/* Today (the app's Home, Wardro Views/Today/*; spec 2.1). A grouped screen:
   Surface.page under, Surface.card panels, Surface.inset boxes inside them. */
[data-screen="today"] {
  --t-page: #000;
  --t-card: #1c1c1e;
  --t-inset: #2c2c2e;
  --t-empty: transparent;            /* an empty week tile: nothing in dark, a faint card in light (app 01-today-top-light) */
  --t-num-bg: var(--mat-regular); /* .regularMaterial behind a day number on a picture */
  --t-add-bg: var(--mat-thick); /* the "+": .thickMaterial */
  --t-add-rim: rgba(255, 255, 255, 0.18);
}
@media (prefers-color-scheme: light) {
  [data-screen="today"] {
    --t-page: #f2f2f7;
    --t-card: #fff;
    --t-inset: #f2f2f7;
    --t-empty: rgba(255, 255, 255, 0.55);
    --t-add-rim: rgba(0, 0, 0, 0.12);
  }
}
[data-screen="today"] .page-content { background: var(--t-page); }
/* Column: padding 16 on every side, 16 between blocks (TodayView), room under the last shelf for the "+". */
[data-screen="today"].no-bar .page-body { padding-top: calc(var(--safe-top) + 16px); padding-bottom: calc(var(--tabbar-h) + var(--tabbar-gap) + 56px); }
[data-screen="today"] .page-body > * + * { margin-top: 16px; }

/* ---------- Header row, 44 tall (HomeHeader) ---------- */
.t-head { position: relative; display: flex; align-items: center; justify-content: space-between; height: 44px; }
.app .t-me { display: flex; align-items: center; gap: 8px; min-width: 0; height: 44px; font-size: var(--t-cap); letter-spacing: 0; transition: opacity var(--press); }
.t-av { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 12%; }
.t-me span { white-space: nowrap; }
.t-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -47%); pointer-events: none;
  font: italic 900 28px/1 var(--wordmark, "Hoefler Text", ui-serif, Georgia, serif); letter-spacing: -0.4px; white-space: nowrap; }
.app .t-help { display: grid; place-items: center end; width: 44px; height: 44px; color: var(--sub); transition: opacity var(--press); }
.t-help .i { width: 22px; height: 22px; stroke-width: 1.5; }

/* ---------- Context card: day-type chip · weather glance ---------- */
.t-ctx { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 41px; padding: 8px 12px; border-radius: 16px; background: var(--t-card); }
.app .t-day { display: inline-flex; align-items: center; gap: 5px; min-width: 0; height: 26px; padding: 0 9px; border-radius: 13px;
  background: rgba(235, 235, 245, 0.07); color: var(--sub); font-size: var(--t-cap); font-weight: 500; letter-spacing: 0; white-space: nowrap; transition: opacity var(--press), transform var(--press); }
@media (prefers-color-scheme: light) { .app .t-day { background: rgba(60, 60, 67, 0.07); } }
.app .t-day.is-known { color: var(--acc-ink); background: var(--acc-tint); }
.t-day span { overflow: hidden; text-overflow: ellipsis; }
.t-day .i { width: 15px; height: 15px; stroke-width: 1.5; }
.t-day .t-chev { width: 11px; height: 11px; stroke-width: 2; }
.app .t-wx { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 26px; color: var(--ink); letter-spacing: 0; transition: opacity var(--press); }
.t-wx .i { width: 19px; height: 19px; stroke-width: 1.5; }
.t-wx b { font-size: var(--t-sub); font-weight: 500; }
.t-wx span { margin-left: 2px; color: var(--sub); font-size: var(--t-cap); white-space: pre; }

