/* ---------- 盤面（HUD）：お嬢様の手帳とマーカー ----------
   白い紙・濃紺の線・パステルのベタ面・ずらしたベタ影。グラデ／ツヤ／ぼかし影は使わない。 */
.board-screen .board3d { position: absolute; inset: 0; }
.board-screen .board3d canvas { display: block; }

/* ===== 上部プレイヤーカード ===== */
.hud-top { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 18px; z-index: 5; }
.pcard {
  width: 330px; height: 118px; position: relative; border-radius: 16px; padding: 9px 12px 8px 102px;
  background: #fff; border: var(--bw) solid var(--c); box-shadow: var(--pop);
  transition: transform .2s; transform-origin: 50% 0;
}
.pcard.turn { transform: scale(1.06); border-width: 3.5px; box-shadow: 0 0 0 3px #fff, 4px 6px 0 rgba(58, 49, 80, .2); }
.pcard .face {
  position: absolute; left: 10px; top: 14px; width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--c) 22%, #fff); border: var(--bw) solid var(--line);
}
.pcard .face img { width: 100%; height: 100%; object-fit: cover; }
.pcard .rank {
  position: absolute; left: -10px; top: -12px; z-index: 2; padding: 1px 10px 2px 8px; border-radius: 999px;
  background: #fff; border: 2px solid var(--line); box-shadow: 2px 3px 0 rgba(58, 49, 80, .16);
  font: 700 13px var(--round); color: var(--ink); line-height: 1.3;
}
.pcard .rank b { font-size: 19px; margin-right: 1px; }
.pcard .rank.r1 { background: var(--lemon); }
.pcard .turn-tape {
  position: absolute; right: 18px; top: -15px; z-index: 2; padding: 2px 14px 3px; transform: rotate(2deg);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.45) 0 6px, transparent 6px 12px), var(--lemon);
  font: 900 14px var(--round); color: var(--ink); letter-spacing: .08em;
}
.pcard .pname { font-weight: 900; font-size: 20px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; line-height: 1.25; }
.suits { display: flex; gap: 2px; }
.suits span { font-size: 18px; line-height: 1; color: var(--line-soft); }
.suits span.on { color: var(--s); }
.pcard .money { display: grid; grid-template-columns: 52px 1fr; align-items: baseline; font-size: 13px; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.pcard .money .num { font-size: 22px; line-height: 1.18; color: var(--ink); text-align: right; }
.pcard .money .num small { font: 700 12px var(--round); color: var(--ink-2); margin-left: 2px; }
.pride { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.pride .pl { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.pride .bar { flex: 1; position: relative; height: 12px; border-radius: 999px; background: #fff; border: 2px solid var(--line); overflow: hidden; }
.pride .bar i { position: absolute; inset: 0 auto 0 0; background: var(--lemon); transition: width .4s; }
.pride.max .bar i { background: var(--pink); }
.pride .pv { min-width: 32px; text-align: right; font-size: 15px; color: var(--ink); }
.pride.max .pv { color: var(--accent-dk); }

/* ===== 左：ステージ情報・ミニマップ ===== */
.stage-info { position: absolute; left: 22px; top: 150px; width: 270px; padding: 14px 18px 12px; z-index: 5; font-size: 15px; line-height: 1.65; }
.stage-info .sn {
  display: inline; font-weight: 900; font-size: 19px; color: var(--ink);
  background: linear-gradient(transparent 60%, var(--pink-soft) 60% 94%, transparent 94%);
}
.stage-info .sub { font: 400 14px var(--hand); color: var(--ink-2); margin: 2px 0 4px; }
.stage-info .row { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px dashed var(--line-soft); }
.stage-info .row:last-child { border-bottom: 0; }
.stage-info .row span { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.stage-info .row b { font-size: 18px; color: var(--ink); }
.stage-info .row b small { font: 700 12px var(--round); color: var(--ink-2); margin-left: 2px; }

.minimap { position: absolute; left: 22px; bottom: 22px; width: 270px; padding: 10px 12px 12px; z-index: 5; }
.minimap h4 {
  margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; cursor: pointer; user-select: none;
  font: 600 15px var(--latin); letter-spacing: .22em; color: var(--ink);
}
.minimap h4 span { font: 700 12px var(--round); letter-spacing: .05em; color: var(--ink-2); }
.minimap h4 .tog { margin-left: auto; font: 700 12px var(--round); font-style: normal; letter-spacing: 0; padding: 1px 10px; border-radius: 999px; border: 2px solid var(--line); background: var(--lemon-soft); color: var(--ink); }
.minimap.closed h4 { margin: 0; }
.minimap .grid { display: grid; gap: 3px; }
.minimap .mc { aspect-ratio: 1; border-radius: 5px; position: relative; border: 1.5px solid var(--line); }
.minimap .mc.on { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 1; }
.minimap .dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); }

/* ===== 右：手番ポートレート・ログ ===== */
.side-right { position: absolute; right: 22px; top: 136px; width: 290px; z-index: 5; display: flex; flex-direction: column; gap: 12px; }
.turn-portrait { height: 330px; overflow: hidden; padding: 0; background: color-mix(in srgb, var(--c) 20%, #fff); }
.turn-portrait img { position: absolute; left: 50%; top: 8px; width: 118%; transform: translateX(-50%); }
.turn-portrait .tp-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px 10px; text-align: center;
  background: #fff; border-top: var(--bw) solid var(--line); border-radius: 0 0 15px 15px;
  font-weight: 900; font-size: 21px; color: var(--ink); line-height: 1.2;
}
.turn-portrait .tp-pill {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%); white-space: nowrap;
  padding: 1px 12px 2px; border-radius: 999px; border: 2px solid var(--line); background: #fff;
  font: 600 12px var(--latin); letter-spacing: .2em; color: var(--ink);
}
.turn-portrait .tp-pill.me { background: var(--lemon); }
.log { height: 186px; padding: 10px 14px; overflow: hidden; font-size: 13px; line-height: 1.45; }
.log h4 { margin: 0 0 4px; font: 600 13px var(--latin); letter-spacing: .22em; color: var(--ink); }
.log h4 span { font: 700 11px var(--round); letter-spacing: .05em; color: var(--ink-2); }
.log ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; }
.log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 3px 0 3px 12px; border-bottom: 2px dashed var(--line-soft); position: relative; color: var(--ink); }
.log li::before { content: ''; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--line-soft)); }
.log li b { color: var(--ink); background: linear-gradient(transparent 60%, color-mix(in srgb, var(--c, var(--lemon)) 30%, #fff) 60%); }

/* ===== 下部コマンドバー ===== */
.cmdbar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 10px; align-items: flex-end; z-index: 6; padding: 10px 14px 14px; border-radius: 22px; }
.cmd {
  appearance: none; width: 84px; height: 80px; border-radius: 16px; cursor: pointer; padding: 4px 0 0;
  background: #fff; border: var(--bw) solid var(--line); box-shadow: 0 5px 0 var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  font-family: var(--round); color: var(--ink); transition: transform .1s, box-shadow .1s;
}
.cmd:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--line); background: var(--lemon-soft); }
.cmd:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.cmd .ic { width: 46px; height: 46px; object-fit: contain; }
.cmd .lb { font-size: 13px; font-weight: 900; color: var(--ink); white-space: nowrap; }
.cmd.main { width: 190px; height: 88px; flex-direction: row; gap: 8px; background: var(--accent); }
.cmd.main:hover { background: var(--accent); filter: brightness(1.04); }
.cmd.main .ic { width: 62px; height: 62px; }
.cmd.main .lb { color: #fff; font-size: 22px; letter-spacing: .08em; }
.cmd.off { opacity: .45; pointer-events: none; }

/* ===== 右上のシステムボタン（MOCK ナビの左。丸アイコン＋小さなラベル） ===== */
.sysbar { position: absolute; right: 196px; top: 8px; z-index: 7; display: flex; gap: 4px; }
.sys {
  appearance: none; cursor: pointer; width: 54px; padding: 0; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: 700 11px var(--round); color: var(--ink); white-space: nowrap;
}
.sys img, .sys .txt {
  width: 42px; height: 42px; border-radius: 50%; padding: 4px; object-fit: contain;
  background: #fff; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); transition: transform .1s, box-shadow .1s;
}
.sys span { padding: 0 5px; border-radius: 999px; background: rgba(255,253,249,.9); }
.sys:hover img, .sys:hover .txt { background: var(--lemon-soft); }
.sys:active img, .sys:active .txt { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.sys .txt { display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--accent-dk); }

/* ===== 残り歩数 ===== */
.steps-badge {
  position: absolute; left: 312px; top: 150px; z-index: 6; width: 128px; height: 128px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: #fff; border: 3px solid var(--line); box-shadow: var(--pop);
}
.steps-badge::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; border: 2px dashed var(--pink); }
.steps-badge b { font: 800 58px var(--num); color: var(--accent); line-height: 1; display: block; }
.steps-badge span { font: 400 15px var(--hand); color: var(--ink); }

