* { box-sizing: border-box; }
:root { color-scheme: dark; background: #060b13; color: #edf6ff; font: 16px/1.5 system-ui, sans-serif; scrollbar-gutter: stable both-edges; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(#05090d33, #05090d91), url("./mc3-black-diamond-tread.jpg") center top / 430px;
}
header { position:relative; z-index:2; display:flex; align-items:center; gap:clamp(10px,2.8vw,14px); min-height:81px; padding: 10px clamp(18px,5vw,72px); border-bottom: 1px solid #23394e; background:#080f1a; }
header img { display:block; border-radius:9px; }
.header-logo { flex:none; width:clamp(48px,14vw,60px); height:auto; }
h1 { margin:0; font-size:clamp(1.25rem,4vw,1.65rem); letter-spacing:-.04em; }
h1 span { color:#91b8e4; }
main { padding-inline: clamp(16px,5vw,40px); }
#km-command .home-cube-art{margin:56px auto 20px;max-width:440px;padding-bottom:44px;text-align:center}
#km-command .home-cube-poem{max-width:440px;margin:4px auto 0;color:#b9d0e4;text-align:center}
#km-command .home-cube-poem::before{content:"";display:block;width:min(80%,340px);height:1px;margin:0 auto 18px;background:#4a9ed2;transform:scaleY(.5);transform-origin:center;opacity:.4}
#km-command .home-cube-answer {
  padding: clamp(14px, 4vw, 24px);
  border: 1px solid #365573;
  border-radius: 14px;
  background: rgb(8 18 32 / 80%);
  box-shadow: 0 12px 30px #0007;
}
#km-command .home-cube-answer[hidden]{display:none}
#km-command .home-cube-answer.is-revealing{animation:home-cube-poem-drop .36s cubic-bezier(.2,.8,.2,1) both}
@keyframes home-cube-poem-drop{from{opacity:0;transform:translateY(-14px)}to{opacity:1;transform:translateY(0)}}
#km-command .home-cube-poem h3{margin:0;color:#42bbff;font:600 16px/1.3 "Avenir Next",Avenir,system-ui,sans-serif;letter-spacing:.02em;text-shadow:0 0 12px #168cec55}
#km-command .home-cube-poem h3[hidden]{display:none}
#km-command .home-cube-poem blockquote{margin:12px auto 10px;max-width:390px;color:#d6e7f3;font:500 17px/1.45 Georgia,serif}
#km-command .home-cube-poem p{margin:0;color:#99b6ce;font-size:12px;line-height:1.4}
#km-command .home-cube-poem cite{font-style:italic}
#km-command .home-cube-video-toggle{margin-top:18px;text-align:left}
#km-command .home-cube-video-toggle summary{display:flex;align-items:center;gap:10px;min-height:46px;padding:10px 14px;border:1px solid #304c68;border-radius:10px;color:#a8d9fa;background:#0e2033;font-size:13px;font-weight:600;cursor:pointer;list-style:none}
#km-command .home-cube-video-toggle summary::-webkit-details-marker{display:none}
#km-command .home-cube-video-toggle summary:hover,#km-command .home-cube-video-toggle summary:focus-visible{border-color:#84c6f6;background:#17314c}
#km-command .home-cube-video-arrow{margin-left:auto;font-size:19px;line-height:1;transition:transform .2s ease}
#km-command .home-cube-video-toggle[open] .home-cube-video-arrow{transform:rotate(180deg)}
#km-command .home-cube-video{overflow:hidden;width:100%;aspect-ratio:16/9;margin-top:18px;border:1px solid #304c68;border-radius:12px;background:#07121e}
#km-command .home-cube-video iframe{display:block;width:100%;height:100%;border:0}
#km-command .home-cube-trigger{display:block;width:100%;padding:0;border:0;background:none;cursor:pointer}
#km-command .home-cube-image{position:relative;display:block;isolation:isolate;pointer-events:none}
#km-command .home-cube-image img{display:block;width:100%;height:auto;max-width:100%;margin:auto}
#km-command .home-cube-image .home-cube-shell{transition:filter .3s ease}
#km-command .home-cube-image .home-cube-bulb{position:absolute;left:23%;top:25%;width:60%;height:auto;pointer-events:none;transition:opacity .24s ease}
#km-command .home-cube-image .home-cube-bulb-off{opacity:0}
#km-command .home-cube-shell{filter:grayscale(1) brightness(.67) contrast(1.15)}
#km-command .has-outer-glow .home-cube-shell{filter:grayscale(0) brightness(1.08) contrast(1) drop-shadow(0 0 9px #4dadffad) drop-shadow(0 0 25px #036eff80)}
#km-command :is(.home-cube-interior-glow, .home-cube-wall-glow) {
  position: absolute;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transition: opacity .38s ease;
}
#km-command .home-cube-interior-glow {
  left: 25%;
  top: 30%;
  width: 60%;
  height: 52%;
  background: radial-gradient(ellipse at 52% 49%, #baf3ffc9 0%, #4bc8ffb5 26%, #0876d388 51%, transparent 74%);
  filter: blur(8px);
}
#km-command .home-cube-wall-glow {
  top: 36%;
  height: 38%;
  filter: blur(5px);
}
#km-command .home-cube-wall-glow-left {
  left: 23%;
  width: 14%;
  transform: skewY(-13deg);
  background: radial-gradient(ellipse at 76% 58%, #81d7ff96, #267dc35c 43%, transparent 73%);
}
#km-command .home-cube-wall-glow-right {
  left: 73%;
  width: 14%;
  transform: skewY(9deg);
  background: radial-gradient(ellipse at 25% 50%, #69caff8f, #186bb34d 46%, transparent 74%);
}
#km-command .home-cube-trigger:not(.is-off) :is(.home-cube-interior-glow, .home-cube-wall-glow) { opacity: 1; }
#km-command .home-cube-trigger.is-off .home-cube-bulb-on{opacity:0}
#km-command .home-cube-trigger.is-off .home-cube-bulb-off{opacity:1}
#km-command .home-cube-trigger.power-on .home-cube-bulb-on{animation:bulb-power-on .48s ease-out}
@keyframes bulb-power-on{0%{filter:brightness(.35)}36%{filter:brightness(1.2)}57%{filter:brightness(.84)}100%{filter:none}}
#km-command .home-cube-trigger:focus-visible{outline:2px solid #8cc6ff;outline-offset:6px;border-radius:16px}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #km-command .home-cube-image { transition: transform .24s ease; }
  #km-command .home-cube-trigger:hover .home-cube-image { transform: translateY(-5px); }
}

