/* =====================================================================
   LYFE · TASK CARD (the pop-up that opens when you open or create a task)
   Scoped to .modal-sheet.tcard so no other pop-up changes.
   Rules: one margin (24px, 18px on phones) for header, body and footer; sections
   are separated by one hairline, not boxed; a field is ONE filled shape (no
   border on top of a fill); the footer sits inside the rounded sheet.
   Loaded after design.css.
   ===================================================================== */
#active-modal .modal-sheet.tcard{
  --tc-pad:24px;
  width:min(560px,calc(100% - 28px));max-width:560px;max-height:min(88vh,820px);
  margin:auto;border-radius:22px;overflow:hidden;
  display:flex;flex-direction:column;
  border:1px solid var(--gold-line-2);
  background:var(--deco-rule) top/100% 1px no-repeat,linear-gradient(180deg,var(--surface-2),var(--surface) 55%);
  box-shadow:0 30px 80px rgba(0,0,0,.55),0 0 0 1px rgba(0,0,0,.25)}
#active-modal .tcard .modal-head-v2{padding:16px var(--tc-pad) 14px;border-bottom:1px solid var(--gold-line);background:transparent}
#active-modal .tcard .modal-body{padding:8px var(--tc-pad) 6px;flex:1 1 auto;min-height:0}
#active-modal .tcard .modal-body.cs-height-locked{flex-shrink:1;min-height:0}
#active-modal .tcard .modal-foot{
  padding:14px var(--tc-pad) calc(14px + var(--safe-bottom,0px));
  gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap;
  border-top:1px solid var(--gold-line);border-radius:0 0 22px 22px;
  background:color-mix(in srgb,var(--surface) 96%,#000);
  -webkit-backdrop-filter:none;backdrop-filter:none}

/* ---- the sections: flat, one hairline between them ---- */
#active-modal .tcard .tc-sec{padding:20px 0;margin:0;border:0;border-top:1px solid var(--gold-line);background:none;box-shadow:none}
#active-modal .tcard .tc-sec:first-of-type,#active-modal .tcard .tv-breadcrumb+.tc-sec{border-top:0;padding-top:8px}
#active-modal .tcard .tc-sec:last-child{padding-bottom:14px}
#active-modal .tcard .tc-h{margin:0 0 14px!important;font-size:10.5px;font-weight:700;letter-spacing:.2em;color:var(--gold-2)}
#active-modal .tcard .tv-breadcrumb{margin:14px 0 2px;font-size:11.5px;letter-spacing:.02em;color:var(--text-muted)}

/* ---- fields: one filled shape, a clear label above ---- */
#active-modal .tcard .tc-row{display:grid;grid-template-columns:1fr 1fr;gap:14px 12px;margin:0 0 14px}
#active-modal .tcard .tc-row:last-child{margin-bottom:0}
#active-modal .tcard .tc-f{min-width:0}
#active-modal .tcard .tc-f-full{grid-column:1/-1}
#active-modal .tcard .tc-lbl{display:block;margin:0 0 7px;font-size:11.5px;font-weight:500;letter-spacing:.03em;color:var(--text-muted)}
#active-modal .tcard .tc-in,#active-modal .tcard .tc-sel{
  width:100%;height:42px;box-sizing:border-box;padding:0 14px;border-radius:12px;
  border:1px solid transparent;background-color:rgba(255,255,255,.05);color:var(--text);
  font:500 14px var(--font-body,Inter,system-ui,sans-serif);transition:border-color .18s,box-shadow .18s,background-color .18s}
#active-modal .tcard .tc-in:hover,#active-modal .tcard .tc-sel:hover{background-color:rgba(255,255,255,.07)}
#active-modal .tcard .tc-in:focus,#active-modal .tcard .tc-sel:focus{outline:0;border-color:var(--gold-line-2);box-shadow:0 0 0 3px var(--accent-soft);background-color:rgba(255,255,255,.07)}
#active-modal .tcard .tc-sel{-webkit-appearance:none;appearance:none;padding-right:38px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23e9c97c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;background-size:12px}
#active-modal .tcard .tc-in::placeholder{color:var(--text-muted);opacity:.7}
#active-modal .tcard .tc-in[type=date]{color-scheme:dark}
#active-modal .tcard .tc-in[type=number]{-moz-appearance:textfield}

