* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #062a42;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #eef9ff;
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

/* Splash-startscherm over het levende aquarium */
.splash-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 18, 32, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 50;
}

.splash-card {
  width: min(440px, 100%);
  max-height: min(92vh, 760px);
  overflow-y: auto;
  border-radius: 22px;
  padding: 22px 24px;
  background: rgba(5, 28, 48, 0.86);
  border: 1px solid rgba(180, 236, 255, 0.3);
  box-shadow: 0 22px 54px rgba(0, 10, 22, 0.55);
  user-select: text;
  -webkit-user-select: text;
}

.splash-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.saved-session-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(14, 72, 108, 0.42);
  border: 1px solid rgba(125, 211, 252, 0.42);
}

.saved-session-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saved-session-summary {
  font-size: 14px;
  font-weight: 600;
  color: #e0f7ff;
  letter-spacing: 0.02em;
}

.primary-btn.secondary-style {
  background: rgba(10, 48, 76, 0.72);
  border-color: rgba(148, 226, 255, 0.36);
  box-shadow: none;
}

.code-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.splash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.splash-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: rgba(2, 18, 32, 0.65);
  border: 1px solid rgba(148, 226, 255, 0.28);
  flex-shrink: 0;
}

.lang-btn {
  border: none;
  background: transparent;
  color: rgba(205, 236, 252, 0.75);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  background: rgba(56, 189, 248, 0.42);
  color: #fff;
}

.splash-head h1 {
  font-size: 24px;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

.splash-sub {
  font-size: 13px;
  color: rgba(205, 236, 252, 0.82);
}

.splash-preview-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.35);
  flex-shrink: 0;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dice-btn {
  padding: 7px 11px;
}

.color-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.swatch-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.16s ease;
}

.swatch-dot:hover,
.swatch-dot.active {
  transform: scale(1.14);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 10px rgba(125, 211, 252, 0.55);
}

.splash-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(224, 245, 255, 0.94);
}

.creature-toggle {
  display: flex;
  gap: 8px;
}

.creature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.choice-btn {
  flex: 1;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(180, 236, 255, 0.28);
  background: rgba(10, 46, 74, 0.62);
  color: #eef9ff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.choice-btn:hover {
  background: rgba(18, 72, 108, 0.78);
}

.choice-btn.active {
  background: rgba(56, 189, 248, 0.36);
  border-color: rgba(125, 211, 252, 0.9);
}

.choice-btn.secondary {
  flex: 0.78;
}

.select-input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 11px;
  border: 1px solid rgba(180, 236, 255, 0.28);
  background: rgba(2, 18, 32, 0.72);
  color: #eef9ff;
  font-size: 13px;
  outline: none;
}

.select-input:focus {
  border-color: rgba(103, 232, 249, 0.8);
}

.code-box {
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(2, 20, 36, 0.56);
  border: 1px solid rgba(148, 226, 255, 0.2);
}

.code-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recovery-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7dd3fc;
}

.restore-section {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 226, 255, 0.18);
}

.restore-label {
  display: block;
  color: #bae6fd;
}

.restore-row {
  margin-top: 6px;
}

.restore-row input[type="text"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.restore-btn {
  background: rgba(16, 128, 152, 0.78);
  border-color: rgba(125, 211, 252, 0.68);
}

.restore-msg {
  margin-top: 6px;
  font-size: 12px;
  color: #fca5a5;
}

.restore-msg.ok {
  color: #86efac;
}

.primary-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 13px;
  border: 1px solid rgba(125, 211, 252, 0.72);
  background: linear-gradient(135deg, rgba(14, 132, 178, 0.92), rgba(20, 168, 168, 0.88));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 16, 30, 0.35);
  transition: transform 0.12s ease, filter 0.2s ease;
}

.primary-btn:hover {
  filter: brightness(1.08);
}

.primary-btn:active {
  transform: scale(0.98);
}

.splash-controls-note {
  font-size: 11.5px;
  color: rgba(190, 226, 245, 0.74);
  text-align: center;
  line-height: 1.4;
}

.splash-event-teaser {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(14, 62, 98, 0.44);
  border: 1px solid rgba(148, 226, 255, 0.28);
  color: #dff5ff;
  font-size: 12px;
  text-align: center;
  line-height: 1.35;
}

