:root {
  --ground: #F2F3F0; --surface: #FFFFFF; --sunken: #F7F8F5; --ink: #1B1D1A; --soft: #3E423C; --muted: #5E625B;
  --line: #DADCD6; --line-strong: #C9CCC4; --accent: #2F5D46; --accent-ink: #FFFFFF; --accent-soft: #E6EEE8; --accent-text: #1F4232;
  --warn-bg: #FBF1DF; --warn-ink: #5C3A00; --error-bg: #FBE4E1; --error-ink: #7A1E12; --phone: #1B1D1A; --skeleton: #E3E5DF;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #141614; --surface: #1D201D; --sunken: #191C19; --ink: #EDEFEA; --soft: #CFD3CB; --muted: #A3A89F;
    --line: #333832; --line-strong: #454B44; --accent: #8CC5A6; --accent-ink: #0E1F16; --accent-soft: #24372C; --accent-text: #BFE3CE;
    --warn-bg: #3A2C12; --warn-ink: #F3D59B; --error-bg: #42201B; --error-ink: #F7C2B9; --phone: #000000; --skeleton: #2E332D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #141614; --surface: #1D201D; --sunken: #191C19; --ink: #EDEFEA; --soft: #CFD3CB; --muted: #A3A89F;
  --line: #333832; --line-strong: #454B44; --accent: #8CC5A6; --accent-ink: #0E1F16; --accent-soft: #24372C; --accent-text: #BFE3CE;
  --warn-bg: #3A2C12; --warn-ink: #F3D59B; --error-bg: #42201B; --error-ink: #F7C2B9; --phone: #000000; --skeleton: #2E332D;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.45 Figtree, system-ui, -apple-system, sans-serif; }
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-inner { max-width: 1360px; margin: 0 auto; padding: 14px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.brand { font-size: 18px; font-weight: 700; }
.brand .muted { font-weight: 500; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--soft); font-weight: 500; }
.tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.private { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }

.page { max-width: 1360px; margin: 0 auto; padding: 32px 32px 56px; }
h1 { margin: 0 0 4px; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.lede { margin: 0 0 28px; color: var(--muted); max-width: 680px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; min-width: 0; }
.card h2 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.note { margin: 0; font-size: 14px; color: var(--muted); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; cursor: pointer; }
.button.big { min-height: 52px; border-radius: 14px; font-size: 16px; width: 100%; }
.button.quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); font-weight: 600; }
.button:disabled { opacity: 0.55; cursor: progress; }
.link { min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--accent); font-weight: 600; cursor: pointer; }
.link:hover, .tabs a:hover { background: var(--accent-soft); }
.button:focus-visible, .link:focus-visible, .tabs a:focus-visible, .choice:focus-visible, .focus-picker:focus-visible, .drop:focus-within, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field { min-height: 46px; width: 100%; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); }

/* Sign in */
.signin { max-width: 440px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 14px; }
.signin label { font-weight: 600; }

/* Messages */
.message { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.message.warn { background: var(--warn-bg); color: var(--warn-ink); }
.message.error { background: var(--error-bg); color: var(--error-ink); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--ground); font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,0.25); }

