/* ベース */
:root {
  --w: 960px;
  --gap: 1rem;
  --fg:#121212;
  --muted:#6b6b6b;
  --bg:#f6f6f6;
  --surface:#ffffff;
  --accent:#2f2f2f;
  --accent-weak:#f1f1f1;
  --accent-strong:#161616;
  --line:#dcdcdc;
  --shadow: 0 24px 60px -32px rgba(0,0,0,.12);
  --glass-bg: rgba(255,255,255,.96);
  --glass-bg-strong: rgba(255,255,255,1);
  --glass-border: rgba(0,0,0,.06);
  --pill-bg: rgba(255,255,255,.7);
  --pill-bg-hover: rgba(255,255,255,.9);
  --panel-bg: rgba(255,255,255,.7);
  --panel-bg-hover: rgba(255,255,255,.92);
  --panel-border: rgba(226,232,240,.7);
  --panel-border-strong: rgba(148,163,184,.85);
  --meta-bg: rgba(226,232,240,.6);
  --avatar-bg: rgba(226,232,240,.6);
  --avatar-border: rgba(203,213,225,.8);
  --card-bg: rgba(255,255,255,.68);
  --card-bg-hover: rgba(255,255,255,.9);
  --card-border: rgba(226,232,240,.75);
  --card-border-strong: rgba(148,163,184,.85);
  --ghost-bg: rgba(255,255,255,.9);
  --ghost-bg-hover: #fff;
  --note-bg: rgba(248,250,252,.92);
  --button-bg: var(--accent-strong);
  --button-fg: #ffffff;
  --toggle-track-bg: rgba(0,0,0,.08);
  --toggle-track-border: rgba(0,0,0,.08);
  --toggle-knob-bg: #ffffff;
  --toggle-knob-shadow: 0 4px 12px -6px rgba(15,15,15,.45);
  --toggle-fill-color: rgba(0,0,0,.12);
  --icon-bg: linear-gradient(135deg, rgba(255,255,255,.96), rgba(226,232,240,.82));
  --icon-border: rgba(148,163,184,.5);
  --icon-color: #1f2937;
  --status-dot: var(--accent);
  --status-dot-ring: rgba(64,64,64,.3);
  --profile-title-bg: linear-gradient(135deg, rgba(241,245,249,.85), rgba(226,232,240,.55));
  --profile-title-color: var(--accent-strong);
  --profile-title-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 20px -18px rgba(15,23,42,.28);
  --profile-hero-bg: linear-gradient(135deg, rgba(0,0,0,.03), rgba(255,255,255,.85));
  --profile-hero-border: var(--line);
  --profile-hero-shadow: 0 24px 48px -36px rgba(15,23,42,.18);
  --profile-portrait-border: rgba(255,255,255,.9);
  --profile-note-border: rgba(148,163,184,.55);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --fg:#f5f5f5;
  --muted:#a5a5b4;
  --bg:#050505;
  --surface:#101010;
  --accent:#fbbf24;
  --accent-weak:rgba(255,255,255,.08);
  --accent-strong:#f5f5f5;
  --line:rgba(255,255,255,.08);
  --shadow: 0 32px 80px -48px rgba(0,0,0,.9);
  --glass-bg: rgba(22,22,22,.88);
  --glass-bg-strong: rgba(32,32,32,.92);
  --glass-border: rgba(255,255,255,.08);
  --pill-bg: rgba(255,255,255,.05);
  --pill-bg-hover: rgba(255,255,255,.12);
  --panel-bg: rgba(16,16,16,.9);
  --panel-bg-hover: rgba(26,26,26,.96);
  --panel-border: rgba(255,255,255,.08);
  --panel-border-strong: rgba(255,255,255,.18);
  --meta-bg: rgba(255,255,255,.1);
  --avatar-bg: rgba(255,255,255,.08);
  --avatar-border: rgba(255,255,255,.12);
  --card-bg: rgba(16,16,16,.92);
  --card-bg-hover: rgba(24,24,24,.96);
  --card-border: rgba(255,255,255,.08);
  --card-border-strong: rgba(255,255,255,.2);
  --ghost-bg: rgba(255,255,255,.08);
  --ghost-bg-hover: rgba(255,255,255,.15);
  --note-bg: rgba(18,18,18,.95);
  --button-bg: #2f2f2f;
  --button-fg: #f5f5f5;
  --toggle-track-bg: rgba(255,255,255,.12);
  --toggle-track-border: rgba(255,255,255,.2);
  --toggle-knob-bg: #f5f5f5;
  --toggle-knob-shadow: 0 4px 18px -8px rgba(0,0,0,.85);
  --toggle-fill-color: rgba(255,255,255,.35);
  --icon-bg: linear-gradient(150deg, rgba(255,255,255,.14), rgba(255,255,255,.03));
  --icon-border: rgba(255,255,255,.28);
  --icon-color: #f6f6f7;
  --status-dot: rgba(255,255,255,.85);
  --status-dot-ring: rgba(255,255,255,.55);
  --profile-title-bg: linear-gradient(140deg, rgba(255,255,255,.12), rgba(0,0,0,.2));
  --profile-title-color: #f8fafc;
  --profile-title-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 30px -26px rgba(0,0,0,.85);
  --profile-hero-bg: linear-gradient(145deg, rgba(255,255,255,.04), rgba(10,10,10,.9));
  --profile-hero-border: rgba(255,255,255,.08);
  --profile-hero-shadow: 0 32px 80px -48px rgba(0,0,0,.85);
  --profile-portrait-border: rgba(255,255,255,.22);
  --profile-note-border: rgba(255,255,255,.2);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body {
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Noto Sans JP", sans-serif;
  line-height: 1.6;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; transition: color .18s ease; outline: none; }
a:hover,
a:focus-visible { color: var(--accent-strong); }
*:focus {
  outline: none;
}
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  transition: outline-offset .15s ease, outline-width .15s ease;
}

