/* ============ Base ============ */
:root {
  --paper: #f1f6ed;
  --panel: #ffffff;
  --panel-2: #f6faf2;
  --ink: #1f3327;
  --ink-dim: #5d7163;
  --hairline: rgba(31, 51, 39, 0.10);
  --line: rgba(176, 125, 31, 0.30);
  --gold: #96690f;
  --gold-bright: #b07d1f;
  --gold-fill: #e0aa4e;
  --matcha: #5c7d3f;
  --matcha-fill: #7fa25e;
  --sky: #4d94c9;
  --online: #4c9e5f;
  --shadow-soft: 0 2px 10px rgba(31, 51, 39, 0.05);
  --shadow-lift: 0 18px 44px rgba(31, 51, 39, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  overflow-x: hidden;
}

/* Signature keyline along the very top */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-fill), var(--matcha-fill) 55%, var(--sky));
  z-index: 60;
}

::selection {
  /* コントラスト確保のため濃い金色背景+白文字に変更 */
  background: var(--gold);      /* #96690f */
  color: #fff;
}

:is(a, button):focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ Ambient layers ============ */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.bg-photo {
  position: absolute;
  inset: 0;
  background: url('images/guangzhou.jpg') center / cover no-repeat;
  opacity: 0.09;
  filter: saturate(0.85);
}

.glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.glow-gold   { width: 480px; height: 480px; top: -160px; left: -140px;  background: rgba(227,172,78,0.22); }
.glow-matcha { width: 620px; height: 620px; top: 28%; right: -240px;    background: rgba(141,173,108,0.20); }
.glow-sky    { width: 460px; height: 460px; bottom: -200px; left: 18%;  background: rgba(127,178,214,0.18); }

.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.04;
}

.firefly {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #d29a35;
  box-shadow: 0 0 10px 2px rgba(210,154,53,0.45);
  opacity: 0;
  transform: scale(var(--scale, 1));
  animation-name: firefly-drift, firefly-glow;
  animation-timing-function: ease-in-out, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-direction: alternate, normal;
}
@keyframes firefly-drift { from { translate: 0 0; } to { translate: 52px -84px; } }
@keyframes firefly-glow  { 0%, 100% { opacity: 0; } 35%, 65% { opacity: 0.8; } }

/* ============ Top bar ============ */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem;
  max-width: 1060px; margin: 0 auto;
  padding: 1.4rem 1.6rem 0;
}
.brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.clock {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--ink-dim);
  border: 1px solid var(--hairline);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  box-shadow: var(--shadow-soft);
}
.clock .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--online);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(76,158,95,0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(76,158,95,0); }
  100% { box-shadow: 0 0 0 0 rgba(76,158,95,0); }
}

/* ============ Layout ============ */
.container {
  position: relative; z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  padding: 2.6rem 1.6rem 1rem;
}
.layout {
  display: grid;
  grid-template-columns: minmax(300px, 370px) 1fr;
  gap: 2.4rem;
  align-items: start;
}

/* ============ Profile card ============ */
.profile-card {
  position: sticky; top: 2rem;
  text-align: center;
  padding: 2.4rem 1.8rem 2rem;
  background: linear-gradient(165deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 22px 22px 22px 6px;
  box-shadow: var(--shadow-lift);
  transform-style: preserve-3d;
  will-change: transform;
}
.profile-card::before {
  content: '';
  position: absolute; top: 0; left: 24px; right: 24px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--gold-fill), transparent);
  opacity: 0.85;
}

.profile-wrapper { position: relative; display: inline-block; margin-bottom: 1.3rem; }
.profile-icon {
  width: 118px; height: 118px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-fill);
  outline: 4px solid rgba(224,170,78,0.28);
  box-shadow: 0 12px 28px rgba(31,51,39,0.16);
}
.status {
  position: absolute; right: 4px; bottom: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--online);
  border: 3px solid #fff;
}

.english-name {
  margin: 0 0 0.15rem;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 4.5vw, 2.7rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.chinese-name {
  margin: 0 0 1.1rem;
  font-family: 'Shippori Mincho B1', serif;
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--gold-bright);
}

