.play-time-options { border: 0; padding: 0; margin: 1.25rem 0; color: inherit; }
.play-time-options legend { font-size: 1.1rem; font-weight: 800; }
.play-time-options p { margin: .4rem 0 .8rem; line-height: 1.5; color: var(--slate, #68838a); }
.play-time-options > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.play-time-options button { font: inherit; cursor: pointer; border: 1px solid #c4b3db; border-radius: .9rem; padding: .85rem .5rem; background: #f6f1fc; color: #49316d; font-weight: 800; }
.play-time-options button[aria-pressed="true"] { background: #dfd0f4; border-color: #8966b8; box-shadow: inset 0 0 0 1px #8966b8; }
.play-time-options button:focus-visible { outline: 3px solid #9273ba; outline-offset: 3px; }
.play-time-options button:disabled { cursor: default; }
.play-time-dialog { width: min(34rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 1.6rem; border: 1px solid #ffffff90; border-radius: 1.6rem; background: #fff; color: #123d47; box-shadow: 0 1rem 3rem #123d472b; }
.play-time-dialog::backdrop { background: #123d4759; backdrop-filter: blur(5px); }
.play-time-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.play-time-dialog h2 { margin: .3rem 0; font-size: clamp(1.6rem, 5vw, 2rem); }
.play-time-dialog .play-time-options > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.play-time-dialog .play-time-close { width: 2.5rem; height: 2.5rem; flex-shrink: 0; border: 0; border-radius: 50%; background: #f0eaf8; color: #49316d; font-size: 1.5rem; cursor: pointer; }
.play-time-start { width: 100%; min-height: 3rem; padding: .75rem; border: 1px solid #9375bb; border-radius: 999px; background: #b69bdc; color: #302147; font: inherit; font-weight: 900; cursor: pointer; }
.play-time-start:disabled { opacity: .65; cursor: wait; }
.play-time-dialog [data-time-error]:empty { display: none; }
.play-time-dialog [data-time-error] { color: #a84630; }
.solo-question-timer { flex-shrink: 0; font-variant-numeric: tabular-nums; font-weight: 800; padding: .4rem .7rem; border-radius: 1rem; background: #eee6f8; white-space: nowrap; }
.solo-question-timer.is-urgent { background: #fff0e8; color: #a84630; }
/* Compact lobby controls beside the exit button. */
.room-heading-actions { position: relative; display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.room-time-trigger { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; flex-shrink: 0; padding: 0; border: 1px solid #b49ad3; border-radius: 50%; background: #e5d8f5; color: #55406e; font: inherit; font-size: .9rem; font-weight: 900; cursor: pointer; font-variant-numeric: tabular-nums; }
.room-time-trigger:focus-visible { outline: 3px solid #9273ba; outline-offset: 3px; }
.room-time-trigger:disabled { cursor: default; }
.room-heading-actions .room-exit { position: static; }
[data-button-theme="night"] .room-time-trigger { background: #302b50; color: #f1f4ff; border-color: #73618f; }
[data-screen="scoreboard"] .scoreboard-timer { display: none; }
[data-button-theme="night"] :is(.play-time-dialog, .play-time-options button, .play-time-close, .solo-question-timer) { background: #302b50; color: #f1f4ff; border-color: #73618f; }
[data-button-theme="night"] .play-time-options button[aria-pressed="true"] { background: #675084; border-color: #d0b5f1; box-shadow: inset 0 0 0 1px #d0b5f1; }

.room-time-status { position: absolute; top: 100%; right: 0; width: 14rem; margin-top: .4rem; color: #a84630; font-size: .72rem; line-height: 1.3; text-align: right; }
.room-time-status:empty { display: none; }

.room-time-control { position: relative; display: inline-flex; flex-shrink: 0; }
.room-time-hint { position: absolute; top: calc(100% + .4rem); left: 50%; width: max-content; max-width: 8rem; color: var(--ink, #55406e); font-size: .65rem; font-weight: 700; line-height: 1.3; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, -.2rem); transition: opacity .18s ease, transform .18s ease; }
.room-time-hint.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .room-time-hint { transition: none; } }

/* Small digital watch: inset dial, four hour marks and case buttons. */
.room-time-trigger { position: relative; }
.room-time-dial { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.room-time-dial-ring { opacity: .22; }
.room-time-dial-marks { opacity: .45; }
.room-time-dial-buttons { stroke-width: 2.5; opacity: .65; }
.room-time-value { position: relative; z-index: 1; font-size: .8rem; line-height: 1; letter-spacing: -.03em; }
.room-time-trigger.is-time-preview { animation: room-time-welcome .6s cubic-bezier(.22, 1, .36, 1) both; }
.room-time-value.is-time-step { animation: room-time-step .28s ease-out both; }
@keyframes room-time-welcome {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-6px) scale(1.06); }
  65% { transform: translateY(1px) scale(.98); }
}
@keyframes room-time-step {
  0% { transform: translateY(3px) scale(.9); opacity: .55; }
  55% { transform: translateY(-2px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .room-time-trigger.is-time-preview, .room-time-value.is-time-step { animation: none; }
}

.solo-time-dialog { width: min(28rem, calc(100% - 2rem)); }
.solo-time-choice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.3rem 0 1.5rem; }
.solo-time-choice strong { font-size: 1rem; }
.solo-time-choice p { margin: .35rem 0 0; color: var(--slate, #68838a); font-size: .8rem; line-height: 1.4; }
.solo-time-choice .room-time-trigger { width: 5.25rem; height: 5.25rem; }
.solo-time-choice .room-time-value { font-size: 1.15rem; }
