/* ==========================================================
   Kanade Maaya ☆ Fan Site
   2000年代前半の個人アイドルファンサイト風スタイル
   ========================================================== */

:root {
  --pink: #ff69b4;
  --pink-deep: #e0218a;
  --pink-light: #ffe4f1;
  --pink-pale: #fff5fa;
  --lavender: #e6d8ff;
  --lavender-deep: #9b7fd4;
  --yellow: #fff799;
  --text: #5a2a44;
  --link: #d6006f;
  --link-visited: #8a3fbf;
  --link-hover: #ff9900;
  --bar-h: 0px;           /* スマホ・タブレットの固定メニューバーの高さ */
  --gutter: 16px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 固定バーに見出しが隠れないように */
section[id], header[id] { scroll-margin-top: calc(var(--bar-h) + 8px); }

body {
  margin: 0;
  color: var(--text);
  font-family: "MS PGothic", "ＭＳ Ｐゴシック", Osaka, "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  /* ギンガムチェックの壁紙 */
  background-color: #ffd6ea;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.55) 50%, transparent 50%),
    linear-gradient(rgba(255,255,255,.55) 50%, transparent 50%);
  background-size: 24px 24px;
}

a { color: var(--link); }
a:visited { color: var(--link-visited); }
@media (hover: hover) {
  a:hover { color: var(--link-hover); text-decoration: underline wavy; }
}

img { max-width: 100%; }

.tiny { font-size: 11px; color: #a0607f; }
.warn { color: #c00; font-weight: bold; }

/* ---------- 年齢確認 ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: repeating-linear-gradient(45deg, #ffc1e0 0 12px, #ffe4f1 12px 24px);
}
.age-gate[hidden] { display: none; }
.gate-open { overflow: hidden; }
.gate-open .age-gate[hidden] { display: flex; }
.age-gate__box {
  max-width: 460px;
  width: 100%;
  padding: 24px 20px;
  text-align: center;
  background: #fff;
  border: 4px double var(--pink);
  box-shadow: 6px 6px 0 var(--lavender-deep);
}
.age-gate__title {
  margin: 4px 0 12px;
  font-weight: bold;
  font-size: 22px;
  color: var(--pink-deep);
  text-shadow: 2px 2px 0 var(--pink-light);
}
.age-gate__stars { margin: 0; color: var(--pink); letter-spacing: 4px; }
.age-gate__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 16px 0;
}
.age-gate__small { font-size: 11px; color: #999; margin: 0; }

.btn {
  display: inline-block;
  padding: 8px 18px;
  font: inherit;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  border: 3px outset #ffb6d9;
  background: var(--pink-light);
  color: var(--pink-deep);
}
.btn:active { border-style: inset; }
.btn--enter { background: var(--pink); color: #fff; border-color: #ff9ccf; }
.btn--leave, .btn--leave:visited { color: #777; background: #eee; border-color: #ddd; }

/* ---------- 全体レイアウト ---------- */
.wrap {
  max-width: 980px;
  margin: 16px auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}

.header {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 26px 12px 10px;
  background:
    radial-gradient(circle at 12% 30%, rgba(255,255,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 80%, rgba(255,255,255,.8) 0 1.5px, transparent 2.5px),
    linear-gradient(#fff 0%, var(--pink-light) 70%, #ffd6ea 100%);
  border: 3px double var(--pink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--lavender-deep);
  animation: glow 3s ease-in-out infinite;
}
/* 上下のレース飾り */
.header::before, .header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: radial-gradient(circle at 8px 0, #fff 0 7px, var(--pink) 7px 8px, transparent 8.5px) repeat-x;
  background-size: 16px 12px;
}
.header::before { top: 0; }
.header::after { bottom: 0; transform: scaleY(-1); }

.header__ribbon { margin: 0 0 2px; }
.header__ribbon span {
  display: inline-block;
  padding: 1px 16px;
  font-family: "Pacifico", cursive;
  font-size: 14px;
  color: #fff;
  background: var(--pink);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--pink-deep);
  letter-spacing: 1px;
}
.header__title { margin: 2px 0 4px; line-height: 1.15; }
.header__title a, .header__title a:visited { text-decoration: none; display: inline-block; }
.header__name {
  display: block;
  font-family: "Hachi Maru Pop", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  font-size: clamp(38px, 11vw, 64px);
  font-weight: 400;
  letter-spacing: .06em;
  color: #ff4fa3;
  /* 光の筋が文字の上を流れる */
  background: linear-gradient(110deg, #ff7ac0 0%, #ff4fa3 38%, #fff6fb 47%, #ffffff 50%, #fff6fb 53%, #ff4fa3 62%, #e0218a 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(3px 4px 0 rgba(155,127,212,.55)) drop-shadow(0 0 10px rgba(255,105,180,.55));
  animation: bounce 3.2s ease-in-out infinite, shimmer 3.6s ease-in-out infinite;
}
.header__roman {
  display: block;
  margin-top: 2px;
  font-family: "Pacifico", cursive;
  font-size: clamp(14px, 3.6vw, 20px);
  font-weight: 400;
  background: linear-gradient(90deg, #ff4fa3, #ff9a3c, #f5d000, #3ccf6e, #3ca0ff, #a066ff, #ff4fa3);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow 6s linear infinite;
}
.header__catch {
  display: inline-block;
  margin: 6px 0 10px;
  padding: 3px 14px;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  color: var(--pink-deep);
  background: #fff;
  border: 2px dashed #ffb6d9;
  border-radius: 999px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0% 0; } }
@keyframes glow {
  0%, 100% { box-shadow: 4px 4px 0 var(--lavender-deep), 0 0 0 rgba(255,105,180,0); }
  50% { box-shadow: 4px 4px 0 var(--lavender-deep), 0 0 26px rgba(255,105,180,.75), 0 0 6px #fff inset; }
}
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* キラキラ */
.sparkle { position: absolute; color: #fff; text-shadow: 0 0 4px #fff, 0 0 10px var(--pink), 0 0 18px var(--pink); animation: twinkle 2.4s ease-in-out infinite; pointer-events: none; }
.sparkle--1 { top: 22%; left: 8%; font-size: 22px; }
.sparkle--2 { top: 16%; right: 10%; font-size: 18px; animation-delay: .6s; }
.sparkle--3 { top: 55%; left: 14%; font-size: 16px; color: #ffb6d9; animation-delay: 1.2s; }
.sparkle--4 { top: 50%; right: 12%; font-size: 24px; animation-delay: 1.8s; }
.sparkle--5 { top: 32%; left: 50%; font-size: 12px; animation-delay: .9s; opacity: .7; }
.sparkle--6 { top: 78%; left: 30%; font-size: 14px; animation-delay: 1.5s; }
.sparkle--7 { top: 12%; left: 28%; font-size: 16px; animation-delay: 2.1s; color: #fff799; }
.sparkle--8 { top: 72%; right: 28%; font-size: 18px; animation-delay: .3s; }
.sparkle--9 { top: 40%; right: 4%; font-size: 13px; animation-delay: 1.1s; color: #fff799; }
.sparkle--10 { top: 40%; left: 3%; font-size: 13px; animation-delay: 2.6s; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }

@keyframes rainbow { to { background-position: 200% center; } }

/* 流れる文字（marquee風） */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: var(--yellow);
  border: 1px dashed var(--pink);
  color: var(--pink-deep);
  font-weight: bold;
  padding: 2px 0;
}
.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 22s linear infinite;
}
@keyframes marquee { to { transform: translateX(-100%); } }

.layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}
.side, .main { min-width: 0; }

/* PC: サイドバーはスクロールしても付いてくる */
.side {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* スマホ・タブレット用バーはPCでは出さない */
.mbar, .scrim { display: none; }

/* ---------- 箱 ---------- */
.box {
  background: var(--pink-pale);
  border: 2px solid var(--pink);
  border-radius: 8px;
  padding: 0 12px 12px;
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 var(--lavender);
}
.box__title {
  position: relative;
  margin: 0 -12px 12px;
  padding: 6px 8px 5px;
  text-align: center;
  color: #fff;
  /* 1枚目は時々横切る光の筋 */
  background:
    linear-gradient(110deg, transparent 42%, rgba(255,255,255,.65) 50%, transparent 58%) no-repeat,
    linear-gradient(var(--pink), var(--pink-deep));
  background-size: 250% 100%, auto;
  animation: sweep 5s ease-in-out infinite;
  border-radius: 6px 6px 0 0;
  text-shadow: 1px 1px 0 var(--pink-deep), 0 0 8px rgba(255,255,255,.6);
  line-height: 1.2;
}
@keyframes sweep { 0% { background-position: 170% 0, 0 0; } 45%, 100% { background-position: -70% 0, 0 0; } }
.box__title::before, .box__title::after { content: "♡"; position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .85; }
.box__title::before { left: 12px; }
.box__title::after { right: 12px; }
.box__ja { display: block; font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 16px; letter-spacing: .08em; }
.box__en { display: block; font-family: "Pacifico", cursive; font-weight: 400; font-size: 11px; letter-spacing: .05em; opacity: .9; }

/* ---------- メニュー ---------- */
.menu { list-style: none; margin: 0; padding: 0; }
.menu li { border-bottom: 1px dotted var(--pink); }
.menu a { display: block; padding: 4px 4px; text-decoration: none; }
.menu a::before { content: "♡ "; color: var(--pink); }
.menu a.is-current { background: var(--pink-light); font-weight: bold; }
.menu a.is-current::before { content: "♥ "; }
@media (hover: hover) {
  .menu a:hover { background: var(--yellow); }
  .menu a:hover::before { content: "♥ "; }
}

/* ---------- カウンター ---------- */
.counter-box { text-align: center; }
.counter-box p { margin: 2px 0; }
.counter {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #3f0;
  background: #000;
  padding: 0 6px;
  border: 3px inset #999;
}
.kiriban {
  color: #f00;
  font-weight: bold;
  animation: blink 1s steps(1) infinite;
}
.banner { display: block; margin: 6px auto 0; image-rendering: auto; }

/* NEW! の点滅 */
.new {
  color: #f00;
  font-weight: bold;
  font-size: 11px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { visibility: hidden; } }

/* ---------- ウェルカム ---------- */
.welcome { text-align: center; }
.welcome p:first-of-type { font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 15px; color: var(--pink-deep); }
.since { font-style: italic; color: var(--lavender-deep); }

/* ---------- プロフィール ---------- */
.profile { display: flex; gap: 12px; align-items: flex-start; }
.profile__photo {
  flex: 0 0 170px;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #fff 0 8px, var(--pink-light) 8px 16px);
  /* ポラロイド写真風 */
  border: 7px solid #fff;
  border-bottom-width: 22px;
  box-shadow: 0 3px 10px rgba(224, 33, 138, .25), 3px 3px 0 var(--lavender);
  transform: rotate(-2deg);
  overflow: hidden;
  color: #d08;
  font-weight: bold;
}
.profile__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile__table { flex: 1; border-collapse: collapse; width: 100%; }
.profile__table th, .profile__table td {
  padding: 4px 6px;
  border-bottom: 1px dashed var(--pink);
  text-align: left;
  vertical-align: top;
}
.profile__table th { width: 8em; color: var(--pink-deep); white-space: nowrap; }
.profile__table th::before { content: "☆ "; }

/* ---------- 作品 ---------- */
.status { margin: 0 0 8px; font-size: 12px; }
.status .live {
  display: inline-block;
  padding: 0 6px;
  color: #fff;
  background: #f33;
  border-radius: 3px;
  font-weight: bold;
  font-size: 11px;
}
.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.work {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid #ffc9e3;
  border-radius: 10px;
  padding: 6px;
  min-width: 0;
  box-shadow: 2px 3px 0 var(--lavender);
  transition: transform .15s;
}
@media (hover: hover) { .work:hover { transform: translateY(-2px) rotate(-.4deg); } }
.work__img {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  background: repeating-linear-gradient(45deg, #fff 0 8px, var(--pink-light) 8px 16px);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.work__img img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
.work__new, .work__sale {
  position: absolute;
  top: 6px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.work__new { left: 6px; background: #ff3b7f; animation: blink 1s steps(1) infinite; }
.work__sale { right: 6px; background: #ff9900; }
.work__title {
  font-size: 12px;
  font-weight: bold;
  margin: 0 0 2px;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work__meta { font-size: 11px; margin: 0 0 4px; color: #a0607f; }
.work__stores { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 4px; }
.store a, .store a:visited {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  min-height: 32px;
  font-size: 11px;
  text-decoration: none;
  color: var(--text);
  background: var(--pink-pale);
  border: 1px solid #ffb6d9;
  border-radius: 6px;
}
@media (hover: hover) { .store a:hover { background: var(--yellow); text-decoration: none; } }
.store__name { font-weight: bold; white-space: nowrap; }
.store--fanza .store__name { color: #d6006f; }
.store--getchu .store__name { color: #1e6fd9; }
.store--gyutto .store__name { color: #e25a00; }
.store__price { text-align: right; }
.store__price strong { color: #e00; }
.store__price s { color: #999; }
.store__price--none { color: #a0607f; font-size: 10px; }
.sale {
  display: inline-block;
  background: var(--yellow);
  color: #e00;
  border: 1px solid #e00;
  font-size: 10px;
  font-weight: bold;
  padding: 0 4px;
  margin-right: 4px;
}

/* ---------- X ---------- */
.x-card {
  padding: 12px;
  background: #fff;
  border: 2px solid #222;
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--lavender);
}
.x-card__head { display: flex; align-items: center; gap: 10px; }
.x-card__logo {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 44px;
  font-size: 22px; color: #fff; background: #111; border-radius: 50%;
  border: 3px solid var(--pink);
}
.x-card__name { margin: 0; font-weight: bold; font-family: "Zen Maru Gothic", sans-serif; font-size: 16px; }
.x-card__handle { margin: 0; color: #777; font-size: 12px; }
.x-card__text { margin: 8px 0; font-size: 13px; }
.x-card__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.x-card__buttons a, .x-card__buttons a:visited {
  flex: 1 1 120px;
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  white-space: nowrap;
  text-align: center;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  background: #111;
  border-radius: 999px;
}
.x-card__buttons a + a, .x-card__buttons a + a:visited { background: var(--pink); }
.x-posts, .x-timeline { margin-top: 8px; }
.x-posts .twitter-tweet { margin: 8px auto !important; }
.x-timeline { max-height: 700px; overflow: auto; }

/* ---------- スケジュール ---------- */
.schedule { width: 100%; border-collapse: collapse; background: #fff; }
.schedule th, .schedule td { border: 1px solid #ffb6d9; padding: 4px 6px; text-align: left; vertical-align: top; }
.schedule th { background: var(--pink-light); white-space: nowrap; width: 8em; }
.schedule tr.past td, .schedule tr.past th { color: #aaa; }
.schedule tr.auto td { font-size: 13px; }

/* ---------- 更新履歴 ---------- */
.updates { margin: 0; max-height: 220px; overflow: auto; background: #fff; padding: 6px 8px; border: 1px inset #ffb6d9; }
.updates dt { font-weight: bold; color: var(--pink-deep); }
.updates dd { margin: 0 0 6px 1em; }

/* ---------- リンク ---------- */
.links { margin: 0; padding-left: 1.2em; list-style: "♪ "; }
.links li { margin-bottom: 4px; }

/* ---------- フッター ---------- */
.footer { text-align: center; font-size: 12px; padding: 8px 0 24px; }
.footer p { margin: 2px 0; }
.rainbow {
  height: 4px;
  border: 0;
  background: linear-gradient(90deg, #ff4fa3, #ff9a3c, #f5d000, #3ccf6e, #3ca0ff, #a066ff);
}

/* ---------- 出勤情報 ---------- */
.shift {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.shift__day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  text-align: center;
  background: #fff;
  border: 2px solid #ffc9e3;
  border-radius: 10px;
  min-height: 92px;
}
.shift__day--work { border-color: var(--pink); background: linear-gradient(#fff, var(--pink-light)); box-shadow: 2px 2px 0 var(--lavender); }
.shift__day--off, .shift__day--undecided { opacity: .6; }
.shift__day.is-today { border-width: 3px; border-color: var(--pink-deep); }
.shift__date { font-weight: bold; font-family: "Zen Maru Gothic", sans-serif; }
.shift__date--sat { color: #1e6fd9; }
.shift__date--sun { color: #e00; }
.shift__today {
  display: block;
  margin: -2px auto 2px;
  width: fit-content;
  padding: 0 8px;
  font-size: 10px;
  color: #fff;
  background: var(--pink-deep);
  border-radius: 999px;
  animation: blink 1.2s steps(1) infinite;
}
.shift__badge {
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  background: var(--pink);
  padding: 0 10px;
  border-radius: 999px;
}
.shift__time { font-weight: bold; color: var(--pink-deep); font-size: 14px; }
.shift__stay { font-size: 11px; color: #a0607f; }
.shift__off { margin-top: 6px; font-size: 13px; color: #999; }
.shift__more { margin: 10px 0 0; text-align: right; font-size: 13px; }

/* ---------- 公式SNS ---------- */
.sns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.sns a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  color: #fff;
  border: 3px outset rgba(255,255,255,.6);
  border-radius: 10px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.25);
  transition: transform .15s;
}
.sns a:visited { color: #fff; }
.sns a:active { border-style: inset; transform: scale(.97); }
.sns__icon { font-size: 22px; line-height: 1; }
.sns__handle { font-size: 11px; font-weight: normal; opacity: .95; overflow-wrap: anywhere; }
.sns--x a { background: linear-gradient(#444, #111); }
.sns--instagram a { background: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7); }
.sns--litlink a { background: linear-gradient(#ff9ccf, var(--pink-deep)); }
.sns--tiktok a { background: linear-gradient(135deg, #25f4ee 0%, #111 30%, #111 70%, #fe2c55 100%); }
.work-contact {
  margin-top: 12px;
  padding: 10px 12px;
  text-align: center;
  background: #fff;
  border: 2px dashed #ffb6d9;
  border-radius: 10px;
}
.work-contact__title { margin: 0 0 4px; font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; color: var(--pink-deep); }
.work-contact__mail, .work-contact__mail:visited { font-size: 16px; font-weight: bold; overflow-wrap: anywhere; }
.work-contact .tiny { margin: 4px 0 0; }
.sns--other a { background: linear-gradient(var(--lavender-deep), #6b4fb0); }
@media (hover: hover) {
  .sns a:hover { transform: translateY(-2px) rotate(-1deg); color: #fff; text-decoration: none; }
}

/* ---------- トップへ戻る ---------- */
.totop {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.1;
  text-decoration: none;
  color: #fff;
  background: var(--pink);
  border: 3px outset #ffb6d9;
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--lavender-deep);
}
.totop:visited { color: #fff; }
.totop[hidden] { display: none; }

/* ==========================================================
   タブレット（641〜899px）
   メニューは上部に固定した横スクロールのタブ、サイドバーの小箱は本文の下へ
   ========================================================== */
@media (max-width: 899px) {
  :root { --bar-h: 88px; }

  .wrap { margin-top: 0; }

  .mbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0 calc(-1 * max(var(--gutter), env(safe-area-inset-left))) 12px;
    padding: 6px max(var(--gutter), env(safe-area-inset-left)) 0;
    background: rgba(255, 245, 250, .96);
    border-bottom: 3px double var(--pink);
    box-shadow: 0 2px 0 var(--lavender);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .mbar__title, .mbar__title:visited {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: bold;
    font-size: 16px;
    color: var(--pink-deep);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 0;
  }
  .mbar__title small { color: var(--lavender-deep); font-size: 11px; }
  .mbar__toggle { display: none; }

  .topnav { flex: 0 0 100%; }
  .topnav__title { display: none; }
  .topnav__list {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 4px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .topnav__list::-webkit-scrollbar { display: none; }
  .topnav__list li { flex: 0 0 auto; scroll-snap-align: start; }
  .topnav__list a, .topnav__list a:visited {
    display: block;
    padding: 6px 14px;
    min-height: 36px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    color: var(--pink-deep);
    background: #fff;
    border: 2px solid var(--pink);
    border-radius: 999px;
  }
  .topnav__list a.is-current { color: #fff; background: var(--pink); }

  .layout { grid-template-columns: minmax(0, 1fr); }
  .side {
    order: 2;
    position: static;
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .side .box { margin-bottom: 0; }
  .menu-box { display: none; }
  .main { order: 1; }

  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================
   スマホ（〜640px）
   メニューは右から出るドロワー、1カラム、タップしやすいサイズに
   ========================================================== */
@media (max-width: 640px) {
  :root { --bar-h: 52px; --gutter: 10px; }

  body { font-size: 15px; background-size: 18px 18px; }

  /* backdrop-filter があると中の position:fixed（ドロワー）がバー基準になってしまうので外す */
  .mbar {
    flex-wrap: nowrap;
    padding-top: 0;
    min-height: 52px;
    background: var(--pink-pale);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .mbar__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 4px 12px;
    font: inherit;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    background: var(--pink);
    border: 3px outset #ffb6d9;
    border-radius: 999px;
    cursor: pointer;
  }
  .mbar__toggle:active { border-style: inset; }
  /* ☰ ⇄ × のアイコン */
  .mbar__icon, .mbar__icon::before, .mbar__icon::after {
    display: block;
    width: 16px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, background .2s;
  }
  .mbar__icon { position: relative; }
  .mbar__icon::before, .mbar__icon::after { content: ""; position: absolute; left: 0; }
  .mbar__icon::before { top: -5px; }
  .mbar__icon::after { top: 5px; }
  .menu-open .mbar__icon { background: transparent; }
  .menu-open .mbar__icon::before { transform: translateY(5px) rotate(45deg); }
  .menu-open .mbar__icon::after { transform: translateY(-5px) rotate(-45deg); }

  .topnav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(78vw, 300px);
    padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--pink-pale);
    background-image: repeating-linear-gradient(45deg, transparent 0 10px, rgba(255,182,217,.25) 10px 20px);
    border-left: 4px double var(--pink);
    box-shadow: -4px 0 0 var(--lavender);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .menu-open .topnav {
    transform: none;
    visibility: visible;
    transition: transform .25s ease;
  }
  .topnav__title {
    display: block;
    margin: 0 0 8px;
    text-align: center;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(var(--pink), var(--pink-deep));
    border-radius: 6px;
    padding: 4px;
  }
  .topnav__list { display: block; padding: 0; overflow: visible; }
  .topnav__list li { border-bottom: 1px dotted var(--pink); }
  .topnav__list a, .topnav__list a:visited {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 8px 10px;
    font-size: 15px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .topnav__list a::before { content: "♡"; margin-right: 8px; color: var(--pink); }
  .topnav__list a.is-current { color: var(--pink-deep); background: var(--pink-light); }
  .topnav__list a.is-current::before { content: "♥"; }

  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45; /* ドロワーはバー（z-index:50）の中にあるので、それより下に敷く */
    background: rgba(90, 42, 68, .35);
  }
  .scrim[hidden] { display: none; }
  .menu-open { overflow: hidden; }

  .header { padding: 12px 8px 6px; }
  .header__deco { letter-spacing: 3px; font-size: 12px; }
  .header__catch { font-size: 13px; }
  .marquee span { animation-duration: 16s; }

  .box { padding: 0 10px 10px; }
  .box__title { margin: 0 -10px 10px; }

  .welcome p { text-align: left; }
  .welcome .since { text-align: center; }

  .sns { grid-template-columns: minmax(0, 1fr); }
  .shift { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shift__more { text-align: center; }
  .sns a { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px 14px; min-height: 52px; }
  .sns__handle { margin-left: auto; font-size: 12px; }

  .profile { flex-direction: column; align-items: center; }
  .profile__photo { flex-basis: auto; width: 200px; margin: 6px 0 10px; }
  .profile__table th { width: auto; white-space: normal; font-size: 13px; }

  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .work { padding: 5px; }
  .work__links { flex-direction: column; gap: 0; }
  .work__links a { display: block; padding: 6px 0; }

  /* スケジュールは表ではなくカード風に */
  .schedule, .schedule tbody, .schedule tr, .schedule th, .schedule td { display: block; width: auto; }
  .schedule { background: transparent; }
  .schedule tr { background: #fff; border: 1px solid #ffb6d9; margin-bottom: 6px; }
  .schedule th, .schedule td { border: 0; }
  .schedule th { padding-bottom: 0; }

  .updates { max-height: 260px; }
  .links li { margin-bottom: 8px; }

  .side { grid-template-columns: minmax(0, 1fr); }

  .footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .totop { width: 48px; height: 48px; }
}

@media (max-width: 360px) {
  .works { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee span, .header__title a, .header__name, .header__roman, .sparkle, .work__new, .shift__today, .new, .kiriban { animation: none; }
  .topnav, .mbar__icon, .mbar__icon::before, .mbar__icon::after, .sns a { transition: none !important; }
  .marquee span { padding-left: 0; }
}

/* 非公式である旨の注記（控えめに） */
.footer__note { margin-top: 10px !important; font-size: 10px; opacity: .75; }


/* ==========================================================
   キラキラ・ピカピカ
   ========================================================== */

/* 画面に舞うキラキラ（js で生成）。本文の手前に重ねるが pointer-events: none で操作の邪魔はしない */
.glitter-layer { position: fixed; inset: 0; z-index: 30; overflow: hidden; pointer-events: none; }
.wrap { position: relative; z-index: 1; }
.glitter {
  position: absolute;
  top: -8vh;
  left: var(--x);
  font-size: var(--size);
  line-height: 1;
  color: var(--c);
  text-shadow: 0 0 4px #fff, 0 0 10px var(--c), 0 0 20px var(--c);
  animation: fall var(--d) linear infinite, blink-soft var(--t) ease-in-out infinite;
  animation-delay: var(--delay), var(--delay);
}
@keyframes blink-soft { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(var(--sway), 58vh) rotate(180deg); }
  100% { transform: translate(0, 118vh) rotate(360deg); }
}

/* ボタン類を時々光が横切る */
.sns a, .x-card__buttons a, .btn--enter, .totop, .header__ribbon span, .shift__day--work, .store a {
  position: relative;
  overflow: hidden;
}
.sns a::after, .x-card__buttons a::after, .btn--enter::after, .totop::after, .header__ribbon span::after, .shift__day--work::after, .store a::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent);
  transform: skewX(-20deg);
  animation: glint 4.5s ease-in-out infinite;
  pointer-events: none;
}
.sns li:nth-child(2) a::after, .shift__day--work:nth-child(2n)::after { animation-delay: .6s; }
.sns li:nth-child(3) a::after, .shift__day--work:nth-child(3n)::after { animation-delay: 1.2s; }
.sns li:nth-child(4) a::after { animation-delay: 1.8s; }
.store a::after { animation-duration: 6s; }
@keyframes glint { 0% { left: -60%; } 35%, 100% { left: 140%; } }

/* カウンターの数字が発光 */
.counter { text-shadow: 0 0 4px #3f0, 0 0 10px #3f0; }
/* バッジもピカッ */
.work__new, .work__sale, .shift__badge, .new { text-shadow: 0 0 6px rgba(255,255,255,.9); }
.work__sale { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); box-shadow: 0 0 12px #ff9900; } }

/* 年齢確認の星もまたたく */
.age-gate__stars { animation: twinkle 2s ease-in-out infinite; }

/* マウスの軌跡・タップで出るキラキラ（js で生成） */
.trail {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  font-size: var(--size, 14px);
  color: var(--c, #fff);
  text-shadow: 0 0 4px #fff, 0 0 10px var(--c, #fff), 0 0 18px #ff69b4;
  transform: translate(-50%, -50%);
  animation: trail-fade .9s ease-out forwards;
}
@keyframes trail-fade {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 24px))) scale(.3) rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .glitter-layer, .trail { display: none; }
  .header, .box__title, .work__sale, .age-gate__stars { animation: none; }
  .sns a::after, .x-card__buttons a::after, .btn--enter::after, .totop::after, .header__ribbon span::after, .shift__day--work::after, .store a::after { display: none; }
}

/* ==========================================================
   ファン参加型コンテンツ
   ========================================================== */
.lead { margin: 0 0 10px; font-size: 13px; }

/* 作品：まあやのひとこと */
.work__comment {
  position: relative;
  margin: 2px 0 6px;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff8fc;
  border: 2px solid #ffc9e3;
  border-radius: 10px;
}
.work__comment::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 16px;
  border: 6px solid transparent;
  border-bottom-color: #ffc9e3;
}
.work__comment-label { display: block; font-weight: bold; color: var(--pink-deep); font-size: 11px; }
.work__comment p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* 作品：投票ボタン */
.vote {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 6px;
  min-height: 34px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: bold;
  color: var(--pink-deep);
  background: #fff;
  border: 2px solid var(--pink);
  border-radius: 999px;
  cursor: pointer;
}
.vote:disabled { opacity: .6; cursor: wait; }
.vote.is-voted { color: #fff; background: linear-gradient(var(--pink), var(--pink-deep)); }
.vote__count { min-width: 2em; text-align: right; }
@media (hover: hover) { .vote:hover { background: var(--yellow); color: var(--pink-deep); } }

/* ランキング */
.ranking { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ranking__item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 2px solid #ffc9e3;
  border-radius: 10px;
}
.ranking__item--1 { border-color: #f5c400; background: linear-gradient(90deg, #fffbe0, #fff); box-shadow: 0 0 12px rgba(245,196,0,.45); }
.ranking__item--2 { border-color: #c0c0c0; }
.ranking__item--3 { border-color: #d49a6a; }
.ranking__rank { flex: 0 0 2.2em; text-align: center; font-size: 20px; font-weight: bold; color: var(--pink-deep); }
.ranking__title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking__votes { flex: 0 0 auto; font-weight: bold; color: var(--pink-deep); }
.ranking__empty { padding: 10px; text-align: center; color: #a0607f; background: #fff; border-radius: 10px; }

/* フォーム（質問箱・ファンレター） */
.fan-form {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 2px dashed #ffb6d9;
  border-radius: 12px;
}
.fan-form__label { font-weight: bold; font-size: 13px; color: var(--pink-deep); margin-top: 4px; }
.fan-form input[type="text"], .fan-form textarea {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: 16px; /* iPhone で入力時に拡大されないように */
  color: var(--text);
  background: var(--pink-pale);
  border: 2px solid #ffc9e3;
  border-radius: 8px;
}
.fan-form input[type="text"]:focus, .fan-form textarea:focus { outline: none; border-color: var(--pink); background: #fff; box-shadow: 0 0 0 3px rgba(255,105,180,.2); }
.fan-form textarea { resize: vertical; }
.fan-form__count { margin: 0; text-align: right; font-size: 11px; color: #a0607f; }
/* ロボット用のおとり欄（人には見えない） */
.fan-form__trap { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.fan-form__captcha:empty { display: none; }
.fan-form__submit {
  justify-self: center;
  min-width: 220px;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 20px;
  font: inherit;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(var(--pink), var(--pink-deep));
  border: 3px outset #ffb6d9;
  border-radius: 999px;
  cursor: pointer;
}
.fan-form__submit:disabled { opacity: .6; cursor: wait; }
.fan-form__status { margin: 4px 0 0; min-height: 1.4em; text-align: center; font-weight: bold; font-size: 13px; }
.fan-form__status.is-ok { color: #1a9a4a; }
.fan-form__status.is-error { color: #d00; }
.fan-form .tiny { margin: 0; }

/* Q&A */
.qa-list { display: grid; gap: 10px; margin-top: 12px; }
.qa-list__empty { margin: 0; text-align: center; color: #a0607f; }
.qa { padding: 10px 12px; background: #fff; border: 2px solid #ffc9e3; border-radius: 12px; }
.qa__q, .qa__a { display: flex; gap: 8px; margin: 0 0 6px; }
.qa__mark {
  flex: 0 0 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
  border-radius: 50%;
  font-family: "Pacifico", cursive;
}
.qa__q .qa__mark { background: var(--lavender-deep); }
.qa__a .qa__mark { background: var(--pink); }
.qa__body { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.qa__a .qa__body { color: var(--pink-deep); font-weight: bold; }
.qa__date { margin: 0; text-align: right; font-size: 11px; color: #a0607f; }

/* 誕生日バナー */
.birthday {
  margin-top: 12px;
  padding: 14px;
  text-align: center;
  background: linear-gradient(135deg, #fff799, #ffd1ea, #e6d8ff);
  border: 3px double var(--pink);
  border-radius: 14px;
  animation: glow 2.4s ease-in-out infinite;
}
.birthday[hidden] { display: none; }
.birthday__title { margin: 0; font-family: "Hachi Maru Pop", "Zen Maru Gothic", sans-serif; font-size: 24px; color: var(--pink-deep); }
.birthday__text { margin: 4px 0 10px; font-weight: bold; }
.birthday__img { max-width: min(100%, 420px); border-radius: 10px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(224,33,138,.3); }

/* キリ番 */
.kiriban-open {
  margin-top: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(#ffb700, #ff8a00);
  border: 2px outset #ffd36b;
  border-radius: 999px;
  cursor: pointer;
}
.kiriban-open[hidden] { display: none; }
.kiriban-dialog {
  width: min(92vw, 440px);
  padding: 18px;
  text-align: center;
  color: var(--text);
  background: linear-gradient(#fff, var(--pink-light));
  border: 4px double var(--pink);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(255,105,180,.6);
}
.kiriban-dialog::backdrop { background: rgba(90, 42, 68, .45); }
.kiriban-dialog__title { margin: 0; font-family: "Hachi Maru Pop", "Zen Maru Gothic", sans-serif; font-size: 22px; color: var(--pink-deep); }
.kiriban-dialog__text { margin: 6px 0 10px; font-weight: bold; }
.kiriban-dialog__img { max-width: 100%; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(224,33,138,.3); }
.kiriban-dialog__close {
  margin-top: 8px;
  min-width: 140px;
  min-height: 40px;
  font: inherit;
  font-weight: bold;
  color: #fff;
  background: var(--pink);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

/* お知らせ（投票したときなど） */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 300;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 10px 18px;
  font-weight: bold;
  color: #fff;
  background: rgba(224, 33, 138, .95);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .birthday { animation: none; }
  .toast { transition: none; }
}

/* ==========================================================
   サイトポリシー・404 などの単独ページ
   ========================================================== */
.page { max-width: 760px; }
.page__header { margin: 8px 0 12px; text-align: center; }
.page__home, .page__home:visited {
  font-family: "Hachi Maru Pop", "Zen Maru Gothic", sans-serif;
  font-size: 22px;
  color: var(--pink-deep);
  text-decoration: none;
}
.page__body h2 {
  margin: 18px 0 6px;
  padding-left: 10px;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 16px;
  color: var(--pink-deep);
  border-left: 5px solid var(--pink);
}
.page__body p, .page__body li { font-size: 14px; }
.page__body ul { padding-left: 1.3em; }
.page__body li { margin-bottom: 4px; }
.page__date { margin-top: 20px; text-align: right; font-size: 12px; color: #a0607f; }

.notfound { margin-top: 40px; padding: 30px 16px; text-align: center; }
.notfound__code {
  margin: 0;
  font-family: "Pacifico", cursive;
  font-size: 72px;
  line-height: 1.2;
  color: var(--pink);
  text-shadow: 3px 3px 0 var(--lavender);
}
.notfound__title { margin: 4px 0 12px; font-family: "Hachi Maru Pop", "Zen Maru Gothic", sans-serif; font-size: 24px; color: var(--pink-deep); }
.notfound__back { margin-top: 20px; }
.notfound__btn, .notfound__btn:visited {
  display: inline-block;
  padding: 10px 24px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(var(--pink), var(--pink-deep));
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--lavender-deep);
}