/* リロードボタン */
.reload-btn {
  position: fixed;
  top: clamp(1.5rem, 4vw, 3rem);
  left: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.9rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px -1px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.reload-btn:hover,
.reload-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.12);
  background: var(--glass-bg-strong);
}
.reload-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.05));
  border-radius: 50%;
  flex-shrink: 0;
}
.reload-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.reload-text {
  font-weight: 600;
  color: var(--accent-strong);
  font-size: 0.88rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* テーマトグル */
.theme-toggle {
  position: fixed;
  top: clamp(1.5rem, 4vw, 3rem);
  right: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.85rem 0.45rem 0.7rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px -1px rgba(0,0,0,0.08);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--fg);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .12s ease, box-shadow .15s ease;
  backdrop-filter: blur(10px);
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--glass-bg-strong);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px -2px rgba(0,0,0,0.12);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.theme-toggle__track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 52px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  background: var(--toggle-track-bg);
  border: 1px solid var(--toggle-track-border);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.theme-toggle__track::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: var(--toggle-fill-color);
  opacity: .35;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease, opacity .25s ease;
}
.theme-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--toggle-knob-bg);
  box-shadow: var(--toggle-knob-shadow);
  transition: transform .25s ease, background .25s ease;
}
.theme-toggle__text {
  letter-spacing: 0.08em;
}
:root[data-theme='dark'] .theme-toggle__knob {
  transform: translateX(26px);
}

/* レイアウト */
.wrap {
  max-width: var(--w);
  margin: clamp(0.75rem, 2.8vw, 1.9rem) auto;
  padding: clamp(0.85rem, 2.5vw, 1.6rem);
}
main {
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3.5vw, 2.4rem);
}
section {
  margin: clamp(1.25rem, 3vw, 2.3rem) 0;
  scroll-margin: clamp(5rem, 12vw, 8rem) 0;
}
h1, h2, h3 { line-height: 1.25; }
h2 {
  font-size: clamp(1.2rem, 2vw, 1.35rem);
  margin: 0 0 .85rem;
  font-weight: 600;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(148, 163, 184, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  color: var(--fg);
}
h2 .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--icon-border);
  background: var(--icon-bg);
  color: var(--icon-color);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 8px 18px -14px rgba(15,23,42,0.38);
}
h2 .icon svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--social,
.icon--links,
.icon--articles,
.icon--profile {
  background: var(--icon-bg);
  border-color: var(--icon-border);
  color: var(--icon-color);
}

