:root {
  color-scheme: light;
  --paper: #faf8f3;
  --surface: #fbf6eb;
  --ink: #201f1c;
  --muted: #68615a;
  --line: #e2d9ca;
  --orange: #c95b27;
  --glaze: #efd6c4;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-brand-en: Georgia, "Noto Serif SC", serif;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.canvas {
  min-block-size: 100vh;
  min-block-size: 100svh;
  width: min(100% - 48px, 1080px);
  margin-inline: auto;
  padding-block: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

/* Brand Header */
.top-brand {
  display: flex;
  justify-content: center;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}

.brand img {
  align-self: end;
  inline-size: 4.6em;
  block-size: auto;
}

/* Main Stage */
.main-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.hero-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.work-scene {
  display: block;
  inline-size: min(100%, 295px);
  block-size: auto;
  overflow: visible;
}

.ink { fill: var(--ink); }
.drawn {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.paper { fill: var(--paper); }
.cup-glaze { fill: var(--glaze); }
.steam {
  opacity: 0.56;
  stroke: var(--orange);
  stroke-width: 3;
}

.tagline {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.08rem, 1.85vw, 1.28rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.015em;
}

/* Narrative Comic Gallery */
.comic-gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.comic-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 14px 20px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.comic-tile:hover {
  transform: translateY(-5px);
  border-color: var(--ink);
  box-shadow: 0 12px 28px rgba(32, 31, 28, 0.065);
}

.comic-frame {
  width: 100%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
}

.comic-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: brightness(1.03) contrast(1.03);
  transition: transform 0.28s ease;
}

.comic-tile:hover .comic-frame img {
  transform: scale(1.045);
}

.tile-caption {
  margin-top: 12px;
  text-align: center;
}

.tile-caption h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tile-caption h2.en-brand {
  font-family: var(--font-brand-en);
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tile-caption p {
  margin: 4px 0 0;
  font-size: 0.81rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* Quiet Footer */
.quiet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}

.status-dot {
  inline-size: 0.46rem;
  block-size: 0.46rem;
  border-radius: 50%;
  background: var(--orange);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Micro Animations */
@media (prefers-reduced-motion: no-preference) {
  #eyes {
    transform-box: fill-box;
    transform-origin: center;
    animation: blink 13.6s ease-in-out infinite;
  }
  #far-arm, #near-arm {
    transform-box: view-box;
    animation: type 6.9s ease-in-out infinite;
  }
  #far-arm { transform-origin: 206px 244px; animation-delay: -1.27s; }
  #near-arm { transform-origin: 205px 244px; }
  .steam { animation: rise 5.4s ease-in-out infinite; }
  .steam--left { animation-delay: -1.7s; }
  .steam--right { animation-delay: -3.9s; }
  .status-dot { animation: breathe 4.8s ease-in-out infinite; }
}

@keyframes blink {
  0%, 19%, 20.5%, 63%, 64.5%, 68%, 69.5%, 100% { transform: scaleY(1); }
  19.65%, 63.65%, 68.65% { transform: scaleY(0.1); }
}
@keyframes type {
  0%, 7%, 13%, 19.5%, 39%, 54%, 60.5%, 68%, 100% { transform: rotate(0); }
  9.5%, 16%, 56.5%, 64% { transform: rotate(0.85deg); }
}
@keyframes rise {
  0% { opacity: 0; transform: translateY(5px); }
  31%, 51% { opacity: 0.62; }
  100% { opacity: 0; transform: translate(3px, -12px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: scale(0.89); }
  50% { opacity: 1; transform: scale(1.07); }
}

/* Tablet & Mobile: 2x2 Narrative Comic Grid */
@media (max-width: 860px) {
  .canvas {
    width: min(100% - 28px, 540px);
    padding-block: 20px 22px;
    gap: 18px;
  }

  .work-scene {
    inline-size: min(100%, 225px);
  }

  .comic-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .comic-tile {
    padding: 14px 10px 15px;
    border-radius: 15px;
  }

  .tile-caption h2 {
    font-size: 1.08rem;
  }

  .tile-caption h2.en-brand {
    font-size: 1.12rem;
  }

  .tile-caption p {
    font-size: 0.76rem;
  }

  .quiet-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
