/* まなべる花札 こいこい — game visual system
   Decorative layers use CSS and the licensed card artwork already in the game.
   The board and educational controls retain high contrast and clear touch targets. */
:root {
  --hana-ink: #243b31;
  --hana-night: #142b29;
  --hana-cedar: #214c3c;
  --hana-rust: #ab4437;
  --hana-rust-dark: #86382f;
  --hana-gold: #c5a46a;
  --hana-gold-light: #e9d5a3;
  --hana-paper: #f8f0dd;
  --hana-paper-light: #fffcf3;
}
body {
  color: var(--hana-ink);
  background: #efe7d4;
}
.shell {
  background:
    radial-gradient(ellipse at 92% 5%, #e4d5b874 0%, transparent 43%),
    radial-gradient(ellipse at 2% 75%, #eadabd77 0%, transparent 45%),
    repeating-linear-gradient(0deg, #fff7e324 0 1px, transparent 1px 5px),
    #f5eee0;
}
.page {
  max-width: 760px;
  padding: 15px 16px 26px;
}
.topbar {
  border-bottom: 1px solid #d9c8ac;
  padding: 5px 1px 14px;
  margin-bottom: 17px;
}
.brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  letter-spacing: .065em;
  color: #233e30;
  font-size: 17px;
}
.brand .seal {
  display: inline-grid;
  place-items: center;
  margin-right: 5px;
  width: 33px;
  height: 33px;
  border-radius: 4px;
  border: 2px solid #a64b3b;
  background: #b94b3b;
  color: #fff2d8;
  font-size: 21px;
  text-shadow: 0 1px #633328;
  transform: rotate(-7deg);
  box-shadow: 0 2px 0 #9e362c4d;
}
.navsmall { color: #966a48; font-size: 13px; }
.quiet {
  border: 1px solid #ceba94;
  border-radius: 7px;
  background: linear-gradient(#fffdf4,#f0e5d1);
  color: #284639;
  font-weight: 750;
  box-shadow: 0 2px 0 #cfbfa272;
}
.hero {
  min-height: 298px;
  border-radius: 11px 36px 11px 11px;
  border: 1px solid #a98b60;
  padding: 30px 25px;
  background:
    radial-gradient(circle at 79% 17%, #e8bb755c 0 8%, transparent 8.4%),
    radial-gradient(ellipse at 94% 105%, #5c786850, transparent 50%),
    repeating-linear-gradient(-26deg,#fff4dc05 0 1px,transparent 1px 12px),
    linear-gradient(135deg,#173a35 0%,#205243 59%,#102e2c 100%);
  box-shadow: inset 0 0 0 8px #c7a57622, inset 0 0 0 9px #e0c19050, 0 15px 26px #193e2f39;
  isolation: isolate;
}
.hero::before {
  content: "✿";
  position: absolute;
  right: 50px;
  top: -34px;
  color: #e8c78c18;
  font-family: Georgia,serif;
  font-size: 242px;
  transform: rotate(-25deg);
  pointer-events: none;
}
.hero::after {
  content: "十二の花に、出会う旅";
  left: 25px;
  right: auto;
  top: auto;
  bottom: 23px;
  width: auto;
  height: auto;
  border: none;
  border-top: 1px solid #d7bd8466;
  border-radius: 0;
  padding-top: 8px;
  font-size: 10px;
  font-weight: 750;
  color: #e9d0a3;
  letter-spacing: .25em;
}
.hero .eyebrow {
  color: #f3d6a1;
  font-size: 10px;
  letter-spacing: .23em;
}
.hero h1 {
  position: relative;
  font-size: clamp(31px,8vw,39px);
  max-width: 255px;
  letter-spacing: .12em;
  line-height: 1.42;
  margin: 28px 0 15px;
  text-shadow: 0 3px 6px #081c1b92;
  z-index: 2;
}
.hero p { max-width: 196px; font-size: 12px; color: #f4e8d0; }
.hero-cards {
  right: -4px;
  top: 108px;
  transform: rotate(8deg);
  filter: drop-shadow(0 13px 9px #071b17a8);
}
.hero-cards img {
  border: 1px solid #d7b879;
  width: 71px;
  box-shadow: 0 7px 12px #041b15c5;
}
.hero-cards img:nth-child(2) {left:30px; top:17px;}
.hero-cards img:nth-child(3) {left:54px; top:44px;}
.sectionhead {
  margin: 28px 0 13px;
  padding-bottom: 9px;
  border-bottom: 1px solid #d6c5a6;
}
.sectionhead h2 {
  font-family: "Yu Mincho","Hiragino Mincho ProN",serif;
  letter-spacing: .09em;
  font-size: 21px;
  color: #274a3b;
}
.sectionhead h2::before {
  content:"";
  display:inline-block;
  height:15px;
  width:4px;
  margin-right:9px;
  background:#ad5d42;
  vertical-align:-1px;
}
.sectionhead small { color: #92734c; letter-spacing: .1em; }
.primary {
  border-radius: 9px;
  border: 1px solid #8f342b;
  background: linear-gradient(180deg,#b94b3c,#983a32);
  color: #fff8eb;
  box-shadow: 0 3px 0 #772e2b, 0 7px 12px #482b2232;
}
.secondary {
  border-radius: 9px;
  border: 1px solid #c7af83;
  color: #294638;
  background: linear-gradient(180deg,#fefaf0,#ecdfc9);
  box-shadow: 0 2px 0 #c7b38a;
}
.chip { border-radius: 8px; background: #fff9ed; border-color: #cdbd9e; }
.chip.active { background:#235442; border-color:#235442; color:#fff6e6; }
.mode-card {
  border-radius: 9px;
  border-color: #d9c9aa;
  box-shadow: 0 5px 13px #3d302012;
}
.mode-card h3 {
  font-family: "Yu Mincho","Hiragino Mincho ProN",serif;
  font-size: 24px;
  margin: 11px 0 4px;
  letter-spacing: .055em;
}
.mode-card p { color:#685d4c; line-height: 1.7; }
.mode-card.story-entry {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  color: #fff9e9;
  border: 1px solid #b2925c;
  background:
    radial-gradient(circle at 94% 80%,#d6ae7359 0 14%,transparent 14.5%),
    radial-gradient(circle at 80% 5%,#889d8060 0%,transparent 60%),
    linear-gradient(125deg,#234434,#37624c 78%,#183829);
  box-shadow: inset 0 0 0 5px #ebd4a21c, 0 7px 16px #24482b38;
}
.story-entry::before {
  content: "壱";
  position: absolute;
  right: 63px;
  bottom: -25px;
  font: 92px "Yu Mincho",serif;
  color: #f1daac1e;
  pointer-events: none;
}
.story-entry .tag { color:#f7ddb1;background:#c79e5347; }
.story-entry p { color:#dcd7c5; }
.story-entry h3, .story-entry button {position:relative;z-index:1;}
.mode-card.free-entry {
  min-height: 137px;
  border-left: 5px solid #9d5c48;
  background:
    radial-gradient(circle at 95% 15%,#d6bba94f,transparent 42%),
    linear-gradient(#fbf2df,#f2e7d3);
}
.free-entry .tag { background:#ead7c0;color:#8d4f39; }
.mode-card.tutor-entry {
  position:relative;
  margin-top: 15px;
  border: 1px solid #d0ad68;
  border-left: 5px solid #af4a35;
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg,#a56b2407 0 1px,transparent 1px 6px),
    linear-gradient(110deg,#fff9e8,#f6e3bb);
  box-shadow: 0 6px 17px #75583424;
}
.tutor-entry::before {
  content: "✿";
  position: absolute;
  right: 9px;
  top: 5px;
  color:#c58a5340;
  font-size:54px;
  line-height:1;
  pointer-events:none;
}
.tutor-entry h3 { font-size:21px; max-width:195px; }
.tutor-entry .tag { color:#75422c;background:#efd4a1; }
.mode-card.study-entry {
  background:linear-gradient(110deg,#fffcf4,#f9f2e5);
  border-left: 3px solid #c7a574;
  min-height: 91px;
}
.study-entry strong {font-family:"Yu Mincho",serif;font-size:17px;letter-spacing:.035em}
.study-entry p { color:#8b806e; }
.panel {
  border-radius: 12px;
  border:1px solid #e2cfab;
  background:linear-gradient(175deg,#fffaf0,#faf4e7);
  box-shadow: 0 4px 13px #513a2014;
}
.chapter-title {
  font-family:"Yu Mincho","Hiragino Mincho ProN",serif;
  color:#244837;
}
.month {
  position:relative;
  overflow:hidden;
  border:1px solid #cfbea2;
  border-radius:9px;
  background:linear-gradient(155deg,#fffaf0,#f0e6d4);
  box-shadow:0 2px 0 #c4b297;
}
.month::after {
  content:"✿";
  position:absolute;
  right:-8px;
  bottom:-23px;
  font-family:serif;
  color:#b6995b26;
  font-size:75px;
  pointer-events:none;
}
.month strong {font-size:27px;position:relative;z-index:1}
.month span {position:relative;z-index:1;color:#665f50}
.month.ready {background:#fff5db;border:2px solid #af6b44}
.month.cleared {background:#e3eee0;border:1px solid #8fba99}
.gameheader {
  position:relative;
  background:
    radial-gradient(ellipse at 95% 10%,#6b8a6a71,transparent 46%),
    linear-gradient(115deg,#17362f,#244c3e 70%,#122d29);
  border:1px solid #b29467;
  border-radius:11px;
  padding:18px 17px;
  box-shadow:inset 0 0 0 5px #e0c78c19,0 5px 13px #1c3b2a24;
}
.gameheader::after {
  content:"✿";
  position:absolute;
  right:10px;
  bottom:-17px;
  font-size:72px;
  opacity:.075;
  pointer-events:none;
}
.gameheader .game-score {
  font-family:"Yu Mincho",Georgia,serif;
  font-size:29px;
  letter-spacing:.065em;
  color:#ffe8a8;
}
.tabletop {
  border:7px solid #755033;
  outline:2px solid #2c4c38;
  border-radius:18px;
  background:
    radial-gradient(ellipse at 50% 25%,#3773577d,transparent 60%),
    repeating-linear-gradient(45deg,#d1edca06 0 1px,transparent 1px 7px),
    repeating-linear-gradient(-45deg,#d1edca06 0 1px,transparent 1px 7px),
    linear-gradient(#20523d,#123e31);
  box-shadow:
    inset 0 0 0 2px #b99158,
    inset 0 0 20px #061e16b8,
    0 11px 21px #47331e38;
  padding: 12px 9px 16px;
}
.tabletop h3 {
  color: #f2e9cd;
  font-size:12px;
  letter-spacing:.1em;
  text-shadow:0 2px 2px #15362a;
}
.tabletop h3 em {color:#f8d68c}
.tabletop .sublabel { color:#ded7b8 }
.tabletop .deckline { border-bottom:1px solid #e8dcb820; padding-bottom:4px }
.back {
  border:2px solid #e9c77f;
  background: linear-gradient(135deg,#a0312c,#bd4f3c,#8f2526);
  box-shadow:inset 0 0 0 4px #9b2525,inset 0 0 0 5px #f6dba6,0 3px 6px #0a261cb5;
}
.card-slot .hana {
  border:1px solid #e9ddb9;
  background: #f4eacb;
  box-shadow: 0 3px 6px #061b139e;
}
.card-slot .card-name {
  min-height:32px;
  padding:4px 1px;
  border:1px solid #d8bb84;
  border-radius:4px;
  background:linear-gradient(#fff7d8,#e9deb8);
  color:#2c4035;
  box-shadow:0 2px 0 #b0905640;
}
.card-name strong {font-size:10px;color:#375645}
.card-name span {font-size:9px;color:#72634f}
.hana.playable { outline:2px solid #e8d08c; }
.hana.selected {outline:3px solid #ffd35b; box-shadow:0 0 0 2px #fff4b2,0 5px 11px #051b10}
.hana.hint {box-shadow:0 0 0 3px #bbebb0,0 4px 9px #071d16}
.tutorial-panel {
  position:relative;
  overflow:hidden;
  border:1px solid #bb985f;
  border-left:5px solid #ad4939;
  border-radius:8px;
  background:
    repeating-linear-gradient(0deg,#e1b9730d 0 1px,transparent 1px 6px),
    linear-gradient(115deg,#fffbee,#f4e5c6);
  color:#384a37;
  box-shadow:0 5px 10px #3b2c1b1e;
}
.tutorial-panel::after {
  content:"花";
  position:absolute;
  right:-10px;
  top:-26px;
  font:116px "Yu Mincho",serif;
  color:#a66b3520;
  pointer-events:none;
}
.tutorial-panel .tutor-kicker {font-size:11px;color:#a85b3b}
.tutorial-panel strong {
  font-family:"Yu Mincho",Georgia,serif;
  font-size:18px;
  color:#284936;
}
.tutorial-panel p {position:relative;z-index:1}
.hand-help {
  border:1px solid #d7ad68;
  background:linear-gradient(130deg,#fff9df,#f8e5b2);
  color:#30432e;
}
.hand-instruction { color:#ffe5a5 }
.controlpad {
  margin-top:17px;
  border:1px solid #d4b88a;
  border-radius:9px;
  background:linear-gradient(#fffdf4,#f3e9d7);
  box-shadow:0 4px 11px #624b2a19;
}
.controlpad strong {font-family:"Yu Mincho",serif;font-size:18px;color:#274a39}
.controlpad .tag {color:#805b3e;background:#ead9b7}
.controlpad .explain {border-left:3px solid #b24d3d;color:#4c624f;line-height:1.75}
.notice {background:#f7e9c9;color:#6c4b35;border:1px solid #dfc896}
.result .big {color:#a34535;text-shadow:0 2px #ead8b0}
.stat {border:1px solid #e1ceb0;border-radius:9px;background:linear-gradient(#fffdf5,#f7ecd9)}
.stat strong {color:#285341}
.footerlinks {color:#8b816e}
.footerlinks a {color:#876347}
@media(min-width:650px) {
 .page {padding:28px 32px}
 .hero {min-height:327px;padding:34px}
 .hero-cards{right:80px;top:79px}
 .hero-cards img{width:83px}
 .hero::after{left:34px}
 .handcards {gap:12px}
 .fieldcards {gap:11px}
 .mode-card.story-entry{min-height:160px}
}
@media(max-width:355px) {
 .page{padding:12px}
 .hero{padding:23px 18px;min-height:276px}
 .hero h1{max-width:205px;font-size:30px}
 .hero p{max-width:175px}
 .hero::after{left:18px}
 .hero-cards{top:120px;right:-12px}
 .hero-cards img{width:65px}
 .brand{font-size:15px;letter-spacing:.03em}
 .brand .seal{width:30px;height:30px}
 .mode-card{padding:13px}
 .mode-card h3{font-size:20px}
 .tutor-entry h3{font-size:17px}
 .sectionhead h2{font-size:18px}
 .tabletop{padding:9px 6px 13px}
 .card-name strong{font-size:9px}
 .card-name span{font-size:8px}
}
@media(prefers-reduced-motion:reduce) {
 .hero-cards,.hero-cards img {transition:none}
}

.table-nav{
  display:flex;justify-content:flex-end;align-items:center;gap:7px;
  margin:-3px 0 12px;padding:2px 1px;
}
.table-nav span{font-size:11px;color:#826f53;margin-right:auto}
.nav-jump{
  min-height:44px;padding:9px 12px;
  color:#3a5c48;background:#fef9ed;
  font-size:12px;font-weight:800;
  border:1px solid #bd9e6e;border-radius:8px;
  box-shadow:0 2px 0 #c7b28b;
}
.nav-jump:active{transform:translateY(2px);box-shadow:none}
@media(max-width:355px){.nav-jump{padding:8px 10px;font-size:11px}}