/* ヒーロー */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: auto;
  gap: clamp(1.15rem, 2.2vw, 2rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(125deg, rgba(0,0,0,.02), rgba(0,0,0,.04));
  border-radius: 24px;
  border:1px solid var(--line);
  margin-bottom: clamp(1.6rem, 3vw, 2.5rem);
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("20250909-00000042-mantan-000-1-view.jpg") 68% center/cover no-repeat;
  opacity: .28;
  filter: saturate(.9);
  transform: scaleX(-1);
  transform-origin: center;
  z-index: 0;
  pointer-events: none;
}
.hero::after {
  content:"";
  position:absolute;
  inset:-140px 35% auto -160px;
  height: 280px;
  background: radial-gradient(circle at center, rgba(0,0,0,.04), rgba(0,0,0,0));
  opacity:.6;
  pointer-events:none;
}
.hero__body {
  position: relative;
  z-index:1;
  max-width: 560px;
  padding-bottom: clamp(3.5rem, 8vw, 5.5rem);
}
.hero h1 {
  margin:0 0 .75rem;
  font-size: clamp(2.2rem, 5.5vw, 2.9rem);
}
.subtitle {
  color:var(--muted);
  margin:0 0 .55rem;
  font-size: clamp(1rem, 2vw, 1.05rem);
}
.note { color:var(--muted); margin:0 0 1.6rem; }
.hero__skills {
  display:flex;
  align-items:flex-start;
  gap: clamp(0.75rem, 1.8vw, 1.35rem);
  flex-wrap: wrap;
  margin: 0 0 1.65rem;
}
.hero__skills-label {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.4rem;
  padding:0;
  min-width:min(120px, 45vw);
  margin-top:.15rem;
}
.hero__skills-label::before {
  content:"";
  display:block;
  width:32px;
  height:2px;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(0,0,0,.34), rgba(0,0,0,0));
}
.hero__skills-label-main {
  font-size:.8rem;
  font-weight:600;
  letter-spacing:.28em;
  text-transform:uppercase;
  color: var(--accent-strong);
  line-height:1.05;
}
.hero__skills-label-sub {
  font-size:.95rem;
  font-weight:500;
  color: var(--muted);
  letter-spacing:.02em;
}
.hero__skills .chips { margin:0; }
.chips {
  list-style:none;
  margin:0 0 1.65rem;
  padding:0;
  display:flex;
  gap:.6rem;
  flex-wrap:wrap;
}
.chips li {
  padding:.5rem .85rem;
  border-radius:999px;
  background: var(--accent-weak);
  color: var(--accent-strong);
  font-size:.85rem;
  font-weight:500;
  letter-spacing:.01em;
  border:1px solid var(--line);
  outline: none;
}
.hero__actions {
  display:flex;
  gap:.85rem;
  flex-wrap:wrap;
  margin-bottom: clamp(0.9rem, 2vw, 1.4rem);
}
.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  padding:.65rem 1.6rem;
  border:1px solid var(--button-bg);
  border-radius: 999px;
  text-decoration:none;
  color: var(--button-fg);
  background: var(--button-bg);
  font-weight:600;
  letter-spacing:.01em;
  box-shadow:0 18px 36px -28px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
  outline: none;
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow:0 28px 48px -32px rgba(0,0,0,.16);
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
.btn--ghost {
  background:var(--ghost-bg);
  color: var(--accent-strong);
  border-color: var(--line);
  box-shadow:none;
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background:var(--ghost-bg-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow:0 14px 32px -26px rgba(0,0,0,.08);
}
.top-nav {
  display:flex;
  gap:1rem;
  flex-wrap:wrap;
  font-size:.85rem;
  position: relative;
  z-index:1;
}
.top-nav a {
  padding:.45rem .85rem;
  border-radius:999px;
  background: var(--pill-bg);
  border:1px solid var(--line);
  text-decoration:none;
  transition: background .2s ease, color .2s ease, transform .15s ease, border .2s ease;
}
.top-nav a:hover,
.top-nav a:focus-visible {
  background: var(--pill-bg-hover);
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}
.hero__aside {
  position: absolute;
  bottom: clamp(1rem, 3vw, 2rem);
  left: clamp(1.2rem, 3.5vw, 2.6rem);
  z-index:1;
  padding: clamp(0.6rem, 1.5vw, 0.85rem) clamp(0.85rem, 2vw, 1.35rem);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  border:1px solid var(--line);
  box-shadow: 0 24px 48px -38px rgba(0,0,0,.14);
  max-width: min(320px, 45%);
  width: auto;
  font-size: .9rem;
}
.hero__status {
  display:flex;
  align-items:center;
  gap:.4rem;
  margin:0 0 .35rem;
  font-weight: 600;
  letter-spacing: .01em;
  font-size: .86rem;
}
.status-dot {
  display:inline-flex;
  width:.58rem;
  height:.58rem;
  border-radius:50%;
  background: var(--status-dot);
  box-shadow:0 0 0 0 var(--status-dot-ring);
  animation: ping 2.8s cubic-bezier(0, 0, .2, 1) infinite;
}
.status-label { color: var(--accent-strong); }
.hero__mini {
  margin:0;
  color: var(--muted);
  font-size:.8rem;
  line-height: 1.5;
}

@media (max-width: 1080px){
  .hero__body {
    padding-bottom: clamp(3rem, 9vw, 5rem);
  }
  .hero__aside {
    bottom: clamp(0.8rem, 2.6vw, 1.6rem);
    left: clamp(0.9rem, 4vw, 2.2rem);
    padding: clamp(0.5rem, 1.3vw, 0.75rem) clamp(0.8rem, 2.1vw, 1.2rem);
    max-width: min(300px, 55%);
  }
}

/* リスト */
.list {
  list-style: none;
  margin:0;
  padding:0;
  display:grid;
  gap:.95rem;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
}
.list a {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  text-decoration:none;
  padding:.85rem 1.1rem;
  background: var(--panel-bg);
  border:1px solid var(--panel-border);
  border-radius: 14px;
  font-weight:520;
  color: var(--accent-strong);
  transition: background .18s ease, border .18s ease, color .2s ease;
  box-shadow:none;
}
.list--social a {
  padding:.9rem 1.15rem;
}
.list--social a::after {
  display: none;
}
.list__left {
  display:flex;
  align-items:center;
  gap:.75rem;
  min-width: 0;
}
.list__label {
  font-weight:560;
  letter-spacing:.01em;
  white-space: nowrap;
}
.list__meta {
  font-size:.72rem;
  letter-spacing:.12em;
  text-transform: uppercase;
  color: rgba(100,116,139,.9);
  background: var(--meta-bg);
  padding:.25rem .65rem;
  border-radius: 999px;
  font-weight:600;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent-strong);
}
.social-icon svg {
  width: 100%;
  height: 100%;
}
.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.list a::after {
  content:"↗";
  font-size: .9rem;
  color: rgba(107,114,128,.7);
  margin-left: auto;
}
.list a:hover,
.list a:focus-visible {
  background: var(--panel-bg-hover);
  border-color: var(--panel-border-strong);
  color: var(--accent-strong);
}
.list--friends {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.friend-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  justify-content: flex-start;
}
.friend-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--avatar-bg);
  border: 1px solid var(--avatar-border);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.friend-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.friend-card__name {
  flex: 1;
  display: inline-flex;
  align-items: center;
}

