/* Sakura sign-in: "zen garden" (v7, approved 2026-10-03). Served as /zen/zen.<hash>.css (no inline styles; CSP 'self').
   Fonts are self-hosted Latin subsets (SIL OFL 1.1, see /public/fonts/LICENSE.md). Asset URLs below are rewritten to
   their content-hashed names by the server (src/portal/assets.ts). */
@font-face { font-family: "Shippori Mincho"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/shippori-mincho-500.7e2b2f7dffbc.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Shippori Mincho"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/shippori-mincho-600.766aefd5a6e4.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Zen Kaku Gothic New"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/zen-kaku-gothic-new-400.5b1bfc34d603.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Zen Kaku Gothic New"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/zen-kaku-gothic-new-500.e4ab8e9dc698.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Layout: a full-bleed photographic karesansui (WebGL, 2.5D layers) with one liquid-glass card resting to the right of the tree (centred low on phones). Single deliberate white theme. */
:root {
  --ink: #2a2422;          /* sumi ink for all text */
  --ink-soft: #4a403d;
  --blush: #d27d94;        /* sakura accent */
  --shu: #c3182b;          /* hanko seal / torii red for the 桜 mark */
  --paper: #eef1f4;        /* cool plaster / mist base */
  --focus: #b8466b;
  --ms-border: #8c8c8c;    /* Microsoft sign-in button (light) */
  --ms-text: #5e5e5e;
  --ms-bg: #ffffff;
  --display: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", Georgia, serif;
  --ui: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
html, body { height: 100%; }
body { margin: 0; overflow: hidden; color: var(--ink); font-family: var(--ui); background: var(--paper); }
/* First paint: tiny blurred photo (inline), then the WebGL scene fades in over it */
#ph { position: fixed; inset: -40px; background-size: cover; background-repeat: no-repeat; filter: blur(18px) saturate(1.3) hue-rotate(-4deg); transform: translateZ(0); }
#garden { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s ease; touch-action: none; }
body.gl-ready #garden { opacity: 1; }
#still { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; filter: saturate(1.3); }
body.still-ready #still { opacity: 1; }

.stage {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: flex-end;   /* vertically centred, right side */
  padding-inline: max(16px, 7vw); padding-block: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto; pointer-events: none;
}
.card {
  pointer-events: auto; position: relative; box-sizing: border-box;
  width: min(392px, 100%); padding: 40px 36px 26px; border-radius: 28px; text-align: center;
  display: grid; gap: 18px; justify-items: center;
  /* Fallback glass (no WebGL): replaced by true refraction in the shader */
  background: rgba(255,255,255,.38); border: 1px solid rgba(255,255,255,.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 18px 48px rgba(60,40,40,.12);
}
body.gl-ready .card { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mark { width: 34px; height: 34px; display: block; fill: var(--shu); filter: drop-shadow(0 1px 0 rgba(255,255,255,.55)); } /* outlined from Shippori Mincho: no font dependency */
.word { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(40px, 6vw, 52px); line-height: 1; letter-spacing: .06em; color: var(--ink); text-wrap: balance; }
.sub { margin: -8px 0 0; font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); }
.greet { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink); max-width: 30ch; }
.ms {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 41px; padding: 0 16px; width: 100%; box-sizing: border-box;
  background: var(--ms-bg); border: 1px solid var(--ms-border); color: var(--ms-text); text-decoration: none; border-radius: 4px;
  font: 600 15px/1 "Segoe UI", system-ui, -apple-system, sans-serif; transition: box-shadow .2s ease, transform .2s ease;
}
.ms:hover { box-shadow: 0 6px 18px rgba(80,40,50,.14); }
.ms:active { transform: translateY(1px); }
.ms:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.ms svg { width: 21px; height: 21px; flex: none; }
.foot { margin: 2px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); letter-spacing: .02em; }
.hint { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(42,36,34,.5); pointer-events: none; white-space: nowrap; transition: opacity 1.2s ease; }
.hint.gone { opacity: 0; }

@media (max-width: 760px), (orientation: portrait) {
  .stage { justify-content: center; align-items: flex-end; padding-block: 16px max(44px, calc(env(safe-area-inset-bottom, 0px) + 36px)); }
  .card { padding: 30px 24px 20px; gap: 14px; }
}
@media (max-height: 520px) { .stage { align-items: flex-start; } .card { padding: 22px 22px 16px; gap: 10px; } .greet { display: none; } }
@media (prefers-reduced-motion: reduce) { #garden, #still, .hint { transition: none; } }

/* No JavaScript: a static photo plate (the script replaces this with the blurred placeholder, then WebGL or a still). */
#ph { background: var(--paper) url("/zen/L-bg-1280.309b61e8e217.webp") 30% 55% / cover no-repeat; }
@media (max-width: 760px), (orientation: portrait) { #ph { background-image: url("/zen/P-bg-1080.891b3385e4bc.webp"); background-position: 42% 44%; } }
html.js #ph { background-image: none; }
html:not(.js) #ph { inset: 0; filter: saturate(1.3); }   /* sharp still plate, not the blurred placeholder look */

/* Messages inside the card (sign-in errors, "waiting for access") */
.msg { margin: 0; width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; text-align: left;
  background: rgba(255,255,255,.66); border: 1px solid rgba(195,24,43,.28); color: #7a1424; }
.msg.info { border-color: rgba(42,36,34,.18); color: var(--ink); }
.msg strong { font-weight: 600; }
.signout { margin: 0; } .signout button { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.signout button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The "stir the garden" hint only makes sense with the animated scene. */
.hint { display: none; } html.js .hint { display: block; }
/* "by Kabo Group" under the wordmark (pink logo, SVG; the wordmark in it is ink, so AA holds on the frosted card) */
.sub.by { display: inline-flex; align-items: center; gap: 10px; margin: -2px 0 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.sub.by .kabo { display: block; width: clamp(118px, 12vw, 140px); height: auto; }
