/* Japanese Sweet Pastel Theme — Upgraded with Google Stitch */

:root,
:root[data-theme='light'] {
  --bg: #FFFBF7;
  --surface: #FFFFFF;
  --surface-low: #FFF2F5;
  --surface-mint: #EFFAF6;
  --surface-high: #FFE6EB;
  --surface-callout: rgba(232, 122, 144, 0.08);
  --ambient-pink: rgba(255, 206, 220, 0.36);
  --ambient-mint: rgba(182, 238, 222, 0.32);
  --dot-color: rgba(232, 122, 144, 0.14);

  --text: #42353B;
  --text-secondary: #75636B;
  --text-muted: #A18F97;
  --border: #F2E2E6;
  --border-strong: #E6C7D0;

  --accent: #E87A90;
  --accent-contrast: #FFFFFF;
  --accent-soft: rgba(232, 122, 144, 0.16);
  --teal: #4EA896;
  --teal-soft: rgba(78, 168, 150, 0.16);

  --shadow-xs: 0 2px 8px rgba(232, 122, 144, 0.08);
  --shadow-sm: 0 8px 22px rgba(232, 122, 144, 0.11);
  --shadow-md: 0 14px 34px rgba(215, 120, 142, 0.14);
  --shadow-float: 0 10px 26px rgba(215, 120, 142, 0.2);

  --terminal-bg: #241D2B;
  --terminal-header: #1C1622;
  --terminal-border: #3B3046;
  --terminal-text: #F6EBF0;
  --terminal-muted: #A998AD;

  --code-bg: #241D2B;
  --code-header: #1C1622;
  --code-border: #3B3046;
  --code-text: #FAF2F5;
  --inline-code-bg: rgba(232, 122, 144, 0.13);
}

:root[data-theme='dark'] {
  --bg: #1A1621;
  --surface: #231E2D;
  --surface-low: #2A2336;
  --surface-mint: #1F2C2D;
  --surface-high: #382E46;
  --surface-callout: rgba(242, 153, 176, 0.1);
  --ambient-pink: rgba(242, 153, 176, 0.13);
  --ambient-mint: rgba(125, 211, 192, 0.1);
  --dot-color: rgba(242, 153, 176, 0.11);

  --text: #F7EFF2;
  --text-secondary: #C6B7BE;
  --text-muted: #93838B;
  --border: #3B3249;
  --border-strong: #56486A;

  --accent: #F299B0;
  --accent-contrast: #241821;
  --accent-soft: rgba(242, 153, 176, 0.2);
  --teal: #7DD3C0;
  --teal-soft: rgba(125, 211, 192, 0.17);

  --shadow-xs: 0 2px 8px rgba(10, 6, 16, 0.35);
  --shadow-sm: 0 8px 22px rgba(10, 6, 16, 0.42);
  --shadow-md: 0 14px 34px rgba(10, 6, 16, 0.5);
  --shadow-float: 0 10px 26px rgba(10, 6, 16, 0.55);

  --terminal-bg: #15111C;
  --terminal-header: #1E1828;
  --terminal-border: #382E47;
  --terminal-text: #F5EBF0;
  --terminal-muted: #A494A8;

  --code-bg: #15111C;
  --code-header: #1E1828;
  --code-border: #382E47;
  --code-text: #FAF2F5;
  --inline-code-bg: rgba(242, 153, 176, 0.15);
}

:root {
  --font-serif: "Quicksand", "Zen Maru Gothic", "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", sans-serif;
  --font-sans: "Zen Maru Gothic", "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 980px;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 65% 38% at 10% 0%, var(--ambient-pink), transparent),
    radial-gradient(ellipse 55% 35% at 90% 4%, var(--ambient-mint), transparent),
    radial-gradient(var(--dot-color) 1.5px, transparent 1.5px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.site-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@keyframes softFloatIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-in {
    animation: softFloatIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

.square-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.square-dot-muted {
  background-color: var(--border-strong);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.serif {
  font-family: var(--font-serif);
}

.pulse-dot-wrap {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.pulse-dot-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--accent);
  opacity: 0.7;
  animation: pulse-ring 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-dot-core {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--accent);
}

@keyframes pulse-ring {
  75%, 100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

/* Header & Milk-Glass Pill Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-link:hover .square-dot {
  transform: scale(1.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 5px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--surface-low) 78%, transparent);
  border: 1px solid var(--border);
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 9999px;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.nav-item:hover {
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--text);
}

.nav-item.active {
  background: var(--surface-high);
  color: var(--accent);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 9999px;
  padding: 3px 5px;
  box-shadow: var(--shadow-xs);
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 3px 7px;
  border-radius: 9999px;
  font-size: 0.72rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--surface-low);
  color: var(--accent);
  font-weight: 700;
}

.theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid var(--border);
  background: var(--surface-low);
  border-radius: 9999px;
  padding: 3px;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 25px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.theme-btn:hover {
  color: var(--text);
}

.theme-btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
  color: var(--accent);
}

.mobile-drawer {
  display: none;
  border-top: 1.5px solid var(--border);
  background: var(--bg);
  padding: 16px 24px 20px;
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-bottom: 14px;
}

/* Reading Top Progress Bar */
.reading-progress-track {
  position: sticky;
  top: 67px;
  z-index: 35;
  width: 100%;
  height: 3px;
  background: var(--surface-low);
  overflow: hidden;
}

.reading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  border-radius: 0 9999px 9999px 0;
  transition: width 0.12s ease-out;
}

/* Breadcrumb & Page Header */
.page-shell {
  padding: 46px 0 76px;
}

.terminal-crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: var(--surface-low);
  border: 1.5px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.terminal-crumb .crumb-segment {
  color: var(--accent);
  font-weight: 600;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.22;
  margin: 0 0 12px;
}

.page-subtitle {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* Hero Section */
.hero-section {
  padding: 52px 0 42px;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(250px, 0.88fr);
  gap: 42px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--surface-low);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.15rem);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 18px;
}

.block-cursor {
  display: inline-block;
  width: 0.45ch;
  height: 0.82em;
  background-color: var(--accent);
  vertical-align: -0.06em;
  margin-left: 8px;
  border-radius: 9999px;
  animation: blink-cursor 1.1s steps(1, end) infinite;
}

@keyframes blink-cursor {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

.hero-bio {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 56ch;
}

.hero-bio p {
  margin: 0 0 8px;
}

.motto-quote {
  border-left: 4px solid var(--accent);
  background: var(--surface-low);
  border-radius: 6px 18px 18px 6px;
  padding: 13px 18px;
  margin: 20px 0 24px;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 700;
  border-bottom: 2px dashed var(--border-strong);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.text-link:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.text-link-muted {
  color: var(--text-secondary);
  font-weight: 500;
}

.sakura-pill-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.sakura-pill-cta:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.arrow-slide {
  display: inline-block;
  transition: transform 0.2s ease;
}

.text-link:hover .arrow-slide,
.sakura-pill-cta:hover .arrow-slide,
.entry-compact-item:hover .arrow-slide,
.knowledge-preview-row:hover .arrow-slide {
  transform: translateX(4px);
}

/* Pastel Sticker Portrait Card */
.portrait-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
}

.avatar-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dot-ripple-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
}

.dot-ripple-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
  pointer-events: none;
  animation: gentle-spin 32s linear infinite;
}

@keyframes gentle-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.sticker-tag {
  position: absolute;
  z-index: 3;
  padding: 2px 10px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  pointer-events: none;
}

.sticker-tag-mint {
  top: 4px;
  left: 6px;
  background: var(--surface-mint);
  color: var(--teal);
  border: 1px solid color-mix(in srgb, var(--teal) 25%, transparent);
  --sticker-rot: -2deg;
  animation: stickerBob 4.4s ease-in-out infinite;
}

.sticker-tag-sakura {
  bottom: 10px;
  right: 2px;
  background: var(--surface-high);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  --sticker-rot: 2deg;
  animation: stickerBob 5s ease-in-out infinite 0.7s;
}

@keyframes stickerBob {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(var(--sticker-rot, 0deg));
  }
  50% {
    transform: translate3d(0, -4.5px, 0) rotate(calc(var(--sticker-rot, 0deg) + 1.8deg));
  }
}