.handle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--matcha);
  background: rgba(127,162,94,0.10);
  border: 1px dashed rgba(127,162,94,0.50);
  border-radius: 9px;
  padding: 0.5rem 0.85rem;
  margin-bottom: 1.1rem;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.handle:hover { border-color: var(--matcha-fill); color: #48652f; }
.handle .copy-hint {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  border-left: 1px solid var(--hairline);
  padding-left: 0.5rem;
  transition: color 0.3s;
}
.handle.copied {
  border-style: solid;
  border-color: var(--gold-bright);
  color: var(--gold);
  background: rgba(224,170,78,0.14);
  animation: copy-pulse 0.45s ease;
}
.handle.copied .copy-hint { color: var(--gold); }
@keyframes copy-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}
.badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin: 1.1rem 0 1rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: 4px;
  border: 1px solid;
}
.badge-admin { color: var(--gold);   border-color: rgba(176,125,31,0.45); background: rgba(224,170,78,0.14); }
.badge-lang  { color: var(--matcha); border-color: rgba(127,162,94,0.50); background: rgba(127,162,94,0.12); }

.tagline { margin: 0; font-size: 0.98rem; color: var(--ink-dim); }
.tagline em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 600;
  color: var(--gold-bright);
}

/* Steaming teacup */
.teacup { position: relative; display: inline-block; margin-top: 1.7rem; font-size: 1.6rem; color: var(--gold-bright); }
.steam {
  position: absolute; bottom: 88%; left: 50%;
  width: 6px; height: 24px;
  border-radius: 50%;
  background: rgba(107,128,113,0.40);
  filter: blur(4px);
  opacity: 0;
  animation: steam 3.4s ease-in-out infinite;
}
.steam.s1 { margin-left: -12px; }
.steam.s2 { animation-delay: 1.15s; }
.steam.s3 { margin-left: 12px; animation-delay: 2.3s; }
@keyframes steam {
  0%   { transform: translateY(8px) scale(0.8); opacity: 0; }
  30%  { opacity: 0.55; }
  100% { transform: translateY(-30px) translateX(5px) scale(1.5); opacity: 0; }
}

/* ============ Section titles ============ */
.section-title {
  display: flex; align-items: center; gap: 0.9rem;
  margin: 0 0 1.2rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--matcha);
}
.section-title .title-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(176,125,31,0.35), transparent); }