.splash-gamepad-hint {
  margin-top: 12px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(14, 72, 108, 0.54);
  border: 1px solid rgba(103, 232, 249, 0.45);
  color: #cffafe;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

body.gamepad-mode .gp-focus {
  outline: 3px solid #67e8f9 !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.28), 0 0 18px rgba(103, 232, 249, 0.45) !important;
}

#sea {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

#sea:active {
  cursor: grabbing;
}

.cinema-fade {
  position: fixed;
  inset: 0;
  background: #062033;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  z-index: 8;
}

.cinema-fade.active {
  opacity: 0.72;
}

.hud-top {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 210px);
  z-index: 20;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(6, 30, 48, 0.52);
  border: 1px solid rgba(180, 236, 255, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #eef9ff;
  box-shadow: 0 6px 20px rgba(0, 12, 24, 0.25);
}

.pill-btn {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.pill-btn:hover {
  background: rgba(14, 56, 86, 0.72);
  border-color: rgba(180, 236, 255, 0.52);
}

.pill-btn:active {
  transform: scale(0.96);
}

.mini-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fb7185;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.school-pill {
  background: rgba(14, 72, 108, 0.68);
  border-color: rgba(103, 232, 249, 0.65);
}

.chip-close {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #eef9ff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.chip-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 8px #ffd166;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.dot.live {
  background: #5ce6a0;
  box-shadow: 0 0 10px #5ce6a0;
}

.dot.busy {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

/* Radar rechtsboven */
.hud-radar {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  z-index: 20;
}

.radar-frame {
  position: relative;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(0, 12, 24, 0.38);
}

#radar {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  cursor: zoom-in;
  display: block;
}

.radar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 14, 26, 0.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 44;
}

.radar-expanded-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  color: #eef9ff;
}

.radar-hint {
  font-size: 13px;
  color: rgba(210, 240, 255, 0.84);
  text-align: center;
  max-width: min(82vw, 440px);
}

.radar-mode-tag {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(4, 24, 40, 0.72);
  border: 1px solid rgba(148, 226, 255, 0.28);
  font-size: 10px;
  font-weight: 600;
  color: rgba(210, 242, 255, 0.9);
  pointer-events: none;
}

.radar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  max-width: 176px;
}

.radar-btn {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(180, 236, 255, 0.26);
  background: rgba(6, 30, 48, 0.56);
  color: #e6f7ff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.radar-btn:hover {
  background: rgba(16, 62, 92, 0.78);
  border-color: rgba(180, 236, 255, 0.55);
}

/* Zwevende glas-panelen (Inbox & Visprofiel) */
.panel {
  position: fixed;
  width: min(310px, calc(100vw - 32px));
  border-radius: 16px;
  background: rgba(5, 26, 44, 0.78);
  border: 1px solid rgba(180, 236, 255, 0.26);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(0, 10, 22, 0.45);
  padding: 13px 14px;
  z-index: 30;
  user-select: text;
  -webkit-user-select: text;
}

.inbox-panel {
  top: max(62px, calc(env(safe-area-inset-top) + 52px));
  left: max(16px, env(safe-area-inset-left));
}

.profile-card {
  left: max(16px, env(safe-area-inset-left));
  bottom: max(66px, calc(env(safe-area-inset-bottom) + 58px));
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(180, 236, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #eef9ff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.text-btn {
  border: none;
  background: none;
  color: rgba(186, 230, 253, 0.85);
  font-size: 12px;
  cursor: pointer;
}

.text-btn:hover {
  color: #fff;
  text-decoration: underline;
}

.self-name-row {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(180, 236, 255, 0.15);
}

.self-name-row label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(224, 244, 255, 0.92);
}

.muted-note {
  color: rgba(180, 220, 240, 0.68);
  font-size: 11px;
}

.input-row,
.chat-form {
  display: flex;
  gap: 6px;
}

input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(180, 236, 255, 0.28);
  background: rgba(2, 18, 32, 0.62);
  color: #eef9ff;
  font-size: 13px;
  outline: none;
}

input[type="text"]:focus {
  border-color: rgba(103, 232, 249, 0.78);
}