.avatar-circle {
  position: relative;
  z-index: 2;
  width: 118px;
  height: 118px;
  padding: 5px;
  border-radius: 9999px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, var(--surface-high), var(--surface-low), var(--surface-mint));
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
}

.avatar-handle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 13px;
  border-radius: 9999px;
  background: var(--surface-low);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.avatar-handle-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--teal);
}

/* Now Pastel Banner */
.now-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px 22px;
  margin-bottom: 50px;
  background: linear-gradient(90deg, var(--surface-mint), var(--surface-low));
  border: 1.5px dashed var(--border-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
}

.now-strip-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.now-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--surface-mint);
  border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 700;
}

.now-text {
  color: var(--text);
  font-size: 0.95rem;
}

/* Home Sections */
.home-section {
  padding: 40px 0;
  border-top: 2px dashed var(--border);
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.section-heading-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.section-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.58rem;
  font-weight: 700;
  margin: 0;
}

.section-en-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--surface-low);
  color: var(--text-secondary);
}

.inline-filter-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 9999px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.filter-pill {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-pill:hover {
  background: var(--surface-low);
  color: var(--text);
}

.filter-pill.active {
  background: var(--surface-high);
  color: var(--accent);
  font-weight: 700;
}

.writing-split {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.92fr);
  gap: 36px;
}

.subcolumn-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1.5px dashed var(--border);
  margin-bottom: 14px;
}

.subcolumn-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.entry-compact-item {
  padding: 18px 20px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.entry-compact-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.entry-compact-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 8px 0 6px;
  transition: color 0.15s ease;
}

.entry-compact-item:hover .entry-compact-title {
  color: var(--accent);
}

.entry-compact-summary {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.meta-lang-tag {
  padding: 2px 9px;
  border-radius: 9999px;
  background: var(--surface-low);
  color: var(--accent);
  font-weight: 600;
}

/* Washi-Tape Memo Cards for Notes */
.notes-card-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 6px;
}

.note-surface-card {
  position: relative;
  display: block;
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: var(--surface-mint);
  border: 1.5px solid color-mix(in srgb, var(--teal) 26%, var(--border));
  box-shadow: var(--shadow-xs);
  transform: rotate(-0.45deg);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.3s ease, border-color 0.2s ease;
}

.note-surface-card::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(1.5deg);
  width: 62px;
  height: 14px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--teal) 28%, transparent);
  backdrop-filter: blur(2px);
  transition: transform 0.34s var(--ease-spring), opacity 0.25s ease;
}

.note-surface-card:nth-child(even) {
  background: var(--surface-low);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
  transform: rotate(0.55deg);
}

.note-surface-card:nth-child(even)::before {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  transform: translateX(-50%) rotate(-1.8deg);
}

.note-surface-card:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.015);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent);
}

.note-surface-card:hover::before {
  transform: translateX(-50%) translateY(-2px) scaleY(1.08) rotate(0deg);
}

.note-surface-card:hover .note-surface-title {
  color: var(--accent);
}

.note-surface-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.42;
  margin: 8px 0 6px;
  transition: color 0.15s ease;
}

/* Featured Project Pastel Showcase */
.featured-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 1fr);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  align-items: stretch;
}

.featured-project-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-low);
  color: var(--text-secondary);
  width: fit-content;
}

.status-pill.in-progress {
  border-color: color-mix(in srgb, var(--teal) 35%, transparent);
  background: var(--surface-mint);
  color: var(--teal);
}

.status-pill.completed {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--surface-low);
  color: var(--accent);
}

.featured-project-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  margin: 14px 0 10px;
  line-height: 1.28;
}

.featured-project-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.72;
}

/* Warm Plum Cozy Terminal */
.terminal-box {
  background: var(--terminal-bg);
  border-left: 1.5px solid var(--terminal-border);
  color: var(--terminal-text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.terminal-box-standalone {
  border: 1.5px solid var(--terminal-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.terminal-box-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--terminal-header);
  border-bottom: 1px solid var(--terminal-border);
  color: var(--terminal-muted);
  font-size: 0.74rem;
}

.terminal-dots {
  display: inline-flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
}

.terminal-dots span:nth-child(1) {
  background: #E87A90;
}

.terminal-dots span:nth-child(2) {
  background: #F5D061;
}

.terminal-dots span:nth-child(3) {
  background: #4EA896;
}

.terminal-box-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  justify-content: center;
}

.roadmap-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.roadmap-label {
  white-space: nowrap;
  color: #F7EAEF;
}

.roadmap-leader {
  flex: 1;
  border-bottom: 1px dotted #5A4969;
  height: 1px;
}

.roadmap-state {
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 2px 9px;
  border-radius: 9999px;
}

.roadmap-state.done {
  background: rgba(78, 168, 150, 0.2);
  color: #8BE0CB;
}

.roadmap-state.current {
  background: rgba(232, 122, 144, 0.25);
  color: #FFA4B6;
  font-weight: 700;
}

.roadmap-state.todo {
  background: rgba(255, 255, 255, 0.06);
  color: var(--terminal-muted);
}

/* Knowledge Preview */
.knowledge-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.knowledge-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.knowledge-preview-row:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.knowledge-preview-row:hover .knowledge-preview-title {
  color: var(--accent);
}

.knowledge-preview-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  transition: color 0.15s ease;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 11px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface-low);
  color: var(--text-secondary);
}

/* Archive 2-Column Layout */
.archive-layout {
  margin-top: 38px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}

.archive-sidebar {
  position: sticky;
  top: 88px;
  padding: 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.sidebar-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 10px;
  border-bottom: 1.5px dashed var(--border);
}

.sidebar-label {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.sidebar-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--surface-low);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-filter-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid transparent;
  border-radius: 9999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-align: left;
  transition: all 0.15s ease;
}

.sidebar-filter-btn:hover {
  color: var(--text);
  background: var(--surface-low);
}

.sidebar-filter-btn.active {
  background: var(--surface-low);
  border-color: var(--border-strong);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-filter-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sidebar-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 1px 8px;
  border-radius: 9999px;
  color: var(--text-muted);
}

.sidebar-filter-btn.active .sidebar-count {
  background: var(--accent);
  color: var(--accent-contrast);
}

.numbered-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.numbered-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.numbered-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.numbered-item:hover .numbered-index {
  background: var(--accent);
  color: var(--accent-contrast);
}

.numbered-item:hover .numbered-title {
  color: var(--accent);
}

.numbered-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-low);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.numbered-title {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
  transition: color 0.15s ease;
}

.numbered-summary {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.empty-state {
  padding: 44px 24px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 20px;
  background: var(--surface-low);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Article Detail */
.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 44px 24px 76px;
}

.article-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.article-back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.2vw, 2.55rem);
  font-weight: 700;
  line-height: 1.28;
  margin: 0 0 14px;
}

.article-lead {
  margin: 0 0 24px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.article-meta-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  margin-bottom: 24px;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.article-meta-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.article-meta-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.author-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.author-inline img {
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  border: 2px solid var(--surface-high);
}

.toc-box {
  margin: 22px 0 36px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface-low) 72%, var(--surface));
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.toc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 10px 20px 18px;
  border-top: 1.5px dashed var(--border);
}

