:root {
  color-scheme: light;
  --ink: #272a27;
  --muted: #485049;
  --paper: #faf7ee;
  --water: #9ab6a1;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--water); }
body { margin: 0; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #285f52; outline-offset: 7px; }
.water-world { height: calc(100svh - 52px); min-height: 800px; position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 45% 32%, #b1c7ae, #9ab6a1 62%, #92ae99); }
/* Water, fish and surface shading stay inside one background stacking context.
   Foreground paper and text are opaque and are never tinted by this layer. */
.water-layer { position: absolute; inset: 0; z-index: 0; isolation: isolate; overflow: hidden; pointer-events: none; }
#water, .water-layer > canvas, .water-shade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.water-layer > canvas { z-index: 0; }
.water-shade { z-index: 1; background: radial-gradient(ellipse at 50% 45%, transparent 20%, #355a4106 100%); }
.masthead { position: absolute; z-index: 30; inset: 28px 36px auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.wordmark { display: flex; align-items: center; gap: 16px; font-family: "Avenir Next", "Trebuchet MS", sans-serif; font-size: 23px; font-weight: 600; letter-spacing: -.7px; }
.brand-divider { width: 1px; height: 15px; background: #35544740; }
.studio-name { font-family: var(--font); font-size: 11px; font-weight: 400; letter-spacing: 1px; }
.motion-button { align-items: center; display: inline-flex; gap: 9px; border: 1px solid #7b8d7f; padding: 10px 14px; border-radius: 50px; background: var(--paper); font-size: 11px; min-height: 38px; }
.motion-button[hidden] { display: none; }
.motion-button:hover { background: #ffffff; }
.motion-symbol { display: flex; align-items: center; justify-content: center; gap: 3px; width: 10px; height: 12px; }
.motion-symbol i { height: 9px; width: 2px; background: currentColor; }
.motion-button[aria-pressed="true"] .motion-symbol { font-size: 10px; }
.motion-button[aria-pressed="true"] .motion-symbol::before { content: "▶"; }
.motion-button[aria-pressed="true"] .motion-symbol i { display: none; }
.welcome { position: absolute; top: 47%; left: 50%; transform: translate(-50%, -50%); z-index: 10; text-align: center; width: min(570px, 54%); pointer-events: none; }
.welcome-intro { margin: 0 0 21px; font-size: 12px; letter-spacing: .19em; font-weight: 400; color: var(--muted); }
.welcome h1 { margin: 0; font-size: clamp(42px, 4.25vw, 64px); line-height: 1.2; font-weight: 500; letter-spacing: .045em; }
.welcome-note { margin: 19px 0 0; color: #3c463f; font-size: 15px; letter-spacing: .07em; }
.interaction-hint { color: #445048; margin: 31px 0 0; font-size: 11px; letter-spacing: .08em; }
.portals { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.gallery-portal { --gallery-top: 76px; position: absolute; z-index: 21; top: var(--gallery-top); left: 50%; transform: translateX(-50%); width: clamp(240px, 24vw, 350px); padding: 6px 6px 0; background: var(--paper); border: 1px solid #fffdf7; border-radius: 8px; box-shadow: 0 2px 4px #1e4c3b16, 0 12px 28px -12px #355e4960; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; cursor: grab; will-change: transform; }
.gallery-portal:active, .gallery-portal[data-state="dragging"] { cursor: grabbing; }
.gallery-portal[data-state="dragging"], .gallery-portal[data-state="returning"] { z-index: 25; box-shadow: 0 20px 35px -12px #355e4960; }
.gallery-preview { position: relative; display: block; aspect-ratio: 2.35; overflow: hidden; border-radius: 4px; background: #efeee9; }
.gallery-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 650ms ease; pointer-events: none; }
.gallery-preview img.is-current { opacity: 1; }
.gallery-placeholder { display: grid; position: absolute; inset: 0; place-items: center; font-size: 11px; letter-spacing: .06em; color: #777b72; }
.gallery-preview[data-ready="true"] .gallery-placeholder { display: none; }
.gallery-caption { display: flex; align-items: center; justify-content: space-between; padding: 8px 9px 9px; font-size: 12px; }
.gallery-caption small { font-size: 9px; font-weight: 400; color: #777b72; margin-left: 7px; }
.gallery-caption .entry-arrow { font-size: 16px; }
.gallery-portal:hover .entry-arrow { translate: 2px -2px; }
.portal { position: absolute; display: block; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; cursor: grab; will-change: transform; z-index: 2; border-radius: 8px; width: 216px; color: #28312e; }
.portal:active, .portal[data-state="dragging"] { cursor: grabbing; }
.portal[data-state="dragging"], .portal[data-state="returning"] { z-index: 5; }
.portal:focus-visible { outline-color: #174d3d; }
.portal-face { display: block; overflow: hidden; border-radius: 8px; background: var(--paper); border: 1px solid #fffdf7; box-shadow: 0 1px 2px #1e4c3b30, 0 7px 13px -5px #355e4945, 0 15px 28px -11px #5a866650; transition: box-shadow 250ms, scale 250ms; }
.portal:hover .portal-face, .portal:focus-visible .portal-face { box-shadow: 0 2px 3px #1e4c3b28, 0 12px 23px -7px #355e4950, 0 22px 34px -13px #5a86664a; scale: 1.035; }
.portal[data-state="dragging"] .portal-face { scale: 1.05; box-shadow: 0 20px 35px -12px #355e4960; }
.card-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px 13px; }
.card-caption strong { font-size: 14px; line-height: 1.35; display: block; font-weight: 500; letter-spacing: .025em; }
.card-caption small { display: block; margin-top: 3px; font-family: "Avenir Next", var(--font); font-size: 10px; color: #666b64; letter-spacing: .02em; }
.entry-arrow { font-family: sans-serif; font-size: 20px; font-weight: 400; opacity: .65; transition: translate 200ms; }
.portal:hover .entry-arrow { translate: 2px -2px; }
.portal-canvas { width: 238px; left: 16%; top: 14%; transform: rotate(-7deg); }
.canvas-photo { display: block; height: 142px; margin: 7px 7px 0; border-radius: 4px; overflow: hidden; }
.canvas-photo img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.portal-owui { width: 202px; left: 72%; top: 14%; transform: rotate(6deg); }
.owui-cover { position: relative; display: flex; flex-direction: column; background: #647e69; color: #edf0d6; margin: 7px 7px 0; border-radius: 4px; padding: 19px 19px 18px; height: 132px; }
.hello-en { font-size: 31px; font-family: "Avenir Next", "Trebuchet MS", sans-serif; line-height: 1.1; letter-spacing: -1.5px; font-weight: 500; }
.hello-zh { font-size: 21px; line-height: 1.9; letter-spacing: -.02em; }
.hello-dot { position: absolute; bottom: 12px; right: 13px; font-size: 31px; color: #b2c694; font-family: Georgia, serif; }
.portal-chat { width: 183px; left: 13%; top: 62%; transform: rotate(5deg); }
.portal-chat .portal-face { background: #efd5c3; border-color: #f6e2d2; }
.wish-cover { display: flex; position: relative; padding: 20px 22px 10px; height: 105px; color: #613e2b; font-size: 20px; line-height: 1.6; font-family: "Songti SC", "SimSun", serif; }
.wish-quote { position: absolute; right: 18px; top: 12px; font-size: 48px; line-height: 1; opacity: .4; }
.portal-chat .card-caption { color: #593d2d; }
.portal-chat small { color: #785743; }
.portal-insight { width: 207px; left: 75%; top: 59%; transform: rotate(-6deg); }
.insight-cover { display: flex; flex-direction: column; height: 146px; padding: 17px 20px 9px; }
.insight-kicker { font-size: 9px; font-family: "Avenir Next", sans-serif; letter-spacing: .08em; color: #6b756c; }
.insight-title { font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; font-size: 28px; line-height: 1.2; margin-top: 9px; color: #343a34; }
.insight-rule { width: 100%; height: 1px; background: #26472b26; margin-top: 13px; }
.insight-subjects { font-size: 8px; letter-spacing: .14em; margin-top: 8px; color: #6a7666; }
.portal-sudoku { width: 163px; left: 32%; top: 73%; transform: rotate(-3deg); }
.portal-aigc { width: 222px; left: 53%; top: 73%; transform: rotate(4deg); }
.aigc-cover { display: flex; flex-direction: column; justify-content: space-between; height: 112px; margin: 7px 7px 0; padding: 17px 18px; border-radius: 4px; background: #263c42; color: #faf7ee; }
.aigc-year { display: flex; align-items: center; justify-content: space-between; font: 40px/.95 "Avenir Next", sans-serif; letter-spacing: -.06em; }
.aigc-year span { font-size: 20px; font-weight: 300; color: #c9e86b; }
.aigc-subject { font-size: 9px; letter-spacing: .12em; color: #dce3db; }
.portal-aigc .card-caption strong { font-size: 12px; }
.sudoku-cover { display: block; background: #dae4e7; margin: 7px 7px 0; border-radius: 4px; padding: 13px 21px; }
.number-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #799697; width: 100%; aspect-ratio: 1; }
.number-grid b { display: grid; place-items: center; font: 19px "Avenir Next", sans-serif; color: #47676c; border-right: 1px solid #7f9b9561; border-bottom: 1px solid #7f9b9561; }
.number-grid b:nth-child(3n) { border-right: 0; }
.number-grid b:nth-child(n+7) { border-bottom: 0; }
.number-grid b:nth-child(5) { background: #f4f7ea80; }
.footer { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 0 36px; min-height: 52px; gap: 12px; font-size: 10px; color: #39443e; background: #9ab5a0; border-top: 1px solid #e0e9d62e; }
.footer div { display: flex; align-items: center; gap: 24px; }
.footer button { border: 0; background: none; padding: 12px 0; font-size: 10px; }
.footer a:hover, .footer button:hover { color: #223d30; text-decoration: underline; text-underline-offset: 3px; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
dialog { border: 1px solid #dbe5d6; border-radius: 16px; background: #f8f9ef; color: #193f38; padding: 40px; width: min(450px, calc(100vw - 32px)); box-shadow: 0 30px 100px #173e3559; }
dialog::backdrop { background: #193f3860; backdrop-filter: blur(5px); }
dialog h2 { margin: 0 0 10px; font-size: 22px; font-weight: 500; }
dialog p { font-size: 13px; line-height: 1.8; }
.close-dialog { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 26px; width: 44px; height: 44px; }
.contact { display: inline-block; font-size: 14px; margin-top: 8px; border-bottom: 1px solid #61836e; padding-bottom: 3px; }
dialog figure { margin: 25px 0; }
dialog figure img { border-radius: 6px; }
dialog figcaption { font-size: 11px; margin-top: 6px; }
dialog .disclaimer, .record { font-size: 11px; color: #5d7165; }
.record:hover { text-decoration: underline; }
@media (max-width: 1100px) and (min-width: 681px) {
  .water-world { min-height: 1120px; }
  .gallery-portal { --gallery-top: 340px; width: 240px; }
  .portal { width: 180px; }
  .portal-canvas { width: 208px; }
  .canvas-photo { height: 122px; }
  .portal-sudoku { width: 142px; }
  .portal-aigc { width: 180px; }
  .aigc-cover { padding: 18px 12px; }
  .aigc-year { font-size: 35px; }
  .portal-aigc .card-caption { padding-left: 12px; padding-right: 12px; }
  .portal-aigc .card-caption strong { font-size: 10px; }
  .sudoku-cover { padding: 10px 20px; }
  .welcome { width: 55%; top: 53%; }
  .welcome h1 { font-size: 46px; }
}
@media (min-width: 1101px) and (max-height: 820px) {
  .gallery-portal { --gallery-top: 70px; width: clamp(220px, 22vw, 360px); }
  .gallery-preview { aspect-ratio: 2.8; }
}
@media (max-width: 680px) {
  .water-world { height: calc(100svh - 78px); min-height: 1020px; }
  .masthead { inset: 22px 20px auto; gap: 12px; }
  .wordmark { font-size: 21px; }
  .brand-divider, .studio-name { display: none; }
  .motion-button { font-size: 10px; padding: 9px 12px; }
  .welcome { top: 46%; width: 92%; }
  .gallery-portal { --gallery-top: 254px; width: 204px; }
  .gallery-preview { aspect-ratio: 2.6; }
  .welcome-intro { font-size: 10px; margin-bottom: 13px; letter-spacing: .12em; }
  .welcome h1 { font-size: 37px; letter-spacing: .055em; }
  .welcome-note { font-size: 12px; margin-top: 13px; }
  .interaction-hint { font-size: 10px; margin-top: 19px; }
  .portal-canvas { width: 141px; left: 8%; top: 12%; }
  .canvas-photo { height: 74px; margin: 5px 5px 0; }
  .portal-owui { width: 124px; left: 62%; top: 13%; }
  .owui-cover { height: 76px; padding: 10px 11px; margin: 5px 5px 0; }
  .hello-en { font-size: 24px; }
  .hello-zh { font-size: 15px; line-height: 1.6; }
  .hello-dot { font-size: 23px; right: 8px; bottom: 2px; }
  .portal-chat { width: 122px; left: 8%; top: 58%; }
  .wish-cover { height: 64px; padding: 8px 14px 0; font-size: 15px; }
  .wish-quote { top: 4px; right: 10px; font-size: 32px; }
  .portal-insight { width: 133px; left: 63%; top: 59%; }
  .insight-cover { height: 90px; padding: 9px 13px 3px; }
  .insight-kicker { font-size: 6px; }
  .insight-title { font-size: 21px; margin-top: 5px; }
  .insight-rule { margin-top: 7px; }
  .insight-subjects { display: none; }
  .portal-sudoku { width: 109px; left: 12%; top: 80%; }
  .portal-aigc { width: 146px; left: 55%; top: 80%; }
  .aigc-cover { height: 86px; padding: 13px 11px; margin: 5px 5px 0; }
  .aigc-year { font-size: 31px; }
  .aigc-year span { font-size: 14px; }
  .aigc-subject { font-size: 7px; letter-spacing: .06em; }
  .portal-aigc .card-caption strong { font-size: 10px; letter-spacing: 0; }
  .sudoku-cover { margin: 5px 5px 0; padding: 8px 17px; }
  .number-grid b { font-size: 12px; }
  .card-caption { padding: 9px 11px 9px; gap: 5px; }
  .card-caption strong { font-size: 11px; }
  .card-caption small { font-size: 8px; margin-top: 2px; }
  .entry-arrow { font-size: 16px; }
  .footer { flex-direction: column; justify-content: center; min-height: 78px; padding: 11px 16px; gap: 4px; font-size: 9px; }
  .footer div { gap: 18px; }
  .footer button { padding: 6px 0; min-height: 30px; font-size: 9px; }
}
@media (max-width: 360px) {
  .portal-aigc { width: 136px; }
  .portal-canvas { width: 128px; }
  .portal-owui { width: 116px; }
  .portal-chat { width: 112px; }
  .portal-insight { width: 121px; }
  .portal-insight .insight-cover { height: 82px; }
  .portal-sudoku .sudoku-cover { padding-top: 7px; padding-bottom: 7px; }
  .welcome h1 { font-size: 33px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .portal:hover .portal-face, .portal:focus-visible .portal-face, .portal[data-state="dragging"] .portal-face { scale: 1; }
}
