/* Aion 2 Checklist
   true-black-flat (tasteskill, seed 1114604490), versão enxuta: chão quente, superfícies separadas só por
   luminosidade, nenhuma linha entre tarefas, dourado só no progresso.
   Grade: coluna de 1152px. Roster 8 × 133.5 + 7 × 12 = 1152. Painel + rail: 784 + 48 + 320 = 1152. */

:root {
  --ground: #0e0d0c;
  --surface: #161513;
  --raised: #22201d;
  --track: #2d2a27;
  --control: #45413c;
  --text: #f2f1ee;
  --muted: #b3ada4;
  --faint: #958f87;
  --accent: #e3bf6b;
  --negative: #ec7a88;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --col: 1152px;
  --gap: 12px;
  --radius-card: 14px;
  --radius-control: 8px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 120ms; --t-hover: 150ms; --t-ui: 200ms;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.5 3 3 6-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 2.5 8 6l-3.5 3.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: var(--radius-control); background: var(--text); color: var(--ground); font-weight: 500; text-decoration: none; }
.skip:focus { top: 8px; }
.col { width: min(var(--col), 100% - 2 * 32px); margin-inline: auto; }
.faint { color: var(--faint); }

/* ---------- topo ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--ground); }
.top-in { display: flex; align-items: center; gap: 40px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.mark { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; }
.nav { display: flex; gap: 28px; }
.nav a { position: relative; display: inline-flex; align-items: center; height: 60px; color: var(--faint); font-weight: 500; text-decoration: none; transition: color var(--t-hover) ease; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }

/* ---------- título ---------- */
main { padding-bottom: 40px; }
main:focus { outline: none; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-top: 32px; margin-bottom: 28px; }
.title-row [hidden] { display: none; }
h1 { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -0.015em; }
.sub { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 22px; }
.sub b { color: var(--text); font-weight: 500; }