/* ---------- Week strip: 7 cells, 4 apart; initial over a 124pt tile (WeekOutfitStrip) ---------- */
.t-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.app .t-cell { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; transition: opacity var(--press); }
.t-ini { color: var(--sub); font-size: var(--t-cap2); line-height: 13px; text-align: center; letter-spacing: 0; }
.is-today .t-ini { color: var(--acc-ink); }
.t-tile { position: relative; display: block; height: 124px; border-radius: 7px; background: var(--t-empty); }
.t-tile.is-worn, .t-tile.is-planned { background: transparent; }
.t-tile-pic { position: absolute; inset: 14px 2px 4px; display: block; }
.t-tile.is-planned .t-tile-pic { opacity: 0.6; }
/* A day whose outfit has a try-on: the photograph cropped to the tall tile (DayThumbnail tileFit .crop). */
.t-tile-try { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 7px; background: var(--t-inset); }
.t-tile-try img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.t-tile.is-planned .t-tile-try { opacity: 0.6; }
.t-tile.is-planned::after { content: ""; position: absolute; inset: 0; border-radius: 7px; border: 1px dashed var(--acc); opacity: 0.65; }
.t-ghost { position: absolute; left: 50%; top: 50%; width: 26px; height: 58px; transform: translate(-50%, -50%); fill: var(--sub); opacity: 0.28; }
.t-dot { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: var(--sub); opacity: 0.6; }
.t-num { position: absolute; left: 2px; top: 2px; padding: 0 3px; border-radius: 7px; font-size: 10px; font-weight: 500; line-height: 14px; letter-spacing: 0; color: var(--ink); }
.is-worn .t-num, .is-planned .t-num { background: var(--t-num-bg); }
.is-today .t-num { color: var(--acc-ink); font-weight: 700; }
.t-more { position: absolute; right: 2px; top: 2px; min-height: 12px; padding: 0 3px; border-radius: 6px; background: var(--acc); color: var(--on-acc); font-size: 9px; font-weight: 700; line-height: 12px; }
.is-today .t-tile::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--acc); pointer-events: none; }

/* ---------- The chat box: drawn as a field, a button (StylistChatBox) ---------- */
.app .t-ask { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; padding: 12px; border-radius: 23px; background: var(--t-card); color: var(--sub); font-size: var(--t-sub); transition: opacity var(--press); }
.t-ask > .i { width: 18px; height: 18px; }
.t-ask span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-ask .t-send { width: 22px; height: 22px; color: var(--ink); --knock: var(--t-card); }

/* ---------- A shelf: header outside, the card (OccasionSectionView) ---------- */
.t-shelf > * + * { margin-top: 8px; }
.t-shead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.t-shead h2 { font: 600 var(--t-body)/1.3 var(--text); letter-spacing: -0.01em; }
.t-shead span { color: var(--sub); font-size: var(--t-cap); letter-spacing: 0; white-space: nowrap; }
.t-card { padding: 12px; border-radius: 16px; background: var(--t-card); }
.t-card > * + * { margin-top: 8px; }