/* ===== サイコロ ===== */
.dice-overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(58, 49, 80, .25); cursor: pointer; }
.dice3d { width: 220px; height: 220px; perspective: 900px; }
.dice3d .cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: spin .45s linear infinite; }
.dice3d.stop .cube { animation: none; transition: transform .7s cubic-bezier(.2,1.5,.4,1); }
@keyframes spin { from { transform: rotateX(0) rotateY(0) rotateZ(0); } to { transform: rotateX(360deg) rotateY(720deg) rotateZ(180deg); } }
.face-d { position: absolute; inset: 0; border-radius: 30px; background: #fff; border: 4px solid var(--line); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 26px; }
.face-d i { width: 34px; height: 34px; border-radius: 50%; place-self: center; background: var(--accent); }
.face-d.one i { width: 56px; height: 56px; }
.dice-hint {
  position: absolute; top: calc(50% + 160px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 8px 30px 10px; border-radius: 999px; background: #fff; border: var(--bw) solid var(--line); box-shadow: var(--pop);
  color: var(--ink); font: 900 26px var(--round); letter-spacing: .1em;
}

/* ===== 確認バー ===== */
.confirm-bar { position: absolute; left: 50%; bottom: 140px; transform: translateX(-50%); width: 940px; padding: 18px 26px; z-index: 12; display: flex; align-items: center; gap: 18px; animation: rise .3s ease both; }
.confirm-bar::before {
  content: ''; position: absolute; left: 30px; top: -13px; width: 96px; height: 24px; transform: rotate(-5deg); border-radius: 3px; opacity: .9;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.4) 0 6px, transparent 6px 12px), var(--pink);
}
@keyframes rise { from { transform: translate(-50%, 30px); opacity: 0; } }
.confirm-bar .q { flex: 1; font-size: 27px; font-weight: 900; color: var(--ink); }
.confirm-bar .q small { display: block; font-size: 17px; font-weight: 700; color: var(--ink-2); margin-top: 2px; }

