/* Páginas de alumnos y maestro (papel / foamboard) + lista de propuestas (proyector) */
body.paper {
  background: var(--paper); color: var(--paper-ink); min-height: 100vh;
  background-image:
    linear-gradient(var(--paper-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-2) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
}
.wrap { width: min(100% - 32px, 640px); margin: 0 auto; padding: 18px 0 64px; }

.brand { display: flex; align-items: center; gap: 12px; padding: 6px 0 18px; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-t { margin: 0; font-weight: 800; font-variation-settings: "wdth" 112; font-size: 1.05rem; line-height: 1.1; letter-spacing: -0.01em; }
.brand-s { margin: 2px 0 0; color: var(--paper-ink-2); font-size: .88rem; }

h2.step { font-size: clamp(1.6rem, 6.5vw, 2.2rem); font-weight: 800; font-variation-settings: "wdth" 110; line-height: 1.02; letter-spacing: -0.025em; margin: 8px 0 6px; text-wrap: balance; }
.lead { margin: 0 0 18px; color: var(--paper-ink-2); font-size: 1rem; max-width: 52ch; }

/* lista de elementos para elegir */
.pick { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--paper-line); }
.pick li { border-bottom: 1px solid var(--paper-line); }
.pick button {
  width: 100%; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px;
  padding: 14px 4px; background: none; border: 0; text-align: left; border-radius: 0;
  transition: background .2s;
}
.pick button:hover { background: rgba(255, 255, 255, .7); }
.pick .n { font-size: 2.5rem; font-weight: 850; font-variation-settings: "wdth" 125; line-height: .85; color: var(--c); text-align: center; letter-spacing: -0.04em; }
.pick .nm { display: block; font-weight: 700; font-size: 1.06rem; line-height: 1.15; }
.pick .pc { display: block; color: var(--paper-ink-2); font-size: .9rem; margin-top: 2px; }
.pick .mine { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--c); color: #fff; font-size: .72rem; font-weight: 700; vertical-align: 2px; }
.pick .go { color: var(--paper-ink-2); }

/* bloque del elemento elegido */
.el-head {
  position: relative; overflow: hidden;
  background: var(--c); color: #fff; border-radius: 6px; padding: 20px 20px 22px;
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--c) 80%, #000);
}
.el-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 18px 18px; mask-image: linear-gradient(120deg, transparent 40%, #000);
}
.el-head .top { display: flex; align-items: flex-start; gap: 14px; position: relative; z-index: 1; }
.el-head .n { font-size: 3.6rem; font-weight: 900; font-variation-settings: "wdth" 125; line-height: .78; letter-spacing: -0.05em; }
.el-head h2 { margin: 2px 0 0; font-size: 1.45rem; line-height: 1.05; font-weight: 800; font-variation-settings: "wdth" 104; letter-spacing: -0.015em; text-wrap: balance; }
.el-head .pc { margin: 6px 0 0; font-size: .92rem; opacity: .92; }
.el-head .about { position: relative; z-index: 1; margin: 14px 0 0; font-size: .98rem; line-height: 1.45; }
.ask { margin: 18px 0 4px; font-family: var(--f-hand); font-size: 1.32rem; line-height: 1.3; color: var(--paper-ink); }
.ask::before { content: ""; display: block; width: 46px; height: 3px; border-radius: 2px; background: var(--c); margin-bottom: 10px; }

.back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px -6px; padding: 8px 10px; border: 0; background: none; color: var(--paper-ink-2); font-weight: 600; border-radius: 6px; }
.back:hover { background: rgba(255,255,255,.7); color: var(--paper-ink); }