/* カード */
.cards {
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:1.35rem;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
}
.card {
  border:1px solid var(--card-border);
  background: var(--card-bg);
  padding:1.35rem;
  border-radius: 20px;
  transition: background .18s ease, border .18s ease, transform .15s ease;
  position: relative;
  overflow:hidden;
  box-shadow:none;
}
.card::after {
  content:"";
  position:absolute;
  inset:8% 6% auto auto;
  width:56px;
  height:56px;
  background: radial-gradient(circle at center, rgba(0,0,0,.06), transparent 70%);
  opacity:0;
  transition: opacity .28s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-2px);
  border-color: var(--card-border-strong);
  background: var(--card-bg-hover);
}
.card:hover::after,
.card:focus-within::after { opacity:1; }
.card h3 {
  margin:0 0 .65rem;
  font-size:1.08rem;
  font-weight:620;
}
.meta { margin:0; color:var(--muted); font-size:.92rem; }

/* プロフィール */
#profile-page h1 {
  font-size: clamp(2.2rem, 5vw, 2.6rem);
  margin: 0 0 clamp(1.6rem, 4vw, 2.4rem);
}
#profile-page #profile-title {
  display: inline-flex;
  align-items: center;
  padding: clamp(0.5rem, 1.4vw, 0.75rem) clamp(1rem, 3vw, 1.4rem);
  border-radius: 20px;
  background: var(--profile-title-bg);
  color: var(--profile-title-color);
  font-weight: 650;
  letter-spacing: .015em;
  box-shadow: var(--profile-title-shadow);
}
#profile-page .profile-section {
  display: grid;
  gap: clamp(1.8rem, 4vw, 2.8rem);
}
#profile-page .profile-hero {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 2.6rem);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  background: var(--profile-hero-bg);
  border: 1px solid var(--profile-hero-border);
  border-radius: 28px;
  box-shadow: var(--profile-hero-shadow);
}
#profile-page .profile-portrait {
  width: clamp(140px, 22vw, 180px);
  height: clamp(140px, 22vw, 180px);
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 20px 40px -34px rgba(15,23,42,.28);
  border: 6px solid var(--profile-portrait-border);
}
#profile-page .profile-hero__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#profile-page .profile-tagline {
  margin: 0;
  font-weight: 620;
  letter-spacing: .02em;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--accent-strong);
}
#profile-page .profile-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
#profile-page .profile-body {
  display: grid;
  gap: clamp(1.8rem, 4vw, 2.6rem);
}
#profile-page .profile-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg-hover);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 22px 46px -40px rgba(15,23,42,.2);
}
#profile-page .profile-table th,
#profile-page .profile-table td {
  padding: clamp(0.85rem, 2.3vw, 1.3rem) clamp(1.2rem, 3vw, 1.9rem);
  border-bottom: 1px solid var(--line);
}
#profile-page .profile-table th {
  width: 140px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  letter-spacing: .02em;
}
#profile-page .profile-table td {
  font-weight: 520;
  color: var(--fg);
}
#profile-page .profile-table tr:last-child th,
#profile-page .profile-table tr:last-child td {
  border-bottom: none;
}
#profile-page .profile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
#profile-page .profile-links a {
  display: inline-flex;
  align-items: center;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--pill-bg);
  text-decoration: none;
  font-weight: 520;
  color: var(--accent-strong);
  letter-spacing: .01em;
  transition: background .2s ease, border .2s ease, transform .15s ease;
}
#profile-page .profile-links a:hover,
#profile-page .profile-links a:focus-visible {
  background: var(--pill-bg-hover);
  border-color: var(--panel-border-strong);
  transform: translateY(-1px);
}
#profile-page .profile-oshimen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
#profile-page .profile-oshimen li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px dashed var(--panel-border-strong);
  background: var(--note-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
#profile-page .profile-oshimen__group {
  font-weight: 620;
  letter-spacing: .02em;
  color: var(--accent-strong);
}
#profile-page .profile-oshimen__member {
  font-weight: 520;
  color: var(--fg);
}
#profile-page .profile-oshimen__member a {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .18s ease, border-color .18s ease;
}
#profile-page .profile-oshimen__member a:hover,
#profile-page .profile-oshimen__member a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
#profile-page .profile-oshimen__hint {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
#profile-page .profile-note {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border-left: 4px solid var(--profile-note-border);
  background: var(--note-bg);
  border-radius: 0 24px 24px 0;
  color: var(--muted);
  line-height: 1.7;
  display: grid;
  gap: .75rem;
}
#profile-page .profile-note p { margin: 0; }