/* ============ Link rows ============ */
.links { list-style: none; margin: 0 0 2.6rem; padding: 0; }
.links li {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.links-section.visible .links li { opacity: 1; transform: none; }

.link-row {
  --accent: #96690f; --accent-fill: #e0aa4e; --on-accent: #22352b;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.7rem;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s, box-shadow 0.35s;
}
.link-row:hover {
  transform: translateX(7px);
  border-color: color-mix(in srgb, var(--accent-fill) 55%, transparent);
  box-shadow: 0 10px 24px rgba(31,51,39,0.12);
}
.link-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 11px;
  font-size: 1.1rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-fill) 18%, white);
  transition: background 0.35s, color 0.35s, transform 0.35s;
}
.link-row:hover .link-icon {
  background: var(--accent-fill);
  color: var(--on-accent);
  transform: rotate(-7deg) scale(1.06);
}
.link-text strong { display: block; font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.link-text small  { font-family: 'IBM Plex Mono', monospace; font-size: 0.76rem; color: var(--ink-dim); }
.link-arrow { color: var(--ink-dim); font-size: 0.85rem; transition: transform 0.35s, color 0.35s; }
.link-row:hover .link-arrow { transform: translateX(5px); color: var(--accent); }

/* Brand accent colours */
.link-website  { --accent: #96690f; --accent-fill: #e0aa4e; --on-accent: #22352b; }
.link-blog     { --accent: #3579ab; --accent-fill: #4d94c9; --on-accent: #ffffff; }
.link-email    { --accent: #5c7d3f; --accent-fill: #7fa25e; --on-accent: #ffffff; }
.link-misskey  { --accent: #71861a; --accent-fill: #a4bd2e; --on-accent: #22352b; }
.link-mastodon { --accent: #5253e0; --accent-fill: #6f70f2; --on-accent: #ffffff; }
.link-x        { --accent: #2c333b; --accent-fill: #3a4149; --on-accent: #ffffff; }
.link-bluesky  { --accent: #2372c9; --accent-fill: #3b93e8; --on-accent: #ffffff; }

/* ============ Details ============ */
.details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; margin: 0; }
.detail {
  padding: 1rem 1.15rem;
  background: rgba(255,255,255,0.80);
  border: 1px solid var(--hairline);
  border-radius: 13px 13px 13px 4px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.3s, transform 0.3s;
}
.detail:hover { border-color: var(--line); transform: translateY(-3px); }
.detail dt {
  margin: 0 0 0.3rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--matcha);
}
.detail dt i { margin-right: 0.45rem; color: var(--gold-bright); }
.detail dd { margin: 0; font-size: 0.94rem; color: var(--ink); }

/* ============ Footer ============ */
.footer {
  position: relative; z-index: 1;
  max-width: 1060px; margin: 0 auto;
  padding: 1.6rem 1.6rem 2.6rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.footer p { margin: 0.35rem 0; }
.footer-note i { color: var(--gold-bright); margin-right: 0.2rem; }
.footer-note .model {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--ink);
  background: rgba(31,51,39,0.06);
  border: 1px solid var(--hairline);
  padding: 0.08rem 0.5rem;
  border-radius: 5px;
}

/* ============ Scroll reveal ============ */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 2rem; }
  .profile-card { position: static; }
}
@media (max-width: 560px) {
  .container { padding: 2rem 1.1rem 0.5rem; }
  .topbar { padding: 1.1rem 1.1rem 0; }
  .details { grid-template-columns: 1fr; }
  .english-name { font-size: 2rem; }
  .chinese-name { font-size: 1.1rem; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in, .links li { opacity: 1; transform: none; }
  .steam, .firefly { display: none; }
}
.tagline a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(176, 125, 31, 0.35);
  transition: color 0.3s, border-color 0.3s;
}
.tagline a:hover,
.tagline a:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}
.tagline a:hover em,
.tagline a:focus-visible em {
  color: var(--gold);
}

/* ============ Topbar actions & notice button ============ */
.topbar-actions { display: flex; align-items: center; gap: 0.6rem; }

.notice-btn {
  position: relative;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.75);
  color: var(--gold-bright);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, border-color 0.3s, color 0.3s;
}
.notice-btn:hover {
  transform: translateY(-2px) rotate(-8deg);
  border-color: var(--line);
  color: var(--gold);
}
.notice-dot {
  position: absolute; top: 6px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d05b4d;
  border: 1.5px solid #fff;
  animation: pulse-red 2.4s infinite;
}
.notice-btn.read .notice-dot { display: none; }
@keyframes pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(208,91,77,0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(208,91,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(208,91,77,0); }
}

/* ============ Announcements dialog ============ */
.notice-dialog {
  width: min(640px, calc(100vw - 2.5rem));
  max-height: min(80vh, 720px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 5px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(31,51,39,0.28);
  overflow: hidden;
}
.notice-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialog-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.notice-dialog[open]::backdrop {
  background: rgba(31, 51, 39, 0.45);
  backdrop-filter: blur(3px);
  animation: backdrop-in 0.35s ease;
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.notice-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(165deg, var(--panel), var(--panel-2));
}
.notice-head h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 600;
}
.notice-head h2 i { color: var(--gold-bright); margin-right: 0.5rem; }
.notice-close {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.notice-close:hover { background: rgba(31,51,39,0.06); color: var(--ink); transform: rotate(90deg); }

.notice-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.4rem 1.6rem 1.8rem;
  font-size: 0.95rem;
  line-height: 1.8;
  transition: opacity 0.2s ease;
}

/* Loading / error state */
.notice-status {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 2.5rem 1rem;
  color: var(--ink-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
}
.notice-status i { color: var(--gold-bright); }
.notice-status.error i { color: #c0564a; }

/* Markdown typography */
.notice-body h1, .notice-body h2, .notice-body h3 {
  font-family: 'Fraunces', serif;
  line-height: 1.3;
  margin: 1.4em 0 0.5em;
}
.notice-body h1 { font-size: 1.5rem; }
.notice-body h2 { font-size: 1.25rem; }
.notice-body h3 { font-size: 1.05rem; }
.notice-body :is(h1, h2, h3):first-child { margin-top: 0; }
.notice-body p { margin: 0.7em 0; }
.notice-body a { color: var(--gold); text-decoration-color: rgba(176,125,31,0.4); text-underline-offset: 3px; }
.notice-body a:hover { color: var(--gold-bright); }
.notice-body ul, .notice-body ol { padding-left: 1.4em; margin: 0.7em 0; }
.notice-body li { margin: 0.3em 0; }
.notice-body li::marker { color: var(--matcha-fill); }
.notice-body blockquote {
  margin: 1em 0;
  padding: 0.4em 1em;
  border-left: 3px solid var(--gold-fill);
  background: rgba(224,170,78,0.08);
  border-radius: 0 8px 8px 0;
  color: var(--ink-dim);
}
.notice-body code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  background: rgba(31,51,39,0.07);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}
.notice-body pre {
  background: rgba(31,51,39,0.06);
  padding: 1em;
  border-radius: 10px;
  overflow-x: auto;
}
.notice-body pre code { background: none; padding: 0; }
.notice-body hr { border: none; border-top: 1px solid var(--hairline); margin: 1.5em 0; }
.notice-body img { max-width: 100%; border-radius: 10px; }
.notice-body table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.9em; }
.notice-body th, .notice-body td { border: 1px solid var(--hairline); padding: 0.5em 0.75em; text-align: left; }
.notice-body th { background: rgba(127,162,94,0.10); font-weight: 700; }

/* ============ iOS horizontal-overflow fix ============ */

/* (1) はみ出しをレイアウト幅に含めない。clip は hidden と違い
       スクロールコンテナを作らないので iOS の横ずれに効く */
       html {
        overflow-x: hidden;
        overflow-x: clip;
      }
      body {
        overflow-x: clip;   /* 既存の hidden を上書き */
        max-width: 100%;
      }
      
      /* (2) 長い handle / URL をカード幅内で折り返し、横広がりを防ぐ */
      .handle { max-width: 100%; }
      .handle-text {
        min-width: 0;                 /* flex 内で縮めるために必須 */
        overflow-wrap: anywhere;      /* モノスペースの連続文字列も折る */
      }
      
      /* (3) 漢字名の右ずれ補正。text-indent は中央寄せでは逆効果なので無効化し、
             letter-spacing 末尾スペースの補正は padding で行う */
      .chinese-name {
        text-indent: 0;
        padding-left: 0.42em;
      }
      
      /* (4) 狭幅で topbar がはみ出さないよう縮める */
      @media (max-width: 560px) {
        .topbar { gap: 0.5rem; }
        .topbar-actions { gap: 0.45rem; }
        .brand-name { font-size: 1rem; }
        .clock { font-size: 0.72rem; padding: 0.3rem 0.7rem; }
        .notice-btn { width: 34px; height: 34px; font-size: 0.85rem; }
      }

/* ============ Notice header controls ============ */
.notice-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* Language switcher */
.notice-lang-switch {
  display: flex;
  gap: 0.25rem;
  background: rgba(31, 51, 39, 0.05);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 0.2rem;
}
.notice-lang-switch button {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.65rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.notice-lang-switch button:hover {
  color: var(--ink);
}
.notice-lang-switch button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(31,51,39,0.10);
}

/* ============ Notice archive link ============ */
.notice-archive {
  padding: 1rem 1.6rem 1.4rem;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
}
.notice-archive a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--matcha);
  text-decoration: none;
  border-bottom: 1px dashed rgba(127,162,94,0.40);
  padding-bottom: 0.1rem;
  transition: color 0.3s, border-color 0.3s;
}
.notice-archive a:hover,
.notice-archive a:focus-visible {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
}
.notice-archive a .fa-box-archive {
  color: var(--gold-bright);
}
.notice-archive a .fa-arrow-up-right-from-square {
  font-size: 0.7rem;
  opacity: 0.6;
}

/* ============ Final polish ============ */

/* reduced motion 時は smooth スクロールも止める（既存ブロックで漏れていた分） */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* iOS でダイアログ内スクロールが背景へ伝播するのを防ぐ */
.notice-dialog,
.notice-body { overscroll-behavior: contain; }