/*
 * Shared by the two sample sites (fictional businesses made by Tobico).
 * Each sample sets its own colours through these custom properties:
 *   --s-bg, --s-ink, --s-muted, --s-line, --s-accent, --s-focus, --s-flag-bg, --s-flag-ink
 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p, ul, ol, dl, dd, h1, h2, h3, h4 { margin: 0; }
:focus-visible { outline: 3px solid var(--s-focus); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; padding: 0.6rem 1rem; border-radius: 6px; background: var(--s-ink); color: var(--s-bg); font-weight: 700; text-decoration: none; }
.skip:focus { top: 0.75rem; }

/* "This is a sample" strip (top of page) */
.concept-strip { background: var(--s-flag-bg); color: var(--s-flag-ink); font-family: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif; font-size: 0.8rem; line-height: 1.55; letter-spacing: 0.01em; }
.concept-strip p { max-width: 76rem; margin-inline: auto; padding: 0.5rem clamp(1rem, 0.5rem + 2vw, 2.5rem); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.75rem; }
.concept-strip strong { font-weight: 700; }
.concept-strip span { opacity: 0.88; }
.concept-strip a { color: inherit; font-weight: 700; text-underline-offset: 0.2em; white-space: nowrap; display: inline-flex; align-items: center; min-height: 1.5rem; }
.concept-strip a:focus-visible { outline-color: currentColor; }

/* Always-visible pill (bottom left) */
.concept-pill {
  position: fixed; left: max(0.75rem, env(safe-area-inset-left)); bottom: max(0.75rem, env(safe-area-inset-bottom)); z-index: 60;
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.25rem; padding: 0.3rem 0.85rem 0.3rem 0.7rem;
  border-radius: 999px; background: var(--s-flag-bg); color: var(--s-flag-ink); box-shadow: 0 2px 10px rgb(0 0 0 / 0.18);
  font: 600 0.75rem/1.2 "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif; letter-spacing: 0.02em; text-decoration: none;
}
.concept-pill:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.concept-pill-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #F08A57; flex: none; }
body { padding-bottom: 3.5rem; }

/* "What this would be on a real site" annotations */
.sample-note {
  margin-top: 1.5rem; max-width: 40rem; padding: 0.7rem 0.9rem; border: 1px dashed currentColor; border-radius: 8px;
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif; font-size: 0.85rem; line-height: 1.6; letter-spacing: 0.01em; color: var(--s-muted);
}
.sample-tag { display: inline-block; margin-right: 0.6em; padding: 0.05em 0.5em; border-radius: 4px; background: var(--s-flag-bg); color: var(--s-flag-ink); font-size: 0.75rem; font-weight: 700; }

/* 日本語 / EN switch */
.s-lang { display: inline-flex; padding: 3px; border: 1px solid var(--s-line); border-radius: 999px; }
.s-lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.25rem; padding: 0 0.7rem; border-radius: 999px; color: var(--s-ink); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.s-lang a[aria-current] { background: var(--s-ink); color: var(--s-bg); }
.s-lang a:not([aria-current]):hover { text-decoration: underline; text-underline-offset: 0.2em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Phones: a shorter strip; the full explanation is in the footer and the pill stays on screen */
@media (max-width: 30rem) { .concept-strip p > span { display: none; } }

/* QA pass (2026-10-20): balanced last lines; Japanese breaks between phrases */
:is(p, li, dd, span, figcaption, h3, h4, time) { text-wrap: pretty; }
html[lang="ja"] :is(p, li, dd, b, span, figcaption, h3, h4) { word-break: auto-phrase; }
.sample-note { max-width: 34rem; }

/* Touch sizes (2026-10-20): 日本語/EN and the sample pill at least 44px tall */
.s-lang a { min-height: 2.75rem; }
.concept-pill { min-height: 2.75rem; }
@media (min-width: 21rem) { header .s-lang a[lang="en"] { min-width: 2.75rem; } }
