@font-face { font-family: "Mind War Sans"; src: url("assets/fonts/Montserrat-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mind War Sans"; src: url("assets/fonts/Montserrat-SemiBold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }
:root { --learn-line: #d9ddda; --learn-gold: #a77e3e; --learn-panel: #fbfbfa; --learn-ink: #1c201d; }
body { background: var(--paper); color: var(--learn-ink); font-family: "Mind War Sans", Arial, sans-serif; }
.learn-header { height: 112px; padding: 26px clamp(24px, 5vw, 72px); position: relative; display: flex; justify-content: center; align-items: flex-start; }
.learn-header .brand { width: 80px; }
.learn-header .brand img { height: 64px; }
.learn-back { position: absolute; top: 49px; left: clamp(24px, 5vw, 72px); color: #3e4441; font-size: 13px; font-weight: 600; text-decoration: underline; text-decoration-color: #b2b9b6; text-underline-offset: 6px; }
.learn-back:hover, .learn-footer a:hover { color: #000; text-decoration-color: #000; }
.learn-main { max-width: 1180px; margin: 0 auto; padding: 38px 28px 100px; }
.learn-hero { max-width: 850px; margin: 0 auto 58px; text-align: center; }
.learn-hero h1 { margin: 0; font-family: "Iowan Old Style", "Baskerville", Georgia, serif; font-size: clamp(52px, 7vw, 86px); font-weight: 400; letter-spacing: -.025em; line-height: 1.02; }
.learn-hero > p { max-width: 660px; margin: 24px auto 0; color: #59605c; font-size: 17px; line-height: 1.65; }
.game-shell, .lesson-card { border: 1px solid var(--learn-line); border-radius: 22px; background: var(--learn-panel); box-shadow: inset 0 1px 0 #fff, 0 22px 60px #2029210d; overflow: hidden; }
.game-heading { padding: clamp(28px, 4vw, 46px); display: flex; justify-content: space-between; align-items: flex-start; gap: 35px; }
.game-step { margin: 0 0 10px; color: var(--learn-gold); font-family: "Iowan Old Style", "Baskerville", Georgia, serif; font-size: 16px; font-style: italic; }
.game-heading h2, .lesson-card h2 { margin: 0; font-family: "Iowan Old Style", "Baskerville", Georgia, serif; font-size: clamp(34px, 4vw, 48px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.game-heading > div > p:last-child { max-width: 640px; margin: 16px 0 0; color: #565d59; font-size: 15px; line-height: 1.6; }
.reset-game { margin-top: 3px; padding: 9px 0; border: 0; border-bottom: 1px solid #aeb4b0; background: transparent; color: #515853; font: 600 12px "Mind War Sans", sans-serif; cursor: pointer; }
.reset-game:hover { color: #000; border-color: #000; }
.lesson-progress { margin: 0; padding: 0 clamp(25px, 4vw, 46px) 25px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; list-style: none; }
.lesson-progress li { padding-top: 12px; border-top: 2px solid #e0e3e0; display: flex; gap: 8px; align-items: center; color: #969c97; font-size: 10px; font-weight: 600; }
.lesson-progress span { width: 20px; height: 20px; border: 1px solid #d3d7d3; border-radius: 50%; display: grid; place-items: center; font-size: 9px; }
.lesson-progress li.is-active { border-color: #a77e3e; color: #6f5226; }
.lesson-progress li.is-active span { border-color: #a77e3e; background: #a77e3e; color: #fff; }
.lesson-progress li.is-done { border-color: #777e79; color: #59605b; }
.lesson-progress li.is-done span { border-color: #777e79; color: #3c423e; }
.table-stage { min-height: 420px; padding: 36px clamp(25px, 5vw, 58px); position: relative; display: grid; grid-template-columns: 245px 1fr; grid-template-areas: "opponents coach" "hand coach"; gap: 28px clamp(30px, 5vw, 70px); align-items: center; background: radial-gradient(circle at 70% 50%, #343934 0, #232723 48%, #191c19 100%); color: #f7f6f1; box-shadow: inset 0 18px 30px #00000020, inset 0 -1px 0 #000; }
.table-stage::after { content: ""; position: absolute; inset: 9% 7% 9% 34%; border: 1px solid #ffffff0e; border-radius: 30px; pointer-events: none; }
.opponent-group, .player-zone, .coach-message { position: relative; z-index: 1; }
.opponent-group { grid-area: opponents; align-self: end; }
.player-zone { grid-area: hand; align-self: start; }
.coach-message { grid-area: coach; }
.opponent-group > p, .player-zone > p, .card-picker > p { margin: 0 0 15px; color: #c3c7c1; font-size: 12px; font-weight: 600; }
.opponent-list { display: grid; gap: 9px; }
.opponent { width: 100%; padding: 11px 13px; border: 1px solid #ffffff17; border-radius: 12px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; background: #ffffff08; color: #fff; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.opponent > span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #0f110f; color: #d8c098; font-family: "Iowan Old Style", Georgia, serif; font-size: 17px; }
.opponent strong { font-size: 13px; }
.opponent small { color: #9da39d; font-size: 10px; }
.opponent:hover { background: #ffffff10; transform: translateX(2px); }
.opponent.is-selected { border-color: #c7a66d; background: #b18b4d1c; box-shadow: 0 0 0 1px #c7a66d4d; }
.opponent.is-active-turn { border-color: #c7a66d; background: #b18b4d24; animation: active-seat 1.4s ease-in-out infinite alternate; }
.coach-message { min-height: 325px; padding: clamp(28px, 4vw, 48px); border: 1px solid #ffffff19; border-radius: 26px; display: flex; flex-direction: column; justify-content: center; background: #111411c7; text-align: left; box-shadow: 0 20px 55px #0005; }
.coach-message::before { content: "✦"; margin-bottom: 11px; color: #c6a365; font-size: 13px; }
.coach-message p { margin: 0; }
.coach-title { font-family: "Iowan Old Style", "Baskerville", Georgia, serif; font-size: clamp(25px, 3vw, 36px); font-weight: 700; line-height: 1.08; }
.coach-title + p { margin-top: 10px; color: #bfc4be; font-size: 12px; line-height: 1.55; }
.coach-message.is-success { border-color: #bfa36e99; }
.coach-message.is-miss { border-color: #ffffff2b; }
.turn-log { max-height: 105px; margin: 18px 0 0; padding: 0; overflow: auto; list-style: none; text-align: left; }
.turn-log:empty { display: none; }
.turn-log li { padding: 7px 0; border-top: 1px solid #ffffff13; display: grid; grid-template-columns: 42px 1fr auto; gap: 8px; align-items: center; font-size: 9px; }
.turn-log span { color: #aeb4ae; }
.turn-log p { color: #e1e4df; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turn-log strong { font-size: 9px; font-weight: 600; }
.log-yes, .log-taken { color: #d4b77e; }
.log-no { color: #b8bdb8; }
.player-zone { text-align: left; }
.player-zone > p { color: #c3c7c1; }
.player-hand { min-height: 110px; display: flex; justify-content: flex-start; align-items: center; padding-left: 12px; }
.hand-card { width: 72px; margin-left: -24px; filter: drop-shadow(0 13px 15px #0008); transition: transform .3s; }
.hand-card:first-child { margin-left: 0; transform: rotate(-6deg); }
.hand-card:nth-child(2) { transform: translateY(-3px) rotate(2deg); }
.hand-card:nth-child(3) { transform: translateY(3px) rotate(7deg); }
.hand-card:nth-child(4) { transform: translateY(-2px) rotate(-2deg); }
.hand-card:nth-child(5) { transform: translateY(2px) rotate(5deg); }
.hand-card:hover { z-index: 2; transform: translateY(-10px) rotate(0); }
.ask-builder { padding: 27px clamp(25px, 4vw, 46px); display: grid; grid-template-columns: 1fr minmax(270px, .7fr); gap: 35px; align-items: center; border-bottom: 1px solid var(--learn-line); }
.card-picker > p { color: #4c534e; }
.card-options { display: flex; gap: 10px; flex-wrap: wrap; }
.card-option { min-width: 116px; padding: 9px 12px 9px 8px; border: 1px solid #d9ddda; border-radius: 11px; display: flex; align-items: center; gap: 8px; background: #fff; color: #252a27; font: 600 12px "Mind War Sans", sans-serif; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card-option img { width: 35px; border-radius: 3px; }
.card-option:hover { border-color: #aeb4b0; transform: translateY(-1px); }
.card-option.is-selected { border-color: var(--learn-gold); box-shadow: 0 0 0 2px #a77e3e24; }
.card-option:disabled { opacity: .45; cursor: default; transform: none; }
.ask-action { padding-left: 34px; border-left: 1px solid var(--learn-line); }
.ask-action > p { min-height: 38px; margin: 0 0 12px; color: #656c67; font-family: "Iowan Old Style", Georgia, serif; font-size: 15px; font-style: italic; line-height: 1.45; }
.make-ask, .next-turn { width: 100%; min-height: 48px; padding: 12px 18px; border: 1px solid #1c1f1c; border-radius: 999px; background: #1c1f1c; color: #fff; font: 600 13px "Mind War Sans", sans-serif; cursor: pointer; transition: transform .2s, background .2s; }
.make-ask:hover:not(:disabled), .next-turn:hover { background: #333633; transform: translateY(-1px); }
.make-ask:disabled { border-color: #d9ddda; background: #e8eae8; color: #929893; cursor: default; }
.evidence-panel { padding: clamp(27px, 4vw, 44px); }
.evidence-heading { margin-bottom: 26px; display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: end; }
.evidence-heading h3 { margin: 0; font-family: "Iowan Old Style", "Baskerville", Georgia, serif; font-size: clamp(28px, 3vw, 39px); line-height: 1.1; }
.evidence-heading > p { margin: 0; color: #6a716c; font-size: 12px; line-height: 1.55; }
.clue-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.clue-card { min-width: 0; padding: 15px; border: 1px solid #dfe2df; border-radius: 14px; background: #fff; box-shadow: 0 8px 20px #26302808; }
.clue-card.has-answer { border-color: #cbb995; background: #fffdfa; }
.clue-card-head { display: flex; gap: 10px; align-items: center; }
.clue-card-head img { width: 42px; border-radius: 4px; box-shadow: 0 4px 10px #20292114; }
.clue-card-head strong, .clue-card-head span { display: block; }
.clue-card-head strong { color: #202522; font-size: 13px; }
.clue-card-head span { margin-top: 3px; color: #8a6730; font-size: 11px; font-weight: 600; }
.clue-card > p { min-height: 30px; margin: 10px 0; color: #757c77; font-size: 10px; line-height: 1.45; }
.map-table { border-top: 1px solid #d7dbd7; }
.map-row { display: grid; grid-template-columns: .6fr 1fr 1.4fr; gap: 20px; padding: 14px 3px; border-bottom: 1px solid #e2e5e2; color: #505753; font-size: 13px; line-height: 1.45; }
.map-row strong { color: #222724; }
.map-row small { margin-top: 3px; display: block; color: #7a817c; font-size: 10px; font-weight: 400; }
.map-head { color: #777e79; font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.map-known { color: #83622d; font-weight: 600; }
.deduction-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.player-mark { min-width: 69px; padding: 5px 7px; border: 1px solid #dfe2df; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center; color: #737a75; font-size: 9px; }
.player-mark b { width: 13px; height: 13px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; }
.player-mark.is-known { border-color: #b79357; background: #a77e3e12; color: #755628; }
.player-mark.is-known b { background: #a77e3e; color: #fff; }
.player-mark.is-out { color: #a3a8a4; text-decoration: line-through; }
.player-mark.is-out b { background: #343936; color: #fff; text-decoration: none; }
.player-mark.is-possible b { border: 1px solid #cbd0cc; color: #9aa09b; }
@keyframes active-seat { from { box-shadow: 0 0 0 0 #c7a66d18; } to { box-shadow: 0 0 0 6px #c7a66d12; } }
.lesson-card { margin-top: 18px; padding: clamp(30px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr); gap: clamp(35px, 6vw, 78px); align-items: center; }
.lesson-card > div:first-child > p { margin: 18px 0 20px; color: #515955; font-size: 15px; line-height: 1.65; }
.lesson-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #353b37; font-size: 13px; }
.lesson-card li { position: relative; padding-left: 18px; }
.lesson-card li::before { content: "✦"; position: absolute; left: 0; top: 0; color: var(--learn-gold); font-size: 10px; }
.lesson-actions { padding: 26px; border: 1px solid #e0e2df; border-radius: 15px; background: #f4f4f1; text-align: center; }
.copy-lesson, .share-lesson { width: 100%; min-height: 48px; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .2s, background .2s; }
.copy-lesson { border: 1px solid #1c1f1c; background: #1c1f1c; color: #fff; box-shadow: 0 9px 20px #1c1f1c1c; }
.copy-lesson:hover { background: #333633; transform: translateY(-1px); }
.copy-lesson.is-copied { background: #3f5943; border-color: #3f5943; }
.share-lesson { margin-top: 9px; border: 1px solid #cfd3cf; background: #fff; color: #252a27; }
.copy-status { min-height: 36px; margin: 13px 0 15px; color: #666d68; font-size: 12px; line-height: 1.5; }
.ai-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 15px; }
.ai-links a { color: #3f4641; font-size: 12px; font-weight: 600; text-underline-offset: 4px; }
.learn-footer { max-width: 1120px; margin: 0 auto; padding: 26px 28px 42px; border-top: 1px solid var(--learn-line); display: flex; justify-content: space-between; gap: 20px; color: #747c77; font-size: 12px; }
.learn-footer a { color: #343a36; font-weight: 600; text-decoration: underline; text-decoration-color: #b3bab6; text-underline-offset: 5px; }
.learn-back:focus-visible, button:focus-visible, .ai-links a:focus-visible, .learn-footer a:focus-visible { outline: 2px solid var(--learn-gold); outline-offset: 4px; }
@media (max-width: 900px) {
  .table-stage { min-height: 520px; grid-template-columns: 210px 1fr; grid-template-areas: "opponents coach" "hand coach"; }
  .player-hand { min-height: 145px; }
  .evidence-heading { grid-template-columns: 1fr; gap: 12px; }
  .clue-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .learn-header { height: 95px; padding: 20px 18px; }
  .learn-header .brand { width: 72px; }
  .learn-header .brand img { height: 57px; }
  .learn-back { top: 40px; left: 18px; font-size: 11px; }
  .learn-main { padding: 37px 12px 65px; }
  .learn-hero { margin-bottom: 40px; padding-inline: 10px; }
  .learn-hero h1 { font-size: clamp(45px, 12vw, 66px); }
  .learn-hero > p { font-size: 15px; }
  .game-shell, .lesson-card { border-radius: 17px; }
  .game-heading { padding: 27px 20px 25px; }
  .game-heading h2 { font-size: 34px; }
  .reset-game { flex: 0 0 auto; font-size: 10px; }
  .lesson-progress { padding: 0 20px 20px; gap: 4px; }
  .lesson-progress li { display: block; font-size: 0; }
  .lesson-progress span { font-size: 9px; }
  .table-stage { min-height: auto; padding: 24px 20px 28px; grid-template-columns: 1fr; grid-template-areas: "coach" "hand" "opponents"; gap: 23px; }
  .table-stage::after { display: none; }
  .opponent-list { grid-template-columns: repeat(3, 1fr); }
  .opponent { padding: 10px 5px; grid-template-columns: 1fr; gap: 5px; justify-items: center; text-align: center; }
  .opponent > span { width: 32px; height: 32px; }
  .opponent small { display: none; }
  .coach-message { min-height: 210px; padding: 27px 22px; border-radius: 20px; }
  .player-zone { text-align: center; }
  .player-hand { min-height: 115px; justify-content: center; }
  .hand-card { width: 79px; margin-left: -27px; }
  .ask-builder { padding: 25px 20px 27px; grid-template-columns: 1fr; gap: 24px; }
  .card-options { display: grid; grid-template-columns: 1fr 1fr; }
  .card-option { min-width: 0; width: 100%; }
  .ask-action { padding: 21px 0 0; border-left: 0; border-top: 1px solid var(--learn-line); }
  .evidence-panel { padding: 28px 20px 32px; }
  .clue-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .clue-card { padding: 11px; }
  .clue-card-head img { width: 35px; }
  .clue-card > p { min-height: 42px; }
  .map-row { grid-template-columns: .65fr 1fr; gap: 7px 13px; }
  .map-row > :last-child { grid-column: 2; color: #777e79; font-size: 11px; }
  .deduction-chips { margin-top: 4px; }
  .player-mark { min-width: 61px; padding: 4px 6px; }
  .map-head > :last-child { display: none; }
  .lesson-card { padding: 28px 22px 33px; grid-template-columns: 1fr; gap: 28px; }
  .lesson-actions { padding: 20px; }
  .learn-footer { padding: 25px 22px 38px; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