.small-btn {
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: rgba(14, 96, 138, 0.62);
  color: #eef9ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.small-btn:hover:not(:disabled) {
  background: rgba(20, 124, 176, 0.78);
}

.small-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: saturate(0.4);
}

.small-btn.copied {
  background: rgba(22, 163, 74, 0.78);
  border-color: rgba(134, 239, 172, 0.85);
  color: #f0fdf4;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
}

.inbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(10, 44, 70, 0.56);
  border: 1px solid rgba(180, 236, 255, 0.16);
  font-size: 12px;
  line-height: 1.35;
}

.inbox-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.inbox-mute-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(252, 165, 165, 0.42);
  background: rgba(127, 29, 29, 0.36);
  color: #fecaca;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.inbox-mute-btn svg {
  width: 15px;
  height: 15px;
}

.inbox-mute-btn:hover {
  background: rgba(185, 28, 28, 0.58);
  border-color: rgba(252, 165, 165, 0.8);
  color: #fff;
}

.empty-note {
  font-size: 12px;
  color: rgba(190, 225, 242, 0.68);
  padding: 6px 2px;
}

/* Profielkaart */
.profile-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fish-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.profile-sub {
  font-size: 12px;
  color: rgba(195, 230, 248, 0.78);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.status-tag,
.mutual-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(92, 230, 160, 0.18);
  border: 1px solid rgba(92, 230, 160, 0.45);
  color: #a7f3d0;
}

.status-tag.busy {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fde68a;
}

.mutual-tag {
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.55);
  color: #fef08a;
}

.muted-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(252, 165, 165, 0.52);
  color: #fecaca;
}

.profile-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.action-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(180, 236, 255, 0.28);
  background: rgba(10, 48, 76, 0.62);
  color: #eef9ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.action-btn:hover {
  background: rgba(18, 74, 112, 0.78);
}

.action-btn.active {
  background: rgba(56, 189, 248, 0.34);
  border-color: rgba(125, 211, 252, 0.85);
}

.action-btn.starred {
  background: rgba(250, 204, 21, 0.24);
  border-color: rgba(253, 224, 71, 0.85);
  color: #fef08a;
}

.mute-icon-btn {
  flex: 0 0 auto;
  width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  color: rgba(226, 238, 248, 0.85);
}

.mute-icon-btn svg {
  width: 17px;
  height: 17px;
}

.mute-icon-btn:hover {
  background: rgba(153, 27, 27, 0.45);
  border-color: rgba(252, 165, 165, 0.65);
  color: #fecaca;
}

.mute-icon-btn.muted-active {
  background: rgba(185, 28, 28, 0.52);
  border-color: rgba(252, 165, 165, 0.85);
  color: #fee2e2;
}

.chat-hint {
  font-size: 11.5px;
  color: rgba(190, 226, 245, 0.76);
  line-height: 1.35;
}

.chat-box {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(180, 236, 255, 0.16);
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 135px;
  overflow-y: auto;
  margin-bottom: 8px;
  font-size: 12px;
}

.chat-msg {
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(14, 58, 90, 0.62);
  align-self: flex-start;
  max-width: 90%;
  word-break: break-word;
}

.chat-msg.me {
  background: rgba(14, 116, 144, 0.72);
  align-self: flex-end;
}

.toast {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(8, 42, 68, 0.86);
  border: 1px solid rgba(125, 211, 252, 0.55);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  color: #eef9ff;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 12, 24, 0.35);
}

