/* Camera-app look: black, the mirror fills the screen, controls float in frosted glass. */
:root { --fg: #fff; --muted: rgb(235 235 245 / .6); --group: #1c1c1e; --line: rgb(84 84 88 / .5); --accent: #f7923a; --glass: rgb(58 58 60 / .55); color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; overflow: hidden; background: #000; color: var(--fg); font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.stage { position: fixed; inset: 0; }
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); background: #000; }
[hidden] { display: none !important; }

.glass { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); color: #fff; border: 0; }
.pill { flex: none; min-height: 40px; padding: 0 18px; border-radius: 999px; font-size: 17px; font-weight: 600; }
.round { flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; font-size: 18px; }
.hint { position: fixed; z-index: 2; top: calc(env(safe-area-inset-top) + 14px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 120px); margin: 0; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; text-align: center; }
.caption { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
#status { position: fixed; z-index: 3; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 10px); min-height: 1.4em; text-shadow: 0 1px 6px #000; }

button { flex: 1; min-height: 52px; padding: 0 20px; border: 0; border-radius: 999px; font: 600 17px -apple-system, BlinkMacSystemFont, system-ui, sans-serif; cursor: pointer; }

button:disabled { opacity: .45; }
button:active:not(:disabled) { transform: scale(.97); }

/* Step overlays sit over the mirror; top and bottom bars only, the middle stays you. */
.overlay { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.overlay > * { pointer-events: auto; }
.top, .bottom { position: absolute; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top { top: calc(env(safe-area-inset-top) + 12px); }
.bottom { bottom: calc(env(safe-area-inset-bottom) + 38px); flex-direction: column; padding-top: 48px; }
.bottom::before { content: ""; position: absolute; inset: 0 -16px calc(-38px - env(safe-area-inset-bottom)); z-index: -1; background: linear-gradient(transparent, rgb(0 0 0 / .65)); }
.row { display: flex; gap: 10px; width: 100%; max-width: 480px; }
.tag { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Pose: camera corner brackets + a big thin countdown in place of instructions. */
.brackets { position: absolute; inset: calc(env(safe-area-inset-top) + 70px) 12% calc(env(safe-area-inset-bottom) + 150px); pointer-events: none;
  --c: rgb(255 255 255 / .9); background:
  linear-gradient(var(--c) 0 0) 0 0 / 28px 3px, linear-gradient(var(--c) 0 0) 0 0 / 3px 28px,
  linear-gradient(var(--c) 0 0) 100% 0 / 28px 3px, linear-gradient(var(--c) 0 0) 100% 0 / 3px 28px,
  linear-gradient(var(--c) 0 0) 0 100% / 28px 3px, linear-gradient(var(--c) 0 0) 0 100% / 3px 28px,
  linear-gradient(var(--c) 0 0) 100% 100% / 28px 3px, linear-gradient(var(--c) 0 0) 100% 100% / 3px 28px; background-repeat: no-repeat; }
.count { position: absolute; top: 50%; left: 0; right: 0; margin: 0; transform: translateY(-50%); font-size: 160px; font-weight: 100; line-height: 1; text-align: center; text-shadow: 0 2px 24px rgb(0 0 0 / .5); pointer-events: none; }
#hold { color: #fff; font-size: 17px; font-weight: 600; }

/* The closet screen: a lookbook in the photos' own studio grey, Bodoni headlines, the brand orange as the one accent
   (--tag for text, --fill behind dark text).
   The camera screens (pose, Live) above stay black with glass controls. */
.sheet { --paper: #e9eae8; --card: #dcdedb; --ink: #141516; --soft: #5f6367; --rule: #cdd0cc; --tag: #b2560a; --fill: #f7923a;
  position: fixed; inset: 0; z-index: 1; overflow-y: auto; background: var(--paper); color: var(--ink);
  font-family: "Instrument Sans", -apple-system, system-ui, sans-serif; color-scheme: light;
  padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 56px); display: flex; flex-direction: column; }
@media (prefers-color-scheme: dark) {
  .sheet { --paper: #0f1011; --card: #1d1f21; --ink: #ecedeb; --soft: #9a9fa3; --rule: #2c2f31; --tag: #f7923a; --fill: #f7923a; color-scheme: dark; }
}
.sheet > * { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.masthead { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 0 14px; border-bottom: 1px solid var(--ink); margin-bottom: 18px; }
.wordmark { font: italic 600 26px/1 "Bodoni Moda", serif; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.tag-link { color: var(--tag); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }

.hero h1 { margin: 22px 0 12px; font: 400 clamp(40px, 12vw, 64px)/.98 "Bodoni Moda", serif; letter-spacing: -.02em; }
.hero h1 em { color: var(--tag); }
.lede { margin: 0 0 22px; color: var(--soft); font-size: 17px; line-height: 1.45; }
.hero-media { position: relative; height: 56dvh; max-height: 560px; border-radius: 4px; background: var(--card); overflow: hidden; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-count { position: absolute; left: 12px; bottom: 10px; font: italic 500 15px "Bodoni Moda", serif; color: #141516; }
.steps { list-style: none; margin: 28px 0 8px; padding: 0; border-top: 1px solid var(--rule); }
.steps li { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.steps b { font: italic 500 22px "Bodoni Moda", serif; color: var(--tag); min-width: 30px; }

.row { display: flex; gap: 10px; width: 100%; }
.sheet button, .button { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 2px;
  font: 600 16px "Instrument Sans", system-ui, sans-serif; letter-spacing: .01em; cursor: pointer; text-decoration: none; }
.sheet .primary { background: var(--ink); color: var(--paper); }
.sheet .ghost { background: transparent; color: var(--ink); }
.button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.button:focus-within, .sheet button:focus-visible { outline: 2px solid var(--tag); outline-offset: 2px; }

/* The stage: your avatar in the outfit, edge to edge, with the side tabs under it like a contact sheet. */
.stage-card { margin: 0 0 8px; }
.look { position: relative; height: 60dvh; max-height: 620px; background: var(--card); border-radius: 4px; overflow: hidden; touch-action: pan-y; cursor: grab; outline: none; }
.look:focus-visible { box-shadow: inset 0 0 0 2px var(--tag); }
.look canvas, .look video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.look.busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%); background-size: 250% 100%; animation: sheen 1.6s linear infinite; pointer-events: none; }
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .look.busy::after { animation: none; background: rgb(255 255 255 / .25); } }
.chip { position: absolute; margin: 0; padding: 7px 13px; border-radius: 999px; background: rgb(21 20 18 / .78); color: #f2efe9; font-size: 13px; font-weight: 600; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sheet .chip { min-height: 0; border: 0; flex: none; padding: 7px 13px; font-size: 13px; }
.look-msg { left: 50%; bottom: 12px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); text-align: center; }
.look-msg:empty { display: none; }
.spin-btn { top: 12px; right: 12px; letter-spacing: .04em; }
.angles { display: flex; margin-top: 10px; border-top: 1px solid var(--ink); }
.sheet .angles button { min-height: 40px; border: 0; border-radius: 0; background: none; color: var(--soft); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sheet .angles button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--fill); }
.caption-line { margin: 6px 0 0; font: italic 400 19px/1.3 "Bodoni Moda", serif; }
.caption-line b { font-style: normal; font-weight: 500; color: var(--tag); margin-right: 6px; }

/* The closet: one shelf per kind, swiped sideways; what you wear gets an ink frame and a tag. */
.section { margin: 30px 0 4px; font: 400 30px/1.1 "Bodoni Moda", serif; letter-spacing: -.01em; }
.shelf { padding: 14px 0 4px; border-bottom: 1px solid var(--rule); }
.shelf h3 { margin: 0 0 10px; color: var(--soft); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.shelf-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.tile-wrap { position: relative; flex: none; width: 104px; scroll-snap-align: start; }
.sheet .tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 104px; aspect-ratio: 3 / 4; min-height: 0; padding: 0;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--card); overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 600; flex: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.sheet .tile[aria-pressed="true"] { border: 2px solid var(--ink); }
.tile[aria-pressed="true"]::after { content: "Wearing"; position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; background: var(--fill); color: #141516; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.tile.busy img { animation: busy .8s ease-in-out infinite alternate; }
@keyframes busy { from { opacity: .35; } to { opacity: .9; } }
.add { cursor: pointer; border-style: dashed !important; }
.add span { font: 300 34px/1 "Bodoni Moda", serif; }
.add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.add:focus-within { outline: 2px solid var(--tag); outline-offset: 2px; }
.sheet .del { position: absolute; top: 4px; right: 4px; flex: none; width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgb(21 20 18 / .7); color: #fff; font-size: 16px; line-height: 1; }
.note { margin: 10px 0 0; color: var(--soft); font-size: 14px; line-height: 1.45; }
.panel { margin-top: 8px; }
.field { width: 100%; min-height: 52px; margin: 16px 0 10px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 2px; background: var(--card); color: var(--ink); font: 16px "Instrument Sans", system-ui, sans-serif; }
.field:focus { outline: 2px solid var(--tag); outline-offset: 1px; }
.sheet .link { flex: none; min-height: 44px; margin-top: 18px; border: 0; background: none; color: var(--soft); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
body.demo .add, body.demo #to-pose, body.demo #pass { display: none; }
#status { color: var(--muted); }
body:not([data-step="pose"]):not([data-step="ar"]) #status { color: #5f6367; text-shadow: none; background: rgb(233 234 232 / .92); padding: 6px; border-radius: 4px; }
#status:empty { display: none; }

/* Live (camera): the closet strip, small. */
.strip { display: flex; gap: 8px; width: 100%; overflow-x: auto; padding: 2px; }
.strip .tile-wrap { flex: none; width: 60px; }
.strip .tile { display: flex; width: 100%; aspect-ratio: 3 / 4; min-height: 0; padding: 0; border: 2px solid transparent; border-radius: 10px; background: #1c1c1e; overflow: hidden; }
.strip .tile[aria-pressed="true"] { border-color: var(--accent); }
.strip .tile[aria-pressed="true"]::after { content: none; }
body.demo #me-upload { display: none; }
