/* うぴょりっくソフト トップページ (upyolic.com)
   色: 夜空の藍・和紙の生成り・花札の朱。帯の 16 色は PC-9801 の標準パレットにちなむ */
:root {
  --night: #151a3a;
  --night-2: #222a57;
  --paper: #fbf7ee;
  --paper-2: #f2ecdd;
  --ink: #26213a;
  --ink-soft: #625b72;
  --line: #e4dccb;
  --shu: #c8323a;
  --shu-deep: #a3242b;
  --moon: #f6efdc;
  --max: 1080px;
  --mincho: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --dot: "DotGothic16", "Osaka-Mono", monospace;
  --pc98: linear-gradient(90deg,
    #000000 0 6.25%, #0000aa 0 12.5%, #aa0000 0 18.75%, #aa00aa 0 25%,
    #00aa00 0 31.25%, #00aaaa 0 37.5%, #aaaa00 0 43.75%, #aaaaaa 0 50%,
    #555555 0 56.25%, #5555ff 0 62.5%, #ff5555 0 68.75%, #ff55ff 0 75%,
    #55ff55 0 81.25%, #55ffff 0 87.5%, #ffff55 0 93.75%, #ffffff 0 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12142a;
    --paper-2: #1b1e3a;
    --ink: #f1ecf7;
    --ink-soft: #b9b2c9;
    --line: #2d3156;
    --shu: #e0565d;
    --shu-deep: #f07a80;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--shu); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--shu); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--mincho); line-height: 1.4; margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
.note { font-size: 0.86rem; color: var(--ink-soft); }
.small { font-size: 0.82rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); padding: 8px 12px; }

.retro-label {
  display: block;
  font-family: var(--dot);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--shu);
  margin-bottom: 6px;
}
.pc98-stripe { height: 6px; background: var(--pc98); }

/* ボタン */
.button {
  display: inline-block;
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  padding: 12px 28px; border-radius: 999px;
  background: var(--shu); color: #fff; text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.button:hover { background: var(--shu-deep); transform: translateY(-1px); }
.button.ghost { background: transparent; color: var(--moon); box-shadow: inset 0 0 0 2px rgba(246,239,220,0.6); }
.button.ghost:hover { background: rgba(246,239,220,0.1); }

/* 上の帯 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(24px, calc((100% - var(--max)) / 2 + 24px));
  background: rgba(21, 26, 58, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--moon);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-name { font-family: var(--mincho); font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.brand-name small { display: block; font-family: var(--dot); font-size: 0.66rem; letter-spacing: 0.2em; opacity: 0.75; }
.topbar nav { display: flex; gap: 22px; }
.topbar nav a { color: inherit; text-decoration: none; font-size: 0.92rem; opacity: 0.85; }
.topbar nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* 冒頭 */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 78% 18%, rgba(246,239,220,0.95) 0 46px, rgba(246,239,220,0.18) 47px, transparent 140px),
    linear-gradient(180deg, #0d1130 0%, var(--night) 55%, var(--night-2) 100%);
  color: var(--moon);
  overflow: hidden;
}
.sky {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 42% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 48%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 52%, #fff 50%, transparent 51%);
  opacity: 0.7;
  pointer-events: none;
}
/* 遠くの山並み (芒に月の札の丘) */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 120px;
  background: #2f3a6e;
  clip-path: polygon(0 70%, 12% 45%, 26% 62%, 40% 38%, 55% 58%, 70% 40%, 84% 60%, 100% 42%, 100% 100%, 0 100%);
  opacity: 0.55;
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto;
  padding: 72px 24px 0;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: end;
}
.hero-text { padding-bottom: 96px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 900; letter-spacing: 0.04em; margin-bottom: 20px; }
.hero .lead { font-size: 1.05rem; color: rgba(246,239,220,0.88); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-cast { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 520px; }
.hero-cast img { height: 100%; width: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,0.45)); }
.hero-cast .c-ririna { height: 88%; margin-right: -46px; z-index: 1; }
.hero-cast .c-neneka { z-index: 2; }
.hero-cast .c-momoka { height: 90%; margin-left: -30px; z-index: 1; }
.hero .pc98-stripe { position: relative; z-index: 2; }

/* 共通の区切り */
.section { padding: 88px 0; }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 32px; }