/* フッター */
.foot {
  margin-top:2.35rem;
  padding-top:1rem;
  border-top:1px solid var(--line);
  color:var(--muted);
  text-align:center;
  font-size:.88rem;
}

/* プロフィール専用ページ */
#profile-page .wrap {
  margin: clamp(3.5rem, 9vw, 6rem) auto clamp(2.5rem, 6vw, 4rem);
}
#profile-page .profile-section {
  margin-top: 0;
}

/* 細かい快適性 */
html { scroll-behavior: smooth; }

@media (max-width: 820px){
  .hero::before {
    background-position: 82% center;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__body {
    padding-bottom: 0;
  }
  .hero__aside {
    position: static;
    margin-top: 0.5rem;
    max-width: none;
    width: 100%;
  }
  #profile-page .profile-hero {
    flex-direction: column;
    text-align: center;
  }
  #profile-page .profile-hero__content {
    align-items: center;
  }
  #profile-page .profile-portrait {
    border-radius: 50%;
  }
  #profile-page .profile-table th {
    width: auto;
  }
  #profile-page .profile-links {
    justify-content: center;
  }
  #profile-page .profile-note {
    border-left: none;
    border-radius: 24px;
  }
}

@media (max-width: 640px){
  .hero {
    padding: clamp(2rem, 7vw, 2.8rem);
  }
  .hero::before {
    background-position: right center;
  }
  main { padding: clamp(1.75rem, 6vw, 2.4rem); }
  .top-nav { gap:.65rem; }
  .list { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .profile {
    grid-template-columns: 1fr;
    text-align:center;
  }
  .profile dl { margin:0 auto; }
  .reload-btn {
    top: clamp(1rem, 3vw, 1.5rem);
    left: clamp(0.75rem, 3vw, 1.25rem);
    padding: 0.5rem 0.85rem;
    gap: 0.65rem;
  }
  .theme-toggle {
    top: clamp(1rem, 3vw, 1.4rem);
    right: clamp(0.75rem, 3vw, 1.25rem);
    padding: 0.45rem 0.8rem;
  }
  .reload-icon-wrapper {
    width: 36px;
    height: 36px;
  }
  .reload-icon {
    width: 36px;
    height: 36px;
  }
  .reload-text {
    font-size: 0.85rem;
  }
  #profile-page .profile-section {
    gap: clamp(1.4rem, 6vw, 2.2rem);
  }
  #profile-page .profile-table th,
  #profile-page .profile-table td {
    padding: clamp(0.75rem, 4vw, 1.1rem) clamp(1rem, 5vw, 1.4rem);
  }
  #profile-page .profile-links {
    gap: .55rem;
  }
}

