/* 通勤ダンジョン 固有スタイル（色は common.css のトークンのみ） */
.td-sub { display: block; font-size: .5em; color: var(--accent); margin-top: 2px; }
.td-hero-art { margin: -20px -20px 14px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--surface-2); }
.td-hero-cv { display: block; width: 100%; height: auto; }
.td-fact { margin: 12px 0 0; }
.td-friend { border-color: var(--accent); background: var(--accent-soft); }
.td-opts { margin-top: 6px; }
.td-opts input { width: 18px; height: 18px; accent-color: var(--accent); }

/* プレイ画面 */
.td-play { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.td-top { margin-bottom: 8px; }
.td-round { font-size: 15px; }
.td-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
.td-chip { display: flex; align-items: center; gap: 4px; font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; min-width: 0; white-space: nowrap; }
.td-chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.td-chip b { margin-left: auto; font-variant-numeric: tabular-nums; }
.td-view { width: 100%; border-radius: 12px; overflow: hidden; background: var(--surface-2); line-height: 0; }
.td-canvas { display: block; touch-action: none; width: 100%; }
.td-mini { display: block; width: 100%; border-radius: 8px; margin: 8px 0 4px; touch-action: manipulation; }
.td-panel { margin-top: 10px; }
.td-phase { margin-bottom: 8px; font-size: 15px; }
.td-msg { margin: 6px 0; min-height: 1.5em; }
.td-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; background: var(--surface-2); border-radius: 999px; padding: 2px 10px 2px 4px; margin-left: 8px; vertical-align: middle; }
.td-warn { color: var(--warn); font-weight: 700; }
.td-ok { color: var(--good); font-weight: 700; }
.td-ng { color: var(--bad); font-weight: 700; }

/* 道具箱 */
.td-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.td-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; min-height: 120px;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; text-align: center;
  font: inherit; color: var(--text); touch-action: manipulation; transition: transform .08s, border-color .15s;
}
.td-card:not(:disabled):active { transform: scale(.97); }
.td-card:not(:disabled):hover { border-color: var(--accent); }
.td-card b { font-size: 13px; line-height: 1.3; }
.td-card span { font-size: 11px; color: var(--text-sub); line-height: 1.35; }
.td-card:disabled { cursor: default; }
.td-card.is-taken { opacity: .55; }
.td-cat-trap { border-top: 4px solid var(--bad); }
.td-cat-help { border-top: 4px solid var(--good); }
.td-cat-bonus { border-top: 4px solid var(--warn); }
.td-owner { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 10px; color: #fff; border-radius: 999px; padding: 0 6px; font-weight: 700; }
.td-owner:empty { display: none; }
.td-icon { display: block; }

.td-log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.td-log li { display: flex; gap: 6px; align-items: center; padding: 4px 0; }
.td-log i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ジャンプボタン（親指の位置） */
.td-jump {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 132px;
  border: 0; border-radius: 20px; background: var(--accent); color: var(--accent-ink); cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18);
}
.td-jump b { font-size: 26px; letter-spacing: .1em; }
.td-jump span { font-size: 12px; opacity: .85; }
.td-jump:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }

/* 採点 */
.td-score { display: grid; gap: 8px; }
.td-srow { display: grid; grid-template-columns: 62px 1fr 34px; gap: 2px 8px; align-items: center; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.td-srow.is-me { border-color: var(--accent); }
.td-sname { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; }
.td-sname i { width: 8px; height: 8px; border-radius: 50%; }
.td-sbar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; display: flex; }
.td-old { background: var(--text-sub); opacity: .45; height: 100%; }
.td-new { height: 100%; animation: td-grow .6s ease both; }
@keyframes td-grow { from { max-width: 0; } to { max-width: 100%; } }
.td-stot { text-align: right; font-variant-numeric: tabular-nums; }
.td-sinfo { grid-column: 1 / -1; line-height: 1.4; }

/* 結果 */
.td-res-hero { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; }
.td-face { width: 130px; height: 130px; border-radius: 50%; background: var(--surface-2); }
.td-rank .big-num { font-size: clamp(40px, 12vw, 64px); color: var(--accent); }
.td-res-hero h2 { margin: 0 0 4px; font-size: 22px; }
.td-res-hero p { margin: 0 0 6px; font-size: 14px; }
.td-row-emoji { font-size: 22px; letter-spacing: 2px; }
.td-newtitle { border-color: var(--warn); }
.td-relay { margin-top: 16px; }
.td-result .row { margin: 12px 0; }
.td-bar { display: grid; grid-template-columns: 7.5em 1fr 3em; gap: 8px; align-items: center; margin: 4px 0; font-size: 13px; }
.td-bar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-zukan { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.td-z { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 8px; background: var(--surface-2); font-size: 10px; text-align: center; line-height: 1.3; }
.td-z:not(.on) .td-icon { filter: grayscale(1) brightness(.4); opacity: .5; }
.td-titles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.td-clear { text-align: center; }
.td-clear h2 { font-size: 20px; margin: 4px 0 0; }
.td-howto { padding-left: 1.3em; margin: 0; }
.td-howto li { margin-bottom: 6px; }
.td-about { padding-top: 0; }
.td-about table { width: 100%; }
.source ul { margin: 4px 0 0; padding-left: 1.2em; }

@media (max-width: 360px) {
  .td-res-hero { grid-template-columns: 96px 1fr; }
  .td-face { width: 96px; height: 96px; }
  .td-card { min-height: 110px; }
}
