.rc-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 24px;
  color: var(--cg-ink);
  font-family: Inter, Arial, sans-serif;
}

.rc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rc-statline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.rc-stat,
.rc-hud-card {
  min-width: 74px;
  padding: 8px 10px;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: var(--cg-panel);
  box-shadow: 0 8px 20px rgba(33, 43, 40, 0.08);
}

.rc-stat span,
.rc-hud-card span {
  display: block;
  color: var(--cg-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.rc-stat strong,
.rc-hud-card strong {
  display: block;
  margin-top: 2px;
  color: var(--cg-ink);
  font-size: 19px;
  line-height: 1;
  white-space: nowrap;
}

.rc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rc-btn,
.rc-close {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: var(--cg-panel);
  color: var(--cg-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(33, 43, 40, 0.08);
  transition: transform 120ms ease, border-color 120ms ease;
}

.rc-btn {
  padding: 0 14px;
}

.rc-btn:hover,
.rc-close:hover {
  transform: translateY(-1px);
  border-color: var(--cg-teal);
}

.rc-btn:focus-visible,
.rc-close:focus-visible,
.rc-canvas:focus-visible {
  outline: 3px solid rgba(49, 95, 157, 0.35);
  outline-offset: 3px;
}

.rc-primary {
  border-color: transparent;
  background: var(--cg-teal);
  color: #fff;
}

.rc-icon-btn {
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.rc-icon-btn svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rc-hud {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.rc-hud-card {
  flex: 1 1 90px;
  text-align: center;
}

.rc-hud-card strong {
  font-variant-numeric: tabular-nums;
}

.rc-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: #22343c;
  box-shadow: var(--cg-shadow);
  touch-action: none;
}

.rc-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.02;
  max-height: min(72vh, 660px);
  cursor: pointer;
}

.rc-timerbar {
  height: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.rc-timerfill {
  height: 100%;
  width: 100%;
  background: var(--cg-amber);
  transition: width 120ms linear;
}

.rc-start,
.rc-result {
  position: absolute;
  left: 50%;
  display: grid;
  gap: 6px;
  width: min(84%, 300px);
  padding: 16px;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cg-ink);
  text-align: center;
  box-shadow: var(--cg-shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.rc-start {
  bottom: 20px;
  pointer-events: none;
}

.rc-start strong,
.rc-result strong {
  font-size: 22px;
  line-height: 1.1;
}

.rc-start span,
.rc-result span,
.rc-result p {
  margin: 0;
  color: var(--cg-muted);
  font-size: 14px;
}

.rc-result {
  top: 50%;
  transform: translate(-50%, -50%);
}

.rc-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(30, 37, 40, 0.32);
}

.rc-modal-card {
  position: relative;
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: var(--cg-panel);
  color: var(--cg-ink);
  box-shadow: 0 24px 70px rgba(30, 37, 40, 0.22);
}

.rc-modal-card h2 {
  margin: 0 48px 12px 0;
  font-size: 24px;
  line-height: 1.1;
}

.rc-modal-card p {
  margin: 10px 0 0;
  color: var(--cg-muted);
  line-height: 1.45;
}

.rc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.rc-hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .rc-shell {
    padding: 0 10px 18px;
  }

  .rc-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rc-statline,
  .rc-actions {
    justify-content: center;
  }

  .rc-stat {
    flex: 1 1 72px;
    text-align: center;
  }

  .rc-hud-card {
    min-width: 0;
    flex: 1 1 70px;
    padding: 7px 6px;
  }

  .rc-hud-card strong {
    font-size: 16px;
  }

  .rc-canvas {
    aspect-ratio: 1 / 1.08;
  }
}