/* ===== マスのツールチップ ===== */
.tile-tip { position: absolute; z-index: 15; width: 330px; padding: 14px 18px; pointer-events: none; font-size: 15px; line-height: 1.6; }
.tile-tip .tt { font-weight: 900; font-size: 20px; color: var(--ink); display: flex; align-items: center; gap: 8px; margin-bottom: 4px; padding-bottom: 4px; border-bottom: var(--bw) solid var(--line); }
.tile-tip .tt i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; border: 2px solid var(--line); }
.tile-tip .row { display: flex; justify-content: space-between; border-bottom: 2px dashed var(--line-soft); }
.tile-tip .row span { color: var(--ink-2); font-weight: 700; }
.tile-tip .row b { font: 800 16px var(--num); font-variant-numeric: tabular-nums; color: var(--ink); }
.tile-tip .row.warn b { color: var(--accent-dk); }
.tile-tip .desc { font-size: 15px; color: var(--ink); }
.tile-tip .warn:not(.row) { margin-top: 8px; padding: 6px 10px; border-radius: 10px; background: var(--pink-soft); color: var(--ink); font-weight: 700; font-size: 14px; }
.tile-tip .warn:not(.row) b { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; }

/* ===== カットイン ===== */
.cutin { position: absolute; left: 0; right: 0; top: 340px; height: 300px; z-index: 30; pointer-events: none; overflow: visible; }
.cutin .band {
  position: absolute; inset: 30px -20px; transform: skewY(-3deg);
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.55) 0 16px, transparent 16px 44px), color-mix(in srgb, var(--c) 30%, #fff);
  border-top: 4px solid var(--line); border-bottom: 4px solid var(--line);
  animation: bandIn .35s ease both, bandOut .35s 2.2s ease both;
}
.cutin .bust {
  position: absolute; right: 360px; top: -30px; width: 340px; height: 340px; border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--c) 35%, #fff); border: 6px solid #fff; outline: var(--bw) solid var(--line); box-shadow: var(--pop-lg);
  animation: imgIn .45s ease both, bandOut .35s 2.2s ease both;
}
.cutin .line {
  position: absolute; left: 140px; top: 62px; width: 1000px; transform: skewY(-3deg); line-height: 1.3;
  font: 900 42px var(--round); color: var(--ink); letter-spacing: .04em; word-break: keep-all;
  -webkit-text-stroke: 8px #fff; paint-order: stroke fill;
  animation: textIn .45s .1s ease both, bandOut .35s 2.2s ease both;
}
.cutin .line small {
  display: inline-block; margin-bottom: 8px; padding: 2px 16px 3px; border-radius: 999px; -webkit-text-stroke: 0;
  font: 600 20px var(--latin); letter-spacing: .3em; color: var(--ink); background: #fff; border: var(--bw) solid var(--line);
}
.cutin .line span { display: block; }
@keyframes bandIn { from { transform: skewY(-3deg) scaleX(0); } }
@keyframes imgIn { from { transform: translateX(300px); opacity: 0; } }
@keyframes textIn { from { transform: skewY(-3deg) translateX(-200px); opacity: 0; } }
@keyframes bandOut { to { opacity: 0; } }