.clocks { display: flex; gap: 40px; flex: none; }
.clock { display: grid; gap: 2px; }
.clock dt { color: var(--faint); font-size: 13px; line-height: 18px; }
.clock dd { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- roster ---------- */
.roster { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 40px; }
.roster li { min-width: 0; }
.who { width: 100%; display: grid; gap: 2px; padding: 14px 14px 16px; border: 0; border-radius: var(--radius-card); background: var(--surface); text-align: left; cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.who:hover { background: #1c1a18; }
.who:active { transform: translateY(1px); }
.who[aria-pressed="true"] { background: var(--raised); }
.who-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.who-name { min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-count { flex: none; color: var(--muted); font-size: 13px; }
.who-meta { color: var(--faint); font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .bar { margin-top: 12px; }
.bar { display: block; height: 3px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--t-ui) var(--ease-out); }

/* ---------- painel + rail ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.panel { background: var(--surface); border-radius: var(--radius-card); padding: 24px 24px 20px; min-width: 0; }
.rail { position: sticky; top: 76px; display: grid; gap: 16px; padding-top: 4px; }
.rail h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
.rail section { display: grid; gap: 16px; }
.rail-block { margin-top: 32px; }
.note { color: var(--faint); font-size: 13px; line-height: 19px; }
.link { justify-self: start; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; transition: color var(--t-hover) ease; }
.link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.char-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.char-head h2 { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; }
.char-head p { color: var(--faint); font-size: 13px; line-height: 18px; margin-top: 2px; }

.group { margin-top: 28px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.group-head h2, .group-head h3 { font-size: 15px; line-height: 22px; font-weight: 600; }
.count { color: var(--faint); font-size: 13px; white-space: nowrap; }
.empty { padding: 10px 0; color: var(--faint); }

/* linhas de tarefa */
.task-line { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 28px; align-items: center; column-gap: 14px; min-height: 44px; margin: 0 -10px; padding: 0 6px 0 10px; border-radius: 10px; transition: background-color var(--t-hover) ease; }
.task-line:hover { background: #1c1a18; }
.task-name { min-width: 0; padding: 12px 0; cursor: pointer; font-weight: 500; line-height: 20px; }
.task-sub { color: var(--faint); font-weight: 400; margin-left: 8px; }
.task.done .task-name, .task.done .task-sub { color: var(--faint); }
.task.done .task-name { font-weight: 400; }
.task-meta { color: var(--faint); font-size: 12px; white-space: nowrap; }
.task-meta:empty { display: none; }
.check { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid var(--control); background: transparent; cursor: pointer; display: grid; place-content: center; transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.check::after { content: ""; width: 16px; height: 16px; background: var(--text); -webkit-mask: var(--check) center / 16px no-repeat; mask: var(--check) center / 16px no-repeat; opacity: 0; transform: scale(0.6); transition: transform var(--t-ui) var(--ease-out), opacity var(--t-hover) ease; }
.check:hover { border-color: var(--muted); }
.check:active { transform: scale(0.92); }
.check:checked { background: var(--raised); border-color: var(--raised); }
.check:checked::after { opacity: 1; transform: scale(1); }
.more { width: 28px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--faint); opacity: 0.55; cursor: pointer; display: grid; place-content: center; transition: opacity var(--t-hover) ease, color var(--t-hover) ease; }
.more::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--chevron) center / 12px no-repeat; mask: var(--chevron) center / 12px no-repeat; transform: rotate(90deg); transition: transform var(--t-ui) var(--ease-out); }
.task-line:hover .more, .more:focus-visible, .more[aria-expanded="true"] { opacity: 1; color: var(--text); }
.more[aria-expanded="true"]::before { transform: rotate(-90deg); }
.task-more, .rem-body { display: grid; gap: 8px; max-width: 64ch; color: var(--muted); line-height: 21px; }
.task-more { padding: 2px 0 16px 34px; }
.task-more[hidden] { display: none; }
.task-more b, .rem-body b { color: var(--text); font-weight: 500; }
.srcs { color: var(--faint); font-size: 12px; line-height: 18px; }
.srcs a { color: var(--muted); text-underline-offset: 3px; text-decoration-color: var(--control); transition: color var(--t-hover) ease; }
.srcs a:hover { color: var(--text); }

.tip { margin-top: 24px; color: var(--muted); }
.tip summary, .rem summary { cursor: pointer; list-style: none; }
.tip summary::-webkit-details-marker, .rem summary::-webkit-details-marker { display: none; }
.tip summary { display: inline-block; color: var(--faint); font-size: 13px; transition: color var(--t-hover) ease; }
.tip summary:hover { color: var(--text); }
.tip p { margin-top: 8px; max-width: 64ch; line-height: 21px; }

/* datas e PvP */
.dates { display: grid; gap: 14px; }
.dates li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; }
.d-what b { display: block; font-weight: 400; line-height: 20px; }
.d-what span { display: block; color: var(--faint); font-size: 13px; line-height: 18px; margin-top: 2px; }
.d-when { color: var(--faint); font-size: 13px; white-space: nowrap; }
.dates li.soon .d-when { color: var(--text); font-weight: 500; }
.sched { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
.sched dd { color: var(--faint); font-size: 13px; text-align: right; white-space: nowrap; }

/* ---------- lembretes ---------- */
.rems { margin: 0 -10px; }
.rem summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; align-items: center; gap: 14px; min-height: 44px; padding: 0 10px; border-radius: 10px; transition: background-color var(--t-hover) ease; }
.rem summary::after { content: ""; width: 12px; height: 12px; background: var(--faint); -webkit-mask: var(--chevron) center / 12px no-repeat; mask: var(--chevron) center / 12px no-repeat; transform: rotate(90deg); transition: transform var(--t-ui) var(--ease-out); }
.rem details[open] summary::after { transform: rotate(-90deg); background: var(--text); }
.rem summary:hover { background: #1c1a18; }
.rem-name { min-width: 0; padding: 12px 0; font-weight: 500; }
.rem.done .rem-name, .rem.done .rem-name .task-sub { color: var(--faint); font-weight: 400; }
.rem-body { padding: 6px 10px 20px; }
.marks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 16px; margin-bottom: 8px; }
.marks li { display: flex; align-items: center; gap: 10px; min-height: 36px; min-width: 0; }
.marks label { min-width: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }

/* ---------- ajustes ---------- */
.set-row { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; padding: 28px 0; }
.set-row:first-child { padding-top: 0; }
.set-label h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
.set-label p { margin-top: 4px; color: var(--muted); line-height: 21px; }

.class-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cp { position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius-control); background: var(--surface); color: var(--muted); font-weight: 500; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.cp:hover { color: var(--text); }
.cp input { position: absolute; opacity: 0; pointer-events: none; }
.cp:has(input:checked) { background: var(--text); color: var(--ground); }
.cp:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.char-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
.char-table li { display: grid; grid-template-columns: 104px minmax(0, 1fr) 40px; align-items: center; gap: 12px; }
.ct-class { font-weight: 500; }
.ct-main { color: var(--faint); font-size: 13px; text-align: center; }
.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-control); background: var(--surface); color: var(--text); transition: border-color var(--t-hover) ease; }
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--control); }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.switch { appearance: none; -webkit-appearance: none; justify-self: center; width: 34px; height: 20px; margin: 0; border-radius: 999px; background: var(--control); position: relative; cursor: pointer; transition: background-color var(--t-ui) ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform var(--t-ui) var(--ease-out); }
.switch:checked { background: var(--text); }
.switch:checked::after { transform: translateX(14px); background: var(--ground); }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.end { justify-content: flex-end; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border: 0; border-radius: var(--radius-control); background: var(--raised); color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: #2c2926; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--text); color: var(--ground); }
.btn.primary:hover { background: #ffffff; }
.btn.danger { background: transparent; color: var(--negative); }
.btn.danger:hover { background: #2a1a1d; }
.btn.ghost { height: 32px; padding: 0 10px; background: transparent; color: var(--faint); font-size: 13px; }
.btn.ghost:hover { background: var(--raised); color: var(--text); }
label.btn:has(+ input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.set-row .note { margin-top: 12px; }

/* ---------- rodapé ---------- */
.foot { margin-top: 96px; color: var(--faint); font-size: 13px; line-height: 20px; }
.foot a { color: var(--muted); text-underline-offset: 3px; }

/* ---------- diálogo e toast ---------- */
.chooser { width: min(560px, 100% - 32px); padding: 28px; border: 0; border-radius: var(--radius-card); background: var(--surface); color: var(--text); }
.chooser::backdrop { background: rgba(6, 5, 4, 0.88); }
.chooser h2 { font-size: 22px; line-height: 28px; font-weight: 600; }
.chooser p { margin: 6px 0 20px; color: var(--muted); line-height: 21px; }
.chooser .cp { background: var(--raised); }
.chooser .cp:has(input:checked) { background: var(--text); }
.chooser .btn-row { margin-top: 20px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translate(-50%, 12px); padding: 10px 16px; border-radius: var(--radius-control); background: var(--text); color: var(--ground); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity var(--t-ui) ease, transform var(--t-ui) var(--ease-out); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .roster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
  .set-row { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
  .char-table { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .title-row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .rail { position: static; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* ---------- celular ---------- */
@media (max-width: 720px) {
  .col { width: calc(100% - 2 * 16px); }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .top-in { height: 52px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 0; padding: 0 8px env(safe-area-inset-bottom); background: var(--surface); }
  .nav a { flex: 1; justify-content: center; height: 56px; font-size: 14px; }
  .title-row { padding-top: 16px; margin-bottom: 20px; gap: 16px; }
  h1 { font-size: 24px; line-height: 30px; }
  .clocks { gap: 32px; }
  .clock dd { font-size: 20px; line-height: 26px; }
  .roster { display: flex; gap: 8px; margin: 0 -16px 28px; padding: 0 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  .roster::-webkit-scrollbar { display: none; }
  .roster li { flex: 0 0 132px; scroll-snap-align: start; }
  .panel { padding: 18px 16px 16px; margin-inline: -4px; }
  .task-line { grid-template-columns: 20px minmax(0, 1fr) 32px; margin: 0 -8px; padding: 0 4px 0 8px; }
  .task-meta { grid-column: 2; grid-row: 2; margin: -10px 0 10px; }
  .task-name { padding: 9px 0; }
  .task-sub { display: block; margin: 0; font-size: 13px; line-height: 18px; }
  .more { width: 32px; height: 32px; opacity: 1; }
  .task-more { padding-left: 34px; }
  .rem-name { padding: 9px 0; }
  .rem-name .task-sub { display: block; margin: 0; font-size: 13px; line-height: 18px; }
  .marks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .char-table li { grid-template-columns: 96px minmax(0, 1fr) 40px; }
  .btn { height: 44px; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .foot { margin-top: 64px; }
  .chooser { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
