/* =========================================================
   FRONTIER GAMES — スタイル（ライト・モダン・シンプル）
   ========================================================= */

:root {
  --bg:        #f4f6f9;   /* 淡いブルーグレー */
  --bg-soft:   #eaeef4;
  --panel:     #ffffff;   /* カードは白 */
  --line:      #e0e5ec;
  --text:      #1c2230;   /* ディープネイビー */
  --muted:     #737b8c;
  --accent:    #1c2230;
  --hl:        #3b5bdb;   /* インディゴ（アクセント） */
  --radius:    16px;
  --maxw:      1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* 固定ヘッダー分、アンカー移動時の見出し隠れを防ぐ */
#featured, #works, #about, #news, #reviews { scroll-margin-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* テキスト選択色 */
::selection { background: var(--hl); color: #fff; }

/* カスタムスクロールバー */
* { scrollbar-width: thin; scrollbar-color: #c2c9d6 transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c6cdd9; border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #aab3c4; }

/* スクロール進捗バー */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 60; background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--hl), #e86a6a);
}

/* トップへ戻る */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 55;
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--text); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 12px 26px -12px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #333; }

/* 全体に極薄のフィルムグレイン */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 24px -16px rgba(0,0,0,.4);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { font-weight: 700; letter-spacing: .16em; font-size: 15px; }
.brand em { color: var(--muted); font-style: normal; }
.brand--logo { display: inline-flex; align-items: center; }
.brand--logo img { height: 24px; width: auto; display: block; }
.nav-mini { color: var(--muted); font-size: 12px; letter-spacing: .16em; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--muted); font-size: 13px; letter-spacing: .08em; transition: color .2s ease; }
.nav a:hover { color: var(--text); }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  padding: 130px 0 100px;
  text-align: center;
  overflow: hidden;
}
/* 背後のやわらかい光 */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(620px 300px at 28% 18%, rgba(59,91,219,.10), transparent 70%),
    radial-gradient(720px 380px at 76% 96%, rgba(59,91,219,.05), transparent 70%);
}
/* 背後の巨大ゴースト文字 */
.hero__ghost {
  position: absolute; z-index: 0; top: 46%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Shippori Mincho", serif; font-weight: 800;
  font-size: clamp(96px, 23vw, 340px); letter-spacing: .04em;
  color: #000; opacity: .035; white-space: nowrap;
  pointer-events: none; user-select: none;
}
.hero .wrap { position: relative; z-index: 2; }
.hero__kicker {
  color: var(--muted); letter-spacing: .34em; font-size: 12px;
  text-transform: uppercase; margin-bottom: 26px;
}
.hero__title {
  font-family: "Shippori Mincho", "Yu Mincho", serif;
  font-size: clamp(40px, 8vw, 92px);
  font-weight: 700; letter-spacing: .04em; line-height: 1.18;
}
.hero__title .fg-red { color: var(--text); position: relative; }
.hero__title .fg-red::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: .12em;
  background: var(--hl); opacity: .9; border-radius: 2px;
}
.hero__lead {
  color: var(--muted); margin-top: 30px; font-size: clamp(14px, 2.5vw, 17px);
  letter-spacing: .03em;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 44px; padding: 13px 28px;
  background: var(--text); color: #fff;
  border-radius: 999px; font-size: 13px; letter-spacing: .08em; font-weight: 500;
  transition: .2s ease;
}
.hero__cta em { font-style: normal; transition: transform .2s ease; }
.hero__cta:hover { background: #333; }
.hero__cta:hover em { transform: translateY(3px); }

/* 読み込み時のフェードイン（ヒーロー） */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal .8s cubic-bezier(.2,.7,.2,1) forwards; }
.hero__kicker.reveal { animation-delay: .05s; }
.hero__title.reveal  { animation-delay: .16s; }
.hero__lead.reveal   { animation-delay: .30s; }
.hero__cta.reveal    { animation-delay: .44s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- セクション ---------- */
.section { padding: 40px 0 110px; }
.section__head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 30px; flex-wrap: wrap;
}
.section__title { font-family: "Shippori Mincho", serif; font-size: 26px; letter-spacing: .08em; }
.section__meta { color: var(--muted); font-size: 13px; }
.section__meta b { color: var(--text); }

