.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 3px solid #fff6d0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffe56a 0%, #ffc400 46%, #e09000 100%);
  box-shadow: 0 5px 0 #a86500, inset 0 1px 0 rgba(255, 255, 255, 0.75);
  color: #3a2500;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 3px;
  height: 42%;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #a86500; }

.btn-blue {
  background: linear-gradient(180deg, #8fd0ff, #2f9bff 50%, #1d4e89);
  color: #f4f8ff;
  box-shadow: 0 5px 0 #0c2e52;
  border-color: #e7f4ff;
}

.btn-ghost {
  background: linear-gradient(180deg, #1d4e86, #12325c);
  color: var(--text);
  box-shadow: 0 4px 0 var(--shadow);
  border-color: var(--line);
}

.btn-danger {
  background: linear-gradient(180deg, #ff9aaa, #ff4d6a 50%, #be123c);
  color: white;
  box-shadow: 0 5px 0 #7f1239;
  border-color: #ffe0e7;
}

.btn-large { min-height: 52px; padding: 0 18px; font-size: 1.05rem; }

.panel {
  min-width: 0;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 28%),
    var(--panel);
  border: 3px solid var(--line);
  box-shadow: 0 6px 0 var(--shadow);
  padding: 14px;
}

.kicker {
  color: var(--highlight);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #12325c;
  border: 2px solid rgba(255, 224, 138, 0.45);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.star-row { display: inline-flex; gap: 2px; }

.ring { position: relative; width: 84px; height: 84px; flex: 0 0 auto; }

.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 8; }

.ring-arc { fill: none; stroke: var(--primary); stroke-width: 8; stroke-linecap: round; }

.ring-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.ring-copy small { color: var(--muted); }

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

.modal {
  position: relative;
  width: min(440px, 100%);
  max-height: min(78dvh, 640px);
  overflow: auto;
  padding: 18px 16px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #1b4f8c, #0d2b52);
  border: 3px solid var(--line);
  box-shadow: 0 8px 0 #071525;
}

.modal-win { background: linear-gradient(180deg, #24548a, #12325c 40%, #0c2e52); }

.modal-kicker { color: var(--highlight); margin-bottom: 4px; }

.modal-title { font-size: clamp(1.4rem, 5vw, 1.8rem); margin-bottom: 8px; }

.modal-body { display: grid; gap: 8px; }

.modal-actions, .settings-actions, .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #12325c;
  color: var(--text);
}

.toast {
  pointer-events: none;
  max-width: min(420px, 100%);
  padding: 10px 14px;
  border-radius: 14px;
  background: #12325c;
  border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-in { opacity: 1; transform: none; }

.toast-danger { border-color: #ff9aaa; }
.toast-warn { border-color: var(--primary); }

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.switch input { position: absolute; opacity: 0; }

.switch i {
  width: 52px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #0c2e52;
  border: 2px solid var(--line);
  position: relative;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d5e4f5;
  transition: transform 0.2s ease;
}

.switch input:checked + i { background: #e09600; }
.switch input:checked + i::after { transform: translateX(22px); background: #fff6c8; }
.switch input:focus-visible + i { outline: 2px solid white; }

.tabs {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 6px 4px;
  border-radius: 14px;
  border: 2px solid rgba(255, 224, 138, 0.35);
  background: #12325c;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab.is-active {
  color: #3a2500;
  background: linear-gradient(#ffe56a, #ffc400);
  border-color: #fff6c8;
}

.page-head { display: grid; gap: 6px; margin-bottom: 12px; min-width: 0; }

.page-head h1, .hero-title {
  font-size: clamp(1.7rem, 7vw, 2.6rem);
}

.guide { display: grid; gap: 10px; }
.guide-count { color: var(--muted); }
