@font-face { font-family: "OB Wordmark"; font-weight: 700; font-display: block; src: url(assets/ZenMaruGothic-700-latin.woff2) format("woff2"); }

:root {
  --sc-canvas:     #08182B;
  --sc-surface:    #0E2C4A;
  --sc-ink:        #F2F6FB;
  --sc-ink-soft:   #A9C0D8;
  --sc-accent:     #FF6B4A;
  --sc-accent-ink: #1C0B06;
  --sc-font-display: "Noto Sans TC", "PingFang TC", "PingFang HK", system-ui, sans-serif;
  --sc-font-text:    "Noto Sans TC", "PingFang TC", "PingFang HK", system-ui, sans-serif;
  --sc-shadow-color: 212 70% 4%;

  --kb-bg: #E3E4E9;
  --kb-key: #FEFDFB;
  --kb-mod: #C3BDB3;
  --kb-letter: #1A1917;
  --kb-radical: #B0603F;
  --kb-accent: #2C5FCB;
  --kb-soft: rgba(30, 28, 25, .5);
  --field-bg: rgba(9, 24, 42, .82);
  --caret: #5FE3E8;
  --chrome-h: 60px;
  --keys-font: -apple-system, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
}

body {
  background:
    radial-gradient(70rem 48rem at 92% -12%, rgba(29, 94, 150, .55), rgba(29, 94, 150, 0) 62%),
    linear-gradient(165deg, #0E2C4A 0%, #0A2038 38%, #08182B 70%, #07152A 100%) fixed;
  letter-spacing: .01em;
  line-height: 1.7;
}
em { font-style: normal; color: var(--sc-accent); }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: 8px;
}
.wordmark { font-family: "OB Wordmark", ui-rounded, var(--sc-font-display); font-weight: 700; letter-spacing: -0.035em; }

/* ---------------------------------------------------------------- chrome -- */
.chrome {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome); height: var(--chrome-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-4);
  padding: 0 var(--sc-gutter);
  background: linear-gradient(to bottom, rgba(8, 24, 43, .92), rgba(8, 24, 43, .72));
  -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid rgba(160, 200, 240, .08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--sc-e1); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand .wordmark { font-size: 1.12rem; }
.brand__sub { font-size: .72rem; color: var(--sc-ink-soft); letter-spacing: .06em; }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(160, 200, 240, .08); }
.tabs a {
  padding: 6px 14px; border-radius: 9px; font-size: .88rem; text-decoration: none; color: var(--sc-ink-soft);
  transition: background-color 160ms var(--sc-ease-out), color 160ms var(--sc-ease-out);
}
.tabs a[aria-current="true"] { background: rgba(242, 246, 251, .12); color: var(--sc-ink); }
.tabs a.tabs__try { color: var(--sc-accent); }
@media (hover: hover) and (pointer: fine) { .tabs a:hover { color: var(--sc-ink); } }
.tabs a:active { transform: translateY(1px); }

