:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(14, 22, 38, 0.82);
  --panel-strong: rgba(17, 27, 46, 0.95);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.7);
  --accent: #7cf7d4;
  --accent-2: #86a8ff;
  --danger: #ff8f8f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(124, 247, 212, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(134, 168, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #050912 0%, #07111f 44%, #0d1630 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease,
    border-color 0.12s ease,
    opacity 0.12s ease;
}

button:hover:not(:disabled) {
  filter: brightness(1.06);
}

button:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
  filter: brightness(1.08);
}

button:focus-visible {
  outline: 2px solid rgba(124, 247, 212, 0.8);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: saturate(0.8);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.account-login {
  flex: 0 0 auto;
  max-width: 220px;
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(124, 247, 212, 0.22);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.account-login.logged-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: left;
}

.account-login.paid {
  color: var(--accent);
  opacity: 1;
}

.account-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #07111f;
  background: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  object-fit: cover;
}

.account-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.developer-easter-egg {
  cursor: pointer;
  user-select: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.05;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.content {
  flex: 1;
  display: grid;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 18px 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.page {
  display: none;
  gap: 14px;
}

.page.active {
  display: grid;
}

.card {
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.95), rgba(11, 18, 32, 0.88));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(20px);
}

.meta-card {
  padding-bottom: 14px;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.meta-label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.meta-value {
  margin-bottom: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.payment-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.payment-warning {
  color: var(--danger);
}

.selection-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.selection-card textarea {
  margin-top: 10px;
  min-height: 140px;
  border-radius: 20px;
}

.input-hint {
  margin: 12px 2px 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.upload-notification {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(124, 247, 212, 0.12);
  border: 1px solid rgba(124, 247, 212, 0.3);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.word-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(134, 168, 255, 0.12);
  border: 1px solid rgba(134, 168, 255, 0.22);
  color: var(--text);
  font-size: 0.85rem;
}

.actions.stack {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}

.intro-card .subtitle,
.instructions,
.hint-box p,
.status {
  color: var(--muted);
  line-height: 1.6;
}

.profile-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(124, 247, 212, 0.22);
  background: rgba(124, 247, 212, 0.08);
  color: var(--accent);
  font-size: 0.83rem;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 190px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(124, 247, 212, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.primary,
.ghost {
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
}

.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07111f;
}

.primary:active:not(:disabled) {
  box-shadow: 0 12px 24px rgba(134, 168, 255, 0.18);
}

.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost:active:not(:disabled),
.icon-btn:active:not(:disabled),
.tab-btn:active:not(:disabled),
.picker-item:active:not(:disabled),
.icon-card:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.icon-card {
  min-height: 108px;
  padding: 16px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  box-shadow: var(--shadow);
}

.icon-card:hover:not(:disabled) {
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.42);
}

.icon-card img {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.icon-card span {
  display: grid;
  gap: 4px;
}

.icon-card strong {
  font-size: 1rem;
  line-height: 1.1;
}

.icon-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.small {
  padding: 10px 14px;
  font-size: 0.86rem;
}

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

.export-panel {
  margin-top: 16px;
  padding-top: 4px;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.export-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.export-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--text);
}

.export-desc {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.export-actions {
  display: flex;
  gap: 10px;
}

.status {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-left: 3px solid rgba(124, 247, 212, 0.8);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.status.loading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-text {
  display: inline-flex;
  align-items: center;
}

.status-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  animation: status-bounce 1s infinite ease-in-out;
}

.status-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.status-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes status-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.error {
  color: var(--danger);
}

.results {
  display: grid;
  gap: 14px;
}

.empty-state {
  color: var(--muted);
}

.quiz-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quiz-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.order {
  margin-bottom: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.quiz-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(124, 247, 212, 0.1);
  border: 1px solid rgba(124, 247, 212, 0.2);
  white-space: nowrap;
}

.label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.sentence {
  margin: 0 0 12px;
  line-height: 1.7;
  font-size: 1.02rem;
}

.answer-row,
.synonym-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.answer-row {
  margin-bottom: 14px;
}

.synonym-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.synonym-row {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.synonym-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(124, 247, 212, 0.1);
  border: 1px solid rgba(124, 247, 212, 0.24);
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
  font-size: 0.94rem;
}

.blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(134, 168, 255, 0.14);
  border: 1px solid rgba(134, 168, 255, 0.24);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.answer-toggle {
  width: 100%;
}

.answer-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.translation-block {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.translation-text {
  margin: 0;
  line-height: 1.65;
  font-size: 0.98rem;
  color: var(--text);
}

.ladder-card {
  background:
    radial-gradient(circle at top right, rgba(124, 247, 212, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.04);
}

.ladder-english {
  font-size: 1.12rem;
}

.ladder-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.teacher-notes {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.62);
  backdrop-filter: blur(12px);
  display: none;
  place-items: end center;
  padding: 16px;
  z-index: 20;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.overlay.open {
  display: grid;
}

.sheet {
  width: min(100%, 640px);
  height: min(calc(100vh - 32px), 760px);
  max-height: calc(100vh - 32px);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.98), rgba(10, 17, 31, 0.98));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-sheet {
  width: min(100%, 760px);
  height: min(calc(100vh - 32px), 760px);
  max-height: calc(100vh - 32px);
}

.pdf-frame {
  width: 100%;
  height: min(72vh, 760px);
  border: 0;
  border-radius: 18px;
  background: #fff;
}

.login-overlay {
  place-items: center;
}

.login-overlay.force-login {
  background: rgba(4, 8, 16, 0.86);
}

.login-sheet {
  width: min(100%, 480px);
  height: auto;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.login-form {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.paywall-panel {
  display: grid;
  gap: 14px;
}

.paywall-panel[hidden],
.wechat-box[hidden],
.wechat-pay-box[hidden],
.paywall-success[hidden] {
  display: none;
}

.paywall-offer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(124, 247, 212, 0.2);
  border-radius: 16px;
  background: rgba(124, 247, 212, 0.08);
}

.paywall-badge {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: #07111f;
  background: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.paywall-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.paywall-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.paywall-price-now {
  color: var(--accent);
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
}

.paywall-price s {
  color: var(--muted);
  font-size: 0.95rem;
}

.paywall-timer {
  min-width: 96px;
  padding: 7px 9px;
  border-radius: 12px;
  text-align: center;
  color: #ff4f5f;
  background:
    linear-gradient(180deg, rgba(255, 79, 95, 0.18), rgba(255, 79, 95, 0.08)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 79, 95, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 79, 95, 0.08), 0 10px 24px rgba(255, 79, 95, 0.12);
  font-size: 0.96rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  animation: paywall-timer-pulse 1.1s ease-in-out infinite;
}

.paywall-timer.expired {
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  animation: none;
}

@keyframes paywall-timer-pulse {
  0%,
  100% {
    filter: saturate(1);
  }

  50% {
    filter: saturate(1.32);
  }
}

.payment-status.error {
  color: var(--danger);
}

.wechat-box {
  display: grid;
  gap: 12px;
}

.pending-code-preview {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(124, 247, 212, 0.08);
  font-weight: 800;
  word-break: break-all;
}

.wechat-qr {
  display: grid;
  place-items: center;
  min-height: 232px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 50%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.06) 50%, transparent 50%),
    rgba(255, 255, 255, 0.04);
  background-size: 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wechat-qr-link {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 16px;
  text-align: center;
  color: #07111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
  text-decoration: none;
}

.wechat-pay-box {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.wechat-pay-actions {
  display: grid;
}

.wechat-pay-result {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.wechat-pay-qr {
  width: 180px;
  height: 180px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
}

.redeem-code-copy {
  width: 100%;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(125, 211, 252, 0.36);
  border-radius: 12px;
  color: var(--accent);
  background: rgba(125, 211, 252, 0.08);
  font-weight: 800;
  letter-spacing: 0;
}

.paywall-success {
  display: grid;
  gap: 12px;
  text-align: center;
  padding: 14px 0 4px;
}

.paywall-success h3 {
  margin: 0;
  color: var(--accent);
}

.paywall-success p {
  margin: 0;
  color: var(--muted);
}

.developer-debug-toggle {
  position: fixed;
  right: max(14px, calc(14px + env(safe-area-inset-right)));
  bottom: max(92px, calc(92px + env(safe-area-inset-bottom)));
  z-index: 30;
  min-width: 64px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #07111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
  font-weight: 800;
}

.developer-debug-panel {
  position: fixed;
  right: max(14px, calc(14px + env(safe-area-inset-right)));
  bottom: max(148px, calc(148px + env(safe-area-inset-bottom)));
  z-index: 29;
  width: min(calc(100vw - 28px), 360px);
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.98), rgba(10, 17, 31, 0.98));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.developer-debug-panel.open {
  display: grid;
  gap: 14px;
}

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

.developer-debug-body {
  display: grid;
  gap: 14px;
}

.developer-debug-user,
.developer-debug-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.developer-debug-actions {
  display: grid;
  gap: 10px;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}

.picker-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.picker-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1 1 auto;
}

.picker-title {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.picker-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  min-height: 0;
  flex: 1 1 auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.picker-toolbar {
  margin-bottom: 14px;
  flex-shrink: 0;
}

.sheet-footer {
  flex-shrink: 0;
}

.picker-item {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.picker-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.picker-item.active {
  background: rgba(124, 247, 212, 0.12);
  border-color: rgba(124, 247, 212, 0.28);
}

.sheet-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-shrink: 0;
}

.hint-box {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}

.tabbar {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(8, 14, 25, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.tab-btn {
  padding: 14px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.tab-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(124, 247, 212, 0.16), rgba(134, 168, 255, 0.18));
  border-color: rgba(124, 247, 212, 0.22);
  color: var(--text);
}

@media (min-width: 860px) {
  .app-shell {
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .meta-row,
  .picker-body,
  .sheet-footer,
  .export-grid,
  .ladder-meta {
    grid-template-columns: 1fr;
    display: grid;
  }

  .actions.stack {
    grid-template-columns: 1fr;
  }

  .action-cards {
    grid-template-columns: 1fr 1fr;
  }

  .input-actions {
    grid-template-columns: 1fr;
  }

  .sheet {
    border-radius: 24px;
  }

  .developer-debug-panel {
    left: 14px;
    right: 14px;
    width: auto;
  }

  .developer-debug-toggle {
    bottom: max(86px, calc(86px + env(safe-area-inset-bottom)));
  }
}