@media (prefers-reduced-motion: reduce){
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fortune-btn:hover {
    transform: none;
  }
}

@keyframes ping {
  0% { transform: scale(.95); box-shadow:0 0 0 0 var(--status-dot-ring); }
  70% { transform: scale(1); box-shadow:0 0 0 10px rgba(0,0,0,0); }
  100% { transform: scale(.95); box-shadow:0 0 0 0 rgba(0,0,0,0); }
}

/* =========================================
   おみくじボタン (ここから下を追加)
   ========================================= */

/* ボタンと結果を配置するエリア */
.fortune-container {
  text-align: center;
  margin: 3rem auto 1rem; /* 上に少し余白、下は控えめに */
  min-height: 150px; /* コメントとラッキーアイテム分の高さを確保 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}

/* ボタンのデザイン */
.fortune-btn {
  background: var(--surface); /* サイトの背景色変数を使用 */
  border: 2px solid #e60033; /* 神社の赤 */
  color: #e60033;
  padding: 0.8rem 2rem;
  border-radius: 999px; /* 角丸（カプセル型） */
  font-weight: bold;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; /* 明朝体 */
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 弾むようなアニメーション設定 */
  box-shadow: 0 4px 12px rgba(230, 0, 51, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

/* ホバー時の動き */
.fortune-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: #e60033;
  color: #fff;
  box-shadow: 0 8px 20px rgba(230, 0, 51, 0.3);
}

/* 結果テキストのデザイン */
.fortune-result {
  display: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #e60033;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  animation: popUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fortune-comment {
  display: none;
  font-size: 1rem;
  color: #8c2f3c;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  line-height: 1.6;
}

.fortune-lucky {
  display: none;
  font-size: 0.95rem;
  color: #444;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}

/* ダークモード対応 */
html[data-theme='dark'] .fortune-btn {
  background: var(--card-bg); /* ダークモード用のカード背景色 */
  color: #ff4d4d; /* 少し明るい赤 */
  border-color: #ff4d4d;
}

html[data-theme='dark'] .fortune-btn:hover {
  background: #ff4d4d;
  color: #fff;
}

html[data-theme='dark'] .fortune-result {
  color: #ff4d4d;
}

html[data-theme='dark'] .fortune-comment {
  color: #ffb3c1;
}

html[data-theme='dark'] .fortune-lucky {
  color: #ffd9e0;
}

/* アニメーション定義 */
@keyframes rotateOut {
  0% { transform: rotateX(0); opacity: 1; }
  100% { transform: rotateX(90deg); opacity: 0; }
}

@keyframes popUp {
  0% { transform: translateY(20px) scale(0.5); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* JSから付与されるクラス */
.animate-out {
  animation: rotateOut 0.3s forwards;
}
