@layer reset, base, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body, h1, h2, h3, p { margin: 0; }
  button, input, select, textarea { font: inherit; }
  button { cursor: pointer; }
  img, svg { max-width: 100%; }
}

@layer base {
  :root {
    --forest: #17262b; --green: #17616c; --green-dark: #0f4b55; --lime: #d2ad67;
    --cream: #f3eee4; --paper: #fbf8f1; --white: #fffefa; --ink: #1c292e;
    --muted: #69777a; --line: #dcd6ca; --soft: #e7eff0; --warning: #fbf1d9;
    --danger: #98483f; --danger-soft: #f8e8e4; --success: #2c685c; --gold: #b88b3e;
    --shadow: 0 22px 54px rgba(23,38,43,.11); --shadow-sm: 0 8px 25px rgba(23,38,43,.065);
    --radius-sm: 12px; --radius: 20px; --radius-lg: 30px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink); background: var(--cream); font-synthesis: none;
  }
  [hidden] { display: none !important; }
  body { min-width: 320px; min-height: 100vh; min-height: 100dvh; background: radial-gradient(circle at 10% 0%, rgba(210,173,103,.15) 0, transparent 28%), radial-gradient(circle at 92% 8%, rgba(23,97,108,.10) 0, transparent 26%), var(--cream); line-height: 1.55; }
  h1 { font-family: Iowan Old Style, Baskerville, Georgia, serif; font-size: clamp(2rem, 5vw, 3.15rem); font-weight: 600; line-height: 1.02; letter-spacing: -.045em; }
  h1[tabindex="-1"]:focus { outline: none; }
  h2 { font-family: Iowan Old Style, Baskerville, Georgia, serif; font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 600; line-height: 1.18; letter-spacing: -.025em; }
  h3 { font-size: 1rem; line-height: 1.35; letter-spacing: -.01em; }
  a { color: var(--green-dark); }
  button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
  :focus-visible { outline: 3px solid #786d00; outline-offset: 3px; }
  ::selection { background: #ead7b1; color: var(--forest); }
}

@layer components {
  .skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--forest); color: white; padding: 10px 14px; border-radius: 10px; }
  .skip-link:focus { top: 12px; }
  .app-shell { width: min(100%, 1120px); min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: rgba(255,253,248,.98); position: relative; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .topbar { height: 70px; padding: 12px clamp(16px,4vw,36px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(216,224,219,.8); position: sticky; top: 0; background: rgba(255,253,248,.93); backdrop-filter: blur(16px); z-index: 20; }
  .brand { border: 0; background: transparent; color: var(--forest); display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.05rem; padding: 3px; }
  .brand small { font-size: .58rem; letter-spacing: .12em; color: var(--green); vertical-align: top; }
  .brand-mark { width: 39px; height: 39px; border-radius: 14px; background: var(--lime); display: grid; place-items: center; font-size: 1.15rem; }
  .profile-button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--forest); color: #fff; font-weight: 900; }
  .screen { width: 100%; max-width: 920px; margin: auto; padding: clamp(22px,4vw,42px) clamp(16px,4vw,38px) 34px; }
  .screen-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; }
  .screen-head p { max-width: 620px; }
  .eyebrow { color: var(--green); font-size: .72rem; letter-spacing: .14em; font-weight: 900; margin-bottom: 7px; }
  .muted { color: var(--muted); }
  .small { font-size: .82rem; }
  .hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(22px,5vw,38px); background: var(--forest); color: white; box-shadow: var(--shadow); }
  .hero::after { content: "P"; position: absolute; right: -10px; bottom: -60px; color: rgba(217,237,128,.1); font-size: 12rem; font-weight: 950; transform: rotate(-8deg); }
  .hero > * { position: relative; z-index: 1; }
  .hero .eyebrow { color: var(--lime); }
  .hero p:not(.eyebrow) { color: #dce9e4; max-width: 650px; margin-top: 10px; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
  .card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
  .card + .card { margin-top: 12px; }
  .card.interactive { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
  .card.interactive:hover { transform: translateY(-2px); border-color: #a8bab0; box-shadow: var(--shadow); }
  .section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 30px 2px 13px; }
  .section-head h2 { margin: 0; }
  .grid { display: grid; gap: 14px; }
  .grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
  .stat { min-height: 104px; display: flex; flex-direction: column; justify-content: center; }
  .stat strong { display: block; font-size: 1.7rem; line-height: 1; margin-bottom: 7px; }
  .stat span { color: var(--muted); font-size: .78rem; }
  .button { min-height: 46px; border: 1px solid transparent; border-radius: 14px; padding: 11px 17px; font-weight: 850; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
  .button:active { transform: translateY(1px); }
  .button.primary { background: var(--green); color: white; }
  .button.primary:hover { background: var(--green-dark); }
  .button.secondary { background: var(--soft); color: var(--forest); border-color: var(--line); }
  .button.ghost { background: transparent; color: var(--green-dark); border-color: var(--green); }
  .button.danger { background: var(--danger); color: white; }
  .button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
  .button.full { width: 100%; }
  .button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
  .text-button { min-height: 44px; border: 0; background: none; color: var(--green-dark); font-weight: 850; padding: 8px; }
  .icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--forest); font-size: 1.35rem; display: grid; place-items: center; }
  .bottom-nav { position: fixed; bottom: 0; width: min(100%,1120px); height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5,1fr); background: rgba(255,253,248,.96); border-top: 1px solid var(--line); backdrop-filter: blur(18px); z-index: 25; }
  .bottom-nav button { border: 0; background: transparent; color: #71827b; padding: 8px 3px 6px; min-width: 0; }
  .bottom-nav button > span { display: block; height: 25px; font-size: 1.2rem; font-weight: 800; }
  .bottom-nav small { display: block; font-size: .68rem; font-weight: 800; white-space: nowrap; }
  .bottom-nav button.active { color: var(--green-dark); }
  .bottom-nav button.active > span { color: var(--forest); }
  .lesson { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; align-items: center; gap: 14px; }
  .lesson-icon { width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; background: var(--soft); color: var(--green-dark); font-size: 1.45rem; font-weight: 900; }
  .lesson h3 { margin: 3px 0; }
  .lesson-meta { color: var(--muted); font-size: .8rem; }
  .pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; background: var(--soft); color: var(--green-dark); font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
  .pill.success { background: #daf0e6; color: var(--success); }
  .pill.warning { background: var(--warning); color: #6c5900; }
  .progress-track { width: 100%; height: 10px; background: #e5ebe7; border-radius: 99px; overflow: hidden; }
  .progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--green); min-width: 0; }
  .week-strip { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; margin: 18px 0 4px; }
  .week-day { min-width: 0; text-align: center; color: var(--muted); font-size: .68rem; }
  .week-day i { width: 35px; height: 35px; max-width: 100%; margin: 0 auto 5px; border-radius: 50%; display: grid; place-items: center; background: #edf1ee; color: var(--muted); font-style: normal; font-weight: 850; }
  .week-day.done i { background: var(--green); color: white; }
  .week-day.current i { box-shadow: 0 0 0 3px var(--lime); }
  .plan-day { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 14px; position: relative; }
  .day-number { width: 42px; height: 42px; border-radius: 14px; background: var(--forest); color: white; display: grid; place-items: center; font-weight: 900; }
  .plan-day.complete .day-number { background: var(--green); }
  .plan-day .lesson { margin-top: 12px; }
  .adaptation { margin-top: 12px; padding: 12px 14px; border-left: 4px solid var(--lime); border-radius: 0 12px 12px 0; background: #f7f9ed; font-size: .83rem; }
  .form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
  .field { display: grid; gap: 7px; }
  .field.full { grid-column: 1/-1; }
  .field label, legend { font-weight: 800; font-size: .86rem; }
  input, select, textarea { width: 100%; border: 1px solid #aebdb5; border-radius: 13px; background: white; color: var(--ink); padding: 12px 13px; min-height: 46px; }
  textarea { min-height: 100px; resize: vertical; }
  input[aria-invalid="true"], select[aria-invalid="true"] { border: 2px solid var(--danger); }
  .error-text { color: var(--danger); font-size: .78rem; font-weight: 750; }
  fieldset { border: 0; padding: 0; margin: 0; }
  .choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .choice { position: relative; }
  .choice input { position: absolute; opacity: 0; pointer-events: none; }
  .choice label { height: 100%; display: block; border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: white; cursor: pointer; }
  .choice label strong { display: block; margin-bottom: 3px; }
  .choice label span { color: var(--muted); font-size: .8rem; }
  .choice input:checked + label { border: 2px solid var(--green); background: var(--soft); padding: 14px; }
  .choice input:focus-visible + label { outline: 3px solid #786d00; outline-offset: 3px; }
  .check-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
  .check-row input { flex: 0 0 auto; width: 20px; height: 20px; min-height: 0; margin-top: 2px; accent-color: var(--green); }
  .check-row label { font-size: .9rem; }
  .alert { border-radius: 16px; padding: 15px 16px; display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; }
  .alert.warning { background: var(--warning); color: #514500; border: 1px solid #e9d477; }
  .alert.danger { background: var(--danger-soft); color: #6e2b25; border: 1px solid #e1aba5; }
  .alert.info { background: var(--soft); border: 1px solid #c9dacf; }
  .onboarding { max-width: 760px; }
  .onboarding-progress { margin-bottom: 26px; }
  .onboarding-progress div { display: flex; justify-content: space-between; color: var(--muted); font-size: .77rem; margin-bottom: 7px; }
  .welcome-mark { width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center; background: var(--lime); font-size: 2rem; font-weight: 950; margin-bottom: 23px; }
  .feature-list { display: grid; gap: 12px; margin: 26px 0; }
  .feature { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; }
  .feature i { width: 32px; height: 32px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; font-style: normal; font-weight: 900; }
  .timer-wrap { text-align: center; margin: 24px auto; }
  .timer { font-size: clamp(3.2rem,14vw,6rem); font-weight: 950; letter-spacing: -.06em; line-height: 1; color: var(--green-dark); font-variant-numeric: tabular-nums; }
  .timer-status { margin-top: 7px; color: var(--muted); font-weight: 750; }
  .step-card { max-width: 680px; margin: 0 auto; }
  .step-count { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin-bottom: 11px; }
  .step-text { font-size: clamp(1.15rem,3vw,1.45rem); line-height: 1.45; font-weight: 750; min-height: 92px; }
  .session-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
  .result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 18px 0; }
  .result-option { position: relative; }
  .result-option input { position: absolute; opacity: 0; }
  .result-option label { display: grid; min-height: 104px; place-items: center; text-align: center; border: 1px solid var(--line); border-radius: 16px; background: white; font-weight: 850; cursor: pointer; padding: 12px; }
  .result-option label span { display: block; font-size: 1.65rem; }
  .result-option input:checked + label { border: 3px solid var(--green); background: var(--soft); padding: 10px; }
  .result-option input:focus-visible + label { outline: 3px solid #786d00; outline-offset: 2px; }
  .history-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; }
  .result-dot { width: 13px; height: 13px; border-radius: 50%; background: #b48b1e; }
  .result-dot.facil { background: var(--success); }
  .result-dot.dificil { background: var(--danger); }
  .filter-bar { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 9px; margin-bottom: 18px; }
  .library-card { display: flex; flex-direction: column; gap: 13px; }
  .library-card .button { margin-top: auto; }
  .review { padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: .73rem; }
  .empty-state { text-align: center; padding: 38px 18px; border: 1px dashed #aabbb1; border-radius: var(--radius); background: #fcfdfb; }
  .empty-state .empty-icon { width: 58px; height: 58px; border-radius: 20px; background: var(--soft); display: grid; place-items: center; margin: 0 auto 14px; font-size: 1.5rem; }
  .empty-state p { max-width: 460px; margin: 8px auto 18px; color: var(--muted); }
  .demo-banner { display: flex; gap: 10px; align-items: center; border-radius: 14px; padding: 11px 14px; background: var(--warning); border: 1px solid #ead67d; margin-bottom: 18px; font-size: .84rem; font-weight: 750; }
  .coach-profile { display: flex; align-items: center; gap: 14px; }
  .coach-avatar { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; background: var(--forest); color: white; font-size: 1.5rem; font-weight: 900; }
  .settings-list { display: grid; gap: 12px; }
  .setting-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
  .setting-row > div:first-child { flex: 1; }
  .toggle { position: relative; width: 50px; flex: 0 0 50px; }
  .toggle input { opacity: 0; position: absolute; }
  .toggle span { display: block; height: 28px; border-radius: 99px; background: #a7b4ae; position: relative; transition: background .18s; }
  .toggle span::after { content: ""; width: 22px; height: 22px; background: white; border-radius: 50%; position: absolute; left: 3px; top: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .18s; }
  .toggle input:checked + span { background: var(--green); }
  .toggle input:checked + span::after { transform: translateX(22px); }
  .toggle input:focus-visible + span { outline: 3px solid #786d00; outline-offset: 3px; }
  .day-picker { display: flex; gap: 7px; flex-wrap: wrap; }
  .day-picker label { position: relative; }
  .day-picker input { position: absolute; opacity: 0; }
  .day-picker span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #edf1ee; font-size: .77rem; font-weight: 850; cursor: pointer; }
  .day-picker input:checked + span { background: var(--green); color: white; }
  .day-picker input:focus-visible + span { outline: 3px solid #786d00; outline-offset: 2px; }
  dialog { width: min(92vw,520px); max-height: 88vh; border: 0; border-radius: 24px; padding: 0; color: var(--ink); box-shadow: 0 28px 80px rgba(0,0,0,.28); }
  dialog::backdrop { background: rgba(13,28,24,.62); backdrop-filter: blur(4px); }
  .dialog-card { padding: 25px; overflow: auto; }
  .dialog-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; margin-bottom: 16px; }
  .dialog-card > p { margin-top: 10px; }
  .toast-region { position: fixed; right: max(16px,calc((100vw - 1120px)/2 + 16px)); bottom: 92px; z-index: 80; display: grid; gap: 8px; pointer-events: none; }
  .toast { width: min(360px,calc(100vw - 32px)); background: var(--forest); color: white; border-radius: 14px; padding: 13px 16px; box-shadow: var(--shadow); animation: toast-in .22s ease both; }
  .toast.error { background: var(--danger); }
  .toast.success { background: var(--success); }
  .noscript { padding: 20px; background: var(--danger-soft); color: var(--danger); }
  @keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
  @keyframes screen-in { from { opacity: 0; transform: translateY(7px); } }

  /* Premium surface language */
  .app-shell { background: rgba(251,248,241,.985); }
  .topbar { height: 76px; border-color: rgba(184,139,62,.18); background: rgba(251,248,241,.9); }
  .brand { color: var(--forest); letter-spacing: -.02em; }
  .brand small { color: var(--gold); }
  .brand-mark { color: #fff; background: linear-gradient(145deg,#c39b55,#9f7531); box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 5px 14px rgba(159,117,49,.2); }
  .topbar-actions { display: flex; align-items: center; gap: 8px; }
  .topbar-tool { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green-dark); background: rgba(255,254,250,.8); }
  .topbar-tool:hover { color: white; background: var(--green-dark); border-color: var(--green-dark); }
  .topbar-tool svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .profile-button { background: linear-gradient(145deg,#21383e,#112126); box-shadow: 0 5px 15px rgba(23,38,43,.18); }
  .screen { animation: screen-in .3s cubic-bezier(.2,.7,.2,1) both; }
  .screen-head { padding-bottom: 18px; border-bottom: 1px solid rgba(184,139,62,.2); }
  .eyebrow { color: var(--gold); letter-spacing: .17em; }
  .hero { background: linear-gradient(130deg,#17262b 0%,#203a41 65%,#16525b 120%); box-shadow: 0 26px 60px rgba(23,38,43,.2); }
  .hero::after { color: rgba(210,173,103,.09); font-family: Georgia,serif; }
  .hero .eyebrow { color: #e7c989; }
  .card { background: rgba(255,254,250,.92); border-color: rgba(220,214,202,.9); }
  .card.interactive:hover { transform: translateY(-3px); border-color: rgba(184,139,62,.48); }
  .button { border-radius: 999px; letter-spacing: -.01em; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
  .button.primary { background: var(--green-dark); box-shadow: 0 7px 18px rgba(15,75,85,.18); }
  .button.primary:hover { background: #0a3d45; box-shadow: 0 9px 22px rgba(15,75,85,.24); transform: translateY(-1px); }
  .button.secondary { background: #f1eee7; }
  .button.ghost { color: var(--green-dark); border-color: rgba(15,75,85,.5); }
  .hero .button.ghost { color: #f7efe1; border-color: rgba(231,201,137,.62); }
  .text-button { color: var(--green-dark); text-decoration: underline; text-decoration-color: rgba(184,139,62,.55); text-underline-offset: 4px; }
  .bottom-nav { height: calc(76px + env(safe-area-inset-bottom)); background: rgba(251,248,241,.94); border-color: rgba(184,139,62,.22); }
  .bottom-nav button { position: relative; color: #7a8586; }
  .bottom-nav button::before { content:""; position:absolute; top:0; left:50%; width:28px; height:2px; border-radius:2px; background:var(--gold); transform:translateX(-50%) scaleX(0); transition:transform .18s ease; }
  .bottom-nav button.active::before { transform: translateX(-50%) scaleX(1); }
  .bottom-nav button.active { color: var(--green-dark); }
  .bottom-nav button > span { display: grid; place-items: center; }
  .bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .lesson-icon, .action-icon, .empty-state .empty-icon { background: linear-gradient(145deg,#e6eff0,#f2eee4); color: var(--green-dark); }
  .pill { background: #edf1ee; color: #31535a; }
  .progress-track > span { background: linear-gradient(90deg,var(--green-dark),#2f7a83); }
  .week-day.current i { box-shadow: 0 0 0 3px rgba(210,173,103,.65); }
  .adaptation { border-color: var(--gold); background: #faf5e9; }
  input, select, textarea { border-color: #c8c1b5; background: #fffefa; }
  input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(23,97,108,.09); outline: 0; }
  .choice input:checked + label { border-color: var(--green); background: #edf4f4; }
  .action-grid { align-items: stretch; }
  .action-card { width: 100%; display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 15px; text-align: left; align-items: center; border: 1px solid var(--line); color: var(--ink); }
  .action-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; }

  /* Private feedback workflow */
  .privacy-banner { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; padding: 16px 18px; border: 1px solid rgba(23,97,108,.18); border-radius: var(--radius); background: linear-gradient(120deg,#e7f0f0,#f6f1e8); }
  .privacy-banner > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; background: var(--green-dark); color: white; }
  .privacy-banner p { color: var(--muted); font-size: .84rem; margin-top: 2px; }
  .feedback-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 16px; align-items: start; }
  .context-card { position: sticky; top: 94px; }
  .metadata-list { display: grid; gap: 0; margin: 16px 0; }
  .metadata-list div { padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
  .metadata-list dt { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
  .metadata-list dd { margin: 3px 0 0; font-size: .8rem; overflow-wrap: anywhere; }
  .metadata-list.compact { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0; }
  .metadata-list.compact div { border: 0; padding: 10px 12px; border-radius: 12px; background: #f3f0e9; }
  .field-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; }
  .upload-card { display: grid; gap: 14px; }
  .upload-zone { min-height: 126px; display: grid; place-items: center; align-content: center; gap: 3px; border: 1px dashed #9aaeb0; border-radius: 16px; background: #f7f8f5; color: var(--green-dark); text-align: center; cursor: pointer; }
  .upload-zone:hover { border-color: var(--green); background: #edf4f4; }
  .upload-zone > span { font-size: 1.45rem; }
  .upload-zone small { color: var(--muted); }
  .screenshot-preview { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: #f3f0e9; }
  .screenshot-preview img { width: 92px; height: 64px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
  .screenshot-preview small { display: block; color: var(--muted); }
  .consent-card { display: grid; gap: 8px; }
  .feedback-stats .stat:last-child strong { font-size: 1rem; }
  details.feedback-item { padding: 0; overflow: hidden; }
  .feedback-item summary { list-style: none; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 18px; cursor: pointer; }
  .feedback-item summary::-webkit-details-marker { display: none; }
  .feedback-item summary h3 { margin: 6px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .severity-dot { width: 12px; height: 12px; border-radius: 50%; background: #6f959a; box-shadow: 0 0 0 5px rgba(111,149,154,.12); }
  .severity-dot.alta, .severity-dot.bloqueante { background: var(--danger); box-shadow: 0 0 0 5px rgba(152,72,63,.12); }
  .pill.severity.media { background: var(--warning); color: #68551d; }
  .pill.severity.alta, .pill.severity.bloqueante { background: var(--danger-soft); color: var(--danger); }
  .feedback-detail { display: grid; gap: 18px; padding: 0 18px 20px 43px; border-top: 1px solid var(--line); padding-top: 18px; }
  .preserve-lines { white-space: pre-line; }
  .feedback-image { display: block; max-height: 420px; width: auto; border: 1px solid var(--line); border-radius: 14px; margin: 8px 0; }
  .legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 18px; }
  .legal-links.card { margin-top: 18px; padding: 12px; }
  .legal-copy { display: grid; gap: 12px; overflow-wrap: anywhere; }
  .legal-copy h2 { margin-top: 13px; }
  .legal-copy h2:first-child { margin-top: 0; }
  .legal-copy mark { background: #fff0bb; color: #5d4700; padding: 2px 4px; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
  .legal-copy code { overflow-wrap: anywhere; }
}

@layer utilities {
  .sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
  .spacer { height: 16px; }
  .stack { display: grid; gap: 14px; }
  .align-end { text-align: right; }
}

@media (max-width: 760px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar input { grid-column: 1/-1; }
  .screen-head { align-items: start; flex-direction: column; }
  .feedback-layout { grid-template-columns: 1fr; }
  .context-card { position: static; order: -1; }
  .metadata-list.compact { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .form-grid, .choice-grid { grid-template-columns: 1fr; }
  .lesson { grid-template-columns: 48px minmax(0,1fr) auto; gap: 10px; padding: 15px; }
  .lesson-icon { width: 48px; height: 48px; border-radius: 15px; }
  .lesson .button { min-width: 46px; width: 46px; padding: 0; font-size: 0; }
  .lesson .button::after { content: "▶"; font-size: 1rem; }
  .result-grid { grid-template-columns: 1fr; }
  .result-option label { min-height: 66px; grid-template-columns: 38px 1fr; text-align: left; }
  .result-option label span { display: inline; }
  .bottom-nav small { font-size: .62rem; }
  .history-item { grid-template-columns: auto 1fr; }
  .history-item > :last-child { grid-column: 2; }
  .topbar { padding-inline: 14px; }
  .brand > span:last-child { font-size: .92rem; }
  .screen { padding-inline: 14px; }
  .feedback-item summary { grid-template-columns: auto minmax(0,1fr); }
  .feedback-item summary > :last-child { grid-column: 2; justify-self: start; }
  .feedback-detail { padding-left: 18px; }
  .screenshot-preview { grid-template-columns: 72px 1fr; }
  .screenshot-preview img { width: 72px; height: 54px; }
  .screen-head .button { width: 100%; }
  .hero-actions .button, .button-row .button { flex: 1 1 100%; }
  .topbar-actions { gap: 4px; }
  .topbar-tool, .profile-button { width: 44px; height: 44px; }
  .card { padding: 16px; }
  .stats { gap: 8px; }
  .stat { min-height: 94px; }
  .bottom-nav button { min-height: 48px; }
  dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .dialog-card { padding: 20px; }
}
@media (max-width: 370px) {
  .brand { gap: 7px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; }
  .brand > span:last-child { font-size: .82rem; }
  .bottom-nav small { font-size: .58rem; }
  .screen { padding-inline: 12px; }
  .week-strip { gap: 4px; }
  .week-day i { width: 32px; height: 32px; }
}
@media (min-width: 1121px) {
  body { padding: 20px 0; }
  .app-shell { min-height: calc(100vh - 40px); border-radius: 28px; overflow: hidden; box-shadow: 0 0 60px rgba(25,53,45,.13); }
  .bottom-nav { bottom: 20px; border-radius: 0 0 28px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; }
}
html.force-reduced-motion *, html.force-reduced-motion *::before, html.force-reduced-motion *::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; scroll-behavior: auto!important; }