/* ---------- フィルタ ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 34px; }
.filters button {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-size: 13px; letter-spacing: .05em;
  cursor: pointer; transition: .18s ease; font-family: inherit;
}
.filters button:hover { color: var(--text); border-color: #c2cad6; }
.filters button.is-active { color: #fff; background: var(--text); border-color: var(--text); }

/* ---------- カードグリッド ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  /* スクロールで下からフェードイン（初期状態） */
  opacity: 0; transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease, box-shadow .22s ease, border-color .22s ease;
  transition-delay: var(--delay, 0ms), var(--delay, 0ms), 0s, 0s;
}
.card.is-in { opacity: 1; transform: translateY(0); }
.card.is-in:hover {
  transform: translateY(-6px);
  border-color: #c3cddf;
  box-shadow: 0 22px 40px -24px rgba(28,34,48,.30);
  transition-duration: .22s; transition-delay: 0s;
}
.card__art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e9edf3;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card__mark {
  font-family: "Shippori Mincho", serif;
  font-size: 62px; font-weight: 700;
  color: #c0c7d4;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card__mark { transform: scale(1.12); }
/* サムネ画像（あれば頭文字プレースホルダーの上に重ねて表示） */
.card__img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card__img { transform: scale(1.06); }
/* 通し番号（エディトリアル） */
.card__num {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  font-family: "Shippori Mincho", serif; font-weight: 700;
  font-size: 20px; color: #c0c7d4; letter-spacing: .04em;
}
/* サムネ画像がある場合は白文字＋影で読みやすく */
.card__art:has(.card__img) .card__num {
  color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.45);
}
.card__series {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 11px; letter-spacing: .08em;
  background: rgba(255,255,255,.9); color: var(--text);
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line);
}
.card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card__genre {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 10px;
}
.card__genre .dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none;
}
.card__title {
  font-family: "Shippori Mincho", serif;
  font-size: 21px; letter-spacing: .03em; margin-bottom: 12px; line-height: 1.4;
}
.card__rating {
  display: inline-flex; align-items: center; gap: 6px; margin: -2px 0 12px;
  width: fit-content; cursor: pointer; border-radius: 6px; padding: 2px 4px;
  margin-left: -4px; transition: background .15s ease;
}
.card__rating:hover { background: color-mix(in srgb, var(--hl) 8%, transparent); }
.card__rating:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; }
.card__rating-stars { color: var(--hl); font-size: 13px; letter-spacing: 1px; }
.card__rating-stars.gray { color: #c0c7d4; }
.card__rating-num { font-weight: 700; font-size: 13px; color: var(--text); }
.card__rating-count { color: var(--muted); font-size: 11px; }
.card__rating-write { font-size: 12px; color: var(--hl); letter-spacing: .04em; }
.card__rating:hover .card__rating-write,
.card__rating:hover .card__rating-num { text-decoration: underline; }

/* 投稿欄ハイライト（カードから飛んで来たとき） */
.review-form.flash { animation: formFlash 1.2s ease; }
@keyframes formFlash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  25%      { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl) 45%, transparent); border-color: var(--hl); }
}
.card__desc { color: var(--muted); font-size: 13.5px; flex: 1; }
.card__play {
  margin-top: 20px; font-size: 13px; letter-spacing: .06em; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
}
.card__play em { font-style: normal; transition: transform .2s ease; color: var(--hl); }
.card:hover .card__play em { transform: translateX(6px); }

/* ---------- セクション共通見出し ---------- */
.sec-kicker {
  color: var(--hl); letter-spacing: .24em; font-size: 11px;
  text-transform: uppercase; margin-bottom: 12px;
}
.sec-title { font-family: "Shippori Mincho", serif; font-size: clamp(24px, 3.4vw, 32px); letter-spacing: .06em; line-height: 1.4; }
.sec-head { margin-bottom: 34px; }