.hint-pill {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(22px, env(safe-area-inset-bottom));
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(6, 30, 48, 0.5);
  border: 1px solid rgba(180, 236, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  color: rgba(235, 248, 255, 0.92);
  white-space: nowrap;
  max-width: calc(100vw - 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: opacity 1.2s ease;
  z-index: 10;
}

.hint-pill.hidden {
  opacity: 0;
}

.hud-top,
.hud-radar,
.hud-bottom {
  transition: opacity 0.9s ease;
}

body.hud-faded .hud-top,
body.hud-faded .hud-radar,
body.hud-faded .hud-bottom {
  opacity: 0.14;
}

body.hud-faded .hud-top:hover,
body.hud-faded .hud-radar:hover,
body.hud-faded .hud-bottom:hover {
  opacity: 0.98;
}

body.hud-hidden .hud-top,
body.hud-hidden .hud-radar,
body.hud-hidden .hud-bottom,
body.hud-hidden .hint-pill {
  opacity: 0;
  pointer-events: none;
}

.atlas-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(180, 236, 255, 0.16);
}

.atlas-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.atlas-sub {
  margin: 6px 0 10px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(206, 236, 250, 0.78);
}

.atlas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.atlas-badge {
  font-size: 11px;
  padding: 5px 7px;
  border-radius: 9px;
  background: rgba(2, 18, 32, 0.52);
  border: 1px solid rgba(180, 236, 255, 0.22);
  color: rgba(210, 236, 250, 0.78);
}

.atlas-badge.found {
  background: rgba(14, 92, 128, 0.52);
  border-color: rgba(125, 211, 252, 0.55);
  color: #e6f9ff;
}

.events-panel {
  width: min(350px, calc(100vw - 32px));
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}

.atlas-panel {
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}

.moon-box {
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(10, 42, 72, 0.62);
  border: 1px solid rgba(186, 230, 253, 0.28);
  font-size: 12.5px;
  font-weight: 600;
  color: #e0f2fe;
  margin-bottom: 6px;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.event-card {
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(10, 44, 70, 0.54);
  border: 1px solid rgba(180, 236, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.event-card.live {
  background: rgba(16, 86, 112, 0.66);
  border-color: rgba(103, 232, 249, 0.75);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.22);
}

.event-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f0f9ff;
}

.event-card-time {
  font-size: 11.5px;
  color: #bae6fd;
  font-weight: 600;
}

.event-card-desc {
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(210, 238, 252, 0.8);
}

.event-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.event-countdown {
  font-size: 11px;
  color: rgba(186, 230, 253, 0.78);
}

.event-live-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.25);
  border: 1px solid rgba(110, 231, 183, 0.7);
  color: #a7f3d0;
}

.event-ics-link {
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: rgba(14, 96, 138, 0.62);
  color: #eef9ff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.event-ics-link:hover {
  background: rgba(20, 124, 176, 0.82);
}

.events-all-link {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, 0.48);
  background: rgba(14, 108, 148, 0.56);
  color: #f0f9ff;
  font-size: 12px;
  font-weight: 700;
}

.events-all-link:hover {
  background: rgba(20, 132, 178, 0.78);
}

.hud-bottom {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  z-index: 20;
}

.bottle-card {
  left: 50%;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 84px));
  transform: translateX(-50%);
  width: min(390px, calc(100vw - 32px));
  background: rgba(14, 34, 48, 0.88);
  border-color: rgba(253, 230, 138, 0.42);
  z-index: 36;
}

.bottle-quote {
  margin: 10px 0 8px;
  font-size: 15px;
  line-height: 1.5;
  color: #fef9e7;
  font-style: italic;
}

.bottle-meta {
  font-size: 11px;
  color: rgba(210, 236, 250, 0.72);
}