/* Artwork list */
.list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.list-head p { margin: 0; color: var(--muted); max-width: 640px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.art { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.art-image { position: relative; height: 300px; background: #2B3A2E; }
.art-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art.is-hidden .art-image img { opacity: 0.45; }
.badge { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: #FFFFFF; color: #1F4232; font-size: 13px; font-weight: 600; }
.art.is-hidden .badge { background: #3E423C; color: #FFFFFF; }
.art-body { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 2px; }
.art-body h2 { margin: 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.art-body .small { font-size: 13px; color: var(--muted); }
.art-body .number { font-size: 13px; font-weight: 600; color: var(--muted); }
.art-actions { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 8px 10px; margin-top: auto; }
.rename { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rename-actions { display: flex; gap: 6px; }
.add-tile { min-height: 420px; border: 2px dashed var(--line-strong); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; text-decoration: none; color: var(--soft); background: var(--sunken); }
.add-tile strong { font-size: 17px; color: var(--ink); }

/* Add artwork */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 420px; padding: 32px; text-align: center; border: 2px dashed var(--line-strong); border-radius: 18px; background: var(--sunken); color: var(--soft); }
.drop.dragging { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: 19px; color: var(--ink); }
.editor { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.editor > .image-card { flex: 0 1 400px; }
.editor > .look-card { flex: 999 1 460px; }
.editor > .details-card { flex: 1 1 320px; display: flex; flex-direction: column; gap: 22px; }
.focus-picker { display: block; position: relative; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: crosshair; background: #2B3A2E; }
.focus-picker img { display: block; width: 100%; height: auto; }
.marker { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid #FFFFFF; box-shadow: 0 0 0 2px rgba(0,0,0,0.35), 0 4px 14px rgba(0,0,0,0.35); pointer-events: none; }
.marker::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #FFFFFF; }
.file-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.file-line span:first-child { font-weight: 500; overflow-wrap: anywhere; }

.previews { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-items: flex-start; }
.previews figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.previews figcaption { font-size: 14px; font-weight: 600; }
.phone { position: relative; width: 180px; height: 390px; border: 6px solid var(--phone); border-radius: 34px; overflow: hidden; background: #FFFFFF; color: #1B1D1A; }
.phone > img, .today-band img, .tile-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.today-band { position: absolute; left: 0; right: 0; top: 0; height: 168px; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.today-heading { position: absolute; left: 14px; top: 34px; }
.today-heading.on-dark { color: #FFFFFF; text-shadow: 0 1px 6px rgba(0,0,0,0.45); }
.today-heading.on-light { color: #1B1D1A; text-shadow: 0 1px 6px rgba(255,255,255,0.6); }
.today-heading strong { display: block; font-size: 22px; line-height: 1.1; }
.today-heading span { font-size: 10px; font-weight: 500; }
.done-card { position: absolute; left: 10px; right: 10px; top: 104px; padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,0.84); display: flex; align-items: center; gap: 6px; }
.done-card div { flex: 1; min-width: 0; }
.done-card strong { display: block; font-size: 11px; }
.done-card small { font-size: 9px; color: #4A4E47; }
.done-card b { font-size: 9px; color: #FFFFFF; background: #2F5D46; border-radius: 999px; padding: 4px 8px; }
.rows { position: absolute; left: 14px; right: 14px; top: 176px; display: flex; flex-direction: column; gap: 10px; }
.rows .label-row { font-size: 10px; font-weight: 700; color: #5E625B; }
.rows .row { display: flex; align-items: center; gap: 8px; }
.rows .row i { width: 12px; height: 12px; border-radius: 50%; background: #2F5D46; }
.rows .row u { height: 7px; border-radius: 4px; background: #E3E5DF; }
.tile { width: 180px; padding: 10px; border-radius: 22px; background: var(--ground); }
.tile-image { width: 160px; height: 200px; border-radius: 14px; overflow: hidden; }
.tile strong { display: block; margin-top: 8px; font-size: 13px; }
.tile span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.big-number { font-size: 34px; font-weight: 700; letter-spacing: -0.01em; }
fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
legend { padding: 0; margin-bottom: 4px; }
.from-claude { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.choice { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 11px 15px; text-align: left; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; cursor: pointer; }
.choice svg { flex: none; visibility: hidden; }
.choice[aria-pressed="true"] { border: 2px solid var(--accent); padding: 10px 14px; background: var(--accent-soft); font-weight: 600; }
.choice[aria-pressed="true"] svg { visibility: visible; }
.choice.loading { color: var(--muted); cursor: default; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.checks li { display: flex; gap: 10px; }
.checks li svg { flex: none; margin-top: 1px; }
.checks li.warn { padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); }
.checks strong { font-weight: 600; }
.publish { display: flex; flex-direction: column; gap: 8px; }
.publish p { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

@media (max-width: 640px) {
  .bar-inner, .page { padding-left: 16px; padding-right: 16px; }
  .private span { display: none; }
  .page { padding-top: 24px; }
  h1 { font-size: 26px; }
  .previews { gap: 18px; }
}