/* ===== 競売 ===== */
.auction { position: absolute; left: 50%; bottom: 140px; transform: translateX(-50%); width: 1060px; padding: 20px 28px 18px; z-index: 12; }
.auction .top { display: flex; align-items: center; gap: 20px; }
.auction .lot { font-weight: 900; font-size: 26px; color: var(--ink); flex: 1; }
.auction .lot small { display: block; font: 700 15px var(--round); color: var(--ink-2); }
.auction .lot small:first-child { font: 600 14px var(--latin); letter-spacing: .12em; }
.auction .bid { text-align: center; min-width: 200px; }
.auction .bid-lb { font-size: 13px; font-weight: 600; letter-spacing: .2em; color: var(--ink-2); }
.auction .bid .num { font-size: 50px; color: var(--accent-dk); }
.auction .bidder { display: flex; align-items: center; gap: 10px; font: 900 18px var(--round); color: var(--ink); min-width: 120px; }
.auction .bidder img { width: 60px; height: 60px; border-radius: 50%; border: var(--bw) solid var(--line); background: color-mix(in srgb, var(--c) 25%, #fff); object-fit: cover; }
.auction .timer { height: 16px; border-radius: 999px; background: #fff; border: 2px solid var(--line); margin-top: 14px; overflow: hidden; }
.auction .timer i { display: block; height: 100%; background: var(--accent); }
