:root {
    --bg: #030303;
    --panel: #0c0c0b;
    --panel2: #12110e;
    --gold: #e4aa24;
    --gold2: #ffda68;
    --text: #fffaf0;
    --muted: #c8c1b4;
    --line: rgba(228, 170, 36, 0.28);
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background:
        radial-gradient(
            circle at 50% 8%,
            rgba(228, 170, 36, 0.16),
            transparent 32%
        ),
        var(--bg);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
    line-height: 1.55;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input {
    font: inherit;
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 15px clamp(18px, 4vw, 54px);
    background: rgba(3, 3, 3, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar strong,
.brand,
h1,
h2,
.eyebrow {
    font-family: Cinzel, Georgia, serif;
}
.topbar a {
    color: var(--gold2);
}
main {
    width: min(1220px, calc(100% - 32px));
    margin: auto;
}
.intro {
    text-align: center;
    padding: 58px 0 28px;
}
.intro h1 {
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.95;
    margin: 0 0 18px;
    color: var(--gold2);
}
.intro p:last-child {
    max-width: 800px;
    margin: auto;
    color: var(--muted);
}
.eyebrow {
    margin: 0 0 8px;
    color: var(--gold);
    letter-spacing: 0.13em;
    text-transform: uppercase;
    font-size: 0.82rem;
}
.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 34px;
    align-items: start;
    padding: 16px 0 50px;
}
.status-line {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    color: var(--muted);
}
.status-line strong {
    font-size: 2rem;
    color: var(--gold2);
}
.wheel-shell {
    position: relative;
    width: min(100%, 680px);
    aspect-ratio: 1;
    margin: auto;
    touch-action: none;
    user-select: none;
}
.gatople-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 28px rgba(228, 170, 36, 0.28));
    pointer-events: none;
    transform: translateY(-20px);
}
.wheel-svg {
    position: absolute;
    inset: 12.8%;
    width: 74.4%;
    height: 74.4%;
    overflow: visible;
    cursor: grab;
}
.wheel-svg:active {
    cursor: grabbing;
}
.segment {
    stroke: rgba(255, 250, 240, 0.3);
    stroke-width: 1.5;
    cursor: pointer;
    transition:
        opacity 0.16s,
        filter 0.16s;
}
.segment:hover,
.segment.active {
    filter: brightness(1.32);
    opacity: 1;
}
.segment-label {
    fill: #fffaf0;
    font-family: Cinzel, serif;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    text-shadow: 0 2px 4px #000;
}
.wheel-core {
    fill: rgba(3, 3, 3, 0.9);
    stroke: var(--gold2);
    stroke-width: 3;
}
.core-small,
.core-tonic {
    fill: var(--gold2);
    text-anchor: middle;
    font-family: Cinzel, serif;
}
.core-small {
    font-size: 18px;
    letter-spacing: 4px;
}
.core-tonic {
    font-size: 54px;
    font-weight: 700;
}
.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 14px;
}
.controls button,
.toggles button {
    border: 1px solid var(--line);
    background: var(--panel2);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
}
.controls button:hover,
.toggles button:hover {
    border-color: var(--gold2);
    color: var(--gold2);
}
.toggles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
}
.toggles label {
    display: flex;
    gap: 7px;
    align-items: center;
}
.card {
    background: linear-gradient(
        180deg,
        rgba(18, 17, 14, 0.96),
        rgba(8, 8, 7, 0.96)
    );
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 20px;
}
.card h2 {
    margin: 0 0 12px;
    color: var(--gold2);
    font-size: 1.5rem;
}
.preview-card {
    min-height: 210px;
}
.role-swatch {
    height: 12px;
    border-radius: 99px;
    margin-top: 22px;
    background: var(--gold);
}
.table-wrap {
    max-height: 520px;
    overflow: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th,
td {
    text-align: left;
    padding: 9px 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
th {
    position: sticky;
    top: 0;
    background: var(--panel2);
    color: var(--gold2);
}
td:nth-child(2) {
    font-size: 1.25rem;
}
.instruments {
    padding: 15px 0 60px;
}
.instrument-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin: 0 0 18px;
}
.instrument-heading h2 {
    font-size: 2.2rem;
    margin: 0;
    color: var(--gold2);
}
.instrument-heading > p {
    max-width: 620px;
    color: var(--muted);
    margin: 0;
}
.piano {
    position: relative;
    display: flex;
    height: 220px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #111;
}
.key {
    position: relative;
    border: 0;
    border-right: 1px solid #333;
    cursor: pointer;
    padding: 0;
}
.key.white {
    flex: 1;
    background: linear-gradient(180deg, #ffffff 0%, #f6f1e7 100%);
    color: #111;
    border-radius: 0 0 4px 4px;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.1s, box-shadow 0.1s;
}
.key.white:hover {
    background: linear-gradient(180deg, #ffffff 0%, #fffbf2 100%);
}
.key.white:active, .key.white.active {
    background: #e2dad0;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.15);
}
.key.black {
    position: absolute;
    z-index: 2;
    width: 6.8%;
    height: 62%;
    background: linear-gradient(180deg, #2c2c2c 0%, #111111 100%);
    color: #fff;
    border: 1px solid #000;
    border-top: none;
    border-bottom: 5px solid #000;
    border-radius: 0 0 7px 7px;
    transform: translateX(-50%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: background 0.1s, border-bottom-width 0.05s, transform 0.05s;
}
.key.black:hover {
    background: linear-gradient(180deg, #3a3a3a 0%, #171717 100%);
}
.key.black:active, .key.black.active {
    border-bottom-width: 2px;
    background: #0a0a0a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.key-label {
    position: absolute;
    bottom: 9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    text-align: center;
}
.key.black .key-label {
    bottom: 7px;
    color: #fff;
}
.key-role {
    display: block;
    font-weight: 900;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    margin-bottom: 2px;
}
.key.black .key-role {
    font-size: 1.15rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}
.guitar-heading {
    margin-top: 48px;
}
.fretboard-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
}
.fretboard {
    min-width: 940px;
    display: grid;
    grid-template-columns: 72px repeat(13, 1fr);
    border-top: 4px solid #6c4a25;
    border-bottom: 4px solid #6c4a25;
    background: linear-gradient(90deg, #3a2413, #6a3f1d);
}
.fret {
    min-height: 50px;
    border-right: 2px solid #b7b7b7;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.74rem;
    text-align: center;
    text-shadow: 0 1px 3px #000;
}
.fret::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% - 1px);
    height: 1.5px;
    background: linear-gradient(180deg, #e5e5e5, #999);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}
.fret.string-name::before {
    display: none;
}
.fret-row-0::before { height: 1px; }
.fret-row-1::before { height: 1.3px; }
.fret-row-2::before { height: 1.6px; }
.fret-row-3::before { height: 2px; }
.fret-row-4::before { height: 2.4px; }
.fret-row-5::before { height: 3px; }

.fret.string-name {
    background: #17120d;
    color: var(--gold2);
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 900;
    font-size: 1.15rem;
    text-shadow: 0 2px 4px #000;
}
.note-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6), inset 0 1.5px 3px rgba(255, 255, 255, 0.45);
    transition: transform 0.1s, box-shadow 0.1s;
}
.note-dot span:first-child {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 900;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.note-dot span:last-child {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 700;
    font-size: 0.55rem;
    letter-spacing: 0.5px;
    margin-top: -1px;
}
.fret:active .note-dot {
    transform: scale(0.92);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 26px clamp(18px, 4vw, 54px);
    border-top: 1px solid var(--line);
    color: var(--muted);
}
footer a {
    color: var(--gold2);
}
kbd {
    border: 1px solid #555;
    border-bottom-width: 3px;
    border-radius: 5px;
    padding: 1px 5px;
    background: #111;
    color: var(--gold2);
}
@media (max-width: 900px) {
    .workspace {
        grid-template-columns: 1fr;
    }
    .info-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .card {
        margin: 0;
    }
    .instrument-heading {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }
}
@media (max-width: 620px) {
    .topbar strong {
        display: none;
    }
    .workspace {
        gap: 20px;
    }
    .info-column {
        grid-template-columns: 1fr;
    }
    .wheel-svg {
        inset: 10%;
        width: 80%;
        height: 80%;
    }
    .piano {
        height: 180px;
    }
    .instrument-heading h2 {
        font-size: 1.8rem;
    }
    footer {
        flex-direction: column;
    }
    .toggles {
        font-size: 0.9rem;
    }
}
.fixed-sector {
    stroke: rgba(255, 250, 240, 0.42);
    stroke-width: 1;
    opacity: 0.96;
    pointer-events: none;
}
.fixed-glyph {
    fill: #fffaf0;
    font-family: Cinzel, serif;
    font-size: 19px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    text-shadow: 0 2px 5px #000;
}
.free-center {
    fill: rgba(3, 3, 3, 0.28);
    stroke: rgba(255, 218, 104, 0.75);
    stroke-width: 2;
    stroke-dasharray: 5 8;
    pointer-events: none;
}
.center-label,
.center-subtitle {
    fill: var(--gold2);
    text-anchor: middle;
    font-family: Cinzel, serif;
    pointer-events: none;
}
.center-label {
    font-size: 17px;
    letter-spacing: 3px;
}
.center-subtitle {
    font-size: 10px;
    letter-spacing: 1.5px;
    fill: var(--muted);
}
.geometry {
    fill: none;
    stroke: rgba(255, 218, 104, 0.88);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
    transition: opacity 0.2s;
}
.pentagram {
    stroke: rgba(255, 250, 240, 0.84);
    stroke-width: 2;
}
.geometry.hidden,
#zoneGuides.hidden {
    opacity: 0;
}
.zone-circle,
.zone-line {
    fill: none;
    stroke: rgba(255, 218, 104, 0.33);
    stroke-width: 2;
    stroke-dasharray: 7 8;
    pointer-events: none;
}
.controls {
    flex-wrap: wrap;
}
.segment-label {
    font-size: 18px;
}
.segment {
    touch-action: none;
}