/* お知らせ */
.news { padding: 56px 0; border-bottom: 1px solid var(--line); }
.news .section-title { margin-bottom: 18px; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-top: 1px dashed var(--line); }
.news-list li:first-child { border-top: 0; }
.news-list time { font-family: var(--dot); color: var(--ink-soft); letter-spacing: 0.06em; }
.news-list p { margin: 0; }

/* 恋々小町 */
.koikoi { background: var(--paper-2); }
.koikoi-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.kicker { font-family: var(--mincho); font-size: 1.15rem; color: var(--shu); margin-top: -18px; }
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; background: var(--paper); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--shu); box-shadow: 0 0 0 4px color-mix(in srgb, var(--shu) 25%, transparent); }
.spec { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 8px 28px; }
.spec div { padding: 18px 0; border-top: 1px solid var(--line); }
.spec div:first-child { border-top: 0; }
.spec dt { font-family: var(--mincho); font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.spec dd { margin: 0; }

/* キャラクター */
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.chara {
  position: relative;
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start;
  background: var(--paper-2); border-radius: 16px; padding: 22px 20px 18px;
  border-top: 5px solid var(--c);
}
.chara img { width: 96px; height: 280px; object-fit: contain; object-position: top; }
.chara h3 { font-size: 1.35rem; }
.chara rt { font-family: var(--sans); font-size: 0.55em; color: var(--ink-soft); }
.chara .cv { font-size: 0.85rem; color: var(--c); font-weight: 700; margin: 4px 0 10px; }
.chara .mood { font-family: var(--mincho); font-weight: 700; margin-bottom: 8px; }
.chara-body p:last-child { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.credit { margin-top: 18px; font-size: 0.85rem; color: var(--ink-soft); text-align: right; }

/* あゆみ */
.history { background: var(--paper-2); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px solid var(--line); }
.timeline > li { position: relative; padding: 0 0 40px 24px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: -38px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--shu);
}
.timeline > li.now::before { background: var(--shu); }
.era { font-size: 0.85rem; font-weight: 700; color: var(--shu); margin-bottom: 2px; }
.era.retro { font-family: var(--dot); letter-spacing: 0.08em; }
.timeline h3 { font-size: 1.3rem; margin-bottom: 8px; }
.works { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 4px 0 0; }
.works li {
  font-family: var(--dot); font-size: 0.92rem;
  background: #0000aa; color: #ffffff; padding: 4px 12px;
  box-shadow: 3px 3px 0 #55ffff;
}

/* X */
.follow-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.follow-card {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px; border-radius: 16px;
  background: var(--paper-2); border: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}
.follow-card:hover { transform: translateY(-2px); border-color: var(--shu); }
.follow-card strong { display: block; font-family: var(--mincho); font-size: 1.15rem; }
.follow-card .handle { display: block; font-size: 0.9rem; color: var(--shu); }
.follow-card .desc { display: block; font-size: 0.88rem; color: var(--ink-soft); }
.follow-card .face {
  flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--c) 18%, var(--paper));
}
.follow-card .face img { width: 140px; max-width: none; margin: -6px 0 0 -42px; }
.follow-card > img { flex: none; }

/* 下の帯 */
.footer { background: var(--night); color: rgba(246,239,220,0.85); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; padding-top: 32px; padding-bottom: 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--mincho); font-weight: 700; margin: 0; color: var(--moon); }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer a { color: inherit; font-size: 0.88rem; }
.footer .small { margin: 0; text-align: right; opacity: 0.8; }