.toc-item {
  margin: 8px 0;
  font-size: 0.86rem;
  line-height: 1.5;
}

.toc-item.level-3 {
  padding-left: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.toc-item a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
}

.toc-item a:hover {
  color: var(--accent);
}

/* Prose */
.prose {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text);
}

.prose p {
  margin: 0 0 1.35em;
}

.prose h2 {
  position: relative;
  font-size: 1.46rem;
  font-weight: 700;
  line-height: 1.32;
  margin: 2.3em 0 0.8em;
  padding-left: 16px;
  scroll-margin-top: 88px;
}

.prose h2::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 5px;
  border-radius: 9999px;
  background: linear-gradient(180deg, var(--accent), var(--teal));
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.8em 0 0.6em;
  scroll-margin-top: 88px;
}

.prose ul,
.prose ol {
  margin: 0 0 1.35em;
  padding-left: 1.45em;
}

.prose li {
  margin-bottom: 0.45em;
}

.prose a {
  color: var(--accent);
  border-bottom: 1.5px dashed var(--border-strong);
}

.prose a:hover {
  border-bottom-color: var(--accent);
}

.prose blockquote {
  position: relative;
  margin: 2em 0;
  padding: 20px 22px 16px;
  border-left: 4px solid var(--accent);
  background: var(--surface-low);
  border-radius: 8px 18px 18px 8px;
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.prose blockquote::before {
  content: 'QUOTE';
  position: absolute;
  top: -10px;
  left: 16px;
  padding: 1px 10px;
  border-radius: 9999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--accent);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  border: 0;
  border-top: 1.5px dashed var(--border-strong);
  margin: 2.3em 0;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--inline-code-bg);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 6px;
}

.prose pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.86rem;
  color: var(--code-text);
}

/* Cozy Plum Code Block */
.code-block-shell {
  margin: 1.7em 0;
  background: var(--code-bg);
  border: 1.5px solid var(--code-border);
  border-radius: 18px;
  overflow: hidden;
  color: var(--code-text);
  box-shadow: var(--shadow-sm);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--code-header);
  border-bottom: 1px solid var(--code-border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #D7C6DB;
}

.code-header-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.code-copy-btn {
  border: 1px solid #59496B;
  background: #3D314B;
  color: #FAF2F5;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 11px;
  border-radius: 9999px;
  cursor: pointer;
}

.code-copy-btn:hover {
  background: #F299B0;
  border-color: #F299B0;
  color: #241821;
}

.code-block-shell pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  line-height: 1.68;
}

.tok-comment {
  color: #9C8EA8;
  font-style: italic;
}

.tok-keyword {
  color: #F497AE;
}

.tok-string {
  color: #8BE0CB;
}

.tok-number {
  color: #FCD38D;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 0.9rem;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid var(--border);
}

.prose th,
.prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.prose th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--surface-low);
  border-bottom: 1.5px solid var(--border);
}

/* Callout & Figure */
.mdx-callout {
  margin: 1.7em 0;
  padding: 16px 20px;
  background: var(--surface-mint);
  border: 1.5px solid color-mix(in srgb, var(--teal) 28%, var(--border));
  border-left: 4px solid var(--teal);
  border-radius: 16px;
  font-size: 0.95rem;
}

.mdx-callout-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 6px;
}

.mdx-figure {
  margin: 1.9em 0;
  padding: 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  text-align: center;
}

.mdx-figure img {
  margin: 0 auto;
  max-height: 220px;
}

.mdx-figure figcaption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Continue Reading */
.continue-reading {
  margin-top: 56px;
  padding-top: 30px;
  border-top: 2px dashed var(--border);
}

.continue-heading {
  font-size: 1.28rem;
  margin: 0 0 18px;
}

.continue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.continue-card {
  display: block;
  padding: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.continue-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.continue-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.article-bottom-nav {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

/* Links & About & Subscribe */
.links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 42px;
}

.friend-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.friend-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.friend-avatar {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 1.5px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

.dashed-meta-card {
  padding: 26px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 22px;
  background: var(--surface-low);
}

.meta-kv-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 20px;
  font-size: 0.92rem;
}

.meta-kv-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
}

.meta-kv-key {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
}

.primary-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 9999px;
  border: 1.5px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.primary-pill-btn:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}

.about-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
  gap: 44px;
  align-items: start;
}

.about-profile-card {
  position: sticky;
  top: 88px;
  padding: 28px 24px;
  border: 1.5px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.feed-url-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  margin: 24px 0 32px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1.5px solid var(--border);
  padding: 28px 0 74px;
  margin-top: 44px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.84rem;
}

/* Floating Scroll To Top Pill */
.scroll-top-pill {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px 8px 10px;
  border-radius: 9999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.15s ease;
}

.scroll-top-pill:hover {
  border-color: var(--accent);
}

.scroll-top-pill.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