@media(prefers-reduced-motion:reduce){#km-command .home-cube-image .home-cube-shell,#km-command .home-cube-image .home-cube-bulb,#km-command :is(.home-cube-interior-glow, .home-cube-wall-glow),#km-command .home-cube-video-arrow{transition:none;animation:none}#km-command .home-cube-answer.is-revealing{animation:none}}
#km-command .home-cube-art { max-width: 520px; margin-top: clamp(0px,2vw,20px); }
#km-command .home-cube-trigger { border-radius: 16px; }
#km-command .video-fallback { margin: 12px 0 0; }
.video-fallback a { color: #a8d9fa; }

#km-command .home-cube-stage {
  max-width: 520px;
  width: 100%;
  margin-inline: auto;
}

@media (max-width: 600px) {
  #km-command .home-cube-stage { width: 80%; }
}

.home-controls {
  --controls-inset: clamp(18px,5vw,72px);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px var(--controls-inset) 0;
}

.control-menu > summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  color: #b4c8d9;
  cursor: pointer;
  list-style: none;
}
.control-menu > summary::-webkit-details-marker { display: none; }
.control-menu.sound-enabled > summary { color: #84d6ff; }
.control-menu > summary:focus-visible { outline: 2px solid #8cc6ff; outline-offset: -2px; }

.control-menu > summary svg { transition: color .2s ease, filter .2s ease; }
.control-menu > summary:is(:hover, :focus-visible) svg, .control-menu[open] > summary svg {
  color: #68ceff;
  filter: drop-shadow(0 0 6px #35baff99);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #settings-menu > summary:hover polygon:first-of-type {
    transform-origin: 8.1px 15px;
    animation: gear-turn 3s linear infinite;
  }
  #settings-menu > summary:hover polygon:nth-of-type(2) {
    transform-origin: 18px 6.7px;
    animation: gear-turn 2.4s linear infinite reverse;
  }
}
@keyframes gear-turn { to { transform: rotate(1turn); } }

.control-panel {
  position: absolute;
  top: calc(100% + 4px);
  inset-inline-end: var(--controls-inset);
  display: grid;
  gap: 12px;
  width: min(264px, calc(100% - var(--controls-inset) - var(--controls-inset)));
  padding: 14px 16px;
  border: 1px solid #34495d;
  border-radius: 12px;
  background: linear-gradient(155deg,#142132,#0d1621 70%);
  box-shadow: 0 12px 32px #0009;
  color: #ceddeb;
  font-size: .875rem;
}
.control-panel h2 { margin: 0; font-size: .95rem; color: #edf6ff; }
.popz-dedication {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .65rem;
  margin: 0;
  padding: 0 0 .7rem;
  border-bottom: 1px solid #34495d;
  background: radial-gradient(ellipse 43% 68px at 50% 72px, #254660, rgb(37 70 96 / 55%) 45%, transparent 100%);
}
.popz-dedication img {
  display: block;
  width: 100px;
  height: auto;
  mask-image: linear-gradient(#000 66%, transparent);
}
.popz-dedication figcaption {
  display: grid;
  gap: .23rem;
  line-height: 1.2;
}
.popz-dedication figcaption span { color: #b6cee4; font-size: .78rem; }
.popz-dedication strong { color: #edf6ff; font-size: .9375rem; white-space: nowrap; }
.popz-dedication figcaption .popz-nickname { color: #a7d6ff; font-size: .88rem; }
.tool-action {
  min-height: 40px;
  border: 1px solid #314b63;
  border-radius: 8px;
  background: #132338;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.tool-action:is(:hover, :focus-visible) { background: #1b3148; border-color: #6287a8; }
.tool-action:disabled { opacity: .55; cursor: wait; }
.tool-dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 18px;
  border: 1px solid #34495d;
  border-radius: 14px;
  background: linear-gradient(155deg,#142132,#0d1621 70%);
  box-shadow: 0 18px 44px #000a;
  color: #edf6ff;
}
.tool-dialog::backdrop { background: #05090dcc; }
.tool-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tool-dialog-heading h2 { margin: 0; font-size: 1.15rem; }
.tool-dialog-heading button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid #34495d;
  border-radius: 8px;
  background: transparent;
  color: #edf6ff;
  font: 1.35rem/1 system-ui, sans-serif;
  cursor: pointer;
}
#problem-form { display: grid; gap: 6px; }
#problem-form label:not(:first-child) { margin-top: 6px; }
#problem-form :is(input, select, textarea) {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #34495d;
  border-radius: 8px;
  background: #0a131e;
  color: inherit;
  font: inherit;
}
#problem-form textarea { resize: vertical; }
.report-note, #problem-status { margin: 4px 0; font-size: .85rem; color: #b4c8d9; }
#problem-status:empty { display: none; }
.control-panel > label, .volume-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.control-panel input { margin: 0; accent-color: #84d6ff; }
.control-panel input[type="checkbox"] { width: 16px; height: 16px; }
.volume-label { justify-content: space-between; }
#sound-level { color: #a7d6ff; font-variant-numeric: tabular-nums; }

.glow-control {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  min-width: 48px;
  min-height: 44px;
}

.glow-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-plate {
  display: grid;
  place-items: center;
  width: 48px;
  height: 33px;
  border: 1px solid #718595;
  border-radius: 9px;
  background:
    radial-gradient(circle at 8px 8px, #121b25 1px, #8295a4 2px, transparent 3px),
    radial-gradient(circle at calc(100% - 8px) 8px, #121b25 1px, #8295a4 2px, transparent 3px),
    radial-gradient(circle at 8px calc(100% - 8px), #121b25 1px, #8295a4 2px, transparent 3px),
    radial-gradient(circle at calc(100% - 8px) calc(100% - 8px), #121b25 1px, #8295a4 2px, transparent 3px),
    linear-gradient(135deg, #455866, #1c2a37 54%, #3a4c5a);
  box-shadow: inset 0 0 0 2px #1b2834, 0 2px 6px #0009;
}

.switch-plate i {
  display: grid;
  place-items: center;
  width: 23px;
  aspect-ratio: 1;
  border: 2px solid #8399aa;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #52697b, #0c1826 70%);
  box-shadow: inset 0 0 0 2px #142333, 0 0 0 1px #0a1019;
}

.switch-plate i::before {
  content: "";
  width: 12px;
  height: 5px;
  border-radius: 8px;
  background: linear-gradient(#a9b9c4, #394e5f);
  box-shadow: 0 1px 2px #000;
  transform: translateX(-3px);
}

.glow-control input:checked + .switch-plate i {
  background: radial-gradient(circle at 35% 28%, #75d2ff, #14629a 52%, #0c1826 76%);
  box-shadow: inset 0 0 0 2px #142333, 0 0 0 1px #0a1019, 0 0 8px #35baffb3;
}

.glow-control input:checked:is(:hover, :focus-visible) + .switch-plate i {
  box-shadow: inset 0 0 0 2px #142333, 0 0 0 1px #0a1019, 0 0 12px #68ceff;
}

.glow-control input:checked + .switch-plate i::before {
  transform: translateX(3px);
}

.glow-control input:focus-visible + .switch-plate {
  outline: 2px solid #8cc6ff;
  outline-offset: 3px;
}

.account-button {
  display: grid;
  place-items: center;
  margin-left: auto;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #d8eaff;
  cursor: pointer;
}

.account-button:hover, .account-button[aria-expanded="true"] { background: #17283a; }

.account-icon {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  width: 25px;
  height: 25px;
  border: 1px solid #7290aa;
  border-radius: 50%;
}

.account-icon::before,
.account-icon::after {
  content: "";
  border: 1px solid currentColor;
}

.account-icon::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.account-icon::after {
  width: 10px;
  height: 5px;
  border-radius: 6px 6px 2px 2px;
}

.profile-card {
  position: absolute;
  top: calc(100% + 8px);
  right: clamp(18px,5vw,72px);
  width: min(352px, calc(100vw - 36px));
  max-height: calc(100dvh - 96px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #34495d;
  border-radius: 15px;
  background: linear-gradient(155deg,#142132,#0d1621 70%);
  box-shadow: 0 18px 44px #000a, inset 0 1px #ffffff0e;
}

.profile-brand strong { display: block; color: #a7d6ff; font-size: .75rem; }
.profile-brand h2 { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.profile-card form { display: grid; gap: 8px; margin-top: 16px; }
.profile-card input, .profile-card button {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #435d77;
  border-radius: 7px;
  background: #15283e;
  color: inherit;
  font: inherit;
}
.profile-card button { cursor: pointer; }
.profile-card button:disabled { opacity: .55; cursor: wait; }
.profile-card button[type=submit], #continue-sign-in { background: #a7d6ff; color: #101d2d; font-weight: 650; }
#account-confirmation, #account-passkey-sign-in { display: grid; gap: 10px; margin-top: 12px; }
#account-confirmation[hidden], #account-passkey-sign-in[hidden] { display: none; }
#account-passkey-sign-in { padding-top: 12px; border-top: 1px solid #2a4055; }
.remember-device { display: flex; align-items: center; gap: 8px; color: #ceddeb; font-size: .85rem; }
.remember-device input { margin: 0; accent-color: #a7d6ff; }
.account-passkeys { margin-top: 14px; padding-top: 8px; border-top: 1px solid #2a4055; }
.account-passkeys p { margin: 0 0 8px; color: #ceddeb; font-size: .85rem; }
.account-passkeys p:empty, #saved-passkeys:empty { display: none; }
.account-passkeys > button { margin: 4px 4px 4px 0; font-size: .83rem; }
#saved-passkeys li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .82rem; }
#saved-passkeys button { font-size: .78rem; }
#account-confirmation p { margin: 0; color: #ceddeb; font-size: .9rem; }
#account-confirmation a { color: #a7d6ff; font-size: .85rem; }

.profile-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid #283d50;
  border-radius: 10px;
  background: #0a131e;
}
#profile-display-name { margin: 0; color: #ceddeb; font-size: .875rem; overflow-wrap: anywhere; }
.account-photo, #profile-initial {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.account-photo { object-fit: cover; }
#profile-initial {
  display: grid;
  place-items: center;
  background: #213b50;
  color: #b8e2ff;
  font-weight: 650;
}

.profile-card h3 { margin: 16px 0 8px; color: #c9dded; font-size: .85rem; }
.profile-card ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.profile-card li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #314b63;
  border-radius: 8px;
  background: #132338;
  color: inherit;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.profile-card li a:hover { background: #1b3148; border-color: #6287a8; }
.app-mark {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  height: 28px;
  border-radius: 6px;
  background: #25435e;
  color: #c6e8ff;
}
.app-arrow { margin-left: auto; color: #9cbbd6; }
.profile-actions {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #2a4055;
}
.profile-settings { flex: 1; }
.profile-settings summary, #account-sign-out {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #bad6ec;
  font-size: .83rem;
  cursor: pointer;
}
.profile-settings summary:hover, #account-sign-out:hover { color: #fff; }
.profile-photo-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.profile-photo-actions button { font-size: .78rem; }
#profile-name-form { margin: 6px 0 10px; gap: 4px; font-size: .8rem; }
#profile-name-form button { justify-self: start; }
#profile-name-hint { color: #bad6ec; }
#account-status, #account-no-apps { margin: 8px 0 0; color: #bad6ec; font-size: .85rem; }
#account-status:empty, #profile-initial[hidden], .account-button > [hidden], .profile-card [hidden] { display: none; }

.home-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 20px;
  margin-top: auto;
  padding: 12px 18px;
  border-top: 1px solid #23394e;
  background: #080f1a;
  color: #bad6ec;
  font-size: .875rem;
}
.home-footer small { font-size: inherit; }
.home-footer button {
  min-height: 36px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.home-footer a { color: inherit; text-underline-offset: 3px; }
.privacy-page { background: #0d1724; }
.privacy-brand { color: inherit; font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.privacy-content {
  width: min(100%, 49rem);
  margin-inline: auto;
  padding-block: clamp(1.75rem, 5vw, 3rem);
  color: #ceddeb;
}
.privacy-content h1 { color: #edf6ff; font-size: clamp(1.8rem, 5vw, 2.5rem); }
.privacy-content h2 { margin: 1.7rem 0 .5rem; color: #edf6ff; font-size: 1.15rem; }
.privacy-content p, .privacy-content ul { margin: .5rem 0; }
.privacy-content ul { padding-inline-start: 1.3rem; }
.privacy-content li + li { margin-top: .65rem; }
.privacy-content a { color: #a7d6ff; text-underline-offset: 3px; }
.privacy-content .privacy-date { color: #a7bed4; font-size: .9rem; }