/* the title is the hero of the card: no box, just a line under it */
#active-modal .tcard .tc-sec-title{padding:6px 0 16px;border-top:0}
#active-modal .tcard .tc-sec-title .tc-h{display:none!important}
#active-modal .tcard .tc-title{height:auto;padding:6px 0 10px;border:0;border-radius:0;background:transparent;box-shadow:none;
  font:700 24px/1.25 var(--font-heading,'Space Grotesk',sans-serif);letter-spacing:-.01em}
#active-modal .tcard .tc-title:hover{background:transparent}
#active-modal .tcard .tc-title:focus{box-shadow:0 1px 0 var(--gold-2);background:transparent}

/* tags, priority, recurrence */
#active-modal .tcard .tc-tagrow{grid-template-columns:1fr auto;align-items:end}
#active-modal .tcard .tc-tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:34px}
#active-modal .tcard .tc-toggles{display:flex;align-items:center;gap:14px;padding-bottom:2px}

/* chips: one soft pill, no frame */
#active-modal .tcard .tc-chip,#active-modal .tcard .chip-tag.tc-chip{display:inline-flex;align-items:center;gap:6px;margin:0;padding:5px 6px 5px 12px;border:0;border-radius:999px;
  background:rgba(255,255,255,.07);color:var(--text);font-size:12.5px;line-height:1.2;opacity:1}
#active-modal .tcard .tc-chip-x{display:inline-grid;place-items:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--text-muted);font-size:13px;line-height:1;cursor:pointer;transition:background .15s,color .15s}
#active-modal .tcard .tc-chip-x:hover{background:rgba(255,255,255,.12);color:var(--text)}
#active-modal .tcard .tc-quick{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 13px;border-radius:999px;border:1px solid var(--gold-line-2);background:transparent;color:var(--gold-2);
  font:600 11.5px var(--font-heading,sans-serif);letter-spacing:.04em;cursor:pointer;transition:background .15s,color .15s,border-color .15s}
#active-modal .tcard .tc-quick:hover{background:var(--accent-soft);color:var(--gold-1)}
#active-modal .tcard .tc-wide{width:100%;justify-content:center;height:42px;border-radius:12px;border-style:dashed}
#active-modal .tcard .tc-quickrow{display:flex;gap:6px;margin:0 0 10px}
#active-modal .tcard .tc-quickrow .tc-quick{height:26px;padding:0 11px;font-size:10.5px}

/* dependencies: a label on the left, the action on the right, the value below */
#active-modal .tcard .tc-blocked{margin-top:2px}
#active-modal .tcard .tc-blockedhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px}
#active-modal .tcard .tc-blockedhead .tc-lbl{margin:0}
#active-modal .tcard .tc-chips{display:flex;flex-wrap:wrap;gap:6px}
#active-modal .tcard .tc-empty{font-size:12.5px;color:var(--text-muted)}

/* ---- the other mode (Hoja): same flat language, no box inside a box ---- */
#active-modal .tcard .card-section{padding:20px 0 0;margin:20px 0 0;border:0;border-top:1px solid var(--gold-line);border-radius:0;background:none;box-shadow:none}
#active-modal .tcard .card-section:first-child{padding-top:0;margin-top:0;border-top:0}
#active-modal .tcard .title-input{width:100%;height:auto;padding:6px 0 10px;margin:0 0 6px;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:24px;font-weight:700;line-height:1.25}
#active-modal .tcard .title-input:focus{box-shadow:0 1px 0 var(--gold-2)}
#active-modal .tcard .desc-box{background:rgba(255,255,255,.045);border:1px solid transparent;border-radius:14px;box-shadow:none}
#active-modal .tcard .desc-box:focus-within{border-color:var(--gold-line-2);box-shadow:0 0 0 3px var(--accent-soft)}
#active-modal .tcard .card-action-row{margin:2px 0 14px}
#active-modal .tcard .card-action-row select.tipo-select{border-color:transparent;background-color:rgba(255,255,255,.06)}
#active-modal .tcard .card-section .section-title,#active-modal .tcard .desc-head-row .section-title{margin:0 0 12px!important;font-size:10.5px;letter-spacing:.2em}
#active-modal .tcard .card-section input:not([type=checkbox]):not([type=range]),#active-modal .tcard .card-section textarea{border-color:transparent;background-color:rgba(255,255,255,.05);border-radius:12px}
#active-modal .tcard .card-section input:focus,#active-modal .tcard .card-section textarea:focus{border-color:var(--gold-line-2);box-shadow:0 0 0 3px var(--accent-soft);outline:0}

