/*
 * 今日のキャラ当て（/js/guess.js）の見た目。全サイト共通。
 * 色・字体はサイトの CSS で .gi-guess { --guess-* } を決める（なければ下の既定の色）。
 * 記事の本文の p・dl などの大きさに負けないよう、本文の中で効く指定は .gi-guess から書く。
 */
[data-guess] { min-height: 120px; }
.gi-guess {
    --gg-paper: var(--guess-paper, #fffdf8); --gg-paper-2: var(--guess-paper-2, #f1ebdd);
    --gg-ink: var(--guess-ink, #27304a); --gg-ink-2: var(--guess-ink-2, #5b6177); --gg-muted: var(--guess-muted, #8a8778);
    --gg-line: var(--guess-line, #ddd4c2); --gg-fill: var(--guess-fill, #1c1d22);
    --gg-ok: var(--guess-ok, #5f8f45); --gg-ok-2: var(--guess-ok-2, #e3eed9);
    --gg-part: var(--guess-part, #d9a93a); --gg-part-2: var(--guess-part-2, #f6ead0); --gg-no: var(--guess-no, #e7e1d3);
    --gg-red: var(--guess-red, #b04a3a); --gg-orange: var(--guess-orange, #a8572a); --gg-gold: var(--guess-gold, #b08a2e); --gg-blue: var(--guess-blue, #5b6c99);
    --gg-serif: var(--guess-serif, "Noto Serif JP", "Hiragino Mincho ProN", serif);
    --gg-latin: var(--guess-latin, "Cormorant Garamond", var(--gg-serif));
    color: var(--gg-ink); font-size: 15px; line-height: 1.7; margin: 8px 0 20px;
}
.gi-guess * { box-sizing: border-box; }
/* 記事の本文の p の大きさ・余白・色に負けないよう、部品の中の p は !important で決める */
.gi-guess p { margin: 0 !important; padding: 0 !important; font-size: 15px !important; line-height: 1.7 !important; color: inherit; text-indent: 0 !important; }
.gi-guess p.gg-series { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--gg-serif); font-weight: 700; font-size: 13px !important; letter-spacing: .1em; color: var(--gg-ink-2) !important; }
.gi-guess .gg-series::before, .gi-guess .gg-series::after { content: ""; width: 28px; height: 1px; background: var(--gg-line); }
.gi-guess p.gg-date { text-align: center; font-size: 12px !important; color: var(--gg-muted) !important; margin: 0 0 16px !important; }

/* 今日のキャラのカード */
.gi-guess .gg-card { display: block; background: var(--gg-paper); border: 2px solid var(--gg-ink); border-radius: 12px; padding: 16px 14px 14px; position: relative; }
.gi-guess .gg-card.gg-solved { border-color: var(--gg-ok); }
.gi-guess .gg-body { display: flex; gap: 14px; align-items: center; }
.gi-guess .gg-qcol { flex: 0 0 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gi-guess p.gg-name { font-family: var(--gg-serif); font-size: 24px !important; font-weight: 700; line-height: 1.3 !important; letter-spacing: .06em; color: var(--gg-ink) !important; margin: 4px 0 12px !important; padding: 0 120px 8px 2px !important; border-bottom: 1px solid var(--gg-line); animation: gg-pop .4s ease; }
.gi-guess .gg-lbl { position: absolute; top: -11px; left: 14px; background: var(--gg-ink); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 10px; border-radius: 999px; letter-spacing: .06em; line-height: 1.6; }
.gi-guess .gg-q { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%; background: var(--gg-ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--gg-serif); font-size: 44px; font-weight: 700; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gg-line); overflow: hidden; }
.gi-guess .gg-q img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; margin: 0; }
.gi-guess .gg-card dl { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-size: 13px; align-items: center; min-width: 0; }
.gi-guess .gg-card dt { color: var(--gg-muted); font-size: 12px; font-weight: 400; margin: 0; }
.gi-guess .gg-card dd { margin: 0; font-weight: 700; position: relative; }
.gi-guess .gg-unk { display: inline-block; min-width: 44px; text-align: center; background: var(--gg-paper-2); color: var(--gg-muted); border-radius: 4px; padding: 0 6px; font-weight: 500; }
.gi-guess .gg-got { display: inline-block; background: var(--gg-ok-2); color: var(--gg-ok); border-radius: 4px; padding: 0 6px; }
.gi-guess .gg-half { display: inline-block; background: var(--gg-part-2); color: #8a6414; border-radius: 4px; padding: 0 6px; }
.gi-guess .gg-lock { display: inline-flex; align-items: center; gap: 4px; background: var(--gg-paper-2); color: var(--gg-muted); border-radius: 4px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.gi-guess .gg-lock svg, .gi-guess .gg-cover svg { width: 10px; height: 12px; }
.gi-guess .gg-stamp { display: inline-block; margin-left: 8px; padding: 0 6px; border: 1.5px solid currentColor; outline: 1px solid currentColor; outline-offset: 1.5px; border-radius: 3px; font-family: var(--gg-serif); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; line-height: 17px; background: var(--gg-paper); transform: rotate(-6deg); animation: gg-stamp .4s cubic-bezier(.2, 1.5, .4, 1) both; vertical-align: 1px; }
.gi-guess .gg-stamp.gg-hit { color: var(--gg-red); }
.gi-guess .gg-stamp.gg-half { color: var(--gg-orange); background: var(--gg-paper); padding: 0 6px; }
.gi-guess .gg-stamp.gg-open { color: var(--gg-ink); }
.gi-guess dd.gg-new > .gg-got, .gi-guess dd.gg-new > .gg-half { animation: gg-glow 1s ease; }
.gi-guess .gg-reveal { position: relative; display: inline-block; perspective: 160px; }
.gi-guess .gg-cover { position: absolute; inset: -1px; display: flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--gg-muted); background: linear-gradient(120deg, #f4eee1 0%, #e6dcc6 100%); border: 1px solid var(--gg-line); box-shadow: 0 1px 0 rgba(0, 0, 0, .06); transform-origin: left center; backface-visibility: hidden; animation: gg-peel .85s cubic-bezier(.45, 0, .3, 1) .1s forwards; }
.gi-guess .gg-cover::after { content: ""; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 0 0 4px 0; background: linear-gradient(135deg, transparent 50%, #d8cdb4 50%); }
.gi-guess .gg-bigstamp { position: absolute; right: 16px; top: 22px; padding: 2px 10px; border: 2px solid var(--gg-red); outline: 1px solid var(--gg-red); outline-offset: 2px; border-radius: 4px; color: var(--gg-red); background: rgba(255, 253, 248, .85); font-family: var(--gg-serif); font-size: 18px; font-weight: 700; letter-spacing: .14em; transform: rotate(-10deg); animation: gg-bigstamp .5s cubic-bezier(.2, 1.5, .4, 1) .2s both; }
@keyframes gg-stamp { 0% { transform: rotate(-6deg) scale(2); opacity: 0; } 100% { transform: rotate(-6deg) scale(1); opacity: 1; } }
@keyframes gg-glow { 0% { box-shadow: 0 0 0 0 rgba(95, 143, 69, .7); } 100% { box-shadow: 0 0 0 8px rgba(95, 143, 69, 0); } }
@keyframes gg-peel { 0% { transform: rotateY(0) skewY(0); } 45% { transform: rotateY(-65deg) skewY(-7deg); box-shadow: 8px 4px 10px rgba(0, 0, 0, .22); } 85% { transform: rotateY(-150deg) skewY(-10deg); opacity: 1; } 100% { transform: rotateY(-170deg) skewY(-10deg); opacity: 0; box-shadow: none; } }
@keyframes gg-bigstamp { 0% { transform: rotate(-10deg) scale(2.6); opacity: 0; } 100% { transform: rotate(-10deg) scale(1); opacity: 1; } }

/* 「これは誰だと思う？」と選ぶキャラ */
.gi-guess .gg-link { display: flex; align-items: stretch; margin: 2px 0 4px; }
.gi-guess .gg-up { flex: 0 0 52px; height: 78px; margin: 0 16px 0 31px; color: var(--gg-ink); animation: gg-bob 1.6s ease-in-out infinite; }
@keyframes gg-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.gi-guess .gg-linkt { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.gi-guess p.gg-ask { font-family: var(--gg-serif); font-size: 18px !important; font-weight: 700; line-height: 1.4 !important; color: var(--gg-ink) !important; }
/* 1人目を選ぶ前だけ、手がかりなしで選んでよいことを添える（2026-12-01 ユーザー指定） */
.gi-guess .gg-ask-sub { display: inline-block; font-size: 12px; font-weight: 400; color: var(--gg-muted); margin-left: 4px; }
.gi-guess p.gg-msg { margin: 0 0 6px !important; font-weight: 700; font-size: 13px !important; line-height: 1.5 !important; color: var(--gg-ink-2) !important; }
.gi-guess .gg-pop { animation: gg-pop .35s; }
@keyframes gg-pop { 0% { transform: scale(.92); opacity: .3; } 100% { transform: none; opacity: 1; } }
.gi-guess .gg-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 4px; background: var(--gg-paper); border: 1px solid var(--gg-line); border-radius: 10px; padding: 8px; }
.gi-guess .gg-pick button { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; border-radius: 8px; padding: 6px 2px; font: inherit; font-size: 11px; line-height: 1.25; color: var(--gg-ink); cursor: pointer; transition: transform .1s; }
.gi-guess .gg-pick button:hover { background: var(--gg-paper-2); }
.gi-guess .gg-pick button:active { transform: scale(.94); }
.gi-guess .gg-pick img, .gi-guess .gg-pick .gg-noimg { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--gg-line); margin: 0; }
.gi-guess .gg-pick button:disabled { opacity: .25; cursor: default; background: none; }
.gi-guess .gg-pick button:disabled img { filter: grayscale(1); }
.gi-guess .gg-pick button.gg-wait { opacity: 1; background: var(--gg-paper-2); }
.gi-guess .gg-pick button.gg-wait img { filter: none; }
.gi-guess .gg-noimg { display: inline-flex; align-items: center; justify-content: center; background: var(--gg-paper-2); color: var(--gg-muted); font-size: 8px; font-weight: 700; line-height: 1.1; text-align: center; }

/* 答えたキャラの表 */
.gi-guess .gg-loghd { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin: 18px 0 8px; }
.gi-guess p.gg-h { font-family: var(--gg-serif); font-size: 17px !important; font-weight: 700; }
.gi-guess .gg-legend { display: flex; gap: 10px; font-size: 11px; color: var(--gg-ink-2); }
.gi-guess .gg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 3px; }
.gi-guess i.gg-ok { background: var(--gg-ok); } .gi-guess i.gg-part { background: var(--gg-part); } .gi-guess i.gg-no { background: var(--gg-no); }
.gi-guess .gg-grid { display: grid; gap: 3px; }
.gi-guess .gg-hd { font-size: 11px; color: var(--gg-muted); text-align: center; }
.gi-guess .gg-who { display: flex; flex-direction: column; align-items: center; font-size: 10px; line-height: 1.2; text-align: center; word-break: break-all; }
.gi-guess .gg-who img, .gi-guess .gg-who .gg-noimg { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; margin: 0; font-size: 6px; }
.gi-guess .gg-c { border-radius: 6px; padding: 4px 2px; text-align: center; font-size: 11.5px; font-weight: 700; line-height: 1.3; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; word-break: break-all; }
.gi-guess .gg-c small { font-size: 9.5px; font-weight: 500; opacity: .9; }
.gi-guess .gg-c.gg-ok { background: var(--gg-ok); color: #fff; }
.gi-guess .gg-c.gg-part { background: var(--gg-part); color: #2b2416; }
.gi-guess .gg-c.gg-no { background: var(--gg-no); color: var(--gg-ink-2); }
.gi-guess .gg-flip { animation: gg-flip .35s ease both; }
@keyframes gg-flip { from { transform: rotateX(90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.gi-guess p.gg-empty { font-size: 13px !important; color: var(--gg-muted) !important; text-align: center; padding: 14px !important; border: 1px dashed var(--gg-line); border-radius: 8px; margin: 4px 0 0 !important; }

/* 正解のあと */
.gi-guess .gg-res { text-align: center; background: var(--gg-paper); border: 2px solid var(--gg-ok); border-radius: 12px; padding: 16px; margin: 14px 0 0; }
.gi-guess p.gg-big { font-family: var(--gg-serif); font-size: 22px !important; font-weight: 700; color: var(--gg-ok) !important; }
.gi-guess .gg-rank { display: inline-flex; align-items: center; gap: 12px; margin: 6px 0 8px; text-align: left; }
.gi-guess .gg-rk { display: flex; align-items: center; justify-content: center; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 50%; border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 3px; font-family: var(--gg-latin); font-size: 34px; font-weight: 700; line-height: 1; animation: gg-bigstamp .5s cubic-bezier(.2, 1.5, .4, 1) .15s both; }
.gi-guess .gg-rt small { display: block; font-size: 11px; color: var(--gg-muted); letter-spacing: .06em; }
.gi-guess .gg-rt b { font-family: var(--gg-serif); font-size: 18px; color: var(--gg-ink); }
.gi-guess .gg-rX { color: var(--gg-gold); } .gi-guess .gg-rX .gg-rk { background: radial-gradient(circle, #fff6d8, transparent 70%); }
.gi-guess .gg-rS { color: var(--gg-red); } .gi-guess .gg-rA { color: var(--gg-orange); } .gi-guess .gg-rB { color: var(--gg-ok); }
.gi-guess .gg-rC { color: var(--gg-blue); } .gi-guess .gg-rD { color: var(--gg-muted); }
.gi-guess p.gg-cnt { margin: 0 0 10px !important; color: var(--gg-ink-2) !important; }
.gi-guess p.gg-place { margin: -2px 0 12px !important; font-size: 14px !important; font-weight: 700; line-height: 1.2 !important; color: var(--gg-ink) !important; }
.gi-guess .gg-place span { font-size: 12px; font-weight: 400; color: var(--gg-muted); margin-right: 8px; }
.gi-guess .gg-place b { font-family: var(--gg-latin); font-variant-numeric: lining-nums; font-size: 28px; margin-right: 2px; vertical-align: -2px; }
.gi-guess .gg-place b.gg-place-x { font-family: var(--gg-serif); font-size: 20px; color: var(--gg-gold); vertical-align: -1px; letter-spacing: .08em; }
.gi-guess .gg-place small { font-size: 12px; font-weight: 400; color: var(--gg-ink-2); margin-left: 2px; }
.gi-guess .gg-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 8px; margin: 0 0 12px; font-size: 11px; color: var(--gg-ink-2); }
/* スマホは3つを同じ幅で1列に */
@media (max-width: 480px) { .gi-guess .gg-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; gap: 6px; } .gi-guess .gg-stats div { padding: 4px 2px; } }
.gi-guess .gg-stats div { background: var(--gg-paper-2); border-radius: 6px; padding: 4px 10px; }
.gi-guess .gg-stats b { display: block; font-size: 17px; color: var(--gg-ink); }
.gi-guess .gg-stats b small { font-size: 11px; font-weight: 700; margin-left: 1px; }
.gi-guess .gg-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gi-guess .gg-btn { display: inline-block; font: inherit; font-weight: 700; font-size: 14px; border: 0; border-radius: 6px; padding: 10px 16px; background: var(--gg-fill); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.4; }
.gi-guess .gg-btn:hover, .gi-guess .gg-btn:focus { color: #fff; text-decoration: none; opacity: .9; }
.gi-guess .gg-btn.gg-sub, .gi-guess .gg-btn.gg-sub:hover { background: var(--gg-paper-2); color: var(--gg-ink); border: 1px solid var(--gg-line); }
.gi-guess .gg-more { display: inline-flex; align-items: center; gap: 4px; margin: 12px auto 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--gg-ink-2); cursor: pointer; padding: 4px 6px; }
.gi-guess .gg-more:hover { color: var(--gg-ink); }
.gi-guess .gg-chev { width: 12px; height: 12px; transition: transform .25s ease; }
.gi-guess .gg-more[aria-expanded="true"] .gg-chev { transform: rotate(180deg); }
.gi-guess .gg-logwrap { display: none; }
.gi-guess .gg-logwrap.gg-open { display: block; animation: gg-pop .25s ease; }
/* X で共有（X のロゴ入りの黒いボタン） */
.gi-guess .gg-btn.gg-x { display: inline-flex; align-items: center; gap: 8px; background: #000; color: #fff; border-radius: 999px; padding: 10px 20px 10px 16px; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); transition: transform .1s, box-shadow .1s, background .15s; }
.gi-guess .gg-btn.gg-x:hover { background: #222; opacity: 1; }
.gi-guess .gg-btn.gg-x:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.gi-guess .gg-xlogo { width: 16px; height: 16px; flex: 0 0 16px; }
.gi-guess .gg-btn.gg-sub { border-radius: 999px; padding: 9px 18px; }

/* 当てたあとのキャラの紹介（キャラページの「どんなキャラ？」の最初の段落） */
.gi-guess .gg-solved .gg-body { flex-wrap: wrap; }
.gi-guess p.gg-about { flex: 1 0 100%; margin: 0 !important; padding: 10px 2px 0 !important; border-top: 1px solid var(--gg-line); font-size: 13px !important; line-height: 1.75 !important; color: var(--gg-ink-2) !important; animation: gg-pop .4s ease; }
/* カードが広いとき（PC）は、紹介文を項目の右の空いた所に置く */
.gi-guess .gg-card { container-type: inline-size; }
@container (min-width: 560px) {
  .gi-guess .gg-solved .gg-body { flex-wrap: nowrap; align-items: center; }
  .gi-guess .gg-card.gg-solved dl { flex: 0 0 auto; }
  .gi-guess p.gg-about { flex: 1 1 0; align-self: stretch; display: flex; align-items: center; padding: 4px 4px 4px 18px !important; border-top: 0; border-left: 1px solid var(--gg-line); }
}

/* 結果の文の答えのキャラ名 */
.gi-guess .gg-cnt b.gg-ans { color: var(--gg-ink); font-weight: 700; }
/* 選択履歴で正解したキャラのバッジ */
.gi-guess .gg-hitw { position: relative; display: inline-block; margin-bottom: 4px; }
.gi-guess .gg-who-hit img, .gi-guess .gg-who-hit .gg-noimg { box-shadow: 0 0 0 2px var(--gg-paper), 0 0 0 4px var(--gg-ok); }
.gi-guess .gg-okb { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: var(--gg-ok); color: #fff; font-size: 9px; font-weight: 700; line-height: 1; letter-spacing: .08em; padding: 2px 5px 2px 6px; border-radius: 999px; white-space: nowrap; box-shadow: 0 0 0 1.5px var(--gg-paper); }
.gi-guess .gg-who-hit { font-weight: 700; color: var(--gg-ok); }