@media (max-width: 820px) {
  .nav-links,
  .nav-controls-desktop {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .hero-section,
  .writing-split,
  .featured-project-card,
  .archive-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .terminal-box {
    border-left: 0;
    border-top: 1.5px solid var(--terminal-border);
  }

  .archive-sidebar,
  .about-profile-card {
    position: static;
  }

  .numbered-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .continue-grid,
  .links-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Stitch-Guided Stationery Elements & Theme Transitions
   ========================================================= */

/* View Transitions API — Sakura Cream Bloom */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 9999;
}

html.vt-switching *,
html.vt-switching *::before,
html.vt-switching *::after {
  transition: none !important;
}

/* Fallback Smooth Color Crossfade (when View Transitions unsupported) */
html.theme-transitioning body,
html.theme-transitioning .site-header,
html.theme-transitioning .mobile-drawer,
html.theme-transitioning .portrait-panel,
html.theme-transitioning .cafe-desk-strip,
html.theme-transitioning .cafe-chip,
html.theme-transitioning .now-strip,
html.theme-transitioning .entry-compact-item,
html.theme-transitioning .note-surface-card,
html.theme-transitioning .featured-project-card,
html.theme-transitioning .knowledge-preview-row,
html.theme-transitioning .archive-sidebar,
html.theme-transitioning .numbered-item,
html.theme-transitioning .article-meta-card,
html.theme-transitioning .toc-box,
html.theme-transitioning .continue-card,
html.theme-transitioning .friend-card,
html.theme-transitioning .dashed-meta-card,
html.theme-transitioning .about-profile-card,
html.theme-transitioning .feed-url-box,
html.theme-transitioning .site-footer,
html.theme-transitioning .scroll-top-pill,
html.theme-transitioning .motto-quote,
html.theme-transitioning .lang-switcher,
html.theme-transitioning .theme-pill,
html.theme-transitioning .nav-links,
html.theme-transitioning .inline-filter-pills,
html.theme-transitioning .tag-pill,
html.theme-transitioning .meta-lang-tag,
html.theme-transitioning .section-ornament,
html.theme-transitioning .postcard-stamp-inner {
  transition:
    background-color 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.48s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@keyframes themeBtnPop {
  0% { transform: scale(0.82) rotate(-22deg); }
  55% { transform: scale(1.18) rotate(8deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.theme-btn-pop svg {
  animation: themeBtnPop 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Theme Bloom Ring & Toast */
.theme-fx-layer {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  overflow: hidden;
}

.theme-bloom-ring {
  position: fixed;
  width: 240vmax;
  height: 240vmax;
  border-radius: 9999px;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: sakuraBloomRing 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.theme-bloom-ring.to-dark {
  background: radial-gradient(circle, transparent 48%, rgba(242, 153, 176, 0.28) 65%, rgba(125, 211, 192, 0.16) 76%, transparent 84%);
  box-shadow: inset 0 0 80px rgba(242, 153, 176, 0.25);
}

.theme-bloom-ring.to-light {
  background: radial-gradient(circle, transparent 48%, rgba(232, 122, 144, 0.24) 65%, rgba(78, 168, 150, 0.18) 76%, transparent 84%);
  box-shadow: inset 0 0 80px rgba(255, 230, 235, 0.45);
}

@keyframes sakuraBloomRing {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.95;
  }
  70% {
    opacity: 0.72;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

.theme-toast {
  position: fixed;
  top: 78px;
  left: 50%;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-float);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -10px) scale(0.95);
  transition: opacity 0.24s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.theme-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.theme-toast-icon {
  display: inline-flex;
  color: var(--accent);
}

/* Floating Sakura Petals & Night Sparkles */
.pastel-ambient-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
}

.sakura-petal,
.night-sparkle {
  position: absolute;
  display: block;
  transition: opacity 0.55s ease;
}

.sakura-petal {
  width: 18px;
  height: 18px;
  color: color-mix(in srgb, var(--accent) 42%, transparent);
  opacity: 0.8;
  animation: petalDrift 9s ease-in-out infinite;
}

.sakura-petal.p2 { width: 15px; height: 15px; animation-name: petalDriftAlt; animation-duration: 11s; animation-delay: -2.2s; }
.sakura-petal.p3 { width: 20px; height: 20px; animation-duration: 10s; animation-delay: -4.1s; color: color-mix(in srgb, var(--teal) 32%, transparent); }
.sakura-petal.p4 { width: 16px; height: 16px; animation-name: petalDriftAlt; animation-duration: 12s; animation-delay: -6.3s; }
.sakura-petal.p5 { width: 17px; height: 17px; animation-duration: 9.5s; animation-delay: -1.4s; }
.sakura-petal.p6 { width: 14px; height: 14px; animation-name: petalDriftAlt; animation-duration: 11.5s; animation-delay: -5.0s; color: color-mix(in srgb, var(--teal) 30%, transparent); }

.night-sparkle {
  width: 14px;
  height: 14px;
  color: color-mix(in srgb, var(--accent) 48%, transparent);
  opacity: 0.16;
  animation: starTwinkle 4.2s ease-in-out infinite;
}

.night-sparkle.s2 { width: 12px; height: 12px; color: color-mix(in srgb, var(--teal) 48%, transparent); animation-delay: -1.1s; }
.night-sparkle.s3 { width: 16px; height: 16px; animation-delay: -2.4s; }
.night-sparkle.s4 { width: 11px; height: 11px; color: color-mix(in srgb, var(--teal) 45%, transparent); animation-delay: -0.7s; }
.night-sparkle.s5 { width: 15px; height: 15px; animation-delay: -3.2s; }
.night-sparkle.s6 { width: 12px; height: 12px; color: color-mix(in srgb, var(--teal) 44%, transparent); animation-delay: -1.9s; }

:root[data-theme='dark'] .sakura-petal {
  opacity: 0.24;
}

:root[data-theme='dark'] .night-sparkle {
  opacity: 0.65;
}

@keyframes petalDrift {
  0% {
    transform: translate3d(0, 0, 0) rotate(6deg) scale(0.94);
  }
  33% {
    transform: translate3d(12px, 14px, 0) rotate(28deg) scale(1.04);
  }
  66% {
    transform: translate3d(-6px, 24px, 0) rotate(44deg) scale(0.98);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(6deg) scale(0.94);
  }
}

@keyframes petalDriftAlt {
  0% {
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(0.96);
  }
  35% {
    transform: translate3d(-11px, 15px, 0) rotate(-30deg) scale(1.05);
  }
  70% {
    transform: translate3d(8px, 22px, 0) rotate(-14deg) scale(0.97);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(0.96);
  }
}

@keyframes starTwinkle {
  0%, 100% {
    transform: scale(0.85) rotate(0deg);
    filter: brightness(0.9);
  }
  50% {
    transform: scale(1.18) rotate(15deg);
    filter: brightness(1.25);
  }
}

/* Postage-Stamp Seal on Portrait Card */
.postcard-stamp {
  position: absolute;
  top: -12px;
  right: -10px;
  z-index: 4;
  transform: rotate(-4deg);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.postcard-stamp:hover {
  transform: rotate(0deg) scale(1.04);
}

.postcard-stamp-inner {
  padding: 6px 9px;
  background: var(--bg);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--border-strong));
  border-radius: 5px;
  box-shadow: var(--shadow-sm);
  min-width: 84px;
}

.postcard-stamp-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  margin-bottom: 4px;
}

.postcard-stamp-mid {
  display: flex;
  align-items: center;
  gap: 6px;
}

.postcard-flower {
  color: var(--accent);
  flex-shrink: 0;
}

.postcard-stamp-city {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  line-height: 1.15;
  color: var(--text-secondary);
}

.postcard-stamp-city span:first-child {
  font-weight: 700;
  color: var(--accent);
}

.postcard-cancel-svg {
  position: absolute;
  bottom: -7px;
  left: -14px;
  width: 46px;
  height: 15px;
  color: var(--text-muted);
  opacity: 0.6;
  pointer-events: none;
}

/* Today's Café Desk Stationery Strip */
.cafe-desk-strip {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  padding: 16px 20px;
  margin-bottom: 14px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-low));
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.cafe-tape-clip {
  position: absolute;
  top: -8px;
  left: 28px;
  width: 72px;
  height: 15px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 26%, var(--surface-high));
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, transparent);
  transform: rotate(-1.6deg);
  pointer-events: none;
}

.cafe-desk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cafe-desk-emblem {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-low);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cafe-desk-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.cafe-desk-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.cafe-desk-modules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.cafe-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.cafe-chip-drink {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--border));
  color: var(--text);
}

.cafe-drink-icon {
  display: inline-flex;
  color: var(--accent);
}

.cafe-chip-mood {
  cursor: pointer;
  background: var(--surface-mint);
  border-color: color-mix(in srgb, var(--teal) 30%, var(--border));
  color: var(--text);
}

.cafe-chip-mood svg {
  color: var(--teal);
  flex-shrink: 0;
}

.cafe-chip-mood:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
}

.cafe-chip-stamp {
  cursor: pointer;
  background: linear-gradient(90deg, var(--surface-low), var(--surface-high));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--text);
}

.cafe-chip-stamp:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.cafe-chip-stamp:active {
  transform: scale(0.96);
}

.cafe-chip-stamp.is-stamped {
  border-style: dashed;
  border-color: var(--accent);
}

.cafe-stamp-seal {
  width: 19px;
  height: 19px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-contrast);
  flex-shrink: 0;
}

.cafe-stamp-count {
  padding-left: 7px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--accent);
  font-weight: 700;
}

.cafe-pill-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  background: var(--surface-low);
  color: var(--accent);
  letter-spacing: 0.04em;
}

.cafe-pill-mint {
  background: var(--surface);
  color: var(--teal);
}

@keyframes chipSpringPop {
  0% { transform: scale(0.93); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.mood-pop,
.stamped-pop {
  animation: chipSpringPop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Washi-Tape Section Divider Ornaments */
.home-section-ornamented {
  position: relative;
  margin-top: 12px;
}

.section-ornament {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-0.6deg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 14px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--surface-low);
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--border));
  color: var(--accent);
  box-shadow: var(--shadow-xs);
  pointer-events: none;
  white-space: nowrap;
}

