/* pzlers 公式Web 各パズルのページ。site.css(トップと同じ書体・色・ボタン・スマホの枠)の上に重ねる。
   パズルの色は body の --c。飾りの影・グラデーション文字は足さない */

/* ---------- ヒーロー: 名前と盤。スマホでは名前 → 盤 → 説明の順 ---------- */
.p-hero { padding: 16px 0 88px; }
.p-hero-in { display: grid; gap: 28px; grid-template-areas: "head" "stage" "body"; }
.p-hero-in > * { min-width: 0; }
.p-head { grid-area: head; }
.p-stage { grid-area: stage; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.p-body { grid-area: body; }
@media (min-width: 1020px) {
  .p-hero { padding: 32px 0 112px; }
  .p-hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "head stage" "body stage"; column-gap: 64px; row-gap: 0; align-items: start; }
  .p-head { align-self: end; }
  .p-stage { position: sticky; top: 16px; }
}
.p-crumbs { display: flex; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.p-crumbs a { color: var(--ink-2); text-decoration: none; }
.p-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.p-kicker { margin-top: 22px; font-size: 15px; font-weight: 800; color: var(--c); }
.p-head h1 { word-break: keep-all; overflow-wrap: anywhere; margin-top: 10px; font-weight: 900; font-size: clamp(40px, 6.4vw, 68px); line-height: 1.12; letter-spacing: -0.03em; font-feature-settings: "palt" 1; }
.p-body .lead { margin-top: 0; }
@media (min-width: 1020px) { .p-body { margin-top: 22px; } }
.p-play-lead { margin-top: 22px; max-width: 32em; font-size: 13px; color: var(--ink-3); }

.p-stage .player { border-radius: 44px; }
.p-stage .player:not([data-live]) { cursor: pointer; }
.p-stage-note { max-width: 340px; text-align: center; font-size: 13px; color: var(--ink-3); }
.p-stage-note a { color: var(--ink); font-weight: 800; white-space: nowrap; }

/* 解き終えたあと: 盤の下に出す小さな面(画面を覆わない) */
.p-after { width: min(420px, 100%); padding: 20px 22px 22px; border-radius: 18px; background: var(--bg-2); box-shadow: inset 4px 0 0 var(--c); }
.p-after[hidden] { display: none; }
.p-after-k { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.p-after-stat { margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.p-after-stat:empty { display: none; }
.p-after-body { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.p-after-act { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.p-after-act .btn { min-height: 46px; padding: 0 18px; font-size: 14px; }
.p-after-act .btn-ink:hover { background: var(--c); }
@media (prefers-reduced-motion: no-preference) {
  .p-after:not([hidden]) { animation: p-rise .35s cubic-bezier(.2, .8, .2, 1); }
  @keyframes p-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---------- 見出し ---------- */
.p-h2 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 900; line-height: 1.2; letter-spacing: -0.035em; font-feature-settings: "palt" 1; margin-bottom: 28px; }
.p-h2-sub { font-size: clamp(22px, 3vw, 30px); }

/* ---------- 面白さ ---------- */
.p-fun { padding: 88px 0; background: var(--bg-2); }
.p-fun-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
@media (min-width: 900px) { .p-fun-list { grid-template-columns: repeat(3, 1fr); } }
.p-fun-list li { display: grid; grid-template-columns: 18px 1fr; column-gap: 14px; align-items: baseline; padding: 20px 22px; border-radius: var(--r); background: var(--bg); }
/* 番号は付けない(本人指示「番号はいらない」)。ロゴのマスと同じ角丸の小さな四角 */
.p-fun-mark { grid-row: span 2; align-self: start; margin-top: 7px; width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.p-fun-list h3 { font-size: 21px; font-weight: 900; line-height: 1.4; letter-spacing: -0.02em; }
.p-fun-list p { margin-top: 4px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
/* 短い一文が1〜2文字だけ次の行に落ちないよう、行の長さをそろえる。日本語は文節で折る */
.p-fun-list h3, .p-fun-list p, .p-body .lead, .p-fun-catch { text-wrap: balance; }
:lang(ja) .p-fun-list h3, :lang(ja) .p-fun-list p, :lang(ja) .p-body .lead, :lang(ja) .p-fun-catch { word-break: auto-phrase; }
/* ひと目で掴む一行(試作: ウソワン日本語のみ) */
.p-h2:has(+ .p-fun-catch) { margin-bottom: 8px; font-size: 15px; letter-spacing: 0; color: var(--ink-3); }
.p-fun-catch { margin-bottom: 26px; font-size: clamp(34px, 9vw, 56px); font-weight: 900; line-height: 1.2; letter-spacing: -0.03em; color: var(--c); font-feature-settings: "palt" 1; }
/* キャッチがあるときは、3つを1枚にまとめて流れとして読ませる */
.p-fun-sub { margin: -14px 0 26px; font-size: clamp(20px, 5.4vw, 28px); font-weight: 900; letter-spacing: -0.02em; }
.p-fun-catch + .p-fun-list, .p-fun-sub + .p-fun-list { gap: 0; padding: 4px 22px; border-radius: var(--r); background: var(--bg); }
@media (min-width: 900px) { .p-fun-catch + .p-fun-list, .p-fun-sub + .p-fun-list { padding: 8px 28px; column-gap: 28px; } }
.p-fun-catch + .p-fun-list li, .p-fun-sub + .p-fun-list li { padding: 18px 0; border-radius: 0; background: none; }
.p-fun-catch + .p-fun-list li + li, .p-fun-sub + .p-fun-list li + li { border-top: 1px solid var(--line); }
@media (min-width: 900px) { .p-fun-catch + .p-fun-list li + li, .p-fun-sub + .p-fun-list li + li { border-top: 0; } }
.p-fun-cta { margin-top: 28px; }
.p-fun-cta .btn:hover { background: var(--c); color: #fff; }

/* ---------- ルールと操作 ---------- */
.p-rules { padding: 96px 0; }
.p-rules-in { display: grid; gap: 56px; }
@media (min-width: 1020px) { .p-rules-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 72px; } }
.p-rule-list { margin: 0; padding: 0; list-style: none; counter-reset: rule; display: grid; gap: 14px; }
.p-rule-list li { counter-increment: rule; display: grid; grid-template-columns: 44px 1fr; align-items: start; font-size: 17px; font-weight: 700; line-height: 1.75; }
.p-rule-list li::before { content: counter(rule, decimal-leading-zero); font-family: var(--mono); font-weight: 800; font-size: 14px; color: var(--c); padding-top: .3em; }
.p-goal { margin-top: 22px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--c); font-size: 15px; font-weight: 700; }
.p-goal .mono { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: var(--c); color: #fff; }
.p-tip { margin-top: 28px; }
.p-tip h3 { font-size: 18px; font-weight: 900; letter-spacing: -0.02em; }
.p-tip p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.p-controls { margin: 0; display: grid; gap: 0; }
.p-controls > div { padding: 16px 0; border-top: 1px solid var(--line); }
.p-controls > div:last-child { border-bottom: 1px solid var(--line); }
.p-controls dt { font-weight: 900; font-size: 16px; }
.p-controls dd { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

/* ---------- アプリ ---------- */
.p-app { padding: 96px 0; background: #0e0e10; color: #f2f2ef; }
.p-app-in { display: grid; gap: 48px; }
@media (min-width: 1020px) { .p-app-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 72px; align-items: center; } }
.p-app-lead { color: #b4b4bb; max-width: 32em; }
.p-app-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.p-app-list li { position: relative; padding-left: 22px; font-weight: 700; }
.p-app-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.p-tech-k { margin-top: 28px; font-size: 13px; font-weight: 800; color: #b4b4bb; }
.p-tech { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.p-tech li { padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px #3a3a40; font-size: 13px; font-weight: 700; }
.p-app .store { margin-top: 28px; color: #b4b4bb; }
.p-app .store .mono { background: #2a2a2f; color: #f2f2ef; }
.p-store-links { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }
.p-app .p-store-links .btn-ink { background: #f2f2ef; color: #0e0e10; }
.p-legal { margin-top: 18px; display: flex; gap: 18px; font-size: 13px; }
.p-legal a { color: #b4b4bb; }
.p-app .app-shots img { outline-color: #2a2a2f; }
.p-app .app-shots figcaption { color: #b4b4bb; font-weight: 700; }

/* ---------- ほかのパズル ---------- */
.p-others { padding: 88px 0 96px; }
.p-other-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
@media (min-width: 680px) { .p-other-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .p-other-list { grid-template-columns: repeat(3, 1fr); } }
.p-other { display: flex; gap: 16px; align-items: center; padding: 12px; border-radius: 18px; background: var(--bg-2); text-decoration: none; }
.p-other:hover { box-shadow: inset 0 0 0 2px var(--c); }
.p-other-plate { flex: none; width: 76px; height: 76px; border-radius: 12px; background: var(--c); display: grid; place-items: center; }
.p-other-plate img { width: 60px; height: 60px; border-radius: 6px; background: #fff; }
.p-other-text { display: grid; gap: 1px; min-width: 0; }
.p-other-text strong { font-size: 18px; font-weight: 900; letter-spacing: -0.02em; }
.p-other-text span:last-child { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

@media (max-width: 600px) {
  .p-hero { padding: 4px 0 56px; }
  .p-fun, .p-rules, .p-app, .p-others { padding: 60px 0; }
  .p-kicker { margin-top: 14px; }
  .nav-links a { padding: 6px 8px; }
}
@media (max-width: 440px) { .nav-links a[href="#rules"] { display: none; } }
