/* Try It On: the set-up sheet (TryOnPoseSheet) and the viewer (TryOnImageViewer). */

/* ---------- The sheet ---------- */
[data-screen="tryon"] .page-bar .glass[data-strong] { font-weight: 600; }
[data-screen="tryon"] .page-body { display: flex; flex-direction: column; gap: var(--s-l); }
.to-strip { display: flex; gap: var(--s-m); overflow-x: auto; margin: 0 calc(-1 * var(--s-l)); padding: 0 var(--s-l); scrollbar-width: none; }
.to-strip::-webkit-scrollbar { display: none; }
.to-g { flex: 0 0 130px; display: flex; flex-direction: column; align-items: center; gap: var(--s-s); text-align: center; }
.to-g-pic { position: relative; display: block; width: 130px; height: 130px; border-radius: var(--r-card); background: var(--bg); }
.to-g-pic img, .to-row-pic 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; }
.to-g-name { font-size: var(--t-foot); line-height: 1.3; letter-spacing: -0.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.to-card { padding: var(--s-l); border-radius: var(--r-panel); background: var(--card); }
.to-title { margin-bottom: var(--s-m) !important; font: 600 var(--t-body)/1.3 var(--serif); font-variant: small-caps; letter-spacing: 0.4px; }
.to-row { display: flex; flex-direction: column; gap: var(--s-s); }
.to-row-head { display: flex; align-items: center; gap: 10px; font-size: var(--t-sub); }
.to-row-pic { position: relative; flex: none; width: 72px; height: 72px; border-radius: var(--r-thumb); background: var(--bg); }
.to-axis { margin-top: 2px !important; font-size: var(--t-foot); color: var(--sub); }
[data-screen="tryon"] .seg { margin: 0; height: 32px; background: var(--fill); }
[data-screen="tryon"] .app .seg-item, [data-screen="tryon"] .seg-item { font-size: var(--t-foot); }
.to-hair { height: 1px; margin: var(--s-m) 0; border: 0; background: var(--ok-hair); }
.to-notes { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: var(--t-body)/1.29 var(--text); letter-spacing: -0.022em; resize: none; -webkit-appearance: none; appearance: none; }
.to-notes::placeholder { color: var(--faint); }
.app .to-notes:focus, .app .to-notes:focus-visible { outline: none; }
.to-status { display: flex; gap: 8px; margin-top: var(--s-m); color: var(--sub); font-size: var(--t-foot); line-height: 1.35; }
.to-status .i { width: 17px; height: 17px; margin-top: 1px; }
.to-status b { color: var(--ink); font-weight: 500; }
.to-hair-card { padding-top: var(--s-xs); padding-bottom: var(--s-xs); }
.to-switch-row { display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: var(--t-sub); }
.app .to-switch { position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill); transition: background 0.25s ease-out; }
.to-switch i { position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.3s cubic-bezier(0.3, 1.3, 0.5, 1); }
.app .to-switch.is-on { background: var(--acc); }
.to-switch.is-on i { transform: translateX(20px); }
.app .to-switch.is-pressed { opacity: 1; }
.to-hair-pick { display: flex; align-items: center; justify-content: space-between; min-height: 44px; border-top: 1px solid var(--ok-hair); font-size: var(--t-sub); color: var(--sub); }
.to-hair-pick .i { width: 13px; height: 13px; stroke-width: 2.4; }
.to-honest { display: flex; gap: 8px; align-items: flex-start; font-size: var(--t-foot); line-height: 1.35; color: var(--sub); }
.to-honest .i { width: 17px; height: 17px; flex: none; color: var(--acc-ink); }
.to-none { margin-bottom: var(--s-m) !important; color: var(--sub); text-align: center; font-size: var(--t-sub); }
[data-screen="tryon"] .demo-line { margin-top: 0 !important; }
@media (prefers-reduced-motion: no-preference) { .to-honest { animation: v4-arrive 0.2s cubic-bezier(0.2, 0.9, 0.3, 1) both; } }

/* ---------- The viewer: a full-screen cover on a black backdrop ---------- */
.page[data-screen="tryview"] {
  --bg: #000; --ink: #fff;
  --glass: rgba(30, 30, 32, 0.78); --glass-rim: rgba(255, 255, 255, 0.13); --glass-hi: rgba(255, 255, 255, 0.06); --glass-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  color: var(--ink);
}
@media (prefers-color-scheme: light) { .page[data-screen="tryview"] { --bg: #141414; } }
[data-screen="tryview"] .page-scroll { overflow: hidden; }
[data-screen="tryview"] .page-bar::before { display: none; }
.tv-stage { position: absolute; left: 0; right: 0; top: calc(var(--safe-top) + var(--bar-h) + 8px); bottom: calc(var(--safe-bottom) + 96px); display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.tv-frame { position: relative; width: 100%; max-height: 100%; aspect-ratio: 3 / 4; }
.tv-pic { position: absolute; inset: 0; will-change: transform; transform-origin: 50% 50%; }
.tv-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tv-frame .ok-wait { inset: 0 16px; transition: opacity 0.3s cubic-bezier(0.42, 0, 0.58, 1); }
.tv-frame.is-waiting .tv-pic { opacity: 0; transition: opacity 0.3s cubic-bezier(0.42, 0, 0.58, 1); }
.tv-frame.is-ready .tv-pic { opacity: 1; }
.tv-frame.is-ready .ok-wait { opacity: 0; }
.tv-foot { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 14px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tv-demo { font-size: var(--t-cap2); color: rgba(255, 255, 255, 0.45); letter-spacing: 0; }
.tv-foot .glass.round { width: 48px; height: 48px; border-radius: 24px; }
