@font-face { font-family: 'LED Digital'; src: url(assets/effects/LEDDigital-Regular.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'WenKai sample'; src: url(assets/effects/wenkai-specimen.woff2) format('woff2'); font-display: swap; }

.demo-stage { cursor: default; }
.demo-stage .expand { z-index: 2; min-width: 34px; min-height: 34px; padding: 0; }
.demo-stage:focus-within { --rx: 0deg !important; --ry: 0deg !important; }
work-demo {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(5px, 2vh, 16px); width: 100%; height: 100%; container-type: size;
  color: var(--foreground, #fafafa); text-align: left;
}
work-demo :where(p, blockquote, dl, dd) { margin: 0; }
.demo-tools { display: flex; justify-content: center; flex: none; }
.demo-tools button {
  border-radius: 99px; border: 1px solid currentColor; color: inherit; padding: 5px 15px;
  font-size: clamp(12px,2.8cqw,15px); line-height: 1.4; background: transparent;
}
.demo-tools button:is(:hover,:focus-visible) { background: var(--foreground,#fff); color: var(--ground,#141421); }
.demo-stage .poster-content { isolation:isolate; }
.detail .demo-stage, .preview-body {
  position:relative; height:clamp(280px,55svh,560px); width:100%; overflow:hidden;
  background:radial-gradient(ellipse at 65% 40%,var(--glow),var(--ground)); border-radius:14px;
}
.detail .demo-stage .expand { inset:auto 12px 12px auto; }
#preview { width:min(900px,95vw); padding:12px; }
#preview header { padding:0 3px 10px; }
.preview-body { height:min(65dvh,610px); }
#preview, .detail { --foreground:#fcfcfa; }
:is(#preview,.detail):is(.fontapp,.appscope,.fontselect,.yusheng) { --foreground:#282332; }
work-demo[data-kind="superclock"] .dial.front { top:50%; right:5%; width:min(62cqw,70cqh); translate:0 -37%; }
work-demo[data-kind="superclock"] .dial.back { top:50%; left:5%; width:min(46cqw,55cqh); translate:0 -71%; }
.pro-face { width:min(78cqw,83cqh); filter:drop-shadow(0 12px 14px #0006); }
.pro-face :is(.hour,.minute,.second) { transform-origin:160px 160px; }
.pro-face .hour { transform:rotate(var(--hour)); }
.pro-face .minute { transform:rotate(var(--minute)); }
.pro-face .second { transform:rotate(var(--second)); }

.font-film { display:grid; justify-items:center; align-content:center; gap:6px; height:100%; width:100%; }
.font-film video { display:block; height:min(82cqh,91cqw); max-width:90%; aspect-ratio:1140/1400; border-radius:9px; background:#f8f7f1; box-shadow:0 12px 28px #36245828; }
.font-film span { color:#493b6d; font-size:clamp(11px,2.4cqw,14px); }

.led-display {
  width:92%; text-align:center; color:var(--led); background:#0c0b09; padding:clamp(7px,6cqh,36px) 2%;
  border-radius:10px; box-shadow:0 18px 48px #14110655; line-height:1;
}
.led-display time { display:block; font:clamp(19px,min(16cqw,30cqh),120px)/1 'LED Digital',monospace; margin:3cqh auto; white-space:nowrap; text-shadow:0 0 9px color-mix(in srgb,var(--led) 48%,transparent); }
.led-display time small { font-size:.47em; }
.led-date,.weekdays { font-family:var(--mono); font-size:clamp(9px,min(3cqw,5cqh),17px); letter-spacing:.09em; }
.weekdays { display:flex; justify-content:center; gap:1em; }
.weekdays span { opacity:.45; }.weekdays .today { opacity:1; }
.flip-time {
  --case: min(91cqw, 176cqh, 760px);
  width: var(--case); padding: calc(var(--case) * .035); position: relative;
  display: grid; grid-template-columns: 1fr 1fr .53fr; gap: calc(var(--case) * .018); align-items: end;
  border: 1px solid #53565a; border-radius: calc(var(--case) * .05);
  background: linear-gradient(155deg, #41454a, #292b2d 14%, #1f2022 75%, #333639);
  box-shadow: inset 0 1px 1px #ffffff59, inset 0 -2px 1px #08090b,
    0 4px 0 #101113, 0 9px 12px -7px #08090ad9, 0 22px 34px -13px #030812b0;
}
.flip-unit {
  position: relative; aspect-ratio: 1.23; perspective: calc(var(--case) * 1.4);
  font: 650 calc(var(--case) * .228)/1 'Helvetica Neue', Arial, sans-serif;
  font-variant-numeric: tabular-nums; letter-spacing: -.045em;
  border-radius: calc(var(--case) * .022); color: #f4f1e8; background: #0b0c0d;
  box-shadow: 0 0 0 2px #0d0e0f, 0 2px 0 1px #ffffff24;
}
.flip-unit.seconds {
  font-size: calc(var(--case) * .118); border-radius: calc(var(--case) * .015); color: #ebbe88;
}
.flip-unit.seconds::before {
  content: 'SEC'; position: absolute; bottom: 112%; width: 100%; text-align: center;
  font: 550 max(8px, calc(var(--case) * .022))/1 var(--mono);
  letter-spacing: .16em; color: #d9b689;
}
.flip-half {
  position: absolute; left: 0; right: 0; height: 50%; overflow: hidden;
  backface-visibility: hidden; pointer-events: none;
}
.flip-half.upper {
  top: 0; border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  background: linear-gradient(#333638, #262829); transform-origin: center bottom;
}
.flip-half.lower {
  bottom: 0; border-radius: inherit; border-top-left-radius: 0; border-top-right-radius: 0;
  background: linear-gradient(#383a3b, #303233 75%, #2c2e30); transform-origin: center top;
}
.flip-half b {
  position: absolute; width: 100%; height: 200%; display: grid; place-items: center;
  font: inherit; letter-spacing: inherit; text-indent: -.045em;
}
.flip-half.upper b { top: 0; }
.flip-half.lower b { bottom: 0; }
.flip-unit::after {
  content: ''; position: absolute; z-index: 3; inset: 50% 0 auto; height: max(1px, calc(var(--case) * .003));
  transform: translateY(-50%); background: #121314; box-shadow: 0 1px 0 #ffffff12;
  pointer-events: none;
}
.flip-half.turning { z-index: 2; }
.quote-leaf {
  position:relative; width:82%; padding:clamp(12px,6cqh,42px) 7%; background:#f9efdd; color:#493627;
  box-shadow:5px 5px 0 #e3d2b6,10px 10px 0 #c9ae8644,0 18px 46px #6d49351f; border-radius:2px;
}
.quote-leaf > span { display:block; height:.55em; color:#b28465; font:clamp(26px,12cqh,70px)/1 Georgia,serif; }
.quote-leaf blockquote { font:500 clamp(17px,min(6cqw,11cqh),46px)/1.45 'Songti SC','Noto Serif CJK SC',serif; margin:3cqh 0; text-wrap:balance; }
.quote-leaf cite,.quote-leaf small { display:block; font-style:normal; font-size:clamp(10px,min(3cqw,5cqh),15px); }
.quote-leaf small { color:#765c48; }
.journal-page {
  width:min(80cqw,90cqh); padding:clamp(5px,1.5cqh,10px); border-radius:5px; background:#f9f8e9; color:#20382c;
  box-shadow:0 14px 34px #08271955; transform:rotate(-2deg);
}
.journal-page img { width:100%; height:36cqh; object-fit:cover; }
.journal-page > div { display:grid; grid-template-columns:auto 1fr; gap:2px 4%; padding:3% 2% 2%; align-items:baseline; }
.journal-page time { grid-row:span 2; color:#527154; font:550 clamp(15px,5cqw,35px)/1 var(--mono); }
.journal-page b { font-size:clamp(12px,3.6cqw,21px); }.journal-page p { font-size:clamp(10px,2.6cqw,15px); }

.camera-scene { width:89%; height:min(64cqh,52cqw); position:relative; overflow:hidden; border-radius:12px; background:#14304a; box-shadow:0 18px 44px #04172f66; }
.camera-scene img { display:block; width:100%; height:100%; object-fit:cover; }
.camera-bubble { position:absolute; left:82%; top:30%; width:25%; aspect-ratio:1; translate:-50% -50%; border-radius:100%; padding:0; overflow:hidden; box-shadow:0 5px 12px #0005; border:2px solid #fff9; touch-action:none; cursor:grab; }
.camera-bubble:active { cursor:grabbing; }
.camera-bubble img { pointer-events:none; user-select:none; }
.income-sheet { width:85%; padding:clamp(10px,5cqh,32px) 6%; color:#222e46; background:#f8faff; border-radius:14px; box-shadow:0 14px 34px #23376e20; }
.income-sheet small { color:#566073; font:500 clamp(10px,2.8cqw,15px)/1.2 var(--mono); }
.income-sheet p { margin:3cqh 0 0; font-size:clamp(12px,3cqw,18px); }
.income-sheet strong { font:650 clamp(26px,min(11cqw,19cqh),78px)/1.05 Bricolage,sans-serif; letter-spacing:-.05em; }
.income-ratio { height:clamp(5px,2.1cqh,12px); border-radius:10px; background:linear-gradient(90deg,#6359c4 84.17%,#8dc3ad 84.17%); margin:4cqh 0 2cqh; }
.income-sheet dl { display:flex; gap:12%; }.income-sheet dt { font-size:clamp(10px,2.8cqw,15px); }.income-sheet dd { font:500 clamp(12px,3.5cqw,22px)/1.3 var(--mono); }
.type-compare { width:88%; }
.type-compare label { display:flex; align-items:center; gap:12px; margin-bottom:3cqh; font-size:clamp(12px,2.7cqw,16px); }
.type-compare input { width:60%; min-width:0; border:1px solid #a0f0cf77; color:#e6fff4; border-radius:5px; padding:4px 8px; font:inherit; background:#142e35; }
.type-compare > div { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:5%; border-top:1px solid #adf9db55; padding:3cqh 1%; }
.type-compare small { font-size:clamp(10px,2.5cqw,14px); color:#bbf4df; }
.type-compare b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 clamp(20px,min(8.5cqw,16cqh),58px)/1.25 'Site SC','PingFang SC',sans-serif; }
.type-compare > div:last-child b { font-family:'Songti SC','Noto Serif CJK SC',serif; font-weight:400; }
.specimen-print { width:80%; padding:5cqh 6%; border-block:1px solid #94456577; background:linear-gradient(100deg,#fae7de,#f8d9d6); color:#72273f; box-shadow:0 16px 35px #803a411f; }
.specimen-print small { display:block; margin:0 0 3cqh; letter-spacing:.16em; font-size:clamp(10px,3cqw,16px); }
.specimen-print b { display:block; font:400 clamp(21px,11cqw,80px)/1.4 'WenKai sample',serif; }
.sans-print b { font-family:'Site SC',sans-serif; font-weight:700; }
@container (max-height:165px) {
  .quote-leaf { padding-block:4px; }.quote-leaf > span { display:none; }
  .journal-page { width:min(72cqw,142cqh); }.journal-page img { height:28cqh; }
  .income-sheet { padding-block:5px; }.income-sheet p,.income-ratio {margin-block:1cqh;}
  .demo-tools button { font-size:11px; padding:2px 10px; }
}