.section-ornament.mint {
  transform: translateX(-50%) rotate(0.6deg);
  background: var(--surface-mint);
  border-color: color-mix(in srgb, var(--teal) 42%, var(--border));
  color: var(--teal);
}

.section-ornament.cream {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

/* Footer Wax-Seal Bookmark Emblem */
.footer-wax-seal {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 11px 3px 5px;
  border-radius: 9999px;
  background: var(--surface-low);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.wax-seal-badge {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent);
}

.wax-seal-badge::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: top center;
  width: 6px;
  height: 8px;
  background: color-mix(in srgb, var(--accent) 68%, var(--surface-high));
  border-radius: 0 0 2px 2px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
  animation: ribbonSway 3.4s ease-in-out infinite;
}

.footer-wax-seal:hover .wax-seal-badge {
  transform: scale(0.94);
  transition: transform 0.22s var(--ease-spring);
}

@keyframes ribbonSway {
  0%, 100% {
    transform: translateX(-50%) rotate(-3deg);
  }
  50% {
    transform: translateX(-50%) rotate(4deg);
  }
}

.wax-seal-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* =========================================================
   Pastel Stationery Spring Motion System
   ========================================================= */

/* Scroll-Triggered Staggered Spring Reveals */
.motion-reveal.motion-pending {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.985);
}

.motion-reveal.is-visible:not(.motion-settled) {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.56s var(--ease-soft),
    transform 0.62s var(--ease-spring);
  transition-delay: calc(var(--stagger, 0) * 65ms);
}

.motion-reveal.is-visible:hover {
  transition-delay: 0ms;
}

/* Gentle Ambient Scroll Parallax */
.pastel-ambient-layer {
  transform: translate3d(0, var(--scroll-parallax, 0px), 0);
  will-change: transform;
}

/* Portrait 3D Tilt & Cursor Pastel Glare */
.portrait-panel {
  transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transition: transform 0.35s var(--ease-soft), box-shadow 0.3s ease;
  overflow: visible;
}

.portrait-panel::after,
.featured-project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    240px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--accent) 12%, transparent),
    transparent 65%
  );
  z-index: 0;
}

.portrait-panel:hover::after,
.featured-project-card:hover::after {
  opacity: 1;
}

.featured-project-card {
  position: relative;
}

.featured-project-card > * {
  position: relative;
  z-index: 1;
}

/* Pearlescent Diagonal Sheen Sweep on CTA & Cards */
.sakura-pill-cta,
.entry-compact-item,
.knowledge-preview-row {
  position: relative;
  overflow: hidden;
}

.sakura-pill-cta::after,
.entry-compact-item::after,
.knowledge-preview-row::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -80%;
  width: 48%;
  height: 180%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.42) 50%,
    transparent 80%
  );
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
  transition: left 0.72s var(--ease-soft), opacity 0.22s ease;
}

:root[data-theme='dark'] .sakura-pill-cta::after,
:root[data-theme='dark'] .entry-compact-item::after,
:root[data-theme='dark'] .knowledge-preview-row::after {
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(242, 153, 176, 0.14) 50%,
    transparent 80%
  );
}

.sakura-pill-cta:hover::after,
.entry-compact-item:hover::after,
.knowledge-preview-row:hover::after {
  left: 145%;
  opacity: 1;
}

/* Tactile Spring Curves on Interactive Pills & Cards */
.entry-compact-item,
.continue-card,
.friend-card,
.numbered-item,
.knowledge-preview-row {
  transition:
    transform 0.34s var(--ease-spring),
    border-color 0.22s ease,
    box-shadow 0.28s ease,
    background-color 0.22s ease;
}

.entry-compact-item:hover,
.continue-card:hover,
.friend-card:hover,
.numbered-item:hover {
  transform: translateY(-3px);
}

.sakura-pill-cta,
.primary-pill-btn,
.filter-pill,
.lang-btn,
.theme-btn,
.nav-item {
  transition:
    transform 0.26s var(--ease-spring),
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.2s ease,
    filter 0.18s ease;
}

.sakura-pill-cta:active,
.primary-pill-btn:active,
.filter-pill:active,
.theme-btn:active {
  transform: scale(0.95);
}

.cafe-desk-strip:hover .cafe-tape-clip {
  transform: rotate(0deg) translateY(-1px);
  transition: transform 0.3s var(--ease-spring);
}

/* Sakura Stamp Particle Burst */
.stamp-burst-group {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.stamp-burst-particle {
  position: fixed;
  width: 14px;
  height: 14px;
  color: var(--accent);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.4);
  animation: stampBurstFly 0.72s var(--ease-soft) forwards;
}

.stamp-burst-particle.mint {
  color: var(--teal);
  width: 12px;
  height: 12px;
}

.stamp-burst-particle.sparkle {
  width: 11px;
  height: 11px;
}

@keyframes stampBurstFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.45) rotate(0deg);
  }
  75% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, -36px))) scale(1.1) rotate(var(--rot, 120deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sakura-petal,
  .night-sparkle,
  .dot-ripple-svg,
  .pulse-dot-ring,
  .block-cursor,
  .sticker-tag-mint,
  .sticker-tag-sakura,
  .wax-seal-badge::after {
    animation: none !important;
  }

  .theme-bloom-ring,
  .theme-btn-pop svg,
  .mood-pop,
  .stamped-pop,
  .stamp-burst-particle {
    animation: none !important;
  }

  .motion-reveal.motion-pending {
    opacity: 1 !important;
    transform: none !important;
  }

  .motion-reveal.is-visible {
    transition: none !important;
  }

  .pastel-ambient-layer,
  .portrait-panel {
    transform: none !important;
  }

  .sakura-pill-cta::after,
  .entry-compact-item::after,
  .knowledge-preview-row::after {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .cafe-desk-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .postcard-stamp {
    top: -10px;
    right: 6px;
  }

  .pastel-ambient-layer {
    opacity: 0.55;
  }

  .github-repo-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   GitHub Profile & About Extensions (Pastel Theme)
   ========================================================= */
.portrait-meta-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

.portrait-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--surface-low);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.portrait-meta-pill.is-status {
  background: var(--surface-mint);
  color: var(--teal);
  border-color: color-mix(in srgb, var(--teal) 26%, transparent);
  font-weight: 600;
}

.about-bio-quote {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin: 8px 0 14px;
  line-height: 1.55;
}

.about-meta-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  text-align: left;
}

.about-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 14px;
  background: var(--surface-low);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}

.about-meta-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.about-meta-val {
  font-weight: 600;
  color: var(--text);
}

.about-meta-val.is-status {
  color: var(--teal);
}

.about-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.about-stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 6px;
  border-radius: 14px;
  background: var(--surface-low);
  border: 1px solid var(--border);
}

.about-stat-num {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent);
}

.about-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
}

.about-social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.about-social-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--surface-low);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease, transform 0.2s var(--ease-spring);
}

.about-social-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-high);
  transform: translateY(-2px);
}

.prose p.about-section-note {
  margin: -4px 0 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.github-repo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 22px;
}

.prose a.github-repo-card,
.github-repo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s ease, transform 0.22s var(--ease-spring), box-shadow 0.22s ease;
}

.prose a.github-repo-card:hover,
.github-repo-card:hover {
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.github-repo-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 10px;
}