/* ---------- ピックアップ作品 ---------- */
.featured { padding: 10px 0 90px; }
.featured__inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center;
}
.featured__media {
  display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 30px 50px -30px rgba(28,34,48,.35);
}
.featured__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.featured__media:hover img { transform: scale(1.05); }
.featured__label { color: var(--hl); letter-spacing: .24em; font-size: 11px; text-transform: uppercase; margin-bottom: 14px; }
.featured__title { font-family: "Shippori Mincho", serif; font-size: clamp(30px, 5vw, 46px); letter-spacing: .04em; }
.featured__genre { color: var(--muted); font-size: 13px; margin-top: 10px; letter-spacing: .06em; }
.featured__desc { color: #41485a; margin-top: 18px; font-size: 15px; line-height: 1.9; }
.featured__btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px;
  padding: 13px 28px; background: var(--text); color: #fff; border-radius: 999px;
  font-size: 13px; letter-spacing: .08em; font-weight: 500; transition: .2s ease;
}
.featured__btn em { font-style: normal; transition: transform .2s ease; }
.featured__btn:hover { background: #2b3346; }
.featured__btn:hover em { transform: translateX(5px); }

/* ---------- About ---------- */
.about {
  background: var(--bg-soft);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 82px 0;
}
.about__inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 46px; }
.about__text p { color: #41485a; font-size: 15px; line-height: 2; margin-bottom: 16px; }
.about__stats { list-style: none; display: flex; gap: 44px; margin-top: 32px; flex-wrap: wrap; }
.about__stats li { display: flex; flex-direction: column; }
.about__stats b { font-family: "Shippori Mincho", serif; font-size: 34px; color: var(--text); line-height: 1; }
.about__stats span { color: var(--muted); font-size: 12px; letter-spacing: .1em; margin-top: 8px; }

/* ---------- News ---------- */
.news { padding: 82px 0 100px; }
.news__list { list-style: none; }
.news__item {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 2px; border-bottom: 1px solid var(--line);
}
.news__item time { color: var(--muted); font-size: 13px; flex: none; width: 92px; font-variant-numeric: tabular-nums; }
.news__tag {
  flex: none; font-size: 10px; letter-spacing: .1em; color: var(--hl);
  border: 1px solid var(--hl); border-radius: 999px; padding: 3px 11px;
}
.news__item p { font-size: 14px; }

/* ---------- レビュー・感想 ---------- */
.reviews {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 82px 0 100px;
}
.reviews__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.reviews__summary { display: flex; align-items: baseline; gap: 10px; }
.reviews__avg { font-family: "Shippori Mincho", serif; font-size: 34px; color: var(--text); line-height: 1; }
.reviews__avgstars { color: var(--hl); font-size: 18px; letter-spacing: 2px; }
.reviews__count { color: var(--muted); font-size: 12px; }

/* 投稿フォーム */
.review-form {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 34px;
}
.review-form__top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.review-form__select,
.reviews__filter select {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 34px 10px 14px; cursor: pointer; transition: border-color .18s ease;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23737b8c' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.review-form__select:focus,
.reviews__filter select:focus { outline: none; border-color: var(--hl); }

/* レビュー絞り込み */
.reviews__filter { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.reviews__filter label { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.review--empty { color: var(--muted); font-size: 13.5px; padding: 22px 4px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.stars-input { display: inline-flex; gap: 2px; }
.stars-input button {
  background: none; border: none; cursor: pointer; padding: 0 2px;
  font-size: 26px; line-height: 1; color: #cfd5e0; transition: color .12s ease; font-family: inherit;
}
.stars-input button.on { color: var(--hl); }
.review-form input[type="text"],
.review-form textarea {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; transition: border-color .18s ease;
}
.review-form__top input[type="text"] { flex: 1; min-width: 180px; width: auto; }
.review-form textarea { resize: vertical; line-height: 1.7; }
.review-form input:focus, .review-form textarea:focus { outline: none; border-color: var(--hl); }
.review-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.review-form__note { color: var(--muted); font-size: 11.5px; }
.review-form__btn {
  background: var(--text); color: #fff; border: none; cursor: pointer;
  padding: 11px 26px; border-radius: 999px; font-size: 13px; letter-spacing: .06em;
  font-weight: 500; font-family: inherit; transition: background .2s ease;
}
.review-form__btn:hover { background: #2b3346; }

/* 投稿一覧 */
.review-list { list-style: none; display: grid; gap: 14px; }
.review {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px;
}
.review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.review__name { font-weight: 700; font-size: 13.5px; color: var(--text); }
.review__game {
  font-size: 11px; letter-spacing: .04em; color: var(--hl);
  background: color-mix(in srgb, var(--hl) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--hl) 30%, #fff);
  border-radius: 999px; padding: 3px 10px;
}
.review__stars { color: var(--hl); font-size: 13px; letter-spacing: 1px; }
.review__date { color: var(--muted); font-size: 12px; margin-left: auto; }
.review__text { font-size: 14px; line-height: 1.8; color: #3a4152; white-space: pre-wrap; }

/* ---------- レビュー投稿モーダル（その場ポップアップ） ---------- */
.review-modal {
  position: fixed; inset: 0; z-index: 80;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.review-modal.open { display: flex; }
body.modal-open { overflow: hidden; }
.review-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 24, 34, .5);
  backdrop-filter: blur(3px);
  animation: modalFade .2s ease;
}
.review-modal__dialog {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px;
  max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
  box-shadow: 0 40px 80px -30px rgba(20, 24, 34, .6);
  animation: modalPop .28s cubic-bezier(.2,.7,.2,1);
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.review-modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--muted);
  transition: background .15s ease, color .15s ease; font-family: inherit;
}
.review-modal__close:hover { background: var(--bg-soft); color: var(--text); }
.review-modal__kicker {
  color: var(--hl); letter-spacing: .24em; font-size: 11px;
  text-transform: uppercase; margin-bottom: 8px;
}
.review-modal__title {
  font-family: "Shippori Mincho", serif; font-size: 20px;
  letter-spacing: .03em; line-height: 1.4; margin-bottom: 18px;
  padding-right: 28px;
}
.review-modal__form { display: flex; flex-direction: column; gap: 14px; }
.review-modal__stars { align-self: flex-start; }
.review-modal__name,
.review-modal__text {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; transition: border-color .18s ease;
}
.review-modal__text { resize: vertical; line-height: 1.7; min-height: 96px; }
.review-modal__name:focus,
.review-modal__text:focus { outline: none; border-color: var(--hl); }
.review-modal__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.review-modal__note { color: var(--muted); font-size: 11.5px; flex: 1; min-width: 160px; }
.review-modal__btn {
  background: var(--text); color: #fff; border: none; cursor: pointer;
  padding: 11px 26px; border-radius: 999px; font-size: 13px; letter-spacing: .06em;
  font-weight: 500; font-family: inherit; transition: background .2s ease;
}
.review-modal__btn:hover { background: #2b3346; }

@media (max-width: 640px) {
  .review-modal__dialog { padding: 24px 20px 20px; }
  .review-modal__title { font-size: 18px; }
}

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 50px 0; color: var(--muted); font-size: 13px; }
.site-footer .wrap {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 20px 24px;
}
.site-footer .brand { color: var(--text); }
.footer__logo { display: inline-block; }
/* 白背景のロゴを淡い背景になじませる（白→透過・黒はそのまま） */
.footer__logo img { height: 26px; width: auto; display: block; mix-blend-mode: multiply; }
.footer__tagline {
  font-family: "Shippori Mincho", serif; color: var(--muted);
  margin-top: 8px; font-size: 13px; letter-spacing: .04em;
}
.footer__social { display: flex; gap: 8px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--text);
  transition: .2s ease;
}
.footer__social a:hover { background: var(--text); color: #fff; border-color: var(--text); }
.footer__bottom {
  grid-column: 1 / -1; border-top: 1px solid var(--line);
  padding-top: 20px; font-size: 12px; letter-spacing: .04em;
}

/* ---------- 認証（ヘッダー・モーダル） ---------- */
.auth-area { display: flex; align-items: center; margin-left: 18px; flex: none; }
.auth-btn {
  background: var(--text); color: #fff; border: none; cursor: pointer;
  padding: 8px 20px; border-radius: 999px; font-size: 13px; letter-spacing: .06em;
  font-weight: 500; font-family: inherit; transition: background .2s ease;
}
.auth-btn:hover { background: #2b3346; }
.auth-btn--ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
}
.auth-btn--ghost:hover { background: var(--bg-soft); color: var(--text); }
.auth-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  font-size: 13px; font-weight: 500; transition: .18s ease;
  max-width: 180px;
}
.auth-chip:hover { border-color: var(--hl); color: var(--hl); }
.auth-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-modal__lead { color: var(--muted); font-size: 13.5px; margin: -6px 0 18px; line-height: 1.7; }

/* LINEログイン */
.auth-line__btn {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #06C755; color: #fff; border: none; cursor: pointer;
  padding: 13px 20px; border-radius: 10px; font-size: 14.5px; font-weight: 700;
  font-family: inherit; transition: background .18s ease;
}
.auth-line__btn:hover { background: #05b34c; }
.auth-line__note {
  color: var(--muted); font-size: 11.5px; line-height: 1.6;
  margin-top: 8px; text-align: center;
}

/* LINEのみのページでは、エラー文言をLINEボタンの下に中央寄せで出す */
.auth-modal__body > .auth-error {
  margin-top: 12px; text-align: center;
}

.auth-google {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: var(--text); border: 1px solid var(--line); cursor: pointer;
  padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 500;
  font-family: inherit; transition: .18s ease;
}
.auth-google:hover { border-color: #b9c2d2; background: var(--bg); }
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 16px 0;
  color: var(--muted); font-size: 11.5px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tabs button {
  flex: 1; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 0; font-size: 13px; cursor: pointer; font-family: inherit; transition: .18s ease;
}
.auth-tabs button.is-active { color: #fff; background: var(--text); border-color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; transition: border-color .18s ease;
}
.auth-form input:focus { outline: none; border-color: var(--hl); }
.auth-error { display: none; color: #c0392b; font-size: 12.5px; line-height: 1.6; }
.auth-error--info { color: var(--hl); }
.auth-submit { align-self: stretch; }
.auth-forgot {
  display: block; margin: 14px auto 0; background: none; border: none;
  color: var(--muted); font-size: 12px; cursor: pointer; font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px; transition: color .15s ease;
}
.auth-forgot:hover { color: var(--hl); }
.auth-modal__done { text-align: center; padding: 8px 0 4px; }
.auth-done__msg { font-size: 14.5px; line-height: 2; margin-bottom: 16px; }
.auth-sent__icon { font-size: 42px; line-height: 1.2; margin-bottom: 10px; }
.auth-sent__title {
  font-family: "Shippori Mincho", serif; font-size: 19px;
  letter-spacing: .04em; margin-bottom: 12px;
}
.auth-sent__msg { font-size: 13.5px; line-height: 1.9; color: #3a4152; margin-bottom: 10px; word-break: break-all; }
.auth-sent__note { color: var(--muted); font-size: 12px; margin-bottom: 18px; }

/* 初回ニックネーム設定 */
.auth-nick { padding: 4px 0 2px; }
.auth-nick__title {
  font-family: "Shippori Mincho", serif; font-size: 19px;
  letter-spacing: .04em; margin-bottom: 10px;
}
.auth-nick__lead { color: var(--muted); font-size: 13px; line-height: 1.8; margin-bottom: 16px; }
.auth-nick__form { display: flex; flex-direction: column; gap: 12px; }
.auth-nick__form input {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; transition: border-color .18s ease;
}
.auth-nick__form input:focus { outline: none; border-color: var(--hl); }
.auth-play { display: inline-flex; align-items: center; gap: 8px; }
.auth-play em { font-style: normal; }

/* ---------- マイページ ---------- */
.mypage-guard { padding: 110px 0 130px; text-align: center; }
.mypage-guard__box { max-width: 460px; margin: 0 auto; }
.mypage-guard__lead { color: var(--muted); font-size: 14px; margin: 18px 0 28px; line-height: 1.9; }
.mypage-guard .hero__cta { border: none; cursor: pointer; font-family: inherit; }
.mypage-guard__back { margin-top: 26px; font-size: 13px; }
.mypage-guard__back a { color: var(--muted); }
.mypage-guard__back a:hover { color: var(--text); }

.mypage { padding: 60px 28px 110px; }
.mypage__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 30px;
}
.mypage-profile {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 34px;
}
.mypage-profile__avatar {
  width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); font-size: 30px; flex: none;
}
.mypage-profile__title { color: var(--hl); font-size: 12px; letter-spacing: .1em; margin-bottom: 4px; }
.mypage-profile__namewrap { display: flex; align-items: center; gap: 8px; }
.mypage-profile__name { font-family: "Shippori Mincho", serif; font-size: 24px; letter-spacing: .03em; }
.mypage-profile__edit {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 15px; padding: 4px 6px; border-radius: 6px; transition: .15s ease; font-family: inherit;
}
.mypage-profile__edit:hover { background: var(--bg-soft); color: var(--text); }
.mypage-profile__email { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* 達成度リング（conic-gradient、--p は 0〜100） */
.mypage-profile__progress { display: flex; align-items: center; gap: 14px; }
.progress-ring {
  width: 84px; height: 84px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--hl) calc(var(--p) * 1%), var(--bg-soft) 0);
  display: flex; align-items: center; justify-content: center;
}
.progress-ring::before {
  content: ""; position: absolute; width: 64px; height: 64px; border-radius: 50%;
  background: var(--panel);
}
.progress-ring { position: relative; }
.progress-ring__num { position: relative; font-weight: 700; font-size: 16px; }
.progress-ring__label { color: var(--muted); font-size: 12px; line-height: 1.7; }
.progress-ring__label span { color: var(--text); font-weight: 700; }

.mypage-sec { margin-bottom: 38px; }
.mypage-sec__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 16px;
}
.mypage-sec__title { font-family: "Shippori Mincho", serif; font-size: 20px; letter-spacing: .06em; }
.mypage-sec__meta { color: var(--muted); font-size: 13px; }
.mypage-sec__meta b { color: var(--text); }

/* バッジ */
.badge-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
}
.badge {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: .18s ease;
}
.badge.is-on { border-color: color-mix(in srgb, var(--hl) 45%, var(--line)); }
.badge.is-on:hover { transform: translateY(-3px); box-shadow: 0 14px 26px -18px rgba(28,34,48,.35); }
.badge.is-off { opacity: .55; filter: grayscale(1); }
.badge__icon { font-size: 30px; line-height: 1.2; }
.badge__name { font-size: 13.5px; }
.badge__desc { color: var(--muted); font-size: 11.5px; line-height: 1.6; }

/* 最近のプレイ */
.play-list { list-style: none; display: grid; gap: 10px; }
.play-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; font-size: 14px;
}
.play-item time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.play-item--empty { color: var(--muted); font-size: 13px; justify-content: center; border-style: dashed; }
.play-item--empty a { color: var(--hl); }
.mypage__back { font-size: 13px; }
.mypage__back a { color: var(--muted); }
.mypage__back a:hover { color: var(--text); }

@media (max-width: 640px) {
  .auth-area { margin-left: 10px; }
  .auth-chip { max-width: 130px; padding: 6px 12px; }
  .mypage { padding: 40px 18px 80px; }
  .mypage-profile { grid-template-columns: auto 1fr; }
  .mypage-profile__progress { grid-column: 1 / -1; justify-content: center; }
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 820px) {
  .featured__inner { grid-template-columns: 1fr; gap: 26px; }
  .about__inner { grid-template-columns: 1fr; gap: 24px; }
  .nav { gap: 18px; }
}
@media (max-width: 640px) {
  .hero { padding: 96px 0 66px; }
  .section { padding: 30px 0 76px; }
  .nav { display: none; }
  .featured { padding: 6px 0 60px; }
  .about { padding: 60px 0; }
  .news { padding: 60px 0 76px; }
  .news__item { flex-wrap: wrap; gap: 8px 14px; }
  .news__item p { flex-basis: 100%; }

  /* スマホは2列表示 */
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .wrap { padding: 0 18px; }
  .card__body { padding: 14px 14px 16px; }
  .card__title { font-size: 15px; margin-bottom: 8px; }
  .card__desc { font-size: 12px; line-height: 1.65; }
  .card__mark { font-size: 44px; }
  .card__genre { font-size: 10px; letter-spacing: .08em; margin-bottom: 7px; }
  .card__series { font-size: 10px; padding: 3px 8px; }
  .card__play { font-size: 12px; margin-top: 14px; }

  .site-footer .wrap { grid-template-columns: 1fr; }
}
