/* hamoji.app (task 044). The paper, ink and one pink of the app's design book
   (design/FOUNDATIONS.md; values from src/theme/tokens.ts), in both themes for
   the pages people read; the home page paints its own sky over them. */

/* Nunito, served from here (no third party sees a reader): the rounded face
   for browsers that have no SF Pro Rounded. One variable file per script.
   The page's head fetches the files its language needs at once, and
   `fallback` lets the text wait a moment for them, so it appears in Nunito
   rather than changing into it (the owner saw the change, 2026-09-30). */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: fallback; src: url("/assets/fonts/nunito-latin.20fc9b6fc6.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: "Nunito"; font-style: normal; font-weight: 400 900; font-display: fallback; src: url("/assets/fonts/nunito-latin-ext.511ce96737.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: fallback; src: url("/assets/fonts/nunito-cyrillic.b63651df97.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: fallback; src: url("/assets/fonts/nunito-cyrillic-ext.2d06f2c340.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: fallback; src: url("/assets/fonts/nunito-vietnamese.d107f72673.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

:root {
  --desk: #EFE4D6; --card: #FFFAF3; --line: #EADCC9;
  --ink: #4B352B; --ink2: #6F5A4B; --ink3: #A8978A;
  --accent: #E8867F; --accent-ledge: #CF6F68; --on-accent: #3A2620;
  --accent-soft: #F8DAD3; --accent-ink: #A9483F;
  --shadow: 0 18px 50px rgba(75, 53, 43, .18);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --desk: #1D1916; --card: #2E2723; --line: #3E352E;
    --ink: #F3EAE0; --ink2: #B8A999; --ink3: #76695F;
    --accent: #EE968E; --accent-ledge: #B8645E; --on-accent: #2A1C17;
    --accent-soft: #4A2C28; --accent-ink: #F4A79F;
    --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { background: var(--desk); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--round); -webkit-font-smoothing: antialiased; }
:lang(ja) { --round: ui-rounded, "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif; }
:lang(zh-Hans) { --round: ui-rounded, "PingFang SC", system-ui, sans-serif; }
:lang(zh-Hant) { --round: ui-rounded, "PingFang TC", system-ui, sans-serif; }
:lang(ko) { --round: ui-rounded, "Apple SD Gothic Neo", system-ui, sans-serif; }
:lang(ar) { --round: ui-rounded, "SF Arabic Rounded", "SF Arabic", system-ui, sans-serif; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
a:focus-visible, summary:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

/* skip link, for the keyboard and the screen reader */
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: var(--shadow); }
.skip:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }

/* the bar: the name, and the language */
.bar { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 14px max(20px, env(safe-area-inset-left, 0px)); max-width: 1120px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 24px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; margin-inline-end: auto; }
.brand .heart { width: 20px; height: 20px; color: var(--accent); }

.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: 15px; white-space: nowrap; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang .chevron { opacity: .7; transition: transform .2s; }
.lang[open] .chevron { transform: rotate(180deg); }
.plate { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--desk); font-size: 13px; font-weight: 800; line-height: 1; flex: none; }
.lang-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; width: min(320px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow: auto; background: var(--card); color: var(--ink); border-radius: 22px; padding: 8px; box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line); }
.lang-pop ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.lang-pop a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; border-radius: 14px; color: inherit; text-decoration: none; font-size: 14px; font-weight: 600; min-width: 0; }
.lang-pop a .plate { width: 26px; height: 26px; font-size: 11px; }
.lang-pop a .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-pop a:hover, .lang-pop a:focus-visible { background: var(--desk); outline: none; }
.lang-pop a[aria-current="true"] { background: var(--accent-soft); font-weight: 800; }
.foot .lang-pop { top: auto; bottom: calc(100% + 8px); }

/* a page people read: the policy, the terms, the imprint, the seller's page */
.document { max-width: 44rem; margin: 0 auto; padding: 18px 20px 64px; font-size: 17px; line-height: 1.6; }
.document h1 { font-size: clamp(32px, 6vw, 46px); line-height: 1.08; font-weight: 900; letter-spacing: -.02em; margin: 18px 0 10px; text-wrap: balance; }
.document h2 { font-size: 21px; line-height: 1.25; font-weight: 800; margin: 36px 0 8px; text-wrap: balance; }
.document p, .document ul { margin: 0 0 14px; }
.document ul { padding-inline-start: 1.2em; }
.document li { margin-bottom: 6px; }
.document .updated { color: var(--ink2); font-size: 15px; font-weight: 600; }
.document .binding { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 16px; padding: 12px 16px; font-size: 15px; color: var(--ink2); }
.document .lede { font-size: 19px; color: var(--ink); }
.document .address { background: var(--card); border-radius: 16px; padding: 14px 18px; box-shadow: inset 0 0 0 1.5px var(--line); }
.commerce { margin: 24px 0 0; display: grid; gap: 10px; }
.commerce .row { background: var(--card); border-radius: 16px; padding: 12px 16px; box-shadow: inset 0 0 0 1.5px var(--line); }
.commerce dt { font-weight: 800; margin-bottom: 2px; }
.commerce dd { margin: 0; }

/* nothing here */
.not-found { text-align: center; display: grid; justify-items: center; padding-top: 32px; }
.not-found img { width: min(280px, 70vw); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 18px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 17px; text-decoration: none; box-shadow: 0 4px 0 var(--accent-ledge); }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-ledge); }

/* the foot */
.foot { max-width: 1120px; margin: 0 auto; padding: 28px 20px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1.5px solid var(--line); display: grid; gap: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a, .foot-note a { color: var(--ink2); text-decoration: none; font-weight: 700; font-size: 15px; }
.foot-links a:hover, .foot-note a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { margin: 0; color: var(--ink2); font-size: 14px; font-weight: 600; }
/* the name signs off as it does everywhere: «Hamoji» and the pink heart */
.foot-brand { white-space: nowrap; }
.foot-brand .heart { width: 13px; height: 13px; margin-inline-start: 3px; vertical-align: -1px; color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
