/*
  DressBoy on the web: a modern look over the desktop app's own markup (renderer/app.js), the
  Daily Games Club's tokens (public/dailygames/dailygames.css). Light or dark follows the device
  (prefers-color-scheme); there's no switch. Responsive from 320 px.
*/

:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --sunken: #eef0f4;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-contrast: #ffffff;
  --accent-text: #4f46e5;
  --good: #067647;
  --good-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --bad: #c01048;
  --bad-soft: #fff1f3;
  --info: #026aa2;
  --info-soft: #f0f9ff;
  --gold: #b54708;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* The desktop app's retro fonts and colours, mapped to this look. */
  --pixel: var(--font);
  --term: var(--font);
  --body: var(--font);
  --green: var(--good);
  --red: var(--bad);
  --cyan: var(--info);
  --purple: #6941c6;
  --muted: var(--text-2);
  --edge: var(--border);
  --edge-hi: var(--border-strong);
  --panel: var(--surface);
  --panel-2: var(--surface-2);
  --bg-2: var(--sunken);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1115;
    --surface: #16181d;
    --surface-2: #1c1f26;
    --sunken: #121418;
    --border: #262a33;
    --border-strong: #343a46;
    --text: #f2f4f7;
    --text-2: #b4bcc8;
    --text-3: #8b93a1;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-soft: rgba(129, 140, 248, .14);
    --accent-contrast: #0f1115;
    --accent-text: #a5b4fc;
    --good: #47cd89;
    --good-soft: rgba(71, 205, 137, .12);
    --warn: #fdb022;
    --warn-soft: rgba(253, 176, 34, .12);
    --bad: #fd6f8e;
    --bad-soft: rgba(253, 111, 142, .12);
    --info: #7cd4fd;
    --info-soft: rgba(124, 212, 253, .12);
    --gold: #fdb022;
    --purple: #b692f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-text-size-adjust: 100%; overflow-x: hidden; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--text-2); font-size: .9rem; margin: .25rem 0 .75rem; }
.small, .small-muted { color: var(--text-3); font-size: .8125rem; }

/* ---------- top bar ---------- */