/* --------------------------------------------------------- the type act -- */
.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding: calc(var(--chrome-h) + var(--sc-5)) var(--sc-gutter) var(--sc-6);
  overflow: hidden;
}
.radicals { position: absolute; inset: 0; pointer-events: none; }
.radicals span {
  position: absolute; left: var(--x); top: var(--y);
  font-size: calc(clamp(5rem, 11vw, 10rem) * var(--s)); font-weight: 700; line-height: 1;
  color: #1b4f82; opacity: .28;
  transform: translate3d(calc(var(--mx, 0) * var(--d) * -28px), calc((var(--sc-p, 0) * -140px - var(--my, 0) * 20px) * var(--d)), 0);
  filter: blur(calc((1 - var(--d)) * 3px));
}
.panel { position: relative; height: min(34rem, 70vh); align-self: center; }
.note { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: var(--sc-4); max-width: 30rem; }
.hero-title { margin: 0; font-size: clamp(2.3rem, 1.5rem + 3vw, 4.2rem); line-height: 1.12; font-weight: 900; letter-spacing: .01em; text-wrap: balance; }
.hero-body { margin: 0; font-size: var(--sc-t-lg); color: #D8E6F5; max-width: 24em; text-wrap: pretty; }
.note__label { margin: 0; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); letter-spacing: .12em; }
.note__big { margin: 0; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.6rem); font-weight: 900; line-height: 1.15; letter-spacing: .01em; text-wrap: balance; }
.note--quiet .note__big { font-weight: 500; color: #D8E6F5; }
.note__line { margin: 0; font-size: var(--sc-t-lg); color: #D8E6F5; max-width: 26em; text-wrap: pretty; }
.status { margin: var(--sc-2) 0 0; display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.status__n { font-size: clamp(3rem, 2rem + 4vw, 5.5rem); font-weight: 900; line-height: 1; color: var(--sc-accent); min-width: 1.2ch; }
.status__unit { font-size: var(--sc-t-xl); color: var(--sc-ink-soft); }

.cta {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 14px; background: var(--sc-accent); color: var(--sc-accent-ink);
  font-weight: 700; font-size: var(--sc-t-base); text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 0 rgba(120, 30, 10, .45), var(--sc-e2);
  transition: transform 140ms var(--sc-ease-out), filter 140ms var(--sc-ease-out);
}
.cta::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--apple) center/contain no-repeat; mask: var(--apple) center/contain no-repeat; }
:root { --apple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.4 12.6c0-2.4 2-3.6 2.1-3.7-1.1-1.7-2.9-1.9-3.5-1.9-1.5-.2-2.9.9-3.7.9-.8 0-1.9-.9-3.2-.8-1.6 0-3.1 1-4 2.4-1.7 3-.4 7.4 1.2 9.8.8 1.2 1.8 2.5 3 2.4 1.2 0 1.7-.8 3.1-.8 1.5 0 1.9.8 3.2.8 1.3 0 2.1-1.2 2.9-2.4.9-1.4 1.3-2.7 1.3-2.8 0 0-2.4-.9-2.4-3.9zM14 5.3c.7-.8 1.1-1.9 1-3-1 0-2.1.7-2.8 1.5-.6.7-1.2 1.8-1 2.9 1.1.1 2.1-.6 2.8-1.4z'/%3E%3C/svg%3E"); }
@media (hover: hover) and (pointer: fine) { .cta:hover { filter: brightness(1.06); } }
.cta:active { transform: scale(.97); }

/* ------------------------------------------------------------ surface -- */
.surface, .try-surface { position: relative; container-type: inline-size; width: 100%; }
.surface { justify-self: end; }
.field {
  position: relative; z-index: 1; display: flex; align-items: center; min-height: 15cqw;
  padding: 0 6cqw; border-radius: 7cqw; background: var(--field-bg);
  border: 1.5px solid rgba(160, 200, 240, .18); box-shadow: var(--sc-e3);
  font-size: 7.2cqw; line-height: 1; white-space: nowrap; overflow: hidden;
}
.field__text { display: inline-flex; }
.field__text .ch { display: inline-block; transform-origin: 50% 80%; }
.field__text .latin { font-family: var(--keys-font); }
.caret { display: inline-block; width: .5cqw; min-width: 2px; height: 8cqw; margin-left: 1cqw; background: var(--caret); border-radius: 2px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.field__placeholder { position: absolute; left: 8cqw; color: rgba(169, 192, 216, .55); font-size: 4.6cqw; pointer-events: none; }
.field--live:not(.has-text) .caret { margin-left: 0; }
.field--live.has-text .field__placeholder { display: none; }

.otter-peek {
  position: absolute; z-index: 2; right: 3%; width: 46%; height: auto; top: -22%;
  transform: translate3d(0, calc(var(--peek, 0) * 64%), 0) rotate(-4deg);
  opacity: calc(1 - var(--peek, 0));
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35));
}

.kb {
  --pad: 1.6cqw; --gap: 1.35cqw;
  --kw: calc((100cqw - 2 * var(--pad) - 9 * var(--gap)) / 10);
  --kh: calc(var(--kw) * 1.3);
  position: relative; z-index: 3; margin-top: 4.5cqw; border-radius: 5.5cqw; background: var(--kb-bg);
  padding: 0 var(--pad) calc(var(--pad) * 2); box-shadow: var(--sc-e3), inset 0 1px 0 rgba(255, 255, 255, .7);
  color: var(--kb-letter); font-family: var(--keys-font); user-select: none; -webkit-user-select: none;
  transition: opacity 220ms var(--sc-ease-out), filter 220ms var(--sc-ease-out);
}
.kb.is-dim { opacity: .38; filter: saturate(.6); }
.kb-bar { position: relative; height: 11cqw; display: flex; align-items: center; }
.kb-idle { position: absolute; left: 2cqw; top: 0; bottom: 0; display: flex; align-items: center; gap: 1.6cqw; font-size: 3.6cqw; white-space: nowrap; }
.kb-idle .kb-name { color: var(--kb-accent); }
.kb-idle .kb-mode { color: var(--kb-soft); font-family: var(--sc-font-text); display: inline-grid; }
.kb-mode span { grid-area: 1 / 1; }
.kb-code { position: absolute; left: 2.2cqw; top: .6cqw; font-size: 2.2cqw; line-height: 1; color: var(--kb-accent); letter-spacing: .1em; font-family: var(--sc-font-text); }
.kb-cands { position: absolute; left: 0; right: 9cqw; top: 1.4cqw; bottom: 0; display: flex; align-items: center; gap: .6cqw; overflow: hidden; }
.kb-cand {
  flex: none; border: 0; background: none; padding: 1.2cqw 2.4cqw; border-radius: 2.4cqw;
  font-family: var(--sc-font-text); font-size: 4.4cqw; line-height: 1.1; color: var(--kb-letter); cursor: default;
}
.kb-cand.is-lead { background: rgba(26, 25, 23, .08); }
.kb-cand.is-press { background: rgba(44, 95, 203, .18); }
.kb--live .kb-cand { cursor: pointer; }
.kb-gear { position: absolute; right: 2cqw; width: 5cqw; height: 5cqw; color: #8E8A84; }
.kb-keys { position: relative; display: flex; flex-direction: column; gap: calc(var(--gap) * 1.55); }
.kb--live .kb-keys { touch-action: none; }
.kb-row { display: flex; gap: var(--gap); justify-content: center; }
.key {
  position: relative; flex: 0 0 var(--kw); height: var(--kh); border: 0; padding: 0; border-radius: 1.4cqw;
  background: var(--kb-key); box-shadow: 0 .35cqw 0 rgba(70, 58, 44, .28);
  display: flex; align-items: center; justify-content: center; color: inherit; font: inherit; cursor: default;
}
.key .let { font-size: 5cqw; font-weight: 500; }
.key .rad { position: absolute; top: .5cqw; right: .9cqw; font-size: 2.3cqw; color: var(--kb-radical); font-family: var(--sc-font-text); transition: opacity 200ms var(--sc-ease-out); }
.kb.no-radicals .key .rad { opacity: 0; }
.key.mod { background: var(--kb-mod); font-size: 3.6cqw; }
.key.w15 { flex-basis: calc(var(--kw) * 1.5 + var(--gap) * .5); }
.key.w12 { flex-basis: calc(var(--kw) * 1.2); }
.key.space { flex: 1 1 auto; font-size: 3.2cqw; letter-spacing: .5em; color: var(--kb-soft); font-family: var(--sc-font-text); }
.key.ret { flex-basis: calc(var(--kw) * 1.9); background: var(--kb-accent); color: #fff; }
.key.zh { font-family: var(--sc-font-text); }
.key svg { width: 4.6cqw; height: 4.6cqw; }
.key.is-press::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(26, 25, 23, .16); }
.key.is-mode { background: #fff; box-shadow: 0 0 0 .5cqw var(--kb-accent); }
.kb--live .key[data-k] { cursor: pointer; }
.kb-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kb-trail polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------- themes rail -- */
.themes-stage { display: flex; align-items: center; padding-top: var(--chrome-h); overflow: hidden; }
.rail { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); padding: 0 var(--sc-gutter); width: max-content; }
.rail__lead { flex: 0 0 min(26rem, 80vw); }
.section-title { margin: 0 0 var(--sc-4); font-size: clamp(2rem, 1.3rem + 2.6vw, 3.6rem); line-height: 1.15; font-weight: 900; letter-spacing: .01em; text-wrap: balance; }
.section-body { margin: 0; font-size: var(--sc-t-lg); color: #D8E6F5; max-width: 26em; text-wrap: pretty; }
.theme { margin: 0; flex: 0 0 clamp(17rem, 30vw, 27rem); }
.theme img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--sc-e3); outline: 1px solid rgba(160, 200, 240, .12); outline-offset: -1px; }
.theme figcaption { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; margin-top: var(--sc-4); }
.theme figcaption b { font-size: var(--sc-t-xl); font-weight: 700; }
.theme figcaption span { font-family: var(--keys-font); color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.theme figcaption p { grid-column: 1 / -1; margin: 2px 0 0; color: #C7D7E8; font-size: var(--sc-t-sm); }
.theme figcaption i { grid-column: 1 / -1; justify-self: start; margin-top: 8px; font-style: normal; font-size: var(--sc-t-xs); color: var(--sc-accent); border: 1px solid currentColor; border-radius: 6px; padding: 1px 8px; }
.rail__end { flex: 0 0 min(18rem, 70vw); color: #D8E6F5; font-size: var(--sc-t-lg); }
@media (prefers-reduced-motion: no-preference) {
  .theme { opacity: calc(.55 + .45 * var(--settle, 1)); }
}

/* ------------------------------------------------------------- privacy -- */
.act-privacy { padding-top: calc(var(--sc-section) * .8); padding-bottom: calc(var(--sc-section) * .7); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(2rem, 6vw, 6rem); row-gap: var(--sc-8); align-items: start; }
.rows { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: rgba(14, 44, 74, .72); box-shadow: var(--sc-e2), var(--sc-edge); }
.rows li { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; }
.rows li + li { border-top: 1px solid rgba(160, 200, 240, .1); }
.rows b { font-size: var(--sc-t-lg); }
.rows span { color: #C7D7E8; font-size: var(--sc-t-base); }
.extras { grid-column: 1 / -1; }
.extras h3 { margin: 0 0 var(--sc-4); font-size: var(--sc-t-xl); }
.extras ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 10px 32px; }
.extras li { padding: 12px 0; border-top: 1px solid rgba(160, 200, 240, .14); color: #D8E6F5; }
.extras li b { font-family: var(--keys-font); color: var(--sc-accent); margin-right: 4px; }

/* ----------------------------------------------------------------- try -- */
.try-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34rem);
  column-gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding: calc(var(--chrome-h) + var(--sc-5)) var(--sc-gutter) 0;
}
.try-copy { display: flex; flex-direction: column; gap: var(--sc-5); }
.download { display: flex; flex-direction: column; gap: var(--sc-3); }
.download__hint { margin: 0; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.store-hint { margin: 0; font-size: var(--sc-t-base); color: #D8E6F5; }
.store-hint b { color: var(--sc-accent); }
.no-store [data-appstore] { display: none; }
html:not(.no-store) .store-hint { display: none; }
.try-surface { justify-self: end; }
.try-note { margin: var(--sc-4) 0 0; color: var(--sc-ink-soft); font-size: var(--sc-t-xs); line-height: 1.6; }
.otter-cheer {
  position: absolute; z-index: 4; width: 28%; aspect-ratio: 1; right: -3%; top: -30%;
  background: url(assets/otter-cheer.png) 0 0 / 200% 200% no-repeat;
  opacity: 0; transform: translateY(12px) scale(.95);
  transition: opacity 180ms var(--sc-ease-out), transform 240ms var(--sc-ease-out);
  pointer-events: none;
}
.otter-cheer[data-f="1"] { background-position: 100% 0; }
.otter-cheer[data-f="2"] { background-position: 0 100%; }
.otter-cheer[data-f="3"] { background-position: 100% 100%; }
.otter-cheer.is-on { opacity: 1; transform: none; }
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sc-3);
  padding: var(--sc-5) var(--sc-gutter) max(var(--sc-5), env(safe-area-inset-bottom));
  border-top: 1px solid rgba(160, 200, 240, .1); color: var(--sc-ink-soft); font-size: var(--sc-t-sm);
}
.foot nav { display: flex; flex-wrap: wrap; gap: var(--sc-5); }
.foot p { margin: 0; }
.field--live:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; }

/* -------------------------------------------------------------- phone -- */
@media (max-width: 860px) {
  :root { --chrome-h: 54px; }
  .tabs a:not(.tabs__try) { display: none; }
  .tabs { background: none; }
  .brand__sub { display: none; }
  .stage {
    grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: var(--sc-4);
    padding: calc(var(--chrome-h) + var(--sc-3)) 16px max(16px, env(safe-area-inset-bottom));
    align-items: end;
  }
  .panel { height: 100%; min-height: 12rem; }
  .note { justify-content: flex-end; gap: var(--sc-3); }
  .hero-title { font-size: clamp(2rem, 9vw, 2.6rem); }
  .hero-body, .note__line { font-size: var(--sc-t-base); }
  .note__big { font-size: clamp(1.75rem, 8vw, 2.3rem); }
  .status__n { font-size: 3rem; }
  .surface { justify-self: stretch; }
  .otter-peek { width: 40%; top: -12%; right: 2%; }
  .radicals span { opacity: .2; }
  .rail__lead { flex-basis: 78vw; }
  .rail__end { flex-basis: 40vw; font-size: var(--sc-t-base); }
  .theme { flex-basis: 78vw; }
  .privacy-grid { grid-template-columns: 1fr; row-gap: var(--sc-6); }
  .try-stage { grid-template-columns: 1fr; align-content: center; row-gap: var(--sc-5); padding: calc(var(--chrome-h) + var(--sc-3)) 16px 16px; }
  .try-copy { gap: var(--sc-3); }
  .try-copy .section-title { margin-bottom: 0; font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .try-copy .section-body { font-size: var(--sc-t-base); }
  .try-surface { justify-self: stretch; }
  .otter-cheer { top: -30%; width: 26%; right: 0; }
  .foot { flex-direction: column; padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .hero-body { display: none; }
  .try-copy .section-body { display: none; }
  html:not(.no-store) .download__hint { display: none; }
  .try-stage { row-gap: var(--sc-3); }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .radicals span { transform: none; }
  .otter-peek { transform: rotate(-4deg); }
}