.github-repo-name {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.github-repo-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.github-repo-fork,
.github-repo-lang {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.github-repo-fork {
  background: var(--surface-low);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.github-repo-lang {
  background: var(--surface-mint);
  color: var(--teal);
  border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent);
}

.prose p.github-repo-desc,
.github-repo-desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.github-repo-origin {
  font-size: 0.69rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
  line-height: 1.35;
}

@media (max-width: 820px) {
  .github-repo-grid {
    grid-template-columns: 1fr;
  }
}

/* GitHub Sync Status Pill & Refresh Control (Pastel Theme) */
.github-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 2.3em 0 0.8em;
}

.prose .github-section-header h2 {
  margin: 0;
}

.gh-sync-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gh-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 9999px;
  background: var(--surface-low);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.gh-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--text-muted);
  flex-shrink: 0;
}

.gh-sync-badge.is-live {
  background: var(--surface-mint);
  border-color: color-mix(in srgb, var(--teal) 32%, transparent);
  color: var(--teal);
}

.gh-sync-badge.is-live .gh-sync-dot {
  background: var(--teal);
}

.gh-sync-badge.is-cache {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--text-secondary);
}

.gh-sync-badge.is-cache .gh-sync-dot {
  background: var(--accent);
}

.gh-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease, transform 0.2s var(--ease-spring);
}

.gh-sync-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-low);
  transform: translateY(-1px);
}

.gh-sync-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.gh-sync-btn.is-syncing svg {
  animation: ghSpin 0.85s linear infinite;
}

@keyframes ghSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gh-sync-btn.is-syncing svg {
    animation: none !important;
  }
}

/* ==========================================================================
   Editorial Postcard Opening Splash Screen (Stitch-Matched Pastel Theme)
   ========================================================================== */

html.splash-active,
html.splash-active body {
  overflow: hidden;
  height: 100%;
}

html:not(.splash-active):not(.splash-leaving) .site-splash {
  display: none;
}

.splash-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 9999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease, transform 0.22s var(--ease-spring);
}

.splash-replay-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-low);
  transform: translateY(-1px);
}

.site-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  will-change: transform, opacity;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.62s ease;
}

.site-splash:focus,
#app-main:focus {
  outline: none;
}

.site-splash :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-splash.is-settled .splash-topbar,
.site-splash.is-settled .splash-postcard,
.site-splash.is-settled .splash-bottom {
  animation: none !important;
}

.site-splash.is-leaving {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.site-splash.is-leaving .splash-postcard {
  transform: perspective(1000px) translateY(-42px) rotateX(8deg) scale(1.035);
  opacity: 0;
  transition: transform 0.56s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.44s ease;
}

.site-splash.is-leaving .splash-envelope-flap {
  transform: translateX(-50%) perspective(700px) rotateX(-165deg) translateY(-12px);
  opacity: 0;
}

.splash-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.splash-glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(88px);
}

.splash-glow-pink {
  width: 440px;
  height: 440px;
  top: -140px;
  left: -120px;
  background: var(--ambient-pink);
  opacity: 0.9;
}

.splash-glow-mint {
  width: 420px;
  height: 420px;
  bottom: -120px;
  right: -100px;
  background: var(--ambient-mint);
  opacity: 0.9;
}

.splash-glow-center {
  width: 680px;
  height: 680px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: color-mix(in srgb, var(--surface-low) 75%, transparent);
  opacity: 0.72;
}

.splash-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot-color) 1.4px, transparent 1.4px);
  background-size: 24px 24px;
  opacity: 0.95;
}

.splash-particle-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-drift-petal {
  position: absolute;
  color: var(--accent);
  opacity: 0;
  will-change: transform, opacity;
}

.splash-drift-petal.is-soft {
  color: #F6A8BC;
}

:root[data-theme='dark'] .splash-drift-petal.is-soft {
  color: #F4B6C8;
}

.splash-drift-petal.p-1 {
  top: 4%;
  left: 7%;
  width: 22px;
  height: 22px;
  animation: splashPetalDriftA 13s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.splash-drift-petal.p-2 {
  top: 9%;
  right: 11%;
  width: 18px;
  height: 18px;
  animation: splashPetalDriftB 15s cubic-bezier(0.4, 0, 0.2, 1) infinite 2.2s;
}

.splash-drift-petal.p-3 {
  top: 24%;
  left: 4%;
  width: 16px;
  height: 16px;
  animation: splashPetalDriftC 14s cubic-bezier(0.4, 0, 0.2, 1) infinite 4.8s;
}

.splash-drift-petal.p-4 {
  top: 28%;
  right: 6%;
  width: 21px;
  height: 21px;
  animation: splashPetalDriftA 16s cubic-bezier(0.4, 0, 0.2, 1) infinite 3.6s;
}

.splash-drift-petal.p-5 {
  top: 14%;
  left: 19%;
  width: 15px;
  height: 15px;
  animation: splashPetalDriftB 14.5s cubic-bezier(0.4, 0, 0.2, 1) infinite 7.2s;
}

.splash-drift-petal.p-6 {
  top: 18%;
  right: 21%;
  width: 17px;
  height: 17px;
  animation: splashPetalDriftC 15.5s cubic-bezier(0.4, 0, 0.2, 1) infinite 6.1s;
}

@keyframes splashPetalDriftA {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  16% {
    opacity: 0.42;
  }
  84% {
    opacity: 0.3;
  }
  100% {
    transform: translate3d(76px, 430px, 0) rotate(145deg);
    opacity: 0;
  }
}

@keyframes splashPetalDriftB {
  0% {
    transform: translate3d(0, 0, 0) rotate(22deg);
    opacity: 0;
  }
  20% {
    opacity: 0.38;
  }
  80% {
    opacity: 0.28;
  }
  100% {
    transform: translate3d(-64px, 390px, 0) rotate(-118deg);
    opacity: 0;
  }
}

@keyframes splashPetalDriftC {
  0% {
    transform: translate3d(0, 0, 0) rotate(-16deg);
    opacity: 0;
  }
  22% {
    opacity: 0.34;
  }
  82% {
    opacity: 0.24;
  }
  100% {
    transform: translate3d(56px, 360px, 0) rotate(96deg);
    opacity: 0;
  }
}

.splash-soda-bubble {
  position: absolute;
  border-radius: 9999px;
  border: 1.5px solid color-mix(in srgb, var(--teal) 56%, transparent);
  background: color-mix(in srgb, var(--teal-soft) 72%, rgba(255, 255, 255, 0.32));
  box-shadow: inset 0 1px 4px rgba(255, 255, 255, 0.55);
  opacity: 0;
  will-change: transform, opacity;
}

.splash-soda-bubble span {
  position: absolute;
  top: 22%;
  left: 24%;
  width: 28%;
  height: 28%;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
}

:root[data-theme='dark'] .splash-soda-bubble {
  border-color: color-mix(in srgb, var(--teal) 48%, transparent);
  background: color-mix(in srgb, var(--teal-soft) 55%, rgba(255, 255, 255, 0.06));
}

.splash-soda-bubble.b-1 {
  bottom: 7%;
  left: 10%;
  width: 16px;
  height: 16px;
  animation: splashBubbleRiseA 9.5s ease-in-out infinite;
}

.splash-soda-bubble.b-2 {
  bottom: 12%;
  right: 10%;
  width: 20px;
  height: 20px;
  animation: splashBubbleRiseB 11.2s ease-in-out infinite 1.8s;
}

.splash-soda-bubble.b-3 {
  bottom: 18%;
  left: 20%;
  width: 12px;
  height: 12px;
  animation: splashBubbleRiseA 10.4s ease-in-out infinite 4.2s;
}

.splash-soda-bubble.b-4 {
  bottom: 9%;
  right: 21%;
  width: 14px;
  height: 14px;
  animation: splashBubbleRiseB 9.8s ease-in-out infinite 5.4s;
}

.splash-soda-bubble.b-5 {
  bottom: 24%;
  right: 7%;
  width: 11px;
  height: 11px;
  animation: splashBubbleRiseA 11.8s ease-in-out infinite 2.9s;
}

@keyframes splashBubbleRiseA {
  0% {
    transform: translate3d(0, 0, 0) scale(0.78);
    opacity: 0;
  }
  20% {
    opacity: 0.52;
  }
  78% {
    opacity: 0.36;
    transform: translate3d(16px, -250px, 0) scale(1.06);
  }
  100% {
    transform: translate3d(26px, -360px, 0) scale(0.88);
    opacity: 0;
  }
}

@keyframes splashBubbleRiseB {
  0% {
    transform: translate3d(0, 0, 0) scale(0.86);
    opacity: 0;
  }
  24% {
    opacity: 0.48;
  }
  74% {
    opacity: 0.32;
    transform: translate3d(-18px, -210px, 0) scale(1.02);
  }
  100% {
    transform: translate3d(-28px, -330px, 0) scale(0.84);
    opacity: 0;
  }
}

.splash-twinkle-star {
  position: absolute;
  color: var(--accent);
  opacity: 0.3;
  animation: splashTwinkle 4.2s ease-in-out infinite;
}

.splash-twinkle-star.t-1 {
  top: 12%;
  left: 5%;
  width: 18px;
  height: 18px;
}

.splash-twinkle-star.t-2 {
  bottom: 24%;
  left: 7%;
  width: 15px;
  height: 15px;
  color: var(--teal);
  animation-delay: 1.6s;
}

.splash-twinkle-star.t-3 {
  top: 48%;
  right: 5%;
  width: 16px;
  height: 16px;
  animation-delay: 2.8s;
}

@keyframes splashTwinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.86);
  }
  50% {
    opacity: 0.58;
    transform: scale(1.14);
  }
}