.screensaver-clock {
  position: fixed;
  left: max(22px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 15;
  pointer-events: none;
  user-select: none;
  color: rgba(238, 249, 255, 0.84);
  text-shadow: 0 2px 14px rgba(2, 16, 28, 0.55), 0 0 24px rgba(2, 18, 34, 0.35);
  transition: opacity 0.45s ease;
}

.screensaver-clock.hidden {
  opacity: 0;
  visibility: hidden;
}

.clock-time {
  font-size: clamp(32px, 5vw, 62px);
  font-weight: 200;
  letter-spacing: 0.04em;
  line-height: 1.0;
  font-variant-numeric: tabular-nums;
}

.clock-date {
  margin-top: 4px;
  font-size: clamp(12px, 1.35vw, 17px);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: capitalize;
  color: rgba(214, 240, 255, 0.76);
}

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(180, 236, 255, 0.28);
  background: rgba(6, 30, 48, 0.5);
  color: #eef9ff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 12, 24, 0.25);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.icon-btn:hover {
  background: rgba(16, 62, 92, 0.72);
  border-color: rgba(180, 236, 255, 0.55);
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.active {
  background: rgba(56, 189, 248, 0.42);
  border-color: rgba(186, 230, 253, 0.85);
}

.icon-btn.autojoin {
  background: rgba(245, 158, 11, 0.36);
  border-color: rgba(253, 224, 71, 0.88);
  color: #fef3c7;
}

.icon-btn.muted .wave {
  opacity: 0.22;
}

/* Laptop & desktop: royale knoppen (+20% extra op de laptop-schaal), aanwijzingen onderin en grote radar */
@media (min-width: 821px) {
  .hud-top {
    gap: 13px;
    max-width: calc(100vw - 380px);
  }

  .pill {
    gap: 13px;
    padding: 13px 24px;
    font-size: 23px;
  }

  .mini-icon {
    width: 26px;
    height: 26px;
  }

  .dot {
    width: 15px;
    height: 15px;
  }

  .badge {
    min-width: 31px;
    height: 31px;
    padding: 0 8px;
    font-size: 18px;
  }

  .chip-close {
    width: 34px;
    height: 34px;
    font-size: 23px;
  }

  .hud-radar {
    gap: 11px;
  }

  .radar-frame,
  #radar {
    width: min(312px, 38vh);
    height: min(312px, 38vh);
  }

  .radar-mode-tag {
    bottom: 14px;
    padding: 4px 13px;
    font-size: 15px;
  }

  .radar-actions {
    gap: 10px;
    max-width: 390px;
  }

  .radar-btn {
    padding: 10px 18px;
    font-size: 19px;
  }

  .hud-bottom {
    gap: 16px;
  }

  .icon-btn {
    width: 83px;
    height: 83px;
  }

  .icon-btn svg {
    width: 40px;
    height: 40px;
  }

  .inbox-panel {
    top: max(98px, calc(env(safe-area-inset-top) + 88px));
  }

  .profile-card {
    bottom: max(122px, calc(env(safe-area-inset-bottom) + 112px));
  }

  .action-btn {
    padding: 14px 18px;
    font-size: 20px;
  }

  .mute-icon-btn {
    width: 54px;
    padding: 0;
  }

  .mute-icon-btn svg {
    width: 22px;
    height: 22px;
  }

  .inbox-mute-btn {
    width: 42px;
    height: 42px;
  }

  .inbox-mute-btn svg {
    width: 20px;
    height: 20px;
  }

  .small-btn {
    padding: 11px 19px;
    font-size: 19px;
  }

  .close-btn {
    width: 46px;
    height: 46px;
    font-size: 27px;
  }

  .splash-card {
    width: min(560px, 100%);
  }

  .choice-btn {
    padding: 16px 17px;
    font-size: 21px;
  }

  .primary-btn {
    padding: 19px 26px;
    font-size: 24px;
  }

  .swatch-dot {
    width: 41px;
    height: 41px;
  }

  .splash-controls-note {
    font-size: 14px;
  }

  .hint-pill {
    bottom: max(26px, env(safe-area-inset-bottom));
    padding: 11px 22px;
    max-width: calc(100vw - 640px);
    font-size: 17px;
  }
}

@media (max-width: 820px) {
  .hint-pill {
    display: none;
  }
  .toast {
    top: max(68px, calc(env(safe-area-inset-top) + 60px));
  }
}

@media (max-width: 640px) {
  .radar-frame,
  #radar {
    width: 126px;
    height: 126px;
  }
}

/* Groot uitgeklapte radar (midden in beeld op laptop & mobiel voor nauwkeurig selecteren) */
.hud-radar.expanded {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  z-index: 45;
  padding: 16px 20px 18px;
  gap: 12px;
  border-radius: 24px;
  background: rgba(4, 22, 38, 0.86);
  border: 1px solid rgba(148, 226, 255, 0.36);
  box-shadow: 0 22px 60px rgba(0, 8, 18, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 1 !important;
  pointer-events: auto !important;
}

.hud-radar.expanded .radar-frame,
.hud-radar.expanded #radar {
  width: min(84vw, 62vh, 520px);
  height: min(84vw, 62vh, 520px);
}

.hud-radar.expanded #radar {
  cursor: crosshair;
}

.hud-radar.expanded .radar-mode-tag {
  bottom: 16px;
  padding: 4px 14px;
  font-size: 13px;
}

.hud-radar.expanded .radar-actions {
  max-width: none;
  gap: 10px;
}

.hud-radar.expanded .radar-btn {
  padding: 9px 16px;
  font-size: 14px;
}
