
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0f0e0d; --card: #171615; --card-2: #1d1c1a; --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.11);
  --text: #e9e8e7; --muted: #88857f; --blue: #5b78f7; --blue-2: #8ba4f2;
  --red: #f87171; --green: #4ade80;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: rgba(255,255,255,.06); padding: .05rem .35rem; border-radius: .3rem; }
a { color: var(--blue-2); }

#nav { position: fixed; inset: 0 0 auto; z-index: 100; height: 66px; display: flex; align-items: center;
  background: var(--bg); border-bottom: 1px solid rgba(255,255,255,.06); }
.nav-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 2.5rem; }
.nav-logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; flex-shrink: 0; }
.nav-logo img { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(91,120,247,.35); }
.nav-logo-name { font-size: .95rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin-left: 1rem; }
.nav-links a { font-size: .84rem; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; color: var(--text); padding: .4rem; margin-left: auto; }
#mobile-menu { display: none; position: fixed; inset: 66px 0 auto; z-index: 99; background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,.06); padding: 1rem 1.5rem 1.5rem; }
#mobile-menu.open { display: block; }
#mobile-menu a { display: block; padding: .7rem 0; font-size: .95rem; font-weight: 500; color: var(--muted);
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.05); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: none; cursor: pointer;
  font-family: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s, opacity .2s; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .input:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn-sm { font-size: .8rem; padding: .5rem 1rem; border-radius: .5rem; }
.btn-md { font-size: .9rem; padding: .7rem 1.4rem; border-radius: .6rem; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover:not(:disabled) { background: #4a62e8; }
.btn-outline { background: rgba(255,255,255,.04); color: var(--text); border: 1px solid rgba(255,255,255,.1); }
.btn-outline:hover:not(:disabled) { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.page-wrap { position: relative; z-index: 1; padding-top: 66px; }
.page { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem 6rem; display: flex; flex-direction: column; gap: 1.25rem; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.page-head { display: flex; flex-direction: column; gap: .45rem; }
.page-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: #fff; }
.page-sub { color: var(--muted); font-size: .92rem; line-height: 1.6; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: .9rem; padding: 1.4rem; }
.card-danger { border-color: rgba(248,113,113,.22); }
.card h2 { font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.01em; margin-bottom: .35rem; }
.card-head { display: flex; gap: .9rem; align-items: flex-start; }
.card-icon { font-size: 1.3rem; line-height: 1; width: 2.4rem; height: 2.4rem; flex-shrink: 0; display: grid; place-items: center;
  background: var(--card-2); border: 1px solid var(--line); border-radius: .6rem; }
.center-card { text-align: center; max-width: 30rem; margin: 1rem auto; display: flex; flex-direction: column; gap: .9rem; align-items: center; }
.center-card p { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.hint { font-size: .85rem; color: var(--muted); line-height: 1.6; }
.hint.small { font-size: .78rem; }
.row-actions { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; margin-top: 1.1rem; }

.sub { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  margin: 1.5rem 0 .7rem; }
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.area { background: var(--card-2); border: 1px solid var(--line); border-radius: .7rem; padding: .85rem 1rem; }
.area h4 { font-size: .86rem; font-weight: 700; color: #fff; margin-bottom: .4rem; }
.area ul, .kept-group ul, .notes { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.area li, .kept-group li { font-size: .82rem; color: #c9c6c1; line-height: 1.5; padding-left: .9rem; position: relative; }
.area li::before { content: ""; position: absolute; left: 0; top: .6em; width: .35rem; height: .35rem; border-radius: 50%; background: var(--red); opacity: .8; }
.kept-group li::before { content: ""; position: absolute; left: 0; top: .6em; width: .35rem; height: .35rem; border-radius: 50%; background: var(--blue-2); opacity: .8; }

.kept { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem; }
.kept-group { background: var(--card-2); border: 1px solid var(--line); border-radius: .7rem; padding: 0 1rem; }
.kept-group summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem 0; font-size: .88rem; font-weight: 600; color: #fff; }
.kept-group summary::-webkit-details-marker { display: none; }
.kept-group summary::after { content: "+"; color: var(--muted); font-weight: 700; margin-left: .25rem; }
.kept-group[open] summary::after { content: "-"; }
.kept-title { flex: 1; min-width: 0; }
.kept-count { font-size: .72rem; font-weight: 700; color: var(--muted); background: rgba(255,255,255,.05); border-radius: 99px; padding: .1rem .5rem; }
.kept-group .hint { margin-bottom: .6rem; }
.kept-group ul { padding-bottom: .9rem; }

.notes li { font-size: .85rem; color: #c9c6c1; line-height: 1.6; }
.notes strong { color: #fff; }

.confirm { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .55rem; }
.confirm label { font-size: .88rem; font-weight: 600; color: #fff; }
.confirm-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.input { flex: 1 1 12rem; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: .6rem;
  padding: .65rem .85rem; font: inherit; font-size: .95rem; letter-spacing: .08em; }
.input::placeholder { color: #57544f; }

.msg { font-size: .86rem; line-height: 1.55; border-radius: .6rem; padding: .7rem .9rem; margin-top: .9rem; background: var(--card-2);
  border: 1px solid var(--line); color: #d6d3d1; }
.confirm .msg { margin-top: .2rem; }
.msg.ok { border-color: rgba(74,222,128,.28); background: rgba(74,222,128,.06); color: #bbf7d0; }
.msg.err { border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.07); color: #fecaca; }

.foot { text-align: center; margin-top: .5rem; }

@media (max-width: 1024px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 760px) {
  .nav-wrap { padding: 0 1rem; }
}
@media (max-width: 640px) {
  .page { padding: 1.5rem 1rem 5rem; }
  .card { padding: 1.1rem; }
  .area-grid { grid-template-columns: 1fr; }
  .confirm-row .btn { width: 100%; }
  .row-actions .btn { width: 100%; }
}
