/* 风格目录 + 风格详情（styles/）页内样式。
   通用组件全部来自 shared/components.css（ac-top、ac-btn、ac-tag、ac-pick、ac-style-card、ac-media、ac-actionbar、ac-empty…），
   颜色、字体、圆角、阴影、动效只用 shared/tokens.css 的变量。
   这里只放本页布局和本页专有部件（顶部样片条、预览播放器的进度条和暂停钮），类名一律 sty- 前缀。 */

/* =====================================================================
   风格目录 styles/index.html
   ===================================================================== */

/* 顶部样片条：首屏样片墙同一组 19 张静帧（背景装饰），压暗微倾，标题浮在上面 */
.sty-intro { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(var(--h-top) * -1); padding: calc(var(--h-top) + 28px) 0 22px; }
.sty-strip { position: absolute; inset: 0; z-index: -2; overflow: hidden; filter: brightness(.5) saturate(.7); }
.sty-strip-grid { --tw: 150px; --th: 84px; position: absolute; left: 50%; top: 50%; display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, var(--th)); gap: 8px; transform: translate(-50%, -50%) rotate(-8deg); }
.sty-strip-grid i { display: block; width: var(--tw); height: var(--th); border-radius: var(--r-xs); background: var(--surface-2) center / cover no-repeat; }
.sty-strip-grid i:nth-child(3n+2) { transform: translateX(calc(var(--tw) * -.45)); }
.sty-intro::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(9, 9, 11, .9), rgba(9, 9, 11, .55) 40%, rgba(9, 9, 11, .82) 78%, var(--bg)), radial-gradient(ellipse 80% 90% at 20% 60%, rgba(9, 9, 11, .7), transparent); }
.sty-intro .ac-h1 { text-shadow: 0 2px 30px rgba(0, 0, 0, .55); }
.sty-lede { max-width: 40em; text-wrap: pretty; }
.sty-nb { display: inline-block; }   /* 短语不拆行（避免“没 / 想好”“按 / 一档算”） */
.sty-lede a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }

/* 用途筛选：粘在顶栏下面，手机上横向滑 */
.sty-filter { position: sticky; top: var(--h-top); z-index: calc(var(--z-top) - 1); padding: 8px 0 10px; background: var(--bg); }
.sty-filter::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(var(--bg), rgba(9, 9, 11, 0)); pointer-events: none; }
.sty-filter .ac-pick small { font-variant-numeric: tabular-nums; }
.sty-filter-row { height: 36px; }
#sty-total, #sty-case-total { display: inline-block; min-width: 2ch; font-variant-numeric: tabular-nums; }