/* formulario */
.field { display: grid; gap: 6px; margin-top: 18px; }
.field label { font-weight: 700; font-size: .95rem; }
.field .help { color: var(--paper-ink-2); font-size: .85rem; }
.input, .textarea {
  width: 100%; padding: 13px 14px; border-radius: 6px;
  border: 1.5px solid var(--paper-line); background: #fff; color: var(--paper-ink);
  font-size: 1.05rem; transition: border-color .2s, box-shadow .2s;
  caret-color: var(--c, var(--paper-ink));
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus { outline: none; border-color: var(--c, var(--paper-ink)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, #12322a) 18%, transparent); }
.input::placeholder, .textarea::placeholder { color: #6f8a7f; }
.counter { justify-self: end; font-size: .82rem; color: var(--paper-ink-2); font-variant-numeric: tabular-nums; }
.counter.low { color: #a24a0b; }
.err { margin: 12px 0 0; padding: 10px 12px; border-radius: 6px; background: #fde8e6; color: #8a1f17; font-weight: 600; font-size: .95rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--paper-ink); color: #fff; font-weight: 750; font-size: 1.05rem; font-variation-settings: "wdth" 106;
  text-decoration: none; transition: transform .2s var(--ease), background .2s, opacity .2s;
}
.btn:hover { background: #1d4a3c; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.block { width: 100%; margin-top: 22px; }
.btn.ghost { background: transparent; color: var(--paper-ink); box-shadow: inset 0 0 0 1.5px var(--paper-line); }
.btn.ghost:hover { background: #fff; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: .93rem; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* enviado */
.done { text-align: center; padding: 26px 8px 8px; }
.done-mark { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; animation: pop .7s var(--ease) both; }
.done-mark .ico { width: 46px; height: 46px; stroke-width: 2.6; }
.done-mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s var(--ease) forwards; }
.done h2 { margin: 0; font-size: 1.9rem; font-weight: 850; font-variation-settings: "wdth" 112; letter-spacing: -0.02em; }
.done p { margin: 8px auto 0; color: var(--paper-ink-2); max-width: 36ch; }
.done .actions { display: grid; gap: 10px; margin-top: 24px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.closed { margin: 0 0 18px; padding: 12px 14px; border-radius: 6px; background: #fff4d6; color: #5c4203; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }

/* mis propuestas */
.mine-box { margin-top: 40px; }
.mine-box h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; }
.mine-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--paper-line); }
.mine-list li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--paper-line); }
.mine-list .n { font-weight: 850; font-size: 1.4rem; color: var(--c); font-variation-settings: "wdth" 120; line-height: 1; }
.mine-list p { margin: 0; font-size: .95rem; }
.pill { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill.pending { background: #fff1cc; color: #6b4a00; }
.pill.approved { background: #e1f3d8; color: #24561a; }
.pill.rejected { background: #fde3e0; color: #8a1f17; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.foot { margin-top: 36px; font-size: .82rem; color: var(--paper-ink-2); text-align: center; }
.demo-flag { position: fixed; left: 12px; bottom: 12px; z-index: 50; padding: 4px 10px; border-radius: 999px; background: #12322a; color: #ffe08a; font-size: .78rem; font-weight: 700; }

/* ---------------- Maestro ---------------- */
.t-shell { width: min(100% - 32px, 1320px); margin: 0 auto; padding: 18px 0 60px; }
.t-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--paper-line); }
.t-top .links { display: flex; gap: 8px; flex-wrap: wrap; }
.t-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 20px; align-items: start; }
.t-main h2 { margin: 0; font-size: 1.7rem; font-weight: 850; font-variation-settings: "wdth" 110; letter-spacing: -0.02em; }
.seg-ctl { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper-2); margin-top: 14px; }
.seg-ctl button { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-weight: 650; font-size: .93rem; color: var(--paper-ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg-ctl button[aria-pressed="true"] { background: #fff; color: var(--paper-ink); box-shadow: 0 1px 3px rgba(18, 50, 42, .18); }
.seg-ctl .k { font-variant-numeric: tabular-nums; min-width: 1.6em; padding: 0 6px; border-radius: 999px; background: var(--paper-line); font-size: .8rem; color: var(--paper-ink); }
.seg-ctl button[aria-pressed="true"] .k { background: var(--wait); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1.5px solid var(--paper-line); background: #fff; border-radius: 999px; padding: 5px 12px 5px 6px; display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 600; color: var(--paper-ink); }
.chip .d { width: 20px; height: 20px; border-radius: 50%; background: var(--c, var(--paper-ink)); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.chip[aria-pressed="true"] { border-color: var(--c, var(--paper-ink)); background: color-mix(in srgb, var(--c, #12322a) 10%, #fff); }

.plist { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--paper-line); }
.prop { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--paper-line); animation: rise .5s var(--ease) both; }
.prop .n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 850; font-size: 1.25rem; font-variation-settings: "wdth" 120; }
.prop .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: .85rem; color: var(--paper-ink-2); }
.prop .meta b { color: var(--paper-ink); font-weight: 750; font-size: .95rem; }
.prop .txt { margin: 4px 0 0; font-size: 1.06rem; line-height: 1.45; max-width: 70ch; overflow-wrap: anywhere; }
.prop .acts { display: flex; gap: 6px; align-items: center; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; font-weight: 700; font-size: .9rem; transition: background .2s, transform .15s; }
.act:active { transform: scale(.97); }
.act.yes { background: #2f7a1f; color: #fff; }
.act.yes:hover { background: #24641a; }
.act.no { background: transparent; color: #8a1f17; box-shadow: inset 0 0 0 1.5px #e9b7b1; }
.act.no:hover { background: #fde3e0; }
.act.undo { background: transparent; color: var(--paper-ink-2); box-shadow: inset 0 0 0 1.5px var(--paper-line); }
.act.undo:hover { background: #fff; color: var(--paper-ink); }
.act.icon { width: 40px; padding: 0; justify-content: center; background: transparent; color: var(--paper-ink-2); }
.act.icon:hover { background: #fde3e0; color: #8a1f17; }
.prop.leaving { animation: leave .35s var(--ease) both; }
@keyframes leave { to { opacity: 0; transform: translateX(24px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.empty { padding: 40px 10px; text-align: center; color: var(--paper-ink-2); }
.empty strong { display: block; color: var(--paper-ink); font-size: 1.15rem; margin-bottom: 4px; }

.t-side { display: grid; gap: 18px; position: sticky; top: 16px; }
.panel { background: #fff; border: 1px solid var(--paper-line); border-radius: 8px; padding: 18px; }
.panel h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.panel .help { margin: 0 0 12px; color: var(--paper-ink-2); font-size: .86rem; }
.saved { font-size: .78rem; font-weight: 600; color: #2f7a1f; opacity: 0; transition: opacity .3s; }
.saved.on { opacity: 1; }
.goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.goal { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; }
.goal .n { font-weight: 850; font-size: 1.3rem; color: var(--c); font-variation-settings: "wdth" 120; text-align: center; }
.goal .nm { font-weight: 650; font-size: .92rem; line-height: 1.15; }
.goal .bar { height: 5px; border-radius: 3px; background: var(--paper-2); margin-top: 5px; overflow: hidden; }
.goal .bar i { display: block; height: 100%; background: var(--c); border-radius: 3px; transition: width .6s var(--ease); }
.goal .pr { font-size: .78rem; color: var(--paper-ink-2); font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--paper-line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: none; font-size: 1.2rem; font-weight: 700; color: var(--paper-ink); }
.stepper button:hover { background: var(--paper-2); }
.stepper input { width: 42px; height: 34px; border: 0; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 650; }
.switch input { appearance: none; width: 52px; height: 30px; border-radius: 999px; background: var(--paper-line); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked { background: #2f7a1f; }
.switch input:checked::after { transform: translateX(22px); }
.stack { display: grid; gap: 10px; }
.danger { color: #8a1f17; box-shadow: inset 0 0 0 1.5px #e9b7b1; }
.danger:hover { background: #fde3e0 !important; }

/* PIN */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(100%, 380px); background: #fff; border: 1px solid var(--paper-line); border-radius: 10px; padding: 28px 24px; box-shadow: 0 30px 60px -30px rgba(18, 50, 42, .35); }
.gate-card h1 { margin: 12px 0 4px; font-size: 1.6rem; font-weight: 850; font-variation-settings: "wdth" 110; letter-spacing: -0.02em; }
.gate-card p { margin: 0 0 16px; color: var(--paper-ink-2); }
.pin { letter-spacing: .5em; text-align: center; font-size: 1.6rem; font-weight: 800; }

@media (max-width: 980px) {
  .t-grid { grid-template-columns: 1fr; }
  .t-side { position: static; }
  .prop { grid-template-columns: 36px minmax(0, 1fr); }
  .prop .n { width: 36px; height: 36px; font-size: 1.05rem; }
  .prop .acts { grid-column: 2; flex-wrap: wrap; }
}

/* ---------------- Lista de propuestas (proyector) ---------------- */
body.dark { background: var(--mat); color: var(--ink); min-height: 100vh;
  background-image: linear-gradient(rgba(226,240,230,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(226,240,230,.06) 1px, transparent 1px);
  background-size: 48px 48px; background-attachment: fixed; }
.l-shell { width: min(100% - 32px, 1680px); margin: 0 auto; padding: clamp(16px, 2vw, 36px) 0 60px; }
.l-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.l-top h1 { margin: 0; flex: 1; font-size: clamp(1.8rem, 3vw, 3.2rem); font-weight: 850; font-variation-settings: "wdth" 116; letter-spacing: -0.03em; line-height: 1; }
.l-back { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; font-weight: 650; }
.l-back:hover { background: var(--mat-3); }
.l-filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
body.dark .seg-ctl { background: rgba(0,0,0,.22); margin: 0; }
body.dark .seg-ctl button { color: var(--ink-2); font-size: 1rem; }
body.dark .seg-ctl button[aria-pressed="true"] { background: var(--balsa); color: #2a1f0e; }
body.dark .seg-ctl .k { background: rgba(255,255,255,.12); color: var(--ink); }
body.dark .seg-ctl button[aria-pressed="true"] .k { background: rgba(0,0,0,.12); color: #2a1f0e; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { border: 1px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: 999px; padding: 6px 14px 6px 6px; display: inline-flex; gap: 8px; align-items: center; font-weight: 650; font-size: .98rem; }
.tab .d { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--balsa)); color: #fff; font-weight: 850; font-size: .85rem; }
.tab[aria-pressed="true"] { background: var(--c, var(--balsa)); border-color: transparent; color: #fff; }
.tab[aria-pressed="true"] .d { background: rgba(255,255,255,.22); }
.tab.all, .chip[data-el="0"] { padding-left: 14px; }
.tab.all[aria-pressed="true"] { color: #2a1f0e; }
.group { margin-top: clamp(22px, 2.4vw, 40px); }
.group-h { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.group-h .n { font-size: clamp(2.6rem, 4vw, 4.4rem); font-weight: 900; font-variation-settings: "wdth" 125; line-height: .8; color: var(--ink-c); letter-spacing: -0.05em; }
.group-h h2 { margin: 0; font-size: clamp(1.3rem, 2vw, 2.2rem); font-weight: 800; font-variation-settings: "wdth" 104; letter-spacing: -0.02em; }
.group-h .tally { color: var(--ink-2); font-size: clamp(.9rem, 1vw, 1.15rem); }
.group-h .tally b { color: var(--ink); }
.cols { list-style: none; margin: 14px 0 0; padding: 0; columns: 3 360px; column-gap: clamp(20px, 2.4vw, 44px); }
.item { break-inside: avoid; padding: 14px 0 16px; border-top: 1px solid var(--line); }
.item p { margin: 0; font-size: clamp(1.05rem, 1.25vw, 1.45rem); line-height: 1.32; font-weight: 520; text-wrap: pretty; overflow-wrap: anywhere; }
.item .by { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--f-hand); color: var(--ink-2); font-size: clamp(.95rem, 1vw, 1.15rem); }
.item.rejected p { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(232, 70, 59, .7); text-decoration-thickness: 2px; }
.st { font-family: var(--f-ui); font-size: .78rem; font-weight: 750; padding: 2px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.st.approved { background: rgba(93,175,62,.2); color: #b7ec9c; }
.st.pending { background: rgba(227,178,60,.18); color: #ffd98a; }
.st.rejected { background: rgba(232,70,59,.18); color: #ffb0a8; }
.st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
body.dark .empty { color: var(--ink-2); font-size: 1.15rem; }
body.dark .empty strong { color: var(--ink); }
