.cc-deck {
  --cyan: #76e4ff;
  --amber: #ffc16e;
  --steel: #6b747c;
  --panel: #0b141c;
  width: min(96%, 1440px);
  margin: 1.25rem auto 2rem;
  padding: clamp(.65rem, 2vw, 1.6rem);
  color: #edf6fb;
  background: repeating-linear-gradient(115deg, #11171e 0px, #202a32 2px, #101820 5px, #151a20 9px);
  border: 2px solid var(--steel);
  border-radius: 18px;
  box-shadow: inset 0 0 0 5px #080b0e, inset 0 0 0 7px #394750, 0 15px 30px #0009;
  font-family: Inter, system-ui, sans-serif;
}
.cc-deck [hidden] { display: none !important; }
.cc-deck-heading, .cc-module, .cc-doors > div {
  background: linear-gradient(155deg, #1b2a36, var(--panel) 35%, #080e14);
  border: 1px solid var(--steel);
  border-radius: 12px;
  box-shadow: inset 0 0 0 3px #070b11, inset 0 4px 0 #73dbf5, 0 5px 12px #0009;
}
.cc-deck-heading { padding: .7rem 1.2rem; margin-bottom: .9rem; }
.cc-deck-heading span { color: var(--cyan); font-weight: 700; }
.cc-deck-heading h1 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.04em; }
.cc-deck p { margin: 0; line-height: 1.45; }
.cc-doors { display: grid; gap: .65rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: .9rem; }
.cc-doors > div, .cc-module { padding: .85rem; min-width: 0; }
.cc-doors > div:nth-child(2), .cc-channel-info, .cc-console-dock {
  box-shadow: inset 0 0 0 3px #070b11, inset 0 4px 0 #ffae58, 0 5px 12px #0009;
}
.cc-doors a, .cc-deck h2 { color: var(--cyan); font-weight: 800; }
.cc-doors > div a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.25rem; text-transform: uppercase; }
.cc-doors > div:nth-child(2) a, .cc-doors .cc-membership-link { color: var(--amber); }
.cc-membership-link { grid-column: 1 / -1; justify-self: end; }
.cc-console { display: grid; grid-template-columns: minmax(165px, 1fr) minmax(0, 3fr) minmax(165px, 1fr); align-items: start; gap: .8rem; }
.cc-tools { display: grid; gap: .8rem; }
.cc-deck h2 { font-size: 1.06rem; text-transform: uppercase; margin: 0 0 .5rem; }
.cc-deck h3 { font-size: 1.05rem; margin: .3rem 0; }
.cc-deck-nav a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid #32434f; }
.cc-enter, #selectedChannelLink { display: inline-flex; align-items: center; min-height: 44px; padding: .35rem .8rem; margin-top: .5rem; border: 1px solid var(--cyan); border-radius: 6px; color: var(--cyan); font-weight: 800; }
.cc-page-controls { display: flex; align-items: center; justify-content: space-between; gap: .45rem; }
.cc-page-controls button, .cc-channel-select { min-height: 44px; border: 1px solid #70c3df; color: #f0faff; background: #0a1822; border-radius: 6px; cursor: pointer; }
.cc-page-controls button { min-width: 44px; font-size: 1.4rem; }
.cc-page-controls button:disabled { opacity: .5; cursor: default; }
.cc-channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: .55rem; touch-action: pan-y pinch-zoom; }
.cc-channel-select { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; min-height: 92px; padding: .7rem; text-align: left; overflow-wrap: anywhere; box-shadow: inset 0 0 12px #3bc6eb38; }
.cc-channel-select[aria-pressed="true"] { border-color: var(--amber); box-shadow: inset 0 0 12px #ffc16e45; }
.cc-channel-select span { color: #b8d0df; }

.cc-console-dock { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem .8rem; margin-top: .9rem; }
.cc-console-dock a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 .4rem; }
.cc-console-dock a[aria-current="page"] { color: var(--amber); border-bottom: 2px solid var(--amber); }
.cc-deck :focus-visible { outline: 3px solid #f7fcff; outline-offset: 3px; }
@media (max-width: 820px) {
  .cc-console { grid-template-columns: minmax(0, 1fr); }
  .cc-tools { grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cc-deck-heading {
  position: relative;
  min-height: clamp(96px, 10vw, 152px);
  overflow: hidden;
  background-image: linear-gradient(90deg, #081018 3%, transparent 56%), url("cc-channels-console-art.jpg");
  background-repeat: no-repeat;
  background-size: cover, 100% auto;
  background-position: center, center top;
}
.cc-deck-heading > span, .cc-deck-heading > h1 {
  display: table;
  background: #071018ec;
  padding-inline: .3em;
}
.cc-deck-heading h1 { text-transform: uppercase; font-style: italic; }
@media (max-width: 540px) {
  .cc-deck-heading { background-size: cover, auto 540%; }
  .cc-tools { grid-template-columns: minmax(0, 1fr); }
}

/* The supplied Channels plate supplies the chassis, rails, mic and meter.
   The console lays real controls over the sample data in its sockets. */
.cc-chassis {
  position: relative;
  container: cc-chassis / inline-size;
}
.cc-doors { margin: .9rem 0 0; }

@container cc-chassis (min-width: 760px) {
  .cc-console {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    background: #07090d url("cc-channels-console-art.jpg") center / 100% 100% no-repeat;
    isolation: isolate;
  }
  .cc-deck-heading {
    position: absolute;
    inset: 0 auto auto 0;
    width: 1px;
    min-height: 0;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .cc-console .cc-module, .cc-console-dock {
    position: absolute;
    margin: 0;
    border: 0;
    border-radius: .4rem;
    box-shadow: none;
    background: #060b11;
    font-size: clamp(.8rem, 1.2cqw, 1rem);
  }
  .cc-tools { display: contents; }
  .cc-radio-controls {
    inset: 40.1% auto auto 4%;
    width: 22.3%;
    height: 16%;
    text-align: center;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #0b1520, #070b0e);
  }
  .cc-enter { margin: 0; }
  .cc-deck-nav {
    inset: 59.7% auto auto 4%;
    width: 22.1%;
    height: 28.5%;
    padding: .35rem;
    display: grid;
    grid-template-rows: repeat(5, 1fr);
  }
  .cc-deck-nav a { min-height: 0; }
  .cc-bay.cc-module {
    inset: 19.8% auto auto 29.3%;
    width: 42%;
    height: 56%;
    padding: .42rem;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }
  .cc-bay:has(#rotatorControls:not([hidden])) {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .cc-channel-grid {
    grid-template-rows: repeat(3, minmax(0, 1fr));
    min-height: 0;
  }
  .cc-channel-select {
    min-height: 0;
    border: 2px solid #78ddfb;
    box-shadow: inset 0 0 14px #1b86ac5c, 0 0 9px #108fb94d;
  }
  
  .cc-channel-info {
    inset: 24.3% auto auto 74.9%;
    width: 21.3%;
    height: 30.7%;
    padding: .55rem;
    overflow: auto;
  }
  .cc-creator-socket {
    position: absolute;
    inset: 55.6% auto auto 74.9%;
    width: 21.3%;
    height: 11.3%;
    background: #070d14;
    display: grid;
    place-content: center;
    color: var(--cyan);
    font-weight: 750;
    text-transform: uppercase;
  }
  .cc-console-dock {
    inset: auto 28% 8.35% 27.8%;
    height: 9.4%;
    gap: .2rem;
    padding: .35rem;
    justify-content: space-evenly;
    align-items: center;
  }
}
@container cc-chassis (max-width: 759px) {
  .cc-creator-socket { display: none; }
}

.cc-radio-controls .cc-enter {
  background: #0b1c27;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.cc-radio-controls .cc-enter:disabled { cursor: default; opacity: .65; }
.cc-radio-disconnect {
  min-height: 44px;
  padding: .35rem .7rem;
  border: 2px solid #ff757c;
  border-radius: 999px;
  color: #fff;
  background: radial-gradient(ellipse at 34% 24%, #b72b32, #4b070a);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cc-radio-disconnect:disabled { cursor: default; filter: brightness(.7); }
@container cc-chassis (min-width: 760px) {
  .cc-radio-disconnect {
    position: absolute;
    inset: 71.2% 3% auto auto;
    width: 8.6%;
    height: 15.5%;
    padding: 0;
    background: transparent;
    border-color: transparent;
    color: transparent;
  }
  .cc-radio-disconnect:focus-visible { border-color: #fff; }
}

.cc-radio-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem; }
.cc-channels-eq {
  width: min(100%, 24rem);
  padding: .75rem;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  background: #080f17;
  box-shadow: 0 8px 20px #000b;
}
.cc-eq-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
}
.cc-eq-heading h2, .cc-eq-heading button { margin: 0; }
.cc-eq-heading button { background: #0b1c27; cursor: pointer; }
#channelsEqControls .cc-eq-seat-faders { width: 100%; }
#channelsEqControls .cc-eq-faders {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 4px;
}
#channelsEqControls .cc-eq-fader { min-width: 0; }
#channelsEqControls .cc-eq-fader input[type="range"] {
  width: 44px;
  min-width: 44px;
  margin: 0;
  background-size: 44px 100%;
}
#channelsEqControls .cc-eq-fader-value { min-width: 0; width: 100%; text-align: center; }
#channelsEqPanel .cc-eq-gated { opacity: .75; }
@container cc-chassis (min-width: 760px) {
  .cc-channels-eq {
    position: absolute;
    z-index: 2;
    inset: 56% auto auto 4%;
  }
}

#channelsSpectrum {
  display: block;
  width: 9rem;
  height: 3rem;
  background: #090908;
  border-radius: 3px;
}
@container cc-chassis (min-width: 760px) {
  #channelsSpectrum {
    position: absolute;
    left: 75.5%;
    top: 74.5%;
    width: 12.5%;
    height: 8.5%;
  }
}


/* Six brass drums share the alignment marks and rotate separately. */
.cc-console .cc-bay.cc-module {display:grid;grid-template-rows:minmax(0,1fr);place-items:stretch center;overflow:hidden;background:radial-gradient(ellipse,#20303a,#070e14 72%);}
.cc-puzzle-lock {width:min(99%,31rem);display:grid;grid-template-rows:.46fr repeat(6,1fr) .46fr;min-height:0;padding-inline:2%;filter:drop-shadow(0 4px 4px #000);}
.lock-ring,.lock-cap {border:1px solid #60451c;border-radius:7% / 15%;background:linear-gradient(90deg,#35291a,#9b8244 10%,#c1a866 20%,#6b572d 31%,#ddc88d 48%,#f2dea2 55%,#9c8141 72%,#4b391b 93%,#211b14);box-shadow:inset 0 2px 1px #fff0ba8a,inset 0 -3px 2px #241d10,0 2px 1px black;}
.lock-cap {width:98%;justify-self:center;display:grid;place-items:end center;line-height:1;color:#35250c;font-size:1rem;border-radius:19% 19% 6% 6% / 58% 58% 22% 22%;}
.lock-foot {place-items:start center;transform:scaleY(1);border-radius:6% 6% 19% 19% / 22% 22% 58% 58%;}
.lock-ring {display:grid;align-items:stretch;grid-template-columns:10% 1fr 10%;min-height:0;isolation:isolate;}
.lock-ring button {font:inherit;border:0;border-radius:0;background:transparent;color:#211a0d;cursor:pointer;padding:0;min-width:0;min-height:0;touch-action:manipulation;}
.lock-ring .turn-back,.lock-ring .turn-next {color:#ffe6a2;font-size:1.45rem;text-shadow:0 1px 2px black;}
.lock-ring .lock-face {touch-action:pan-y pinch-zoom;display:grid;grid-template-columns:16% 1fr 16%;align-items:stretch;user-select:none;background:repeating-linear-gradient(90deg,transparent 0 10%,#372a1580 10.4%,#fff5c680 10.8%,transparent 11% 21%);}
.lock-face > span {align-content:center;text-align:center;}
.dial-before,.dial-after {font:700 clamp(.8rem,1.5vw,1.1rem)/1 Georgia,serif;color:#342711;text-shadow:0 1px #eed998;}
.dial-center {min-width:0;border-inline:1px solid #513d1e;background:linear-gradient(90deg,#b49b61,#ecda9f 50%,#baa16b);display:grid;padding:1px 3px;}
.dial-center strong,.dial-entry {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#241b0d;line-height:1.15;}
.dial-center strong {font-size:clamp(.85rem,1.7cqw,1.3rem);}
.dial-entry {font:600 clamp(.7rem,1.15cqw,.92rem)/1.15 system-ui,sans-serif;}
.lock-ring:focus-within {outline:2px solid #83e7ff;outline-offset:-2px;}
@container cc-chassis (max-width:759px) {
  .cc-console {display:grid;grid-template-columns:minmax(0,1fr);}
  .cc-bay {grid-column:1;grid-row:1;}
  .cc-puzzle-lock {min-height:344px;}
  .lock-ring {grid-template-columns:44px 1fr 44px;}
}

#ring-prompt {width:min(92vw,26rem);max-height:85dvh;overflow:auto;box-sizing:border-box;padding:1.25rem;border:1px solid #68c4d4;border-radius:12px;color:#edf8fa;background:#0b1c24;font:1rem/1.45 system-ui,sans-serif}
#ring-prompt::backdrop {background:#000b}
#ring-prompt form[method="dialog"] {float:right}
#ring-prompt h2 {margin:0 0 .75rem;font-size:1.5rem}
#ring-prompt button,#ring-action {min-height:44px;cursor:pointer}
#ring-action {display:inline-flex;align-items:center;padding:0 1rem;color:#171512;background:#ffd179;border-radius:6px;font-weight:700}
#ring-prompt [hidden] {display:none}