/* The pager: horizontal paging, 240 tall, each page the card's width with a 2pt inset. */
/* It carries data-hscroll, the shared mark of a row that scrolls sideways (tools/demo-shots-v4.mjs leaves those out of its edge check). */
.t-card .t-pager > .t-page { flex: 0 0 100%; }
.t-pager { display: flex; height: 240px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.t-pager::-webkit-scrollbar { display: none; }
.t-page { position: relative; flex: 0 0 100%; height: 100%; padding: 0 2px; scroll-snap-align: start; scroll-snap-stop: always; }
.t-lay { position: absolute; inset: 0 2px; display: block; }
.t-lay .lay { padding: 6px; }
/* A page whose outfit has its try-on (TryOnPageImage): the photograph fitted to the page's height
   (Space.xs inside it), rounded (Radius.thumb), centred; its 3:4 box is there before it loads. */
.t-try { position: absolute; top: 4px; bottom: 4px; left: 50%; aspect-ratio: 3 / 4; transform: translateX(-50%); overflow: hidden; border-radius: 10px; background: var(--t-inset); }
.t-try img { display: block; width: 100%; height: 100%; object-fit: cover; }
.t-try .ok-wait { border-radius: inherit; transition: opacity 0.3s cubic-bezier(0.42, 0, 0.58, 1); }
.t-try.is-waiting img { opacity: 0; }
.t-try.is-ready img { opacity: 1; transition: opacity 0.3s cubic-bezier(0.42, 0, 0.58, 1); }
.t-try.is-ready .ok-wait { opacity: 0; }
.t-try .ok-wait-fig { height: 70%; }
/* Saving changed the page's picture: the old one fades out over the new (Motion.crossfade). */
.t-lay.t-fadein { opacity: 0; }
.t-lay { transition: opacity 0.3s cubic-bezier(0.42, 0, 0.58, 1); }
.t-lay.t-fadeout { pointer-events: none; transition: opacity 0.3s cubic-bezier(0.42, 0, 0.58, 1); }
.t-lay.t-fadeout.is-gone { opacity: 0; }

/* Page dots: leading, 20 × 28 each, 4 apart; current 8 primary, others 6 at 35%. */
.t-dots { display: flex; gap: 4px; height: 28px; }
.app .t-dotb { display: grid; place-items: center; width: 20px; height: 28px; }
.t-dotb i { width: 8px; height: 8px; border-radius: 50%; background: var(--sub); opacity: 0.6; transform: scale(0.75); transition: transform var(--receipt), opacity var(--receipt), background var(--receipt); }
.t-dotb i.is-on { background: var(--ink); opacity: 1; transform: none; }
.t-dotb i.is-edge { transform: scale(0.5); }

/* The words under the page, clear of the 60pt lane the "+" floats in. */
.t-foot > * + * { margin-top: 8px; }
.t-detail { padding-right: 60px; }
.t-detail > * + * { margin-top: 8px; }
.t-status { display: flex; align-items: center; justify-content: space-between; min-height: 32px; color: var(--sub); font-size: var(--t-sub); }
.app .t-info { display: grid; place-items: center; width: 44px; height: 32px; margin-right: -10px; color: var(--sub); transition: opacity var(--press); }
.t-info .i { width: 17px; height: 17px; stroke-width: 1.5; }
.app .t-why { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; color: var(--acc-ink); font-size: var(--t-cap); font-weight: 500; letter-spacing: 0; transition: opacity var(--press); }
.t-why .i { width: 11px; height: 11px; stroke-width: 2; }
.t-reasons { padding: 12px; border-radius: 10px; background: var(--t-inset); }
.t-reasons > * + * { margin-top: 10px; }
.app .t-reason { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; transition: opacity var(--press); }
.t-rsym { width: 16px; height: 16px; margin-top: 2px; stroke-width: 1.6; }
.t-reason span { flex: 1; min-width: 0; }
.t-reason b { display: block; font-size: var(--t-sub); font-weight: 500; line-height: 1.3; }
.t-reason small { display: block; margin-top: 2px; color: var(--sub); font-size: var(--t-cap); line-height: 1.3; letter-spacing: 0; }
.t-rchev { width: 11px; height: 11px; margin-top: 4px; color: var(--faint); stroke-width: 2.2; }

/* The toolbar: five equal parts, glyph 19 in a 24 frame over its word (12 medium), min 52 tall. */
.t-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-right: 60px; }
.app .t-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 52px; color: var(--ink); transition: opacity var(--press); }
.t-glyph { position: relative; display: flex; align-items: center; justify-content: center; gap: 2px; height: 24px; }
.t-glyph > .i { width: 21px; height: 21px; stroke-width: 1.6; }
.t-glyph .t-mini { width: 9px; height: 9px; stroke-width: 2.4; }
.t-word { font-size: var(--t-cap); font-weight: 500; line-height: 15px; letter-spacing: 0; white-space: nowrap; }
.cost.t-cost { position: absolute; left: 60%; top: -9px; height: 14px; padding: 0 4px; border-radius: 7px; }
.cost.t-cost .i { width: 8px; height: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .t-glyph.arrive { animation: t-pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
  @keyframes t-pop { from { opacity: 0.4; transform: scale(0.8); } to { opacity: 1; transform: none; } }
}

/* The thumbs-down receipt and the shelf a visitor emptied. */
.t-receipt { display: flex; align-items: baseline; gap: 8px; margin-right: 60px; padding: 8px; border-radius: 10px; background: var(--t-inset); color: var(--sub); font-size: var(--t-cap); line-height: 1.3; letter-spacing: 0; }
.t-receipt .i { flex: none; width: 13px; height: 13px; align-self: center; }
.t-receipt span { flex: 1; }
.app .t-receipt button { flex: none; color: var(--acc-ink); font-weight: 600; transition: opacity var(--press); }
.t-turned p { padding: 8px 60px 0 0; color: var(--sub); font-size: var(--t-sub); line-height: 1.35; }
.app .t-bring { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; margin-bottom: 8px; border-radius: 12px; background: var(--fill-strong); font-size: var(--t-sub); font-weight: 600; transition: opacity var(--press); }
.t-bring .i { width: 17px; height: 17px; }

/* ---------- Wearing today (no card surface; 3 garments across) ---------- */
.t-wearing > * + * { margin-top: 12px; }
.t-whead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.t-whead h2 { display: flex; align-items: center; gap: 6px; font: 600 20px/1.25 var(--text); letter-spacing: -0.01em; }
.t-whead h2 .i { width: 20px; height: 20px; color: var(--acc-ink); --knock: var(--t-page); }
.t-whead span { color: var(--sub); font-size: var(--t-cap); letter-spacing: 0; }
.t-wgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app .t-wtile { display: flex; flex-direction: column; min-width: 0; text-align: center; }
.t-wpic { position: relative; display: block; height: 110px; border-radius: 10px; transition: transform var(--press); }
.t-wpic img { position: absolute; left: 50%; top: 50%; width: calc(89% * var(--x, 0.86)); height: calc(89% * var(--x, 0.86)); transform: translate(-50%, -50%); object-fit: contain; filter: drop-shadow(0 0 5px rgba(var(--halo-rgb), var(--halo))); }
.app .t-wtile.is-pressed { opacity: 1; }
.t-wtile.is-pressed .t-wpic { transform: scale(0.96); }
.t-wname { margin-top: 4px; font-size: var(--t-cap); line-height: 1.25; letter-spacing: 0; }
.t-wcat { color: var(--sub); font-size: var(--t-cap2); letter-spacing: 0; }
.app .t-quiet { display: block; width: 100%; min-height: 44px; color: var(--red); font-size: var(--t-sub); text-align: center; transition: opacity var(--press); }
.app .t-quiet.is-pressed { opacity: 0.5; }
.app .t-else { min-height: 44px; border-radius: 12px; font-size: var(--t-sub); }
.app .t-else .i { width: 17px; height: 17px; }

/* ---------- The floating "+": 56, 16 from the edge and above the tab bar (HomeAddMenu) ---------- */
.app .t-add { position: absolute; z-index: 4; right: 16px; bottom: calc(var(--tabbar-gap) + var(--tabbar-h) + 16px); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--t-add-bg); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--t-add-rim), 0 2px 6px rgba(0, 0, 0, 0.25); color: var(--ink); transition: transform var(--press), opacity var(--press); }
.t-add .i { width: 24px; height: 24px; stroke-width: 2.3; }
.app .t-add.is-pressed { opacity: 1; transform: scale(0.92); }

[data-screen="today"] .demo-line { margin-top: 24px !important; }
@media (prefers-reduced-motion: reduce) { .t-lay, .t-try img, .t-try .ok-wait { transition: none !important; } }
