:root{
  --bg:#fff8fb;
  --bg2:#eef7ff;
  --panel:#ffffffee;
  --panel-2:#fff7fb;
  --panel-3:#f7fbff;
  --text:#4a4960;
  --sub:#7a8099;
  --line:#efdee8;
  --line-2:#e4d7f0;
  --accent:#ff7aa8;
  --accent-2:#9c8cff;
  --accent-3:#6fd5c3;
  --accent-4:#ffbe66;
  --shadow:0 28px 70px rgba(95,80,124,.14);
  --shadow-soft:0 14px 34px rgba(95,80,124,.09);
  --radius:30px;
  --radius-md:24px;
  --radius-sm:18px;
  --radius-xs:14px;
  font-family:"M PLUS Rounded 1c", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  color:var(--text);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:radial-gradient(circle at top left,#ffe6f1 0,#fff8fb 33%,#eef8ff 100%);color:var(--text)}
body::before,body::after{content:"";position:fixed;border-radius:50%;filter:blur(18px);z-index:-1;opacity:.7;pointer-events:none}
body::before{width:360px;height:360px;left:-100px;top:-90px;background:#ffd7e6}
body::after{width:420px;height:420px;right:-120px;top:-60px;background:#dff2ff}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
img{display:block;max-width:100%}
button{cursor:pointer}
.boot{min-height:100vh;display:grid;place-items:center;font-weight:900;color:#866f88}
.icon{display:block;flex:none}
.desktop-only{display:grid}
.mobile-only{display:none}

.shell{max-width:1420px;margin:0 auto;padding:18px 18px 36px}
.game-shell{padding-bottom:150px}
.header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:6px 4px 18px}
.brand{display:flex;align-items:center;gap:14px}
.brand-mark{width:60px;height:60px;border-radius:20px;background:linear-gradient(145deg,#ffffff 0,#ffeef6 55%,#fff 100%);display:grid;place-items:center;box-shadow:var(--shadow-soft);border:1px solid #fff;padding:8px}
.brand strong{display:block;font-size:1.24rem;letter-spacing:.02em}
.brand small{display:block;color:var(--sub);font-size:.73rem;letter-spacing:.14em}
.top-actions{display:flex;gap:10px;flex-wrap:wrap}

.button,.choice,.chip-button,.market-actions button,.holding-actions button,.tab,.dock-chip{transition:.18s ease}
.button{appearance:none;border:1px solid transparent;border-radius:18px;padding:12px 16px;min-height:48px;background:#fff;color:#5d6277;font-weight:900;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 10px 22px rgba(132,114,157,.08)}
.button:hover,.choice:hover,.chip-button:hover,.market-actions button:hover,.holding-actions button:hover,.tab:hover,.dock-chip:hover{transform:translateY(-1px)}
.button.primary{background:linear-gradient(135deg,#ff79a8 0,#ff9f83 100%);color:#fff;box-shadow:0 16px 28px rgba(255,127,167,.28)}
.button.blue{background:linear-gradient(135deg,#7eb1ff,#62d1ff);color:#fff}
.button.line{border-color:#ecd6e4;background:#fff}
.button.outline{border-color:#d8cad9;background:transparent}
.button.mint{background:linear-gradient(135deg,#74dcc7,#7dacff);color:#fff}
.button.tiny{padding:10px 14px;border-radius:15px;min-height:0}
.button.large{padding:15px 18px;min-height:56px}
.button.full{width:100%}
.button[disabled],button[disabled]{opacity:.45;cursor:not-allowed;transform:none}

.hero{display:grid;grid-template-columns:1.02fr .98fr;gap:24px;align-items:center;padding:34px;border-radius:40px;background:linear-gradient(135deg,#fffefd 0,#fff4f8 46%,#eef9ff 100%);box-shadow:var(--shadow);border:1px solid #fff;position:relative;overflow:hidden}
.hero::before,.hero::after{content:"";position:absolute;border-radius:50%;filter:blur(10px)}
.hero::before{width:240px;height:240px;background:#ffe0ec;right:-40px;top:-40px;opacity:.75}
.hero::after{width:210px;height:210px;background:#def2ff;left:-40px;bottom:-70px;opacity:.85}
.hero h1{font-size:clamp(2rem,4vw,3.5rem);line-height:1.08;margin:.3em 0 .22em}
.hero h1 span{color:#ff6f98}
.hero p{font-size:1.05rem;line-height:1.85;color:#5f6882;margin:0}
.hero-illustration{background:linear-gradient(180deg,#ffffffd0,#ffffff85);border-radius:30px;padding:18px;border:1px solid #ffffffd5;box-shadow:inset 0 1px 0 #fff}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:.74rem;letter-spacing:.16em;color:#b15f87;font-weight:900;text-transform:uppercase}
.pills{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.pill{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid #f2dde8;color:#69657b;font-size:.9rem;box-shadow:0 6px 16px rgba(132,114,157,.08)}

.setup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}
.map-panel{grid-column:1/-1}
.panel{background:var(--panel);backdrop-filter:blur(12px);border:1px solid #fff;box-shadow:var(--shadow);border-radius:var(--radius);padding:22px}
.panel.glass{background:linear-gradient(180deg,#ffffffef,#fffdfef8)}
.section-head{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:14px}
.section-head h2{margin:0;font-size:1.12rem}
.small-head{margin-bottom:10px}
.subtle{color:var(--sub);font-size:.88rem}
.field{display:grid;gap:8px;margin-bottom:15px}
label{font-weight:900;font-size:.94rem;color:#5a627e}
input,select{width:100%;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px 14px;outline:none;color:var(--text);box-shadow:inset 0 1px 0 #fff;font-size:16px}
input:focus,select:focus{border-color:#ddb1d5;box-shadow:0 0 0 4px #ffdceb78}
.notice{background:linear-gradient(135deg,#fffafc,#f6fbff);border:1px solid #f2dfe8;border-radius:20px;padding:14px 16px;color:#605f75;line-height:1.7;box-shadow:0 10px 24px rgba(124,102,149,.06)}
.note{margin:0;color:#6b718a;line-height:1.75}
.footer{text-align:center;color:#8a89a0;font-size:.86rem;padding:18px 10px}

.character-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.character{border:1px solid var(--line);background:linear-gradient(180deg,#fff,#fffdfd);border-radius:20px;padding:10px;display:grid;justify-items:center;gap:4px;box-shadow:0 10px 18px rgba(132,114,157,.05)}
.character.selected{border-color:#ff9cbc;background:linear-gradient(180deg,#fff,#fff2f7);box-shadow:0 14px 24px rgba(255,127,167,.18)}
.character-name{font-weight:900}
.character-job{font-size:.82rem;color:var(--sub)}
.char-caption{margin-top:12px;color:#666a7e;line-height:1.7}
.avatar{display:block}
.choice-group{display:flex;gap:10px;flex-wrap:wrap}
.choice{border:1px solid var(--line);background:#fff;border-radius:999px;padding:10px 15px;color:#5e6274;font-weight:900}
.choice.selected{background:linear-gradient(135deg,#ff89af,#ffb0c8);border-color:#ff8fb4;color:#fff;box-shadow:0 12px 24px rgba(255,127,167,.24)}
.map-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.map-card{border:1px solid var(--line);border-radius:24px;background:#fff;padding:12px;box-shadow:var(--shadow-soft)}
.map-card strong{display:block;margin-top:12px}
.map-card p{font-size:.9rem;color:#72778e;line-height:1.6;margin:.55em 0 0}
.map-card.locked{opacity:.68}
.map-card.active{border-color:#ffd2df}
.map-preview{position:relative;border-radius:18px;overflow:hidden;padding:10px;height:122px;border:1px solid #ffffffcb}
.map-tag{position:absolute;right:10px;top:10px;background:#fff;border:1px solid #f0dbe6;border-radius:999px;padding:5px 10px;font-size:.75rem;font-weight:900;color:#6b6278}
.setup-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:16px;flex-wrap:wrap}

.title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:4px 4px 16px;flex-wrap:wrap}
.title-row h1{margin:.26em 0 0;font-size:clamp(1.78rem,3vw,2.45rem)}
.title-badges{display:flex;gap:10px;flex-wrap:wrap}
.title-pill{display:inline-flex;align-items:center;gap:7px;background:#fff;border:1px solid #eddce7;border-radius:999px;padding:10px 14px;font-weight:900;box-shadow:var(--shadow-soft)}
.toast-notice{margin-bottom:12px}

.summary-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.summary-card{background:linear-gradient(180deg,#ffffffef,#fffafb);border:1px solid #f1dfe8;border-radius:24px;padding:16px 18px;box-shadow:var(--shadow-soft);display:grid;gap:6px}
.summary-card.accent{background:linear-gradient(135deg,#fff,#fff2f7);border-color:#ffd4e3}
.summary-card span{color:#836b86;font-size:.83rem;font-weight:900;letter-spacing:.04em}
.summary-card strong{font-size:1.5rem;line-height:1.1}
.summary-card small{color:#7a8199}

.game-layout{display:grid;grid-template-columns:minmax(0,1.08fr) 380px;gap:18px;align-items:start}
.game-main,.game-side{display:grid;gap:16px;min-width:0}
.side-stack{position:sticky;top:14px}

.stage-shell{background:linear-gradient(180deg,#fff,#fff9fc);border:1px solid #fff;border-radius:36px;box-shadow:var(--shadow);overflow:hidden}
.stage-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid #f3e7ee;background:linear-gradient(135deg,#fff,#fff6fb)}
.stage-head strong{display:flex;align-items:center;gap:8px}
.stage-head small{display:block;color:var(--sub);margin-top:4px}
.stage-tools{display:flex;gap:8px;flex-wrap:wrap}
.chip-button{border:1px solid #e9d9e3;background:#fff;border-radius:999px;padding:10px 13px;color:#62677f;font-weight:900;display:inline-flex;align-items:center;gap:6px;box-shadow:0 8px 16px rgba(132,114,157,.06)}
.board-wrap{position:relative;background:linear-gradient(180deg,#fefcff,#f6fbff)}
.board-viewport{overflow:auto;padding:14px;min-height:660px;-webkit-overflow-scrolling:touch}
.stage-floating{position:absolute;inset:16px 16px auto 16px;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;pointer-events:none}
.goal-card,.legend-card{pointer-events:auto;background:#ffffffd9;border:1px solid #fff;border-radius:20px;padding:12px 14px;box-shadow:var(--shadow-soft);backdrop-filter:blur(12px)}
.goal-card{max-width:280px;display:grid;gap:4px}
.goal-label{font-size:.76rem;font-weight:900;letter-spacing:.09em;color:#8b6a84;text-transform:uppercase}
.goal-card strong{font-size:1.12rem}
.goal-card small{color:#747c95;line-height:1.55}
.legend-card{display:flex;gap:12px;flex-wrap:wrap;align-items:center;color:#656a80;font-size:.88rem}
.legend-card span{display:inline-flex;align-items:center;gap:7px}
.legend-dot{width:12px;height:12px;border-radius:50%;display:inline-block;border:2px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.tile{cursor:pointer;transition:transform .16s ease}
.tile:hover{transform:translateY(-3px)}
.pawn{filter:drop-shadow(0 8px 12px rgba(0,0,0,.14))}
.helper-box{margin-bottom:6px}

.turn-card,.players-panel,.sheet-section{display:grid;gap:12px}
.turn-card{background:linear-gradient(180deg,#fff,#fff8fb);border:1px solid #fff;border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}
.turn-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.turn-person{display:flex;align-items:center;gap:14px}
.turn-person strong{display:block;font-size:1.08rem}
.turn-person small{display:block;color:var(--sub);margin-top:4px}
.round-badge{padding:10px 14px;border-radius:999px;background:linear-gradient(135deg,#fff4e4,#fff);border:1px solid #f2e0bd;font-weight:900;color:#cb8840}
.turn-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.turn-stats>div{padding:12px 14px;border-radius:18px;background:linear-gradient(135deg,#fff8fc,#f6fbff);border:1px solid #f0dfe9}
.turn-stats span{display:block;color:#8a6487;font-size:.8rem;font-weight:900}
.turn-stats strong{display:block;font-size:1.26rem;margin-top:3px}
.turn-suits{background:linear-gradient(135deg,#fff7fb,#f7fbff);border:1px solid #eedde7;border-radius:18px;padding:12px 14px;display:grid;gap:8px}
.mini-label{font-size:.8rem;font-weight:900;color:#8a6487;letter-spacing:.08em}
.mini-foot{font-size:.88rem;color:#666d85}

.turn-action{display:grid;gap:10px;border-top:1px dashed #edd6e0;padding-top:14px}
.turn-action h3{margin:0;font-size:1.08rem}
.turn-action p{margin:0;color:#676e86;line-height:1.75}
.action-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.action-buttons.mobile{grid-template-columns:1fr}
.movement-track{height:10px;background:#f1e9f0;border-radius:999px;overflow:hidden}
.movement-track i{display:block;height:100%;background:linear-gradient(90deg,#ff7fa7,#8ca9ff);border-radius:999px}

.suit-track{display:flex;gap:8px;flex-wrap:wrap}
.suit-chip{width:42px;height:42px;border-radius:14px;border:1px solid #ecdce8;background:#fff;display:grid;place-items:center;box-shadow:0 8px 16px rgba(132,114,157,.07)}
.suit-chip svg{width:21px;height:21px;fill:none;stroke:#cbbaca;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.suit-chip.owned{background:linear-gradient(135deg,#fff 0,#fff6fb 45%,#f7fbff 100%);border-color:#f2c4d7;box-shadow:0 10px 18px rgba(255,127,167,.14)}
.suit-chip.owned[title="ハート"] svg{stroke:#ff7fa7;fill:#ff7fa71a}
.suit-chip.owned[title="ダイヤ"] svg{stroke:#6ec5ff;fill:#6ec5ff1a}
.suit-chip.owned[title="クラブ"] svg{stroke:#72c26b;fill:#72c26b1a}
.suit-chip.owned[title="スペード"] svg{stroke:#8f82ff;fill:#8f82ff1a}
.suit-chip.small{width:30px;height:30px;border-radius:11px}
.suit-chip.small svg{width:16px;height:16px}

.players-panel .player-row,.sheet-section .player-row{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px 0;border-top:1px solid #f1e6ee}
.players-panel .player-row:first-of-type,.sheet-section .player-row:first-of-type{border-top:none}
.player-row.you{background:linear-gradient(135deg,#fff7fb,#fff);border-radius:18px;padding:12px}
.player-row.current{outline:2px solid #ffd2df;outline-offset:0}
.player-row.out{opacity:.55}
.player-details{display:grid;gap:2px}
.player-details strong{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.player-details small{color:var(--sub)}
.status-dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.player-money{text-align:right;font-weight:900}
.player-money small{display:block;color:var(--sub);font-weight:700;margin-top:3px}

.tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
.tab{border:none;border-radius:15px;background:#f7f2f7;color:#6f7086;padding:11px 10px;font-weight:900}
.tab.active{background:linear-gradient(135deg,#ff8aae,#8ca9ff);color:#fff;box-shadow:0 12px 22px rgba(144,137,235,.24)}
.market-hint{display:flex;align-items:center;gap:8px;padding:12px 14px;border-radius:16px;background:#fff8fb;border:1px solid #f0d8e4;margin-bottom:12px;color:#6b677e}
.market-hint.bank-open{background:#eef8ff;border-color:#d6ebff;color:#52708f}
.holdings{display:grid;gap:12px}
.market-row,.holding{background:#fff;border:1px solid #efe0e9;border-radius:18px;padding:14px;box-shadow:0 8px 18px rgba(132,114,157,.05)}
.market-row{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}
.market-name{display:flex;align-items:center;gap:8px;font-weight:900}
.market-own,.market-price,.holding p{color:#6b7188;line-height:1.7}
.market-right{text-align:right;display:grid;gap:8px}
.market-actions,.holding-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.market-actions button,.holding-actions button,.dock-chip{border:1px solid #ebd7e4;background:#fff;border-radius:14px;padding:10px 12px;font-weight:900;color:#60657c;box-shadow:0 8px 16px rgba(132,114,157,.05)}
.market-actions .sell,.holding-actions .sell{background:linear-gradient(135deg,#eef6ff,#fff);border-color:#d8e8ff}
.bank-complete{margin-top:10px}
.log-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.log-list li{background:#fff;border:1px solid #efe0e9;border-radius:16px;padding:12px 14px;line-height:1.7;color:#666d84}
.log-list strong{display:inline-flex;min-width:40px;color:#a56c88}

.mobile-dock{position:fixed;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));z-index:60;padding:14px;border-radius:28px;background:linear-gradient(180deg,#fffffff6,#fff7fbfa);backdrop-filter:blur(14px);border:1px solid #fff;box-shadow:0 18px 40px rgba(72,58,94,.18);display:grid;gap:12px}
.mobile-dock-main{display:grid;gap:10px}
.mobile-turn-left{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.mobile-player{display:flex;align-items:center;gap:12px}
.mobile-player strong{display:block;font-size:1rem}
.mobile-player small{display:block;color:var(--sub);margin-top:4px}
.mobile-money{text-align:right}
.mobile-money span{display:block;color:#7c8198;font-size:.76rem;font-weight:900}
.mobile-money strong{font-size:1.1rem}
.mobile-suits{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:linear-gradient(135deg,#fff8fc,#f5fbff);border:1px solid #eedfea;border-radius:16px;padding:10px 12px}
.mobile-suits span{font-size:.82rem;color:#68718a;font-weight:700}
.mobile-shortcuts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.dock-chip{display:flex;align-items:center;justify-content:center;gap:6px;min-height:46px;padding:11px 10px}

.sheet-backdrop{position:fixed;inset:0;background:rgba(57,43,70,.34);display:grid;align-items:end;z-index:80;padding:0}
.sheet-panel{background:#fff;border-radius:28px 28px 0 0;box-shadow:0 -12px 32px rgba(35,23,52,.18);padding:10px 14px calc(16px + env(safe-area-inset-bottom));max-height:min(78vh,820px);overflow:auto}
.sheet-handle{width:52px;height:6px;border-radius:999px;background:#e9dbe6;margin:4px auto 10px}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px 10px}
.sheet-head h2{margin:0;font-size:1.08rem}
.sheet-section{padding:4px 2px 2px}

.modal-backdrop{position:fixed;inset:0;background:#4f46605a;display:grid;place-items:center;padding:18px;z-index:100}
.modal-box{width:min(720px,100%);background:#fff;border:1px solid #ffffffb8;border-radius:28px;box-shadow:0 32px 70px rgba(35,23,52,.22);overflow:hidden}
.modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:18px 20px;border-bottom:1px solid #f2e7ee;background:linear-gradient(135deg,#fff,#fff8fb)}
.modal-head h2{margin:0;font-size:1.14rem}
.modal-body{padding:18px 20px;max-height:min(70vh,680px);overflow:auto;color:#656c82;line-height:1.8}
.modal-body h3{color:#504f69;margin:1.2em 0 .3em}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding:18px 20px;border-top:1px solid #f2e7ee;background:#fff}
.modal-summary{margin:0}
.end-box{text-align:center;display:grid;gap:10px;justify-items:center}
.ranking{width:100%;display:grid;gap:10px}
.rank-line{display:flex;justify-content:space-between;gap:12px;background:#fff9fc;border:1px solid #f0dde7;border-radius:15px;padding:10px 12px}
.small-link{border:none;background:none;color:#8d5d8f;padding:0;font-weight:900}

@media (max-width:1150px){
  .game-layout{grid-template-columns:1fr}
  .side-stack{position:static}
}
@media (max-width:920px){
  .shell{padding:14px 12px 32px}
  .game-shell{padding-bottom:235px}
  .desktop-only{display:none}
  .mobile-only{display:grid}
  .hero{grid-template-columns:1fr;padding:22px}
  .setup-grid{grid-template-columns:1fr}
  .summary-strip{grid-template-columns:1fr 1fr}
  .header{align-items:flex-start;flex-direction:column}
  .top-actions{width:100%}
  .top-actions .button{flex:1}
  .stage-head,.setup-foot,.title-row,.market-row{flex-direction:column;align-items:flex-start}
  .stage-tools{width:100%}
  .goal-card{max-width:220px}
  .legend-card{max-width:200px;justify-content:flex-start}
  .board-viewport{min-height:540px;padding:10px 10px 14px}
  .summary-card strong{font-size:1.24rem}
}
@media (max-width:620px){
  .shell{padding:12px 10px 28px}
  .game-shell{padding-bottom:285px}
  .panel,.turn-card{padding:16px}
  .brand strong{font-size:1.08rem}
  .brand small{letter-spacing:.08em}
  .brand-mark{width:54px;height:54px}
  .summary-strip{grid-template-columns:1fr}
  .character-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-actions,.choice-group{display:grid;grid-template-columns:1fr}
  .button.large,.button.full{width:100%}
  .tabs{grid-template-columns:repeat(3,1fr)}
  .tab{padding:10px 6px;font-size:.92rem}
  .market-row{grid-template-columns:1fr}
  .market-right,.player-money{text-align:left}
  .market-actions,.holding-actions{justify-content:flex-start}
  .player-row,.players-panel .player-row,.sheet-section .player-row{grid-template-columns:auto 1fr}
  .player-money{grid-column:2}
  .stage-floating{position:static;padding:0 12px 12px;display:grid;grid-template-columns:1fr;gap:10px}
  .goal-card,.legend-card{max-width:none}
  .board-viewport{min-height:420px}
  .mobile-turn-left{flex-direction:column}
  .mobile-money{text-align:left}
  .mobile-shortcuts{grid-template-columns:repeat(2,1fr)}
  .action-buttons{grid-template-columns:1fr}
}

/* v0.2.2 / モバイル・フルスクリーン操作: マップの上に巨大なパネルを重ねない */
@media (max-width:920px){
 html:has(body.mobile-playing),body.mobile-playing{height:100%;overflow:hidden;overscroll-behavior:none}
 body.mobile-playing{background:#ecf8f8}
 .game-shell{
  box-sizing:border-box!important;
  height:100vh;height:100dvh;
  overflow:hidden;display:flex;flex-direction:column;
  max-width:none;padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));
  gap:6px;background:linear-gradient(180deg,#fff5fa 0%,#f0f9fb 34%,#e3f7ef 100%);
 }
 .game-shell .header{
  flex:0 0 43px;min-height:0;display:flex;flex-direction:row;align-items:center;
  justify-content:space-between;margin:0;padding:0 3px;gap:8px;
 }
 .game-shell .brand{gap:8px;min-width:0}
 .game-shell .brand-mark{width:37px;height:37px;border-radius:12px;padding:4px}
 .game-shell .brand strong{font-size:14px;white-space:nowrap;line-height:1.25}
 .game-shell .brand small{display:none}
 .game-shell .top-actions{width:auto;display:flex;gap:6px;flex-wrap:nowrap}
 .game-shell .top-actions .button.tiny{width:36px;height:36px;min-width:0;padding:0;border:1px solid #eedde8;box-shadow:0 2px 9px #a783a022;border-radius:12px}
 .game-shell .top-actions .button.tiny span{display:none}
 .game-shell .title-row,.game-shell .summary-strip,.game-shell .game-side,.game-shell .helper-box,.game-shell .game-footer{display:none!important}
 .mobile-hud{
  flex:0 0 43px;min-height:43px;display:flex;align-items:center;gap:9px;
  padding:4px 10px;background:#fffcff;border:1px solid #f1d9e9;border-radius:15px;
  box-shadow:0 4px 12px rgba(100,70,117,.07);overflow:hidden;
 }
 .hud-money{display:flex;flex-direction:column;gap:0;min-width:0;flex:1}
 .hud-money small{font-size:9px;line-height:1.1;color:#937994;font-weight:900}
 .hud-money strong{font-size:15px;line-height:1.25;white-space:nowrap;color:#413f59}
 .hud-level,.hud-round{border-radius:9px;padding:5px 7px;white-space:nowrap;font-size:11px;font-weight:900;background:#ffecf4;color:#c45886}
 .hud-round{background:#eaf4ff;color:#477ca7}
 .hud-suits{display:flex;flex-shrink:0;align-items:center}
 .hud-suits .suit-track{gap:3px;flex-wrap:nowrap}
 .hud-suits .suit-chip.small{width:23px;height:23px;border-radius:7px;box-shadow:none}
 .hud-suits .suit-chip.small svg{width:14px;height:14px}
 .game-shell .game-layout{display:flex!important;flex:1 1 auto;min-height:0;overflow:hidden;gap:0;margin:0}
 .game-shell .game-main{display:flex;flex:1 1 auto;min-width:0;min-height:0;gap:0;overflow:hidden}
 .game-shell .stage-shell{
  flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;
  position:relative;overflow:hidden;border-radius:20px;
  background:#f2fbf3;border:2px solid #fff;
  box-shadow:0 7px 24px rgba(57,101,92,.16),inset 0 0 0 1px #d4e9e0;
 }
 .game-shell .stage-head{display:none}
 .game-shell .board-wrap{flex:1 1 auto;min-height:0;display:flex;position:relative;overflow:hidden}
 .game-shell .board-viewport{
  flex:1;min-height:0!important;height:100%;width:100%;overflow:hidden;
  padding:0!important;touch-action:none;overscroll-behavior:contain;
  background:linear-gradient(180deg,#f6fbff,#e6f6ed);
 }
 .game-shell #board-svg{display:block;width:100%!important;min-width:0!important;height:100%!important;max-width:none}
 .game-shell .stage-floating{display:none!important}
 .mobile-map-tools{
  position:absolute;right:10px;top:10px;z-index:4;
  display:flex!important;flex-direction:row;gap:5px;
 }
 .map-mode{
  display:inline-flex;align-items:center;gap:4px;border:1px solid #fff;
  background:#fffcfff0;color:#6a6585;min-height:35px;padding:7px 9px;
  border-radius:12px;box-shadow:0 4px 10px #70667e22;font-size:11px;font-weight:900;
  backdrop-filter:blur(7px);
 }
 .game-shell .mobile-dock{
  flex:0 0 auto;position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;
  z-index:10;display:flex;flex-direction:column;gap:8px;
  margin:0;padding:10px 11px 11px;max-height:min(180px,31dvh);
  overflow-y:auto;border-radius:19px;background:#fffcff;
  border:1px solid #efd8e6;box-shadow:0 6px 20px #956b8922;
  backdrop-filter:none;
 }
 .dock-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:28px}
 .dock-heading strong{font-size:12px;line-height:1.3;white-space:normal;min-width:0;overflow-wrap:anywhere}
 .dock-menu{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:0 0 auto;border-radius:10px;min-height:31px;padding:6px 10px;background:#f4f0ff;border:1px solid #dcd4f4;color:#6a5d9a;font-size:12px;font-weight:900}
 .dock-controls{width:100%}
 .dock-controls .button{min-height:49px;padding:9px 12px;font-size:15px;border-radius:14px;box-shadow:0 5px 13px rgba(255,127,167,.22)}
 .dock-controls .button.line{box-shadow:none;background:#fdf9fd}
 .dock-actions{display:grid;gap:8px}
 .dock-actions.two{grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr)}
 .dock-actions .button{font-size:14px;white-space:nowrap}
 .dock-wait{background:#f3f2fb;padding:13px 14px;border-radius:12px;text-align:center;font-size:12px;color:#777392;font-weight:900}
 .waiting-dot{display:inline-block;width:8px;height:8px;margin-right:8px;background:#8d86e2;border-radius:50%;animation:bounce .45s alternate infinite}
 .dock-progress{height:12px;border-radius:999px;overflow:hidden;background:#f1e7ef;margin:15px 1px}
 .dock-progress span{height:100%;display:block;background:linear-gradient(90deg,#ff79a8,#8d91ef);border-radius:999px}
 .sheet-backdrop{z-index:80;align-items:end;background:#38304477}
 .sheet-panel{
  width:100%;max-height:min(78dvh,720px);display:flex;flex-direction:column;
  padding:8px 14px max(12px,env(safe-area-inset-bottom));overflow:hidden;
  border-radius:24px 24px 0 0;background:#fffaff;
 }
 .sheet-handle{flex:0 0 5px;margin:2px auto 8px}
 .sheet-head{flex:0 0 auto;padding:0 2px 8px}
 .sheet-head h2{font-size:16px}
 .sheet-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;flex:0 0 auto;padding-bottom:9px}
 .sheet-tab{background:#f2eff6;border:1px solid #e9e0ee;border-radius:11px;padding:10px 2px;min-height:41px;font-weight:900;font-size:12px;color:#726980}
 .sheet-tab.active{color:#fff;background:linear-gradient(130deg,#ff83ac,#948bf3);border-color:transparent}
 .sheet-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:12px}
 .sheet-players{display:grid;gap:0}
 .sheet-players .player-row{border-bottom:1px solid #f2e7f1}
 .sheet-scroll .market-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;padding:11px}
 .sheet-scroll .market-right{text-align:right}
 .sheet-scroll .market-actions,.sheet-scroll .holding-actions{justify-content:flex-end}
 .sheet-scroll .market-actions button,.sheet-scroll .holding-actions button{min-height:40px}
 .modal-backdrop{padding:12px}
 .modal-box{max-height:88dvh;display:flex;flex-direction:column}
 .modal-body{flex:1 1 auto;min-height:0;overflow:auto}
}
@media(max-width:380px){
 .hud-level,.hud-round{font-size:10px;padding:5px}
 .hud-suits .suit-chip.small{width:21px;height:21px}
 .mobile-hud{gap:5px;padding:4px 7px}
 .hud-money strong{font-size:13px}
 .dock-actions .button{font-size:12px}
 .game-shell .header{flex-basis:40px}
}
@media(max-height:640px) and (max-width:920px){
 .game-shell{gap:4px;padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(4px,env(safe-area-inset-bottom))}
 .game-shell .header{flex-basis:38px}
 .mobile-hud{flex-basis:38px;min-height:38px}
 .game-shell .mobile-dock{padding:7px 9px;gap:5px}
 .dock-controls .button{min-height:44px}
}
/* ゲームアイコンはSVGの線画として描画し、黒い塗りつぶしにならないようにする */
.icon{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:920px){
 .game-shell .game-layout{align-items:stretch!important}
 .game-shell .game-main,.game-shell .stage-shell{height:100%;align-self:stretch}
}
@media(max-width:920px){
 .sheet-scroll .market-row{display:grid;grid-template-columns:1fr;gap:7px;padding:12px}
 .sheet-scroll .market-details{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
 .sheet-scroll .market-own{font-size:12px}
 .sheet-scroll .market-right{display:grid;grid-template-columns:1fr;gap:7px;text-align:left}
 .sheet-scroll .market-price{text-align:right;line-height:1.1;font-weight:900}
 .sheet-scroll .market-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap}
 .sheet-scroll .market-actions button{min-height:41px;flex:1 1 75px;font-size:13px}
 .game-shell .top-actions .button.tiny{width:39px;height:39px}
 .map-mode{min-height:39px}
 .dock-menu{min-height:35px}
}
