@font-face {
  font-family: "AccessGill";
  src: url("/assets/gill-sans-bold.otf") format("opentype");
  font-weight: 700;
}

@font-face {
  font-family: "Teko";
  src: url("/assets/teko-medium.ttf") format("truetype");
  font-weight: 500;
}

@font-face {
  font-family: "Teko";
  src: url("/assets/teko-bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  color-scheme: light;
  font-family: Teko, "Arial Narrow", "Segoe UI", Arial, sans-serif;
  background: #ffffff;
  color: #111111;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button {
  font: inherit;
}

.shell,
.stage {
  width: 100%;
  height: 100%;
}

.stage {
  position: relative;
  background: #ffffff;
}

#dial {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

#dial.dragging {
  cursor: grabbing;
}

.topbar,
.bottombar {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.topbar {
  top: 0;
  padding: 18px 22px;
}

.bottombar {
  bottom: 0;
  padding: 18px 22px 22px;
}

.bottom-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  pointer-events: auto;
}

.brand {
  color: #111111;
  font-size: 20px;
  letter-spacing: 0;
}

.subtle {
  margin-top: 4px;
  color: #5b5b5b;
  font-size: 15px;
}

.state {
  min-width: 96px;
  text-align: center;
  border: 1px solid #929292;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #111111;
  font-size: 18px;
}

.state.unlocked {
  border-color: #148f35;
  color: #053b14;
  background: rgba(210, 255, 219, 0.78);
}

.progress {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border: 1px solid #777777;
  background: rgba(255, 255, 255, 0.72);
}

.dot.filled {
  background: #111111;
  border-color: #111111;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid #38526f;
  border-radius: 50%;
  color: #111111;
  background: rgba(255, 255, 255, 0.76);
  pointer-events: auto;
  cursor: pointer;
}

.icon-button:hover {
  border-color: #111111;
}

.icon-button.small {
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
}

.text-button,
.step-button {
  border: 1px solid #777777;
  color: #111111;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  pointer-events: auto;
  letter-spacing: 0;
}

.text-button {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 18px;
}

.text-button.primary {
  border-color: #111111;
  color: #ffffff;
  background: #111111;
}

.text-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.step-button {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 24px;
}

.modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.modal[hidden] {
  display: none;
}

.password-panel {
  width: min(680px, calc(100vw - 34px));
  border: 1px solid #1f1f1f;
  background: rgba(244, 244, 244, 0.96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  padding: 18px;
}

.password-head,
.password-row,
.password-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.password-title {
  font-size: 24px;
  color: #111111;
}

.password-row {
  margin-top: 16px;
}

.password-preview {
  display: grid;
  grid-template-columns: repeat(10, minmax(18px, 1fr));
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.preview-slot {
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #9a9a9a;
  background: #ffffff;
  color: #111111;
  font-size: 24px;
}

.preview-slot.empty {
  color: #b5b5b5;
}

.length-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.length-value {
  width: 36px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #9a9a9a;
  background: #ffffff;
  font-size: 22px;
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 6px;
  margin-top: 16px;
  max-height: min(42vh, 360px);
  overflow: auto;
}

.symbol-button {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  border: 1px solid #777777;
  background: #ffffff;
  color: #111111;
  font-size: clamp(18px, 3.8vw, 30px);
  cursor: pointer;
}

.symbol-button.selected {
  border-color: #0d8d36;
  background: #cffff0;
  box-shadow: inset 0 0 0 2px #0d8d36;
}

.symbol-order {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 13px;
  color: #063f18;
}

.symbol-glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  text-shadow: -1px 0 #ffffff, 0 1px #ffffff, 1px 0 #ffffff, 0 -1px #ffffff;
}

.symbol-image {
  width: 82%;
  height: 82%;
  object-fit: contain;
  pointer-events: none;
}

.password-actions {
  margin-top: 16px;
  justify-content: flex-end;
}

.password-status {
  min-height: 24px;
  margin-top: 10px;
  color: #4d4d4d;
  font-size: 17px;
}

.password-status.ok {
  color: #0a7028;
}

.password-status.error {
  color: #aa1212;
}

.unlock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.46);
  pointer-events: none;
}

.unlock[hidden] {
  display: none;
}

.unlock-title {
  color: #effff3;
  font-size: clamp(28px, 6vw, 72px);
  text-shadow: 0 0 22px rgba(78, 255, 139, 0.45), 0 2px 0 #031108;
}

@media (max-width: 520px) {
  .topbar,
  .bottombar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .bottom-actions {
    gap: 10px;
  }

  .text-button {
    padding: 7px 10px;
    font-size: 16px;
  }

  .password-panel {
    padding: 14px;
  }

  .password-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .password-preview {
    width: 100%;
  }

  .password-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    max-height: 45vh;
  }
}
 .topbar-actions { display:flex; align-items:center; gap:14px; }
 .main-site-link { color:inherit; text-decoration:none; font-size:12px; letter-spacing:.08em; opacity:.82; border:1px solid currentColor; border-radius:999px; padding:8px 12px; }
 .main-site-link:hover { opacity:1; }
 .topbar { position:absolute; z-index:10; pointer-events:none; }
 .topbar-actions, .main-site-link { pointer-events:auto; }
 @media (max-width:650px) {
   .topbar { flex-wrap:wrap; gap:10px; padding:12px; }
   .topbar-actions { gap:6px; flex-wrap:wrap; }
   .main-site-link { font-size:10px; padding:7px 9px; }
   .topbar-actions .state { min-width:70px; padding:5px 8px; font-size:15px; }
 }