.site-splash.splash-fx-paused .splash-drift-petal,
.site-splash.splash-fx-paused .splash-soda-bubble,
.site-splash.splash-fx-paused .splash-twinkle-star {
  animation-play-state: paused !important;
  opacity: 0.16 !important;
}

.splash-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 28px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.splash-topbar {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: splashRiseIn 0.55s var(--ease-soft) both;
}

.splash-topbar-left,
.splash-topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.splash-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 0.78rem;
}

.splash-brand-mark {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.splash-brand-sep {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.splash-brand-loc {
  color: var(--teal);
  font-weight: 600;
  font-size: 0.76rem;
}

.splash-issue-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--surface-mint) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent);
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.splash-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.splash-lang-btn {
  border: 0;
  background: transparent;
  padding: 3px 9px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.splash-lang-btn:hover {
  color: var(--text);
}

.splash-lang-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
}

.splash-theme-pill {
  border-width: 1px;
  box-shadow: var(--shadow-xs);
}

.splash-skip-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 5px 12px;
  border-radius: 9999px;
  color: var(--text-secondary);
  font-size: 0.74rem;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.splash-skip-btn:hover {
  color: var(--accent);
  background: var(--surface-low);
  border-color: var(--border);
}

.splash-stage {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 4px;
}

.splash-postcard {
  position: relative;
  width: 100%;
  max-width: 680px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border);
  border-radius: 26px;
  padding: 34px 40px 30px;
  box-shadow: var(--shadow-md);
  transform: perspective(1000px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transition: transform 0.25s ease-out, box-shadow 0.3s ease, border-color 0.25s ease;
  animation: splashCardIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.splash-postcard:hover {
  border-color: var(--border-strong);
  box-shadow: 0 22px 48px rgba(232, 122, 144, 0.14);
}

:root[data-theme='dark'] .splash-postcard:hover {
  box-shadow: 0 24px 52px rgba(8, 4, 16, 0.62), 0 0 0 1px rgba(242, 153, 176, 0.22);
}

.splash-envelope-flap {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: center bottom;
  width: 84%;
  max-width: 540px;
  height: 32px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.42s ease;
}

.splash-envelope-flap svg {
  width: 100%;
  height: 100%;
}

.envelope-flap-fill {
  fill: var(--surface-high);
  opacity: 0.72;
}

.envelope-flap-stitch {
  stroke: var(--accent);
  opacity: 0.48;
}

:root[data-theme='dark'] .envelope-flap-fill {
  fill: var(--surface-high);
  opacity: 0.65;
}

.splash-hanko-wrap {
  position: absolute;
  bottom: -14px;
  right: -12px;
  z-index: 5;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  cursor: pointer;
}

.splash-hanko-counter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow: var(--shadow-xs);
  transform: rotate(-3deg);
  margin-bottom: 5px;
  line-height: 1.15;
}

.hanko-counter-tag {
  font-size: 0.5rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.hanko-counter-num {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent);
}

.splash-hanko-seal {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: 2px solid #D84D68;
  background: #FFF5F6;
  padding: 3px;
  box-shadow: 0 6px 16px rgba(216, 77, 104, 0.22);
  transform: rotate(-8deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s ease;
}

:root[data-theme='dark'] .splash-hanko-seal {
  background: #2C1D2A;
  border-color: #F299B0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(242, 153, 176, 0.22);
}

.splash-hanko-wrap:hover .splash-hanko-seal {
  transform: rotate(0deg) scale(1.07);
  box-shadow: 0 8px 22px rgba(216, 77, 104, 0.32);
}

.splash-hanko-wrap:active .splash-hanko-seal,
.splash-hanko-wrap.is-stamping .splash-hanko-seal {
  animation: splashHankoPress 0.46s var(--ease-spring);
}

@keyframes splashHankoPress {
  0% {
    transform: rotate(-8deg) scale(1);
  }
  32% {
    transform: rotate(-2deg) scale(0.84);
  }
  68% {
    transform: rotate(-10deg) scale(1.1);
  }
  100% {
    transform: rotate(-8deg) scale(1);
  }
}

.splash-hanko-inner {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  border: 1px dashed rgba(216, 77, 104, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #D84D68;
}

:root[data-theme='dark'] .splash-hanko-inner {
  border-color: rgba(242, 153, 176, 0.78);
  color: #F299B0;
}

.splash-hanko-kanji {
  font-family: "Noto Sans TC", "Noto Sans JP", serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.splash-hanko-sub {
  font-size: 0.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 2px;
  opacity: 0.9;
}

.splash-hanko-ripple {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

.splash-hanko-wrap.is-stamping .splash-hanko-ripple {
  animation: splashHankoRipple 0.52s ease-out;
}

@keyframes splashHankoRipple {
  0% {
    transform: scale(0.92);
    opacity: 0.75;
  }
  100% {
    transform: scale(1.52);
    opacity: 0;
  }
}

.splash-hanko-tooltip {
  position: absolute;
  top: -28px;
  right: 0;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.62rem;
  box-shadow: var(--shadow-xs);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.splash-hanko-wrap:hover .splash-hanko-tooltip,
.splash-hanko-wrap:focus-visible .splash-hanko-tooltip {
  opacity: 0.96;
  transform: translateY(0);
}

.splash-enter-mail {
  transition: transform 0.24s var(--ease-spring);
}

.splash-enter-btn:hover .splash-enter-mail {
  transform: rotate(-10deg) translateY(-1px);
}

.splash-washi-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.4deg);
  width: 112px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255, 224, 198, 0.86);
  border: 1px solid rgba(232, 122, 144, 0.16);
  box-shadow: 0 3px 8px rgba(66, 53, 59, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.splash-washi-tape span {
  width: calc(100% - 16px);
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.45);
}

:root[data-theme='dark'] .splash-washi-tape {
  background: rgba(242, 153, 176, 0.26);
  border-color: rgba(242, 153, 176, 0.32);
}

:root[data-theme='dark'] .splash-washi-tape span {
  background: rgba(255, 240, 245, 0.2);
}

.splash-stamp {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 78px;
  height: 92px;
  border-radius: 12px;
  background: var(--surface-low);
  border: 1px dashed var(--border-strong);
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  pointer-events: none;
}

.splash-stamp-stripe {
  height: 6px;
  width: 100%;
  border-radius: 3px;
  background: repeating-linear-gradient(
    45deg,
    var(--accent) 0px,
    var(--accent) 6px,
    var(--bg) 6px,
    var(--bg) 12px,
    var(--teal) 12px,
    var(--teal) 18px
  );
  opacity: 0.85;
}

.splash-stamp-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
}

.splash-stamp-icon {
  color: var(--accent);
  display: inline-flex;
}

.splash-stamp-city {
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.splash-stamp-year {
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.splash-stamp-mark {
  position: absolute;
  bottom: -10px;
  left: -10px;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px dashed color-mix(in srgb, var(--accent) 46%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--accent) 72%, transparent);
  transform: rotate(12deg);
}

.splash-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.splash-avatar-cluster {
  position: relative;
  width: 108px;
  height: 108px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-avatar-ring {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
}

.splash-avatar-ring-outer {
  inset: -12px;
  background: color-mix(in srgb, var(--teal-soft) 72%, transparent);
  border: 1px dashed color-mix(in srgb, var(--teal) 32%, transparent);
  animation: splashSpinSlow 28s linear infinite;
}

.splash-avatar-ring-inner {
  inset: -4px;
  background: color-mix(in srgb, var(--accent-soft) 80%, transparent);
  animation: splashPulseSoft 3.6s ease-in-out infinite;
}

@keyframes splashSpinSlow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes splashPulseSoft {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.55;
  }
}

.splash-avatar-frame {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-sm);
  background: var(--surface-low);
}

.splash-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.splash-status-pill {
  position: absolute;
  z-index: 2;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text);
}

.splash-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--teal);
  flex-shrink: 0;
}

