/* gameclock 固有スタイル */
.gc-presets { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.4rem; }
.gc-preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; }
.gc-preset-group { width: 4.2rem; font-size: 0.82rem; font-weight: 700; color: var(--text-sub); }
.gc-preset-btn {
  font: inherit; font-size: 0.88rem; padding: 0.4rem 0.8rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--pt-r); background: var(--surface); color: var(--text);
}
.gc-preset-btn:hover { border-color: var(--pt-accent); }
.gc-preset-btn.is-on { border-color: var(--pt-accent); background: var(--pt-accent-soft); color: var(--pt-accent); font-weight: 700; }

.gc-time-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1.2rem; }
.gc-time-grid .form-group[hidden] { display: none; }
.gc-extra { margin-top: 0.4rem; }
.gc-hms { display: flex; align-items: center; gap: 0.4rem; }
.gc-hms input { width: 5.5rem; margin: 0; }
.gc-hms span { font-size: 0.9rem; color: var(--text-sub); margin-right: 0.5rem; }
.gc-summary { margin: 0.8rem 0 0; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: var(--pt-r); background: var(--bg); font-weight: 700; font-size: 0.92rem; }
.gc-start-actions .btn { width: auto; min-width: 12rem; font-size: 1.05rem; padding: 0.8rem 1.6rem; }

/* 時計画面 */
.gc-stage {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 0.6rem;
  height: calc(100vh - var(--hdr, 64px)); height: calc(100dvh - var(--hdr, 64px)); min-height: 440px;
  background: var(--bg);
}
.gc-stage[hidden] { display: none; }
.gc-stage:fullscreen { height: 100vh; height: 100dvh; padding: 0.8rem; }
.gc-stage:-webkit-full-screen { height: 100vh; padding: 0.8rem; }

.gc-panel {
  flex: 1 1 0; min-height: 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.5rem; margin: 0; width: auto;
  border: 2px solid var(--border); border-radius: var(--pt-r);
  background: var(--surface); color: var(--text);
  font: inherit; cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.gc-panel:focus-visible { outline: 3px solid var(--pt-accent); outline-offset: 2px; }
.gc-name { font-size: clamp(0.95rem, 2.6vh, 1.4rem); font-weight: 700; color: var(--text-sub); }
.gc-time {
  font-size: min(24vw, 18vh); font-weight: 700; line-height: 1.05; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums; font-family: "Noto Sans JP", ui-monospace, Consolas, sans-serif;
}
.gc-frac { font-size: 0.5em; font-weight: 700; margin-left: 0.04em; }
.gc-sub { font-size: clamp(0.85rem, 2.4vh, 1.25rem); color: var(--text-sub); min-height: 1.4em; }
.gc-state { font-size: clamp(0.95rem, 2.6vh, 1.4rem); font-weight: 700; min-height: 1.4em; }

.gc-panel.is-active { background: var(--pt-accent); border-color: var(--pt-accent); color: #fff; }
.gc-panel.is-active .gc-name, .gc-panel.is-active .gc-sub { color: rgba(255, 255, 255, 0.85); }
.gc-panel.is-active.is-byo { background: #b45309; border-color: #b45309; }
.gc-panel.is-active.is-low { background: var(--pt-err); border-color: var(--pt-err); }
.gc-panel.is-flag { background: var(--pt-err); border-color: var(--pt-err); color: #fff; }
.gc-panel.is-flag .gc-name, .gc-panel.is-flag .gc-sub { color: rgba(255, 255, 255, 0.85); }
.gc-panel.is-winner { border-color: var(--pt-ok); }
.gc-panel.is-winner .gc-state { color: var(--pt-ok); }
.gc-stage.is-paused .gc-panel { opacity: 0.6; }
.gc-stage.is-idle .gc-panel:not(.is-flag) .gc-time { color: var(--text-sub); }

.gc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4rem; }
.gc-bar .btn { margin: 0; width: auto; }
.gc-bar .btn:disabled { opacity: 0.45; cursor: default; }
.gc-hint { flex-basis: 100%; text-align: center; font-size: 0.82rem; color: var(--text-sub); min-height: 1.2em; }

.gc-stage.is-facing #p0 { transform: rotate(180deg); }

@media (orientation: landscape) and (min-width: 760px) {
  .gc-stage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .gc-stage > #p0 { grid-column: 1; grid-row: 1; }
  .gc-stage > #p1 { grid-column: 2; grid-row: 1; }
  .gc-stage > .gc-bar { grid-column: 1 / -1; grid-row: 2; }
  .gc-time { font-size: min(14vw, 30vh); }
  .gc-stage.is-facing #p0 { transform: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .gc-stage { min-height: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .gc-panel { transition: background-color 0.12s, border-color 0.12s; }
}