/* 分组 */
.sty-groups { padding-bottom: var(--sp-4); }
.sty-group { padding-top: var(--sp-5); animation: sty-in var(--dur-2) var(--ease) both; }
.sty-group-head { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.sty-group-head .ac-h2 { font-size: 21px; flex: none; }
.sty-group-head p { min-width: 0; font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }

/* 风格 / 成片卡：shared .ac-style-card，16:9 不裁；视野内预览与用途小字 */
.sty-grid .ac-style-card { gap: 9px; }
.sty-grid .ac-style-card__desc { font-size: var(--fs-xs); }
.sty-grid .ac-style-card__name { height: 1.35em; }
.sty-grid .ac-style-card__desc { height: 3em; }
.sty-grid .ac-media { flex: none; width: 100%; aspect-ratio: 16 / 9; }
.sty-fit { margin-top: var(--sp-1); font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sty-case-tag .ac-i { color: var(--ok); }
.sty-placeholder .ac-style-card__name > i, .sty-placeholder .ac-style-card__desc > i { display: block; width: 72%; height: 1em; border-radius: 3px; }
.sty-placeholder .ac-style-card__desc > i { width: 95%; margin-top: 3px; }
.sty-placeholder { pointer-events: none; }
.ac-style-card .ac-media > img { transition: transform var(--dur-3) var(--ease); }
.ac-style-card .ac-media > video { transition: opacity var(--dur-1), transform var(--dur-3) var(--ease); }
.ac-style-card:hover .ac-media > img, .ac-style-card:hover .ac-media > video { transform: scale(1.04); }

/* 页底“交给我们定” */
.sty-delegate { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-4); margin-top: var(--sp-7); box-shadow: var(--shadow-inset); }
.sty-delegate .ac-h2 { font-size: 21px; margin-bottom: var(--sp-2); }
.sty-footer { margin-top: var(--sp-8); }

/* 手机：滚过标题后浮出“交给我们定”（次按钮，不抢风格卡）；滚到页底那块时收起 */
.sty-bar { transform: translateY(110%); transition: transform var(--dur-2) var(--ease); }
.sty-bar.is-on { transform: none; }
.sty-bar-title { font-size: 14px; font-weight: 600; color: var(--ink); }

@keyframes sty-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 640px) {
  .sty-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
}
@media (min-width: 900px) {
  .sty-intro { padding: calc(var(--h-top) + 64px) 0 44px; }
  .sty-strip-grid { --tw: 300px; --th: 169px; gap: 14px; }
  .sty-filter { padding: 12px 0 14px; }
  .sty-group { padding-top: var(--sp-8); }
  .sty-group-head { margin-bottom: var(--sp-5); }
  .sty-group-head .ac-h2 { font-size: 28px; }
  .sty-group-head p { font-size: 14px; }
  .sty-grid .ac-style-card { gap: 12px; }
  .sty-grid .ac-style-card__name { font-size: 16px; }
  .sty-grid .ac-style-card__desc { font-size: 13px; }
  .sty-delegate { flex-direction: row; align-items: center; justify-content: space-between; padding: var(--sp-7) var(--sp-8); }
  .sty-delegate .ac-h2 { font-size: 26px; }
  .sty-bar { display: none; }
}
@media (min-width: 1100px) {
  .sty-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
}

/* =====================================================================
   风格详情 styles/detail.html
   ===================================================================== */
.sty-detail { position: relative; isolation: isolate; }
.sty-ambient { position: absolute; z-index: -1; left: 0; right: 0; top: calc(var(--h-top) * -1); height: 680px; overflow: hidden; pointer-events: none; }
.sty-ambient i { position: absolute; inset: -60px; background: center / cover no-repeat; filter: blur(48px) saturate(1.1); opacity: .32; transform: scale(1.1); }
.sty-ambient::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(9, 9, 11, .35), rgba(9, 9, 11, .75) 55%, var(--bg)); }
.sty-crumb { display: flex; align-items: center; gap: 6px; height: 40px; font-size: var(--fs-sm); color: var(--ink-3); }
.sty-crumb a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 0; color: var(--ink-2); text-decoration: none; border-radius: 6px; }
.sty-crumb a:hover { color: var(--ink); }
.sty-crumb span[aria-hidden] { color: var(--ink-4); }

.sty-layout { display: grid; gap: var(--sp-5); }
.sty-main, .sty-side { min-width: 0; }

/* 大预览：shared .ac-media（首帧图打底，playing 才淡入视频）；放不出来时中间给“点一下播放预览” */
.sty-player { box-shadow: 0 0 0 1px var(--line), var(--shadow-2); animation: sty-in var(--dur-3) var(--ease) both; }
.sty-player-btn { position: absolute; z-index: 2; right: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; font-size: 13px; color: var(--ink); border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%; background: rgba(10, 10, 12, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; }
.sty-player-btn::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }   /* 34px 小钮，可点区域撑到 44px（本页自有元素） */
.sty-player .i-play { display: none; }
.sty-player.is-paused .i-play { display: block; }
.sty-player.is-paused .i-pause { display: none; }
.sty-player:not(.is-playing):not(.is-paused) .sty-player-btn { display: none; }
.sty-player-big { position: absolute; z-index: 3; left: 50%; top: 50%; display: none; align-items: center; gap: 8px; height: 46px; padding: 0 20px 0 16px; font: 600 15px/1 var(--ui); color: var(--ink); white-space: nowrap; border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--r-pill); background: rgba(10, 10, 12, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transform: translate(-50%, -50%); cursor: pointer; }
.sty-player-big .ac-i { font-size: 16px; color: var(--accent); }
.sty-player.is-blocked .sty-player-big { display: inline-flex; }

