:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;color:#24352f;background:#f5f1e9;font-synthesis:none;-webkit-tap-highlight-color:transparent}
*{box-sizing:border-box}body{margin:0;min-width:300px}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.42;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #e09b3e;outline-offset:2px}a{color:inherit}
.shell{min-height:100dvh;background:#f5f1e9;padding-bottom:calc(28px + env(safe-area-inset-bottom))}.page{max-width:760px;margin:0 auto;padding:18px 17px 22px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}
.brand{font-family:Georgia,"Yu Mincho","Hiragino Mincho ProN",serif;letter-spacing:.1em;font-size:17px;color:#244737;font-weight:800}.brand .seal{color:#bb5c3f}.navsmall{font-size:12px;color:#738177}.quiet{border:1px solid #d6dcd5;background:#fff9;padding:10px 14px;border-radius:16px;color:#2d5244;min-height:44px}
.hero{position:relative;min-height:254px;overflow:hidden;border-radius:26px;padding:28px;background:radial-gradient(circle at 88% 22%,#476e52 0%,transparent 38%),linear-gradient(127deg,#193b31,#284b3e 72%,#153529);color:#fff;box-shadow:0 15px 35px #20452e24}
.hero:after{content:"";position:absolute;border:1px solid #f1e7c62e;width:290px;height:290px;border-radius:50%;right:-80px;top:-70px}.eyebrow{letter-spacing:.18em;text-transform:uppercase;font-size:10px;color:#d6bf83;font-weight:700}.hero h1{font-family:Georgia,"Yu Mincho",serif;font-size:32px;font-weight:500;letter-spacing:.12em;line-height:1.35;margin:17px 0 14px;max-width:260px;position:relative;z-index:2}.hero p{max-width:180px;font-size:12px;line-height:1.85;color:#e3e4d8;position:relative;z-index:2}.hero-cards{position:absolute;right:4px;top:70px;width:112px;height:165px;transform:rotate(6deg);z-index:1}.hero-cards img{width:68px;height:auto;box-shadow:0 12px 18px #102e26a6;border-radius:4px;position:absolute;transform:rotate(8deg)}.hero-cards img:nth-child(2){left:28px;top:25px;transform:rotate(-13deg)}.hero-cards img:nth-child(3){left:52px;top:53px;transform:rotate(11deg)}
.kicker{font-size:12px;letter-spacing:.12em;font-weight:800;color:#9c6749}.sectionhead{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:24px 0 12px}.sectionhead h2,.sectionhead h3{font-size:17px;margin:0;font-weight:800;letter-spacing:.03em}.sectionhead small{font-size:11px;color:#8a948c}
.panel{background:#fff;border-radius:22px;padding:18px;margin:12px 0;box-shadow:0 3px 18px #18291e0b;border:1px solid #e8e5de}.lead{margin:8px 0 16px;font-size:13px;line-height:1.8;color:#61736a}.stack{display:grid;gap:10px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.primary,.secondary,.chip{border:0;border-radius:14px;min-height:46px;padding:12px 18px;font-weight:800}.primary{background:#a94335;color:#fff;box-shadow:0 4px 11px #a9433533}.primary.dark{background:#244939}.secondary{background:#eaf0e8;color:#285342}.chip{border:1px solid #d4dfd7;background:#fff;color:#446354;min-height:44px;padding:8px 12px;font-size:12px}.chip.active{background:#284b3e;color:white;border-color:#284b3e}
.full{width:100%}.mode-card{display:grid;grid-template-columns:1fr auto;gap:10px;padding:18px;border-radius:20px;background:#fff;border:1px solid #ece8df;align-items:center}.mode-card strong{font-size:16px}.mode-card p{margin:8px 0 0;color:#859186;font-size:12px;line-height:1.65}.iconstamp{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#e8efe5;font-family:serif;font-size:22px;color:#2e5845}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.stat{background:#fff;border-radius:16px;padding:14px 8px;text-align:center}.stat strong{font-size:22px;font-family:Georgia,serif}.stat label{font-size:11px;color:#8a9189;display:block;margin-top:7px}
.month-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.month{border:1px solid #e2e3d9;background:#fff;border-radius:17px;text-align:left;padding:13px 12px;min-height:93px}.month strong{font-size:24px;font-family:Georgia,serif;color:#365743}.month span{font-size:11px;color:#92a095;display:block;margin-top:6px}.month.ready{border:2px solid #b46b46;background:#fffbf3}.month.cleared{background:#eaf3e9}.month.locked{opacity:.56}.month .mark{float:right;color:#bd6946;font-size:14px}
.chapter-title{font-size:30px;font-family:Georgia,"Yu Mincho",serif;color:#284b39;margin:6px 0}.story{font-size:14px;line-height:2;color:#50655a}.quote{border-left:3px solid #b87a55;padding-left:13px;font-size:13px;color:#738274;font-style:italic}.tag{border-radius:9px;background:#dce7dc;padding:5px 9px;color:#3a6951;font-size:11px;font-weight:700}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.gameheader{background:#193d30;color:#f3f2e4;padding:15px 15px 14px;border-radius:19px;margin:0 0 10px}.gameheader .row{align-items:start}.gameheader .game-score{font-size:24px;font-family:Georgia,serif;font-weight:700}.gameheader small{color:#c5d1bd;font-size:11px}
.tabletop{background:radial-gradient(ellipse at center,#34654c 0%,#174432 100%);border:5px solid #315742;border-radius:25px;padding:12px 10px 14px;box-shadow:0 12px 30px #14351e35;color:white}.tabletop h3{font-size:11px;letter-spacing:.13em;color:#e6eedc;font-weight:600;margin:10px 1px 9px}.tabletop h3 em{color:#e5bd7e;font-style:normal}.deckline{display:flex;gap:8px;align-items:center;justify-content:space-between;margin:8px 0}.back{background:#b12f30;border:2px solid #e3bf74;box-shadow:inset 0 0 0 4px #9b322b,inset 0 0 0 6px #e2bc74;border-radius:6px;width:36px;height:53px;display:grid;place-items:center;font-size:14px;color:#f2dcad;font-family:serif}
.fieldcards{display:grid;grid-template-columns:repeat(4,1fr);justify-items:center;gap:7px;min-height:96px}.handcards{display:flex;overflow:auto;gap:7px;padding:6px 4px 11px;scroll-snap-type:x proximity}.handcards .hana{flex:0 0 clamp(51px,16vw,72px);scroll-snap-align:start}.hana{position:relative;display:block;width:min(100%,69px);aspect-ratio:512/839;padding:0;background:#100f0c;border:0;border-radius:5px;box-shadow:0 4px 7px #081d1688;transition:transform .12s,outline .12s}.hana img{width:100%;height:100%;object-fit:fill;border-radius:4px;display:block}.hana.playable{outline:2px solid #d8bd7a;outline-offset:2px}.hana.selected{transform:translateY(-8px);outline:3px solid #f3b56b;outline-offset:3px}.hana.target{outline:3px solid #ffcf63;outline-offset:2px;animation:pulse 1.3s infinite}.hana.hint{box-shadow:0 0 0 3px #bdeab6,0 4px 9px #15381c}.hana:focus-visible{outline:3px solid #f1c56a}.tinycards{display:flex;overflow:auto;gap:4px;padding:3px 3px 7px}.tinycards .hana{flex:0 0 33px;width:33px;pointer-events:none}.tinycards .hana img{border-radius:2px}@keyframes pulse{50%{outline-color:#fff6c9}}
.controlpad{padding:14px 13px;background:#fff;border:1px solid #e9e6d7;border-radius:20px;margin:12px 0}.controlpad p{font-size:13px;line-height:1.75;margin:8px 0}.explain{border-left:3px solid #b98a48;padding:0 10px;color:#52695d}.notice{background:#f3ead7;border-radius:13px;padding:12px;font-size:13px;color:#6c573e}.choicepair{display:flex;gap:8px}.choicepair>button{flex:1}.sublabel{font-size:11px;color:#a3ab9d}.result{padding:20px 12px;text-align:center}.result .big{font-size:42px;color:#bb6940;font-family:Georgia,"Yu Mincho",serif}.result h2{font-family:Georgia,"Yu Mincho",serif;font-size:26px}.result p{line-height:1.9;color:#60776b}
.catalog-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px 8px}.catalog-grid .hana{margin:auto}.catalog-grid .capt{font-size:10px;text-align:center;margin-top:6px;color:#69786c}.catalogitem{min-width:0}.dictionary-group{margin:17px 0 24px}.dictionary-group h3{font-size:15px;margin-bottom:9px;color:#315840}
.yaku{display:grid;grid-template-columns:1fr auto;gap:8px;border-bottom:1px solid #e5e9df;padding:12px 0}.yaku strong{font-size:15px}.yaku small{color:#7a847b;font-size:12px}.yaku b{color:#aa5d3d}.yaku-cards{display:flex;gap:4px;margin-top:8px}.yaku-cards img{height:61px;width:auto;max-width:42px}.quiz-title{font-family:Georgia,serif;font-size:21px}.quiz-options{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.quiz-option{border:1px solid #ccd9d0;background:#fff;border-radius:14px;min-height:50px;color:#2f5344;font-weight:700}.quiz-option.correct{background:#d7e8d6}.quiz-option.wrong{background:#f9ddd2}.footerlinks{font-size:11px;line-height:1.8;text-align:center;color:#829086;padding:18px 10px 20px}.footerlinks a{color:#66776b}
#toast{position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));left:16px;right:16px;z-index:30;background:#253e31;color:white;padding:15px;border-radius:15px;text-align:center;font-size:13px;box-shadow:0 7px 20px #15241677}
@media(min-width:650px){.page{padding:26px 28px}.hero{min-height:278px}.hero h1{font-size:40px}.month-grid{grid-template-columns:repeat(4,1fr)}.fieldcards{grid-template-columns:repeat(8,1fr)}.fieldcards .hana{width:64px}.handcards{justify-content:center}.handcards .hana{flex-basis:67px}.catalog-grid{grid-template-columns:repeat(6,1fr)}}
@media(max-width:355px){.page{padding:12px}.hero{padding:20px}.hero h1{font-size:27px}.hero-cards{right:5px}.fieldcards{gap:6px}.fieldcards .hana{width:min(100%,63px)}.handcards .hana{flex-basis:48px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}


/* 初心者向け：すべての手札を最初から見せ、絵柄の下に札名を表示する。 */
.handcards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px 6px;overflow:visible;scroll-snap-type:none;padding:8px 2px 5px;justify-items:stretch}
.fieldcards{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 6px;align-items:start}
.card-slot{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;width:100%;height:100%}
.card-slot .hana{flex:none;width:min(100%,72px);height:auto;margin:0 auto;aspect-ratio:512/839;scroll-snap-align:none}
.card-name{width:100%;min-height:31px;padding:3px 2px;border-radius:6px;background:#f8f1d4;color:#21392e;text-align:center;line-height:1.25;overflow-wrap:anywhere}
.card-name strong{display:block;font-size:10px;font-weight:800;white-space:nowrap}
.card-name span{display:block;font-size:9px;line-height:1.22}
.tabletop .deckline h3{margin:9px 0}
.hand-help{margin:12px 0 2px;background:#fdf7e7;color:#284433;border-radius:13px;padding:12px;text-align:left}
.hand-help strong{font-size:13px;display:block}
.hand-help p{font-size:12px;margin:7px 0;line-height:1.5}
.hand-help button{margin-top:6px}
.hand-instruction{text-align:center;color:#f5e8bf;font-size:12px;font-weight:700;margin:9px 0 3px}
.tutorial-panel{border:2px solid #c79c58;border-radius:17px;padding:15px 16px;margin:0 0 12px;background:#fffbec;color:#2c4737;box-shadow:0 5px 15px #152a1e19}
.tutorial-panel .tutor-kicker{font-size:11px;color:#9b6941;font-weight:800;letter-spacing:.05em;margin-bottom:6px}
.tutorial-panel strong{display:block;font-size:16px}
.tutorial-panel p{font-size:13px;line-height:1.7;margin:9px 0 10px}
.tutorial-panel button{min-width:170px}
.tutor-entry{background:#fdf7e8;border-color:#e3c48f;margin-top:13px}
.tutor-entry .tag{background:#f3e0b5;color:#6f4a2f}
@media(min-width:650px){.handcards{grid-template-columns:repeat(8,minmax(0,1fr));gap:9px}.card-slot .hana{width:min(100%,67px)}}
@media(max-width:355px){.card-name strong{font-size:9px}.card-name span{font-size:8px}.tabletop{padding:10px 8px 12px}.handcards{gap:8px 5px}}