/* ---- footer buttons ---- */
#active-modal .tcard .modal-foot .btn{height:42px;padding:0 22px;border-radius:999px;font-weight:600;white-space:nowrap}
#active-modal .tcard .modal-foot .btn-ghost{background:transparent;border:1px solid var(--gold-line-2);color:var(--gold-1)}
#active-modal .tcard .modal-foot .btn-ghost:hover{background:var(--accent-soft)}
#active-modal .tcard .modal-foot .btn[data-action="delete-task"]{margin-right:auto;padding:0 14px;border:1px solid transparent!important;color:#ef8a82!important;font-weight:500}
#active-modal .tcard .modal-foot .btn[data-action="delete-task"]:hover{background:rgba(239,138,130,.1)}
#active-modal .tcard .modal-foot .btn-solid{background:var(--th-grad);color:var(--ink);border:0;box-shadow:var(--th-glow)}

@media (max-width:520px){
  #active-modal .modal-sheet.tcard{--tc-pad:18px;width:calc(100% - 20px);max-height:92vh;border-radius:20px}
  #active-modal .tcard .modal-foot{border-radius:0 0 20px 20px}
  #active-modal .tcard .tc-title,#active-modal .tcard .title-input{font-size:21px}
  #active-modal .tcard .tc-row{gap:12px 10px}
}

/* ── Task card: main three + "Más opciones" (24 Nov) ── */
.tc-lbl3{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--text-muted,#9a93a8);margin:12px 0 6px}
.tc-gs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-bottom:12px}
.tc-g{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 2px 5px;border-radius:12px;border:1px solid rgba(233,201,124,.16);background:rgba(255,255,255,.03);color:var(--text,#e8dcc4);font:inherit;font-size:10.5px;line-height:1.1;cursor:pointer;min-width:0}
.tc-g img{width:34px;height:34px;object-fit:contain}
.tc-g span{max-width:100%;white-space:normal;text-align:center;hyphens:auto;-webkit-hyphens:auto;overflow-wrap:break-word;font-size:9.5px;line-height:1.08;min-height:2.16em;display:flex;align-items:center}
.tc-g.on{border-color:#e9c97c;background:rgba(233,201,124,.14);box-shadow:0 0 0 1px #e9c97c inset}
.tc-gs.tc-ask{animation:tcAsk .5s ease}
@keyframes tcAsk{20%,60%{transform:translateX(-5px)}40%,80%{transform:translateX(5px)}}
.tc-more{margin-top:10px;border-top:1px solid rgba(233,201,124,.14)}
.tc-more>summary>span{white-space:nowrap;flex-shrink:0}.tc-more>summary{list-style:none;cursor:pointer;display:flex;align-items:baseline;gap:10px;padding:12px 2px;color:#e9c97c;font-weight:600;font-size:13.5px}
.tc-more>summary::-webkit-details-marker{display:none}
.tc-more>summary::before{content:'›';display:inline-block;transition:transform .2s;font-size:16px}
.tc-more[open]>summary::before{transform:rotate(90deg)}
.tc-more>summary small{font-weight:400;font-size:11.5px;color:var(--text-muted,#9a93a8);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tc-more[open]>summary small{display:none}
@media (min-width:700px){.tc-g img{width:40px;height:40px}.tc-g{font-size:11.5px}}
/* onboarding: the first task card sits above Tizón's story */
body.ob-navfront .modal-overlay{z-index:2147483655!important}
/* Tizón's whispers never sit on top of an open card (they covered «Guardar», 24 Nov) */
body:has(#active-modal) .tzw{opacity:0!important;pointer-events:none!important}
/* one Tizón at a time: while the Arena's own Tizón is speaking, no whisper on top (they said different things, 24 Nov) */
body:has(#view-arena.active .arena-tz-empty) .tzw{display:none!important}
