/* Shared: tokens, reset, header navigation, page shell. */
:root {
  --paper: #fbf5eb;
  --card: #fffdf6;
  --ink: #65432f;
  --soft: #856b57;
  --muted: #947c67;
  --accent: #a17e60;
  --border: #d9c2a8;
  --line: #65432f28;
  --focus: #986b47;
  /* more theme colours — defaults are the original cream & brown; a pet's theme (css/theme.css) overrides them */
  --accent-deep: #a17b5b;      /* the logo dot, highlighted words in titles */
  --glow: #fffaf0;             /* soft light behind the page top */
  --on-ink: #fffaf2;           /* text on dark (ink-coloured) buttons */
  --shadow-rgb: 101 67 47;     /* card / photo shadows (used with transparency) */
  --shadow-deep-rgb: 81 52 33;
  --backdrop: #513b2b77;       /* behind the photo viewer */
  --rule: #c9ab8b;             /* short decorative lines */
  --border-soft: #e7d6c1;
  --tint: #f4ead9;             /* pale fill: film cards, photo backgrounds */
  --img-bg: #f3e9dc;
  --viewer-bg: #f4eadc;
  --viewer-border: #dac2a6;
  --input: #fffcf5;
  --glass: #fffcf2e8;
  --glass-strong: #fffdf4ed;
  --video-bg: #241810;
  --chip: #3d2a1ecc;
  --hint: #90725b;             /* home page hint text */
  --hint-strong: #7d5f49;
  --bubble: #fffaf2;
  --bubble-border: #e6d2bb;
  --hover: #f0e1cd;
  --focus-soft: #b58c66;
  --orbit: #c1a08020;
  --floor: #7b715b40;
  --heart: #be786d;
  --sun: #c9a25a;
  /* optional: --title / --title-em = colour of "hello," and of the name on the home page (default: ink);
     --title-fill / --title-em-fill = a gradient instead (set --title / --title-em to transparent);
     --em-color / --em-fill = the highlighted word in page titles (「我是 HASH」「我們的時光」) */
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Arial, 'PingFang TC', 'Noto Sans TC', sans-serif;
  --gutter: 4.2vw;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
img, video { max-width: 100%; }
/* no long-press "save image" on phones, no dragging images out (with js/protect.js) */
img, video { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
  overflow-x: clip;
  background: radial-gradient(ellipse at 50% 30%, var(--glow) 0, transparent 60%);
}

/* Header */
.site-header {
  height: 106px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
/* Logo: the pet's round avatar + italic serif name */
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 50%; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-name { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: -.5px; }
.brand-dot { color: var(--accent-deep); }
.brand-sub { font-size: 8px; letter-spacing: 2.4px; font-weight: 500; }
.site-nav { display: flex; gap: 34px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 13px; letter-spacing: 1.5px; padding: 8px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.site-nav a:hover { border-bottom-color: var(--border); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Sub-page content */
.content { flex: 1 0 auto; padding: 36px 4% 70px; }
.page-intro { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 22px; }
.tiny-label { font-size: 8px; letter-spacing: 1.9px; }
.page-title { font-family: Georgia, 'PingFang TC', serif; font-size: clamp(24px, 2.4vw, 34px); font-weight: 400; line-height: 1.4; letter-spacing: 2px; margin: 10px 0 0; }
.page-title em { font-style: normal; color: var(--em-color, var(--accent-deep)); background: var(--em-fill, none); -webkit-background-clip: text; background-clip: text; }
.page-lead { font-size: 13px; line-height: 1.8; color: var(--soft); margin: 0; }

@media (max-width: 700px) {
  :root { --gutter: 6vw; }
  .site-header { height: 83px; }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 25px; }
  .brand-sub { font-size: 6px; letter-spacing: 1.4px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 12px; letter-spacing: .5px; }
  .site-nav .nav-home { display: none; }
  .content { padding: 26px 0 50px; }
  .page-intro { display: block; margin-bottom: 16px; }
  .page-title { font-size: 23px; letter-spacing: 1px; }
  .page-lead { font-size: 12px; margin-top: 6px; }
}
@media (max-width: 360px) {
  .site-header { gap: 10px; }
  .brand { gap: 7px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 22px; }
  .site-nav { gap: 12px; }
}
@media (max-width: 320px) {
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 19px; }
  .brand-sub { display: none; }
  .site-nav { gap: 9px; }
  .site-nav a { font-size: 11px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
