.gb-page {
  --gb-accent: #f4c9ad;
  --gb-seam: #493c4b;
  --gb-mute: #cbbac7;
  color: var(--text, #f7f2ed);
}
.gb-page *, .gb-page *::before, .gb-page *::after { box-sizing: border-box; }
.gb-head { margin: .65rem 0 1.6rem; }
.gb-head h1 { font: 400 clamp(2.5rem, 4.6vw, 5rem)/1.06 var(--serif, Georgia, serif); letter-spacing: -.055em; }
.gb-head p { color: var(--muted, #beb5c4); max-width: 43rem; line-height: 1.55; margin: .68rem 0 0; }
.gb-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 1fr); gap: clamp(1rem, 2.2vw, 2.4rem); align-items: stretch; }
.gb-stage {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid #5a4857; border-radius: 1.35rem; min-height: 28rem;
  background: radial-gradient(ellipse at 48% 36%, #544253 0, #3d3144 40%, #2a2331 82%);
}
.gb-sky { display: grid; flex: 1; place-items: center; padding: clamp(1.6rem, 4vw, 3.3rem) 1rem .75rem; }
.gb-ring { position: relative; display: grid; place-items: center; width: clamp(11rem, 19vw, 17rem); aspect-ratio: 1; }
.gb-ring::before, .gb-ring::after { content: ""; position: absolute; pointer-events: none; inset: 0; border: 1px solid #d3b2b147; border-radius: 50%; }
.gb-ring::after { inset: -7%; border-color: #c2adba27; }
.gb-disc {
  position: absolute; inset: 0; border-radius: 50%; transform: scale(.67);
  border: 1px solid #f6cbb573;
  background: radial-gradient(ellipse at 37% 26%, #ffe7c9 0, #f0c3a8 34%, #d99fa0 68%, #a27488 100%);
  box-shadow: 0 0 2rem #e7a7851c, inset 0 0 1rem #fbd2b24a;
}
.gb-readout { position: relative; z-index: 1; pointer-events: none; text-align: center; color: #372530; max-width: 69%; line-height: 1.12; }
.gb-status { display: block; overflow-wrap: anywhere; font: 500 clamp(1.32rem, 2.15vw, 2rem)/1.12 var(--serif, Georgia, serif); letter-spacing: -.036em; }
.gb-beat { display: block; font-weight: 650; font-size: .9rem; font-variant-numeric: tabular-nums; margin-top: .3rem; }
.gb-beat:empty { display: none; }
.gb-land { position: absolute; z-index: -1; bottom: 0; width: 100%; height: 39%; opacity: .92; pointer-events: none; }
.gb-stage-foot { padding: 1rem clamp(1.1rem, 2.4vw, 2.1rem) 1.45rem; }
.gb-time { display: flex; justify-content: space-between; color: #eee0e6; gap: 1rem; font-size: .84rem; }
.gb-time time { font-variant-numeric: tabular-nums; font-weight: 650; }
.gb-track { margin: .55rem 0 1.25rem; background: #f1dae337; border-radius: 10px; height: .19rem; overflow: hidden; }
.gb-track i { display: block; height: 100%; background: var(--gb-accent); transform: scaleX(0); transform-origin: left; }
.gb-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.gb-page button { font: inherit; color: inherit; cursor: pointer; }
.gb-page button:disabled { cursor: default; }
.gb-page button:focus-visible { outline: 3px solid #ffd7ad; outline-offset: 3px; }
.gb-actions button { display: inline-flex; min-height: 2.8rem; align-items: center; justify-content: center; gap: .55rem; border-radius: 3rem; padding: .55rem 1.2rem; line-height: 1.3; }
.gb-icon { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.gb-primary { background: var(--gb-accent); color: #31222b !important; font-weight: 650 !important; border: 1px solid transparent; }
.gb-primary:hover { background: #ffe0c5; }
.gb-primary i { display: inline-flex; }
.gb-reset { background: #302633; border: 1px solid #927789; }
.gb-reset:disabled { opacity: .55; }
.gb-settings { border: 1px solid var(--gb-seam); border-radius: 1.35rem; padding: clamp(1rem, 2.1vw, 1.9rem); background: var(--panel, #221f2b); min-width: 0; }
.gb-settings fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.gb-settings legend { padding: 0; margin: 0 0 .62rem; color: #eee2e9; font-size: .94rem; font-weight: 650; }
.gb-patterns { display: grid; gap: .4rem; }
.gb-pattern {
  width: 100%; text-align: start; display: flex; align-items: center; gap: .72rem; min-height: 3.65rem;
  border-radius: .85rem; border: 1px solid #493f4c; background: #29232e; padding: .5rem .75rem;
}
.gb-pattern[aria-pressed="true"] { border-color: #b89185; background: #3b2e38; }
.gb-pattern:hover:enabled, .gb-durations button:hover:enabled { border-color: #b89185; }
.gb-pattern:disabled, .gb-durations button:disabled { opacity: .72; }
.gb-pattern:disabled[aria-pressed="true"], .gb-durations button:disabled[aria-pressed="true"] { opacity: 1; }
.gb-wave { display: grid; flex: none; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 50%; background: #483844; color: #eac3aa; }
.gb-wave svg { width: 72%; height: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.gb-rhythm-copy { display: block; min-width: 0; }
.gb-rhythm-copy strong, .gb-cue-copy strong { display: block; font-size: .94rem; font-weight: 620; line-height: 1.3; }
.gb-rhythm-copy small, .gb-cue-copy small { display: block; color: var(--gb-mute); font-size: .79rem; line-height: 1.4; margin-top: .14rem; }
.gb-indicator { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .25em; color: var(--gb-accent); font-size: .9rem; }
.gb-locked { border: 1px solid #705a68; border-radius: 2rem; padding: .15rem .4rem; font-size: .68rem; }
.gb-durations { display: flex; gap: .42rem; flex-wrap: wrap; }
.gb-durations button { border-radius: 1.5rem; border: 1px solid #5b4c59; background: transparent; min-height: 2.65rem; padding: .34rem .9rem; }
.gb-durations button[aria-pressed="true"] { background: #ead0bb; color: #312430; border-color: transparent; }
.gb-cue-row { display: flex; gap: .9rem; align-items: center; justify-content: space-between; border-top: 1px solid var(--gb-seam); padding-top: .95rem; }
.gb-cue-copy strong { display: flex; gap: .45rem; align-items: center; }
.gb-cue-copy strong svg { color: var(--gb-accent); }
.gb-switch { position: relative; flex: none; width: 3rem; height: 2.75rem; padding: 0; background: transparent; border: 0; }
.gb-switch::before { content: ""; position: absolute; inset: .58rem .08rem; border-radius: 2rem; border: 1px solid #766271; background: #382f3a; }
.gb-switch i { width: 1.05rem; height: 1.05rem; position: absolute; left: .4rem; top: .85rem; border-radius: 50%; background: #dac9d3; transition: transform .16s ease; }
.gb-switch[aria-checked="true"]::before { background: #efc5a9; border-color: #efc5a9; }
.gb-switch[aria-checked="true"] i { transform: translateX(1.15rem); background: #493440; }
.gb-note { color: var(--gb-mute); font-size: .76rem; margin: .95rem 0 0; line-height: 1.45; }
@media (max-width: 750px) {
  .gb-head { margin: .4rem 0 1.2rem; }
  .gb-layout { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .gb-stage { min-height: 20rem; }
  .gb-sky { padding-top: 1.75rem; }
  .gb-stage-foot { padding-bottom: 1rem; }
  .gb-ring { width: clamp(9rem, 35vw, 12rem); }
}
@media (max-width: 340px) {
  .gb-wave { display: none; }
  .gb-settings { padding: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gb-disc { transform: scale(.82) !important; }
  .gb-switch i { transition: none; }
}