.splash-heading-block {
  margin-top: 6px;
}

.splash-greeting {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.65rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.splash-name-accent {
  color: var(--accent);
}

.splash-word-space {
  display: inline-block;
  width: 0.28em;
}

.splash-cursor {
  display: inline-block;
  width: 5px;
  height: 0.92em;
  margin-left: 5px;
  border-radius: 9999px;
  background: var(--accent);
  animation: splashBlink 1.15s steps(2, start) infinite;
}

@keyframes splashBlink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

.splash-subline {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.splash-quote-card {
  position: relative;
  width: 100%;
  margin: 18px 0 0;
  padding: 14px 22px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-low) 84%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  overflow: hidden;
}

.splash-quote-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
}

.splash-quote-mark {
  position: absolute;
  top: 6px;
  right: 10px;
  color: var(--accent);
  opacity: 0.16;
  pointer-events: none;
}

.splash-quick-strip {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
}

.splash-drink-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 9999px;
  background: var(--surface-mint);
  border: 1px solid color-mix(in srgb, var(--teal) 26%, transparent);
  font-size: 0.76rem;
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.splash-drink-pill.is-dark-drink {
  background: var(--surface-high);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.splash-drink-icon {
  display: inline-flex;
  color: var(--accent);
}

.splash-drink-prefix {
  color: var(--teal);
  font-weight: 700;
}

.splash-drink-pill.is-dark-drink .splash-drink-prefix {
  color: var(--accent);
}

.splash-route-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--surface-low) 78%, transparent);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.splash-route-link {
  padding: 1px 4px;
  border-radius: 6px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.splash-route-link:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}

.splash-route-sep {
  color: var(--border-strong);
}

.splash-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0 2px;
  animation: splashRiseIn 0.65s var(--ease-soft) 0.14s both;
}

.splash-enter-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 34px;
  border: 0;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 36%, transparent);
  transition: transform 0.24s var(--ease-spring), box-shadow 0.24s ease, filter 0.2s ease;
}

.splash-enter-btn:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--accent) 44%, transparent);
  filter: brightness(1.03);
}

.splash-enter-btn:active {
  transform: translateY(0) scale(0.985);
}

.splash-enter-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-110%);
  transition: transform 0.72s ease;
  pointer-events: none;
}

.splash-enter-btn:hover .splash-enter-sheen {
  transform: translateX(110%);
}

.splash-enter-arrow {
  transition: transform 0.22s var(--ease-spring);
}

.splash-enter-btn:hover .splash-enter-arrow {
  transform: translateX(4px);
}

.splash-cue-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
}

.splash-fx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--text-muted);
  font-size: 0.68rem;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.splash-fx-pill.is-on {
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--text-secondary);
}

.splash-fx-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-low);
}

.splash-fx-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--border-strong);
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.splash-fx-pill.is-on .splash-fx-dot {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-soft);
}

.splash-fx-state {
  color: var(--teal);
  font-weight: 700;
}

.splash-fx-pill:not(.is-on) .splash-fx-state {
  color: var(--text-muted);
}

.splash-cue-sep {
  color: var(--border-strong);
  font-size: 0.72rem;
}

.splash-scroll-cue {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.16s ease;
}

.splash-scroll-cue:hover {
  color: var(--accent);
}

.splash-cue-chevron {
  color: var(--accent);
  animation: splashBounce 1.8s ease-in-out infinite;
}

@keyframes splashBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.splash-progress-track {
  width: 148px;
  height: 4px;
  border-radius: 9999px;
  background: var(--border);
  overflow: hidden;
}

.splash-progress-bar {
  width: 42%;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  animation: splashProgressSlide 2.6s ease-in-out infinite;
}

@keyframes splashProgressSlide {
  0% {
    transform: translateX(-80%);
  }
  50% {
    transform: translateX(130%);
  }
  100% {
    transform: translateX(-80%);
  }
}

.splash-edge-footer {
  width: 100%;
  padding-top: 8px;
  border-top: 1px dashed color-mix(in srgb, var(--border) 82%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.splash-edge-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.splash-edge-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--teal);
}

@keyframes splashRiseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splashCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 680px) {
  .splash-shell {
    padding: 14px 16px 12px;
    gap: 12px;
  }

  .splash-issue-pill {
    display: none;
  }

  .splash-postcard {
    padding: 28px 20px 24px;
    border-radius: 22px;
  }

  .splash-stamp {
    top: 14px;
    right: 14px;
    width: 60px;
    height: 72px;
    padding: 4px;
  }

  .splash-stamp-icon svg {
    width: 16px;
    height: 16px;
  }

  .splash-avatar-cluster {
    width: 92px;
    height: 92px;
  }

  .splash-avatar-frame {
    width: 82px;
    height: 82px;
  }

  .splash-quote-card {
    padding: 12px 14px;
  }

  .splash-edge-footer {
    justify-content: center;
    text-align: center;
  }

  .splash-hanko-wrap {
    bottom: -12px;
    right: -4px;
  }

  .splash-hanko-counter {
    display: none;
  }

  .splash-hanko-seal {
    width: 48px;
    height: 48px;
  }

  .splash-hanko-kanji {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-splash,
  .splash-topbar,
  .splash-postcard,
  .splash-bottom,
  .splash-drift-petal,
  .splash-soda-bubble,
  .splash-twinkle-star,
  .splash-avatar-ring-outer,
  .splash-avatar-ring-inner,
  .splash-cursor,
  .splash-cue-chevron,
  .splash-progress-bar {
    animation: none !important;
    transition: none !important;
  }
}