.sty-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--sp-3); padding: 0; list-style: none; }
.sty-desc { margin-top: var(--sp-3); font-size: 16px; line-height: var(--lh-body); color: var(--ink-2); }
.sty-label { margin: var(--sp-5) 0 var(--sp-2); font-size: var(--fs-sm); font-weight: 500; letter-spacing: .06em; color: var(--ink-3); }
.sty-suit { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sty-suit .ac-tag { height: auto; min-height: 32px; padding: 6px 13px; font-size: 14px; line-height: 1.3; color: var(--ink); white-space: normal; }
.sty-desc, .sty-price, .sty-note, .sty-empty .ac-empty__text { text-wrap: pretty; }
.sty-price { margin-top: var(--sp-5); font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--ink-3); }
.sty-price b { color: var(--ink-2); font-weight: 600; }
.sty-note { margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--ink-2); border-radius: var(--r-md); background: var(--fill-1); border: 1px solid var(--line); }
.sty-note b { color: var(--ink); font-weight: 600; }

.sty-frame { margin: var(--sp-3) 0 0; }
.sty-frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line); background: var(--surface-2); }
.sty-frame figcaption { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-3); }

.sty-near { margin-top: var(--sp-8); }
.sty-near-head { margin-bottom: var(--sp-4); }
.sty-near-head .ac-h2 { font-size: 21px; }

.sty-empty { max-width: 440px; margin: 12vh auto 0; gap: var(--sp-3); padding: var(--sp-8) var(--sp-5); background: var(--glass); }
.sty-empty .ac-h2 { margin-top: var(--sp-2); }
.sty-empty .ac-empty__text { margin-bottom: var(--sp-2); }
.sty-empty .ac-btn { margin-top: 0; }
body.is-missing { padding-bottom: 0; }

@media (min-width: 900px) {
  .sty-ambient { height: 820px; }
  .sty-crumb { height: 52px; }
  .sty-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--sp-5) 48px; align-items: start; }
  .sty-side { grid-column: 2; grid-row: 1 / span 2; padding-top: 4px; }
  .sty-main-2 { grid-column: 1; }
  .sty-frame { margin-top: 0; }
  .sty-name { font-size: 52px; }
  .sty-desc { font-size: 18px; }
  .sty-actionbar { padding-top: var(--sp-6) !important; }
.sty-price { margin-top: var(--sp-3); }
  .sty-near { margin-top: var(--sp-10); }
  .sty-near-head .ac-h2 { font-size: 28px; }
  .sty-player-btn { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .sty-group, .sty-player { animation: none; }
}
#sty-missing { min-height: calc(100vh - 240px); min-height: calc(100svh - 240px); }

.sty-notice { margin-top: 24px; margin-bottom: 24px; color: var(--ink-2); }
.sty-notice.is-error { color: var(--danger); }
.sty-intro .ac-eyebrow, .sty-group-head p, .sty-grid .ac-style-card__desc, .sty-fit, .sty-crumb, .sty-label, .sty-price, .sty-frame figcaption, .sty-bar .ac-actionbar__label { color: var(--ink-2); }

/* 加载 / 读不出来 / 空目录（site-polish-v1） */
main > .sty-notice { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.sty-notice:has(.sty-fail) { color: inherit; }
.sty-loading { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); margin-top: var(--sp-6); }
.sty-loading .ac-skeleton { display: block; aspect-ratio: 16 / 9; border-radius: var(--r-lg); }
@media (min-width: 720px) { .sty-loading { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .sty-loading { grid-template-columns: repeat(3, 1fr); } }
.sty-filter[hidden] { display: none; }
.sty-fail, .sty-none { max-width: 520px; margin: var(--sp-8) auto; padding: var(--sp-6) var(--sp-5); border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: var(--r-lg); background: var(--glass); text-align: center; }
.sty-fail__title { margin: 0 0 var(--sp-2); font-size: 18px; font-weight: 600; color: var(--danger); }
.sty-fail__text { margin: 0 0 var(--sp-4); color: var(--ink-2); text-wrap: pretty; }
.sty-fail__retry { margin: 0 auto; }
.sty-none { color: var(--ink-2); text-wrap: pretty; }
