.play-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.play-title { flex: 1; font-weight: 700; font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.play-layout { display: grid; gap: 20px; }
@media (min-width: 820px) {
  .play-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}
.play-main { display: flex; flex-direction: column; align-items: center; min-width: 0; }

.cw-board { position: relative; width: 100%; display: flex; justify-content: center; }
.cw-grid {
  --cols: 7;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  width: min(100%, calc(var(--cols) * 54px));
  container-type: inline-size;
  border: 2px solid var(--ink-soft);
  background: var(--ink-soft);
  gap: 1px;
  border-radius: 4px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  box-shadow: var(--shadow);
}
.cw-cell {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: calc(100cqw / var(--cols) * .56);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cw-cell.black { background: var(--black-cell); cursor: default; }
.cw-cell .num {
  position: absolute;
  top: 6%;
  left: 8%;
  font-size: calc(100cqw / var(--cols) * .22);
  font-weight: 700;
  color: var(--muted);
}
.cw-cell .pending {
  position: absolute;
  right: 8%;
  bottom: 6%;
  font-size: calc(100cqw / var(--cols) * .24);
  color: var(--accent-ink);
  font-family: ui-monospace, monospace;
}
.cw-cell.word { background: var(--accent-softer); }
.cw-cell.sel { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.cw-cell.wrong { color: var(--ng); background: var(--ng-soft); }
.cw-cell.wrong .ch { text-decoration: underline wavy; text-underline-offset: .06em; }
.cw-cell.wrong.sel { box-shadow: inset 0 0 0 2px var(--ng); }
.cw-cell.revealed { color: var(--accent-ink); }
.cw-board.solved .cw-cell:not(.black) { background: var(--ok-soft); color: var(--ink); }
.cw-board.solved .cw-cell.revealed { color: var(--accent-ink); }
.cw-board.solved .cw-cell { cursor: default; }

.cw-input {
  position: absolute;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  font-size: 16px; /* iOS のズーム防止 */
  background: transparent;
  color: transparent;
  caret-color: transparent;
  outline: none;
  z-index: 2;
  pointer-events: none;
}
.cw-input.composing {
  opacity: 1;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 0 6px;
  width: 9em !important;
  box-shadow: var(--shadow);
}

.clue-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(100%, 560px);
  margin-top: 12px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 56px;
}
.clue-bar-text { flex: 1; font-size: .95rem; line-height: 1.45; min-width: 0; }
.clue-bar-text .tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-softer);
  border-radius: 999px;
  padding: 1px 8px;
  margin-right: 6px;
  white-space: nowrap;
}
.clue-bar-text .len { color: var(--muted); font-size: .8rem; margin-left: 4px; white-space: nowrap; }
.btn.icon { min-width: 36px; min-height: 40px; padding: 0; font-size: 1.3rem; border-radius: 10px; }

.palette {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  width: min(100%, 520px);
  margin-top: 12px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.palette .key {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  color: var(--ink);
}
.palette .key:active { background: var(--accent-soft); }
.palette .key.blank { visibility: hidden; }
.palette .key.fn { background: var(--bg-deep); font-size: .95rem; }
.palette .key.wide2 { grid-column: span 2; }
.palette .key.wide3 { grid-column: span 3; }

.controls { justify-content: center; width: min(100%, 560px); }
.controls .spacer { min-width: 0; }

.play-side { display: grid; gap: 12px; min-width: 0; }
.clue-list { padding: 12px 14px; }
.clue-list h2 { margin: 0 0 6px; font-size: .95rem; color: var(--ink); }
.clue-list ol { list-style: none; margin: 0; padding: 0; }
.clue-list li {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
.clue-list li:hover { background: var(--accent-softer); }
.clue-list li .n { font-weight: 700; min-width: 1.4em; text-align: right; color: var(--accent-ink); }
.clue-list li.active { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.clue-list li.filled .t { color: var(--muted); }
.clue-list li.filled .n { color: var(--muted); }

@media (max-width: 480px) {
  .palette { gap: 3px; }
  .palette .key { min-height: 42px; font-size: 1rem; border-radius: 6px; }
  .controls .btn { padding: 6px 10px; font-size: .85rem; }
}