.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: .6rem max(1rem, env(safe-area-inset-left)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .55rem; flex-shrink: 0; }
.brand-logo { width: 30px; height: 30px; image-rendering: pixelated; }
.screen-title { margin: 0; font-size: 1.15rem; font-weight: 750; letter-spacing: -.01em; }
.nav { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.nav-btn { font: 600 .875rem var(--font); color: var(--text-2); background: none; border: 0; padding: .45rem .7rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.nav-btn:hover { background: var(--surface-2); color: var(--text); }
.nav-btn.active { background: var(--accent-soft); color: var(--accent-text); }
.top-tools { display: flex; gap: .4rem; align-items: center; flex-shrink: 0; }
body.logged-out .nav, body.logged-out .top-tools { display: none; }

.view { padding: 1.25rem max(1rem, env(safe-area-inset-left)) 3rem; max-width: 1480px; margin: 0 auto; }

/* ---------- cards & controls ---------- */

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.1rem 1.15rem; min-width: 0; }
.panel-title { margin: 0 0 .8rem; font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap; }
.panel-head .panel-title { margin: 0; }

.btn { font: 600 .9rem var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .95rem; cursor: pointer; box-shadow: var(--shadow-sm); white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.gold { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { font-size: .82rem; padding: .4rem .7rem; }
.btn.tiny { font-size: .76rem; padding: .28rem .55rem; box-shadow: none; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-row.right { justify-content: flex-end; }
.btn-row.center { justify-content: center; }
.link-btn { background: none; border: 0; color: var(--accent-text); cursor: pointer; font: inherit; padding: 0; }

.input { width: 100%; font: 400 .95rem var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .7rem; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input.narrow { width: 6rem; }
.field-label { display: block; font-size: .78rem; font-weight: 650; color: var(--text-2); margin: .9rem 0 .35rem; text-transform: uppercase; letter-spacing: .03em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.check { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; cursor: pointer; margin-right: .9rem; }

.chip { font: 500 .82rem var(--font); padding: .3rem .65rem; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.chip.ok { color: var(--good); background: var(--good-soft); border-color: transparent; }
.chip.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.chip.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.chip.info { color: var(--info); background: var(--info-soft); border-color: transparent; }
.chip-btn { cursor: pointer; }
.chip-btn:hover { color: var(--text); border-color: var(--border-strong); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.notes .chip, .chips .chip { white-space: normal; max-width: 100%; }
.tag { font: 700 .66rem var(--font); letter-spacing: .05em; padding: .2rem .4rem; border-radius: 6px; background: var(--surface-2); color: var(--text-3); }

.swatch { display: inline-block; width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); position: relative; overflow: hidden; vertical-align: middle; }
.swatch.sm { width: 16px; height: 16px; border-radius: 4px; }
.swatch.lg { width: 42px; height: 42px; border-radius: 10px; }
.swatch .acc { position: absolute; right: 0; top: 0; bottom: 0; width: 30%; }
.swatch .acc + .acc { right: 30%; }

/* ---------- banners ---------- */

.banner { display: flex; align-items: center; gap: .8rem; padding: .6rem max(1rem, env(safe-area-inset-left)); font-size: .9rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.banner .grow { flex: 1; min-width: 14rem; }
.banner.remap { background: var(--warn-soft); color: var(--warn); }
.banner.trip { background: var(--info-soft); color: var(--info); }
.banner.log { background: var(--good-soft); color: var(--good); }

/* ---------- login ---------- */

.login-wrap { padding: 2rem 1rem 4rem; }
.login { max-width: 760px; margin: 0 auto; text-align: center; }
.login.card { max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 1.6rem; text-align: left; }
.login-head h1, .login h1 { font-size: 1.5rem; margin: .4rem 0 .2rem; letter-spacing: -.02em; }
.login-logo { width: 56px; height: 56px; image-rendering: pixelated; }
.who-search { max-width: 340px; margin: 1rem auto; display: block; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; margin-top: .5rem; }
.who { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .9rem .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font: 600 .9rem var(--font); color: var(--text); box-shadow: var(--shadow-sm); }
.who:hover { border-color: var(--accent); }
.face { display: inline-grid; place-items: center; border-radius: 50%; background: var(--c, var(--accent)); color: #fff; font-weight: 700; object-fit: cover; flex-shrink: 0; }
.face.xl { width: 56px; height: 56px; font-size: 1.4rem; }
.face.lg { width: 48px; height: 48px; font-size: 1.2rem; }
.who-line { display: flex; gap: .8rem; align-items: center; }
.who-line h1 { margin: 0; font-size: 1.3rem; }
.who-line .muted { margin: 0; }
.code-input { font-size: 1.3rem; letter-spacing: .3em; text-align: center; }
.login-error { color: var(--bad); min-height: 1.2em; font-size: .9rem; margin: .4rem 0; }

/* ---------- dressboy.app: sign up / log in, account panel (web/app/app-api.js) ---------- */

.auth { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; min-height: calc(100vh - 9rem); }
.auth-brand { display: none; } /* the top bar already says DressBoy */
.auth-logo { width: 44px; height: 44px; image-rendering: pixelated; }
.auth-hero h1 { font-size: clamp(1.85rem, 4.2vw, 2.9rem); line-height: 1.08; letter-spacing: -.035em; margin: 1.1rem 0 .8rem; }
.auth-lede { font-size: 1.05rem; color: var(--text-2); margin: 0 0 1.3rem; max-width: 34rem; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.auth-points li { display: flex; gap: .7rem; align-items: flex-start; color: var(--text-2); }
.auth-points b { color: var(--text); }
.auth-ico { flex-shrink: 0; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-soft); }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 1.5rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; background: var(--sunken); border-radius: var(--radius); margin-bottom: .4rem; }
.auth-tabs button { font: 650 .92rem var(--font); color: var(--text-2); background: transparent; border: 0; border-radius: var(--radius-sm); padding: .55rem; cursor: pointer; }
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-h { font-size: 1.2rem; margin: .2rem 0 .3rem; letter-spacing: -.01em; }
.auth-flash { border-radius: var(--radius-sm); padding: .55rem .75rem; font-size: .9rem; margin: 0 0 .8rem; }
.auth-flash.ok { background: var(--good-soft); color: var(--good); }
.auth-flash.bad { background: var(--bad-soft); color: var(--bad); }
.auth-card .small-muted { margin: .4rem 0 0; }
.btn.wide { width: 100%; padding: .7rem; font-size: .95rem; }
.center { text-align: center; }
.auth-card p.center { margin: .8rem 0 0; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 4rem; }
.pw-show { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: .82rem; }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-card { order: -1; }
  .auth-hero h1 { margin-top: .6rem; }
  .auth-hero .auth-brand { display: none; }
}
.sheet-box { width: min(640px, 100%); }
.sheet-h { font-size: .95rem; margin: 1.2rem 0 .2rem; }
.acct-who { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.acct-who .muted { margin: 0; }
/* dressboy.app: the 👤 menu */
.acct-menu { position: fixed; z-index: 330; min-width: 230px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .35rem; display: flex; flex-direction: column; }
.acct-menu-who { display: flex; flex-direction: column; gap: .1rem; padding: .45rem .65rem .6rem; margin-bottom: .3rem; border-bottom: 1px solid var(--border); font-size: .9rem; min-width: 0; }
.acct-menu-who span { color: var(--text-3); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu button { text-align: left; background: none; border: 0; border-radius: var(--radius-sm); padding: .55rem .65rem; font: 500 .92rem var(--font); color: var(--text); cursor: pointer; }
.acct-menu button:hover, .acct-menu button:focus-visible { background: var(--surface-2); }
.acct-menu hr { border: 0; border-top: 1px solid var(--border); margin: .3rem 0; }
.acct-panel .acct-who { margin-bottom: .2rem; }
.save-state[data-state="saved"] { color: var(--good); }
.save-state[data-state="offline"] { color: var(--bad); }
.danger-zone { margin-top: .6rem; padding-top: .2rem; border-top: 1px solid var(--border); }
#sheet { z-index: 320; }

/* Add from a photo (the piece editor, dressboy.app only) */
.photo-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; padding: .75rem .85rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); margin-bottom: .4rem; }
.photo-row .small-muted { flex: 1; min-width: 14rem; }
.photo-result { display: flex; gap: .8rem; align-items: center; margin: .6rem 0 .2rem; font-size: .9rem; color: var(--text-2); }
.photo-result img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); flex-shrink: 0; }
.photo-result.bad { color: var(--bad); }
.photo-result b { color: var(--text); }
.photo-suggest { display: flex; flex-direction: column; gap: .5rem; padding: .7rem .85rem; margin-bottom: .5rem; border-radius: var(--radius); background: var(--info-soft); color: var(--text-2); font-size: .9rem; }
.photo-suggest b { color: var(--text); }

/* Add from photos, many at once */
.bulk-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: .2rem 0 .8rem; }
.bulk-progress { flex: 1; min-width: 10rem; height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.bulk-progress span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.bulk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; max-height: 55vh; overflow: auto; padding-right: 2px; }
.bulk-card { display: grid; grid-template-columns: auto 52px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem .55rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.bulk-card img, .bulk-ph { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; display: grid; place-items: center; background: var(--sunken); }
.bulk-card.reading { border-color: var(--accent); }
.bulk-card.error { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.bulk-card .h-name { display: flex; align-items: flex-start; gap: .4rem; font-weight: 650; font-size: .9rem; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.bulk-card .h-name .swatch { flex-shrink: 0; }
.bulk-card .small-muted { margin-top: .15rem; }
.bulk-card .chip { font-size: .7rem; padding: .05rem .4rem; }
.bulk-acts { display: flex; gap: .25rem; }
.bulk-n { font-size: .75rem; font-weight: 700; color: var(--text-3); min-width: 1.3rem; text-align: right; }
.bulk-err { color: var(--bad); font-size: .85rem; }

/* ---------- today ---------- */

.day-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.day-nav { display: flex; align-items: center; gap: .5rem; }
.day-title { font-size: 1.15rem; font-weight: 750; min-width: 8.5rem; text-align: center; }
.day-title small { display: block; font-size: .78rem; font-weight: 500; color: var(--text-3); }
.wx { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .9rem; color: var(--text-2); }
.wx .wx-icon { font-size: 1.4rem; }
.wx .wx-temp { color: var(--text); font-size: 1.3rem; font-weight: 750; }
.mode-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.mode-tab { font: 650 .9rem var(--font); padding: .55rem .9rem; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: .4rem; }
.mode-tab .k { display: none; }
.mode-tab:hover { color: var(--text); border-color: var(--border-strong); }
.mode-tab.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.mode-tab .star { color: var(--warn); }
.mode-tab.active .star, .mode-tab.active .worn { color: inherit; }
.mode-tab .worn { color: var(--good); }

.day-main { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.avatar-panel { display: flex; flex-direction: column; align-items: center; gap: .9rem; background: radial-gradient(ellipse at 50% 30%, var(--surface-2), var(--surface) 70%); }
.avatar { image-rendering: pixelated; }
.mannequin { max-width: 100%; height: auto; }
.story { text-align: center; font-size: .95rem; font-weight: 600; }
.story .kind { display: block; font-size: .72rem; font-weight: 700; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .2rem; }
.story .split { display: block; color: var(--text-2); font-weight: 400; font-size: .85rem; }
.story-strip { display: flex; gap: 2px; width: 100%; height: 14px; }
.story-strip span { flex: 1; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }

.toggles { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.toggle { font: 650 .78rem var(--font); padding: .35rem .65rem; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; }
.toggle.on { color: var(--good); background: var(--good-soft); border-color: transparent; }
.toggle .auto { font-size: .66rem; color: var(--info); }
.toggle .tick { width: 1.05rem; height: 1.05rem; display: inline-grid; place-items: center; border: 1.5px solid var(--border-strong); border-radius: 4px; background: var(--surface); font-size: .72rem; line-height: 1; color: #fff; }
.toggle .tick { color: var(--text-3); }
.toggle.on .tick { background: var(--good); border-color: var(--good); color: #fff; }
.toggle-why { font-size: .82rem; color: var(--text-3); margin: 0 0 .8rem; }
.gear { display: flex; flex-direction: column; gap: .4rem; }
.gear-row { display: grid; grid-template-columns: 2.6rem 42px minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .5rem .6rem; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius); }
.gear-row .tag { text-align: center; }
.gear-row .g-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-row .g-sub { font-size: .8rem; color: var(--text-3); }
.gear-row.missing { background: transparent; border: 1px dashed var(--border-strong); }
.gear-row.missing .g-name { font-weight: 400; color: var(--text-3); font-style: italic; white-space: normal; }
.gear-row.forced { border-color: var(--purple); }
.notes { display: flex; flex-wrap: wrap; gap: .35rem; margin: .9rem 0; }
.rules-box { margin: .9rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.rules-box summary { cursor: pointer; padding: .55rem .8rem; font-size: .78rem; font-weight: 650; letter-spacing: .03em; color: var(--text-2); border-radius: var(--radius); }
.rules-box summary:hover { color: var(--text); }
.rules-box[open] summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.rules-list { margin: 0; padding: .55rem .9rem .7rem 2rem; font-size: .9rem; color: var(--text-2); }
.rules-list li { margin: .2rem 0; }
.day-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .9rem; }
.worn-badge { font-weight: 700; color: var(--good); }

/* ---------- 7 days ---------- */

.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .8rem; }
.day-card { cursor: pointer; display: flex; flex-direction: column; gap: .45rem; padding: .85rem .75rem; transition: transform .12s, box-shadow .12s; }
.day-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.day-card.today { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.dc-day { font-weight: 750; display: flex; justify-content: space-between; align-items: center; }
.dc-date, .dc-story { font-size: .8rem; color: var(--text-3); }
.dc-wx { font-size: .85rem; color: var(--text-2); }
.dc-wx b { color: var(--text); }
.dc-modes { display: flex; gap: 3px; }
.dc-mode { flex: 1; font: 650 .66rem var(--font); padding: .3rem 0; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); border-radius: 6px; cursor: default; text-align: center; }
button.dc-mode { cursor: pointer; }
.dc-mode.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.dc-avatar { display: flex; justify-content: center; }
.dc-list { display: flex; flex-direction: column; gap: .2rem; }
.dc-item { display: flex; gap: .4rem; align-items: center; font-size: .78rem; line-height: 1.2; }
.dc-badges { display: flex; gap: .25rem; flex-wrap: wrap; }

/* ---------- wardrobe ---------- */

.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .input { width: min(100%, 18rem); }
.filter { font: 650 .8rem var(--font); padding: .35rem .7rem; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.filter.active { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.slot-section { margin-bottom: 1.3rem; }
.slot-section h3 { font-size: .8rem; font-weight: 700; color: var(--text-3); margin: 0 0 .5rem; letter-spacing: .06em; text-transform: uppercase; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.tile { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: .65rem; align-items: center; padding: .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--text); font: inherit; box-shadow: var(--shadow-sm); }
.tile:hover { border-color: var(--border-strong); }
.tile.remap { border-color: var(--warn); }
.tile.off { opacity: .55; }
.tile .t-name { font-weight: 650; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .t-sub, .tile .t-state { font-size: .78rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-state.dirty { color: var(--bad) !important; }
.t-state.near { color: var(--warn) !important; }
.t-state.clean { color: var(--good) !important; }

.chart { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 .5rem; }
.chart-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chart-col.c2 { padding-top: 32px; }
.chart-col.c3 { padding-top: 46px; }
.cc { position: relative; display: flex; align-items: center; justify-content: center; height: 24px; border: 0; border-radius: 5px; cursor: pointer; font: 600 .74rem var(--font); overflow: hidden; white-space: nowrap; }
.cc:hover { outline: 2px solid var(--text); z-index: 1; }
.cc.sel { outline: 3px solid var(--accent); z-index: 2; }
.cc.sel::after { content: '✓'; position: absolute; right: 6px; }
.cc.guess { outline: 2px dashed var(--warn); z-index: 1; }
.cc .role { position: absolute; left: 5px; font-size: .6rem; opacity: .75; }
.chart.compact .cc { height: 21px; font-size: .7rem; }

/* ---------- hampers, vacation ---------- */

/* Hampers stacked full width, each one's pieces side by side across it, names in full. */
/* A hamper's title, with its ✎ (edit) right after the count. */
.ph-title { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.btn.pencil { padding: .2rem .45rem; line-height: 1; }
/* WASHED / WASHED ALL (and the shoe bin's and cleaners' buttons): sky blue. */
.btn.wash { background: #8fd0f5; border-color: #5fb6e8; color: #0b3550; }
.btn.wash:hover { background: #6fc1f0; border-color: #3fa3df; color: #08283d; }
.hamper-grid { display: flex; flex-direction: column; gap: 1rem; }
.hamper-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: .45rem; }
.hamper-set { margin-bottom: .8rem; }
.hamper-swatches { display: flex; flex-wrap: wrap; gap: 3px; margin: .4rem 0 .2rem; }
.hamper-set .chart { margin-top: .4rem; }
.h-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem .55rem; background: var(--surface-2); border-radius: var(--radius-sm); }
/* Names on one line (a card is wide enough for most); on a phone they wrap rather than be cut off. */
.h-item .h-name { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-item.wide { grid-column: span 2; }
@media (max-width: 600px) { .h-item .h-name { white-space: normal; overflow-wrap: anywhere; } .h-item.wide { grid-column: auto; } }
.h-item .h-sub { font-size: .76rem; color: var(--text-3); }
.supply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; font-size: .9rem; max-width: 420px; }
.empty { font-size: .9rem; color: var(--text-3); padding: .4rem 0; }
.vac { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.trip-list { display: flex; flex-direction: column; gap: .4rem; }
.trip-btn { text-align: left; padding: .6rem .7rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); cursor: pointer; font: inherit; }
.trip-btn.active { border-color: var(--accent); background: var(--accent-soft); }
.trip-btn .tb-name { font-weight: 650; }
.trip-btn .tb-sub { font-size: .8rem; color: var(--text-3); }
.trip-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; }
.trip-day { display: flex; flex-direction: column; gap: .3rem; padding: .45rem .55rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.trip-day .td-date { font-size: .85rem; font-weight: 600; }
.pack-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .35rem .9rem; }
.pack-item { display: flex; gap: .45rem; align-items: center; font-size: .88rem; }
.pack-item .n { font-weight: 700; color: var(--accent-text); min-width: 1.8rem; }
.trip-outfits { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.trip-outfit { padding: .5rem; background: var(--surface-2); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.big-num { font-size: 1.8rem; font-weight: 800; color: var(--accent-text); }

/* ---------- color rules, settings ---------- */

.rules-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.rule { padding: .65rem 0; border-bottom: 1px solid var(--border); }
.rule:last-child { border-bottom: 0; }
.rule b { display: block; font-size: .85rem; color: var(--accent-text); margin-bottom: .2rem; }
.rule p { margin: 0; color: var(--text-2); font-size: .9rem; }
.matrix-wrap, .matrix { max-width: 100%; }
.matrix { border-collapse: separate; border-spacing: 2px; font-size: .85rem; }
.matrix th, .matrix td { min-width: 32px; height: 32px; text-align: center; border-radius: 5px; }
.matrix th { font-size: .62rem; color: var(--text-3); font-weight: 650; }
.matrix th .swatch { display: block; margin: 0 auto 2px; }
.matrix td.blend { background: var(--good-soft); color: var(--good); }
.matrix td.split { background: var(--warn-soft); color: var(--warn); }
.matrix td.clash { background: var(--bad-soft); color: var(--bad); }
.legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .82rem; margin-top: .6rem; align-items: center; }
.legend > span { display: inline-flex; align-items: center; gap: .3rem; }
.checker { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.verdict { margin-top: .8rem; padding: .8rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 1rem; align-items: start; }
.temp-table { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: .35rem .7rem; align-items: center; font-size: .9rem; }
.temp-mode { grid-column: 1 / -1; font-size: .78rem; font-weight: 700; color: var(--text-3); margin-top: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.place-results { display: flex; flex-direction: column; gap: .3rem; margin-top: .5rem; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px; flex-wrap: wrap; }
.seg button { font: 650 .8rem var(--font); padding: .35rem .75rem; background: none; color: var(--text-2); border: 0; border-radius: 999px; cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- stats ---------- */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.stat { padding: .8rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.stat-num { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.stat-label { font-size: .72rem; font-weight: 700; color: var(--text-3); letter-spacing: .05em; text-transform: uppercase; margin: .15rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; align-items: start; }
.bars { display: flex; flex-direction: column; gap: 2px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr) 2.6rem; gap: .6rem; align-items: center; padding: 3px 0; }
.bar-label { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: .35rem; }
.bar-track { height: 12px; display: flex; }
.bar { height: 100%; border-radius: 0 4px 4px 0; }
.bar.light { box-shadow: inset 0 0 0 1px var(--border-strong); }
.bar-row:hover .bar { filter: brightness(1.08); }
.bar-val { font-size: .85rem; text-align: right; font-variant-numeric: tabular-nums; }
.stack { display: flex; gap: 2px; height: 16px; }
.stack.tall { height: 30px; }
.stack span { min-width: 3px; }
.stack span:first-child { border-radius: 4px 0 0 4px; }
.stack span:last-child { border-radius: 0 4px 4px 0; }
.color-cal { display: grid; grid-template-columns: repeat(42, 1fr); gap: 2px; height: 110px; }
.cal-day { display: flex; flex-direction: column; gap: 1px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.cal-day span { flex: 1; }
.cal-axis { display: flex; justify-content: space-between; font-size: .76rem; color: var(--text-3); margin-top: .25rem; }

/* ---------- modal, toast, tooltip ---------- */

.modal { position: fixed; inset: 0; z-index: 300; background: rgba(16, 24, 40, .45); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-box { width: min(760px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-box.wide { width: min(980px, 100%); }
.modal-foot { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.swap-list { display: flex; flex-direction: column; gap: .35rem; max-height: 60vh; overflow: auto; }
.swap-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .5rem .6rem; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.swap-item:hover { border-color: var(--accent); }
.swap-item.bad { opacity: .55; }
.swap-item .why { font-size: .78rem; color: var(--text-3); }
.toast { position: fixed; bottom: max(1rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 400; font-size: .9rem; padding: .6rem 1rem; background: var(--text); color: var(--bg); border-radius: 999px; box-shadow: var(--shadow-lg); max-width: calc(100% - 2rem); }
.tip { position: fixed; z-index: 500; pointer-events: none; max-width: 340px; padding: .4rem .6rem; font-size: .8rem; background: var(--text); color: var(--bg); border-radius: 6px; box-shadow: var(--shadow-md); }

/* ---------- small screens ---------- */

@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; }
  .nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 900px) {
  .day-main, .vac, .rules-grid { grid-template-columns: minmax(0, 1fr); }
  .avatar-panel .mannequin { width: 200px; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: .15rem; }
  .nav-btn { font-size: .74rem; padding: .4rem .2rem; text-align: center; white-space: normal; }
  .field-row, .field-row.three, .checker { grid-template-columns: minmax(0, 1fr); }
  .gear-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .gear-row .tag { display: none; }
  .gear-row .swatch.lg { width: 34px; height: 34px; }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .chart .cc { font-size: .6rem; }
  .color-cal { height: 80px; }
  .matrix th, .matrix td { min-width: 24px; height: 26px; }
  .day-title { min-width: 0; }
  .bar-row { grid-template-columns: minmax(80px, 40%) minmax(0, 1fr) 2.2rem; }
}

/* ---------- setup (first-run tutorial) ---------- */

.setup { max-width: 860px; margin: 0 auto; }
.steps { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.step { width: 2rem; height: 2rem; border-radius: 50%; font: 700 .8rem var(--font); background: var(--surface); color: var(--text-3); border: 1px solid var(--border-strong); cursor: pointer; }
.step.done { background: var(--good-soft); color: var(--good); border-color: transparent; }
.step.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.setup-card { padding: 1.4rem 1.5rem; }
.setup-card .panel-title { font-size: 1.35rem; margin-top: .2rem; }
.setup-card p { color: var(--text-2); }
.setup-list { padding-left: 1.2rem; color: var(--text-2); line-height: 1.6; }
.setup-list b { color: var(--text); }
.setup-foot { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.setup-split { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 1rem; align-items: start; }
.setup-figure { display: flex; justify-content: center; padding-top: 1.5rem; }
.setup-temps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: .3rem 1.6rem; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: .6rem; margin: .9rem 0; }
.option { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .9rem .6rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; font: inherit; box-shadow: var(--shadow-sm); }
.option .opt-emoji { font-size: 1.8rem; }
.option span:last-child { font-size: .8rem; color: var(--text-3); }
.option:hover { border-color: var(--border-strong); }
.option.active { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
@media (max-width: 600px) {
  .setup-split { grid-template-columns: minmax(0, 1fr); }
  .setup-figure { display: none; }
  .setup-card { padding: 1.1rem; }
}

/* The colour-family table on phones: swatches for headers (names on hover / long-press), and a
   scroll box of its own as a last resort (never the page). Wide screens: the week in 7 columns. */
.matrix-wrap { max-width: 100%; overflow-x: auto; }
@media (max-width: 480px) {
  .matrix .mx-name { display: none; }
  .matrix th, .matrix td { min-width: 22px; height: 24px; font-size: .78rem; }
  .matrix { border-spacing: 2px; }
}
@media (min-width: 1200px) {
  .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* Phones: the header scrolls away with the page (it's two rows of tabs) and banners stay compact,
   so the outfit gets the screen. */
@media (max-width: 600px) {
  .topbar { position: static; padding-top: .5rem; padding-bottom: .5rem; }
  .banner { font-size: .8rem; padding: .45rem 1rem; gap: .5rem; }
  .banner .grow { min-width: 0; flex-basis: calc(100% - 2rem); }
  .banner .btn { font-size: .75rem; padding: .3rem .6rem; }
  .modal { align-items: flex-start; padding: .6rem; }
  .modal-box { max-height: calc(100vh - 1.2rem); }
}

/* Settings: tabs, and sections that open and close */
.set-tabs { margin-bottom: 1rem; }
.set-list { display: flex; flex-direction: column; gap: .6rem; max-width: 980px; }
.set-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.set-sec > summary { display: flex; align-items: baseline; gap: .5rem .8rem; flex-wrap: wrap; padding: .9rem 1.1rem; cursor: pointer; list-style: none; border-radius: var(--radius-lg); }
.set-sec > summary::-webkit-details-marker { display: none; }
.set-sec > summary::before { content: '▸'; color: var(--text-3); display: inline-block; transition: transform .15s; }
.set-sec[open] > summary::before { transform: rotate(90deg); }
.set-sec > summary:hover { background: var(--surface-2); }
.set-sec[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.set-title { font-weight: 700; font-size: 1rem; }
.set-body { padding: .3rem 1.1rem 1.1rem; min-width: 0; }
.look-row { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.look-preview { flex-shrink: 0; }
.days-pick { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin: .4rem 0; }

/* Your week: an outfit-type checkbox per day */
.week-plan { display: grid; grid-template-columns: minmax(6rem, 1fr) repeat(5, minmax(3.2rem, auto)); gap: .3rem .6rem; align-items: center; max-width: 560px; margin: .4rem 0 .8rem; }
.week-plan > .small-muted { text-align: center; font-size: .68rem; font-weight: 650; letter-spacing: .02em; }
.wp-cell { display: flex; justify-content: center; }
.wp-cell input { width: 1.1rem; height: 1.1rem; }
/* TODAY → + ADD: a row per outfit type */
.dm-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.dm-row .tag { min-width: 8.5rem; font-weight: 700; font-size: .82rem; }
/* Trips: each day's weather */
.td-wx { font-size: .82rem; color: var(--text-2); }
.trip-day { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
/* Dry cleaning kinds */
.dc-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .1rem .8rem; }
/* Settings → Temperatures: rules in words */
.temp-rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.temp-rules .temp-mode { font-size: .78rem; font-weight: 700; color: var(--text-2); letter-spacing: .03em; margin-bottom: .3rem; }
.temp-rule { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.unit-input { display: inline-flex; align-items: center; gap: .35rem; }
.unit-input .input { width: 5.5rem; }

/* The piece editor: its yes/no tags on one line, and when a holiday piece is worn. */
.edit-flags { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .7rem; }
.holiday-hint { margin: .5rem 0 0; }

/* A photo you can tap to see big (ADD FROM PHOTOS, the editor), and the big view. */
.photo-zoom { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; flex-shrink: 0; border-radius: 6px; }
.photo-zoom .zoom-ico { position: absolute; right: 2px; bottom: 2px; font-size: 11px; line-height: 1; padding: 2px 3px; border-radius: 4px; background: rgba(255, 255, 255, .85); }
.photo-zoom:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }
.zoom { position: fixed; inset: 0; z-index: 400; background: rgba(10, 12, 20, .85); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.zoom-box { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; }
.zoom-box img { max-width: min(100%, 1000px); max-height: calc(100vh - 170px); object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.zoom-box figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 10px 14px; border-radius: 10px; background: #fff; color: #1f2937; font-size: 14px; }
.zoom-colors { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 600; }
.zoom-color { display: inline-flex; align-items: center; gap: 6px; }
.zoom-color .swatch { width: 22px; height: 22px; }

/* The editor: a brand that isn't on the shared list, and "looks like one you have". */
.brand-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; }
.dup-box { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #fff4e0; color: #5b3b00; font-size: 14px; }

/* ADD FROM PHOTOS: the loading screen, and the list to check. */
.bulk-loading { width: min(520px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bulk-loading .bulk-progress { width: 100%; flex: none; height: 10px; }
.bl-icon { font-size: 46px; line-height: 1; animation: bl-bob 1.6s ease-in-out infinite; }
@keyframes bl-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .bl-icon { animation: none; } }
.bl-text { font-weight: 650; margin: 0; }
.bl-actions { justify-content: center; margin-top: 6px; }
.bulk-card.done { opacity: .6; }
.bulk-card.dup { border-color: #e0a100; }
.bulk-dup, .bulk-card .brand-hint { grid-column: 1 / -1; }
.bulk-dup { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 8px; background: #fff4e0; color: #5b3b00; font-size: 13px; }

/* TODAY → 🏷 BRAND?: the other pieces of that kind to tick. */
.brand-more { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; margin: 8px 0; }
.brand-more-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }

/* TODAY: turning the mannequin (buttons, or a swipe). */
.turn-stage { perspective: 900px; touch-action: pan-y; display: flex; justify-content: center; cursor: grab; user-select: none; }
.turn-stage .mannequin { transform-origin: 50% 50%; }
.turn-stage.turning-cw .mannequin { animation: turn-cw .35s ease-out; }
.turn-stage.turning-ccw .mannequin { animation: turn-ccw .35s ease-out; }
@keyframes turn-cw { from { transform: rotateY(-75deg); opacity: .25; } to { transform: none; opacity: 1; } }
@keyframes turn-ccw { from { transform: rotateY(75deg); opacity: .25; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .turn-stage .mannequin { animation: none !important; } }
.view-turn { display: flex; width: fit-content; margin: 6px auto 4px; }
.view-turn button { font-size: 11px; padding: 4px 9px; }

/* Suggestions under a field (brands): the app's own list, not the browser's. */
.suggest-wrap { position: relative; }
.suggest-list { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; right: 0; max-height: 228px; overflow: auto; display: flex; flex-direction: column; padding: 4px; background: var(--surface, var(--panel)); border: 1px solid var(--border, var(--edge)); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .16); }
.suggest-item { text-align: left; font: inherit; font-size: .92rem; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--text); cursor: pointer; }
.suggest-item:hover, .suggest-item.active { background: var(--surface-2, var(--panel-2)); }

/* The photo list: two pieces a row (one on a phone); names and details on one line, notes at most two. */
.bulk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) {
  .bulk-grid { grid-template-columns: minmax(0, 1fr); }
  /* the buttons get their own line, so the name has the width */
  .bulk-card { grid-template-columns: auto 52px minmax(0, 1fr); }
  .bulk-card > .bulk-acts { grid-column: 2 / -1; justify-content: flex-end; }
}
.bulk-card { align-items: start; }
.bulk-card > .photo-zoom, .bulk-card > .bulk-ph, .bulk-card > .bulk-n, .bulk-card > .bulk-acts { align-self: center; }
.bulk-card .h-name { align-items: center; overflow-wrap: normal; }
.bulk-card .h-name .nm, .bulk-card .bulk-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-card .bulk-info > .small-muted:not(.bulk-meta) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bulk-acts { flex-shrink: 0; }

/* 7 DAYS: the type buttons pick the card's outfit; SEE OUTFITS (at the bottom) opens the day. */
.day-card { cursor: default; }
.day-card:hover { transform: none; }
.day-card:not(.today):hover { box-shadow: none; }
.dc-open { margin-top: auto; width: 100%; }

/* Settings → Temperatures: one list under each outfit type's header, each rule with a fixed slider
   on the heat map (-30°C to 40°C: dark blue, light blue, yellow, red); editing is a slider on it. */
:root { --heat: linear-gradient(90deg, #1f3f99 0%, #2a5cc2 30%, #5bb8f0 35.7%, #8fd3f7 41.4%, #f5d34a 45%, #f2b53a 71.4%, #e8582f 77.1%, #b01e1e 100%); }
/* "The other outfit types too?": one line per outfit type. */
.sister-list { display: flex; flex-direction: column; gap: .45rem; margin: .4rem 0 .9rem; }
.check.sister { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.temp-search { max-width: 420px; margin: .2rem 0 1rem; }
.temp-rules-grid { display: flex; flex-direction: column; gap: 1.1rem; }
.temp-rules .temp-mode { border-bottom: 1px solid var(--border); padding-bottom: .35rem; margin: 0; }
.temp-rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem) auto; align-items: center; gap: .9rem; }
.tr-heat { display: grid; grid-template-columns: minmax(0, 1fr) 5.6rem; align-items: center; gap: .55rem; }
.tr-val { font-size: .82rem; font-weight: 650; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.heat-bar { position: relative; display: block; height: 8px; border-radius: 99px; }
.heat-bar::before, .heat-fill { content: ""; position: absolute; inset: 0; border-radius: 99px; background: var(--heat); }
.heat-bar::before { opacity: .2; }
.heat-mark { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(16, 24, 40, .28), 0 1px 3px rgba(16, 24, 40, .25); }
.heat-fields { display: flex; flex-direction: column; gap: .9rem; margin: .4rem 0 .6rem; }
.heat-preview { padding: .5rem 0 .2rem; }
.heat-preview .heat-bar { height: 10px; }
.heat-field .field-label { display: flex; align-items: center; gap: .5rem; }
.heat-val { display: inline-block; min-width: 3.4rem; text-align: center; padding: .1rem .55rem; border-radius: 99px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.heat-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 24px; margin: .2rem 0 0; background: transparent; cursor: pointer; }
.heat-range::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: var(--heat); }
.heat-range::-moz-range-track { height: 10px; border-radius: 99px; background: var(--heat); }
.heat-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -6px; border-radius: 50%; background: var(--thumb, #f2c230); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(16, 24, 40, .3), 0 2px 5px rgba(16, 24, 40, .3); }
.heat-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--thumb, #f2c230); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(16, 24, 40, .3), 0 2px 5px rgba(16, 24, 40, .3); }
.heat-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 99px; }
.heat-ticks { position: relative; height: 1rem; font-size: .7rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.heat-ticks span { position: absolute; top: 0; transform: translateX(-50%); }
@media (max-width: 640px) {
  .temp-rule { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text edit" "heat heat"; row-gap: .45rem; }
  .temp-rule .tr-text { grid-area: text; }
  .temp-rule .tr-heat { grid-area: heat; }
  .temp-rule .btn { grid-area: edit; }
}

/* Game Day: the team row on TODAY (and its colours prompt), My teams, and the GAME DAYS page. */
.team-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; padding: .55rem .7rem; margin-bottom: .6rem; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .9rem; }
.team-row select.input { width: auto; min-width: 11rem; }
.team-row.ask { background: var(--accent-soft); }
.team-row .grow { flex: 1; min-width: 10rem; }
.team-colors .swatch { margin-right: .15rem; }
.team-item { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.team-item:last-of-type { border-bottom: 0; }
.team-item .ti-name { font-weight: 650; }
.team-item .grow { flex: 1; }
.game-row { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.game-row:last-child { border-bottom: 0; }
.gr-fig { flex: none; width: 52px; display: flex; justify-content: center; }
.gr-fig svg { width: 52px; height: auto; }
.gr-date { flex: none; width: 4.2rem; display: flex; flex-direction: column; font-size: .8rem; color: var(--text-2); }
.gr-date b { color: var(--text); font-size: .85rem; }
.gr-main { flex: 1; min-width: 0; }
.gr-team { font-weight: 650; }
@media (max-width: 640px) {
  .game-row { flex-wrap: wrap; }
  .game-row .btn-row { flex-basis: 100%; justify-content: flex-end; }
}

/* The help chat (dressboy.app): 💬 Help in the corner, and its panel. */
.help-fab { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60; font: 650 .9rem var(--font); color: #fff; background: var(--accent); border: 0; border-radius: 999px; padding: .65rem 1rem; box-shadow: 0 6px 18px rgba(16, 24, 40, .22); cursor: pointer; }
.help-fab:hover { filter: brightness(1.08); }
.help-fab[aria-expanded="true"] { opacity: .85; }
.help-panel { position: fixed; right: 1.1rem; bottom: 4.4rem; z-index: 61; width: min(420px, calc(100vw - 2.2rem)); height: min(620px, calc(100vh - 7rem)); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px rgba(16, 24, 40, .25); overflow: hidden; }
.help-panel.hidden { display: none; }
.help-head { display: flex; align-items: center; gap: .4rem; padding: .7rem .8rem; border-bottom: 1px solid var(--border); }
.help-head .grow { flex: 1; }
.help-log { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .55rem; }
.help-hi p { margin: 0 0 .7rem; color: var(--text-2); }
.help-starters { display: flex; flex-wrap: wrap; gap: .35rem; }
.help-starters .btn { white-space: normal; text-align: left; }
.help-msg { max-width: 88%; padding: .55rem .75rem; border-radius: 12px; line-height: 1.45; font-size: .92rem; overflow-wrap: anywhere; }
.help-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.help-msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.help-msg.error { align-self: stretch; max-width: none; background: transparent; color: var(--bad); font-size: .85rem; padding: 0 .2rem; }
.help-dots { display: inline-flex; gap: 4px; }
.help-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: help-dot 1s infinite ease-in-out; }
.help-dots i:nth-child(2) { animation-delay: .15s; }
.help-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes help-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .help-dots i { animation: none; } }
.help-go { display: flex; width: fit-content; max-width: 100%; margin: .45rem 0 .2rem; text-align: left; white-space: normal; background: var(--surface); border-color: var(--accent); color: var(--accent-text, var(--accent)); }
.help-next { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; margin: -.15rem 0 .2rem; }
.help-next .btn { white-space: normal; text-align: left; }
.help-next::before { content: "Ask next:"; font-size: .72rem; color: var(--text-3); }
.help-form { display: flex; gap: .5rem; align-items: flex-end; padding: .6rem .8rem .3rem; border-top: 1px solid var(--border); }
.help-form textarea { flex: 1; resize: none; min-height: 2.6rem; max-height: 8rem; }
.help-foot { margin: 0; padding: 0 .8rem .6rem; font-size: .72rem; color: var(--text-3); }
body.logged-out .help-fab, body.logged-out .help-panel { display: none; }
@media (max-width: 600px) {
  .help-fab { right: .8rem; bottom: .8rem; }
  .help-panel { right: .5rem; left: .5rem; top: max(.5rem, env(safe-area-inset-top)); bottom: 4rem; width: auto; height: auto; }
  .help-form textarea { font-size: 16px; } /* smaller and iPhones zoom the page on focus */
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