/* 狭い画面 */
@media (max-width: 860px) {
  .topbar nav { display: none; }
  .hero {
    background:
      radial-gradient(circle at 86% 7%, rgba(246,239,220,0.95) 0 26px, rgba(246,239,220,0.16) 27px, transparent 80px),
      linear-gradient(180deg, #0d1130 0%, var(--night) 55%, var(--night-2) 100%);
  }
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-text { padding-bottom: 8px; }
  .hero-cast { height: 360px; }
  .wide-only { display: none; }
  .koikoi-grid, .cast, .follow-cards { grid-template-columns: 1fr; }
  .koikoi-grid { gap: 32px; }
  .news-list li { grid-template-columns: 1fr; gap: 0; }
  .section { padding: 64px 0; }
  .footer .small { text-align: left; }
}

/* ===== 共通の追加 ===== */
.brand-mark, .round { border-radius: 50%; }
.koikoi-page .brand-mark { box-shadow: 0 0 0 2px rgba(246,239,220,0.25); }

/* ===== トップページ (サークル紹介): うぴの紫と工房のあたたかさ ===== */
.home {
  --night: #2c2152;
  --night-2: #3d2f6e;
  --shu: #6b4fd6;
  --shu-deep: #4b33a8;
  --paper: #fbf9f4;
  --paper-2: #f3eefa;
  --line: #e4dcf0;
  --lavender: #bca5d3;
}
@media (prefers-color-scheme: dark) {
  .home {
    --paper: #15121f;
    --paper-2: #1e1a2d;
    --line: #342d4a;
    --shu: #a993f5;
    --shu-deep: #c3b4ff;
  }
}
.home .topbar { background: rgba(44, 33, 82, 0.9); }
.home h1, .home h2, .home h3 { font-family: "Zen Maru Gothic", var(--mincho); }

/* タイトル (くまの工房の絵 3:1、ロゴ入り) */
.title { position: relative; background: #2c2152; }
.title-art { margin: 0; line-height: 0; background: #d9c9e4; }
.title-art img { display: block; width: 100%; max-width: 1920px; height: auto; margin: 0 auto; }
.title-band { background: #2c2152; color: #f3eefa; }
.title-band-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; padding-top: 22px; padding-bottom: 22px; }
.title-band .retro-label { color: #c3b4ff; margin: 0; }
.title-band .catch { font-family: "Zen Maru Gothic", var(--sans); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.5rem); margin: 0; }
.title-band .lead { margin: 0; font-size: 0.95rem; color: rgba(243,238,250,0.8); }

/* わたしたち */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.about-item { background: var(--paper-2); border-radius: 18px; padding: 26px 24px 20px; }
.about-num { font-family: var(--dot); color: var(--shu); font-size: 1.4rem; margin: 0 0 4px; }
.about-item h3 { font-size: 1.25rem; margin-bottom: 10px; }
.about-item p:last-child { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* 作品 */
.works-section { background: var(--paper-2); }
.work-card {
  display: grid; grid-template-columns: 1fr 1.1fr; overflow: hidden;
  border-radius: 20px; text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--line);
  transition: transform 0.15s, box-shadow 0.15s;
}
.work-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(44, 33, 82, 0.15); }
.work-art {
  display: flex; justify-content: center; align-items: flex-end; height: 320px; padding-top: 24px;
  background:
    radial-gradient(circle at 80% 22%, #f6efdc 0 26px, rgba(246,239,220,0.15) 27px, transparent 80px),
    linear-gradient(180deg, #0d1130, #222a57);
}
.work-art img { height: 100%; width: auto; }
.work-art .c-ririna { height: 88%; margin-right: -30px; }
.work-art .c-momoka { height: 90%; margin-left: -20px; }
.work-body { padding: 32px 36px; align-self: center; }
.work-body h3 { font-family: var(--mincho); font-size: 2rem; }
.work-kicker { font-family: var(--mincho); color: #c8323a; margin: 0 0 12px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #c8323a; }
.more { font-weight: 700; color: var(--shu); margin: 0; }

/* キャラクター (5 人) */
.mini-cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.mini-cast li {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--paper-2); border-radius: 18px; padding: 20px 12px 18px;
  border-top: 5px solid var(--c);
}
.mini-face {
  width: 112px; height: 112px; border-radius: 50%; overflow: hidden; margin-bottom: 12px;
  background: color-mix(in srgb, var(--c) 16%, var(--paper));
}
.mini-face img { width: 120px; max-width: none; margin: -2px 0 0 -4px; }
.mini-cast li:nth-child(2) .mini-face img { width: 150px; margin-left: -22px; }
.mini-cast li.bear .mini-face img { width: 112px; margin: 0; }
.mini-cast strong { font-family: "Zen Maru Gothic", var(--sans); font-size: 1.1rem; }
.mini-cast span { font-size: 0.8rem; color: var(--c); font-weight: 700; }
.mini-cast em { font-style: normal; font-size: 0.85rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.6; }

@media (max-width: 860px) {
  .title-band-inner { display: block; }
  .title-band .catch { margin: 4px 0 6px; }
  .about-grid, .work-card { grid-template-columns: 1fr; }
  .mini-cast { grid-template-columns: repeat(2, 1fr); }
  .work-body { padding: 24px; }
}
