/* App tokens */
body.app-body {
  --app-radius-sm: 10px;
  --app-radius-md: 12px;
  --app-radius-lg: 16px;
  --app-border-width: 1px;
  --app-control-min-height: 48px;
  --app-inset-md: 12px 14px;
  --app-button-padding-x: 18px;
  /* passive panels stay quieter than tappable controls */
  --app-surface-panel-muted: rgba(128, 128, 128, 0.04);
  --app-surface-interactive: rgba(128, 128, 128, 0.06);
  --app-surface-interactive-hover: rgba(128, 128, 128, 0.1);
  --app-surface-interactive-active: rgba(128, 128, 128, 0.14);
  --app-border-muted: rgba(128, 128, 128, 0.14);
  --app-border-muted-hover: rgba(128, 128, 128, 0.18);
  --app-card-border-muted: rgba(128, 128, 128, 0.1);
  --app-card-border-muted-hover: rgba(128, 128, 128, 0.15);
  --app-focus-ring: inset 0 0 0 1px var(--links);
  --app-shadow-sticky: 0 -8px 20px rgba(0, 0, 0, 0.08);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  margin: 0;
  padding: 0;
  max-width: none;
}

/* Shell layout */
.app-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
  min-height: 100dvh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 4px 0 12px;
  background: var(--background-body);
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.app-nav {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  font-size: 0.95rem;
}

.app-nav a {
  white-space: nowrap;
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-size: inherit;
  line-height: 1.2;
  text-decoration: none;
  color: var(--text-main);
}

.app-nav a.active,
.app-nav a[aria-current="page"] {
  border-color: var(--links);
  box-shadow: var(--app-focus-ring);
}

.app-nav .app-tab-icon,
.app-nav .app-tab-label {
  display: none;
}

.app-nav .app-nav-text {
  display: inline;
}

.app-content {
  min-height: 320px;
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: opacity 0.18s ease;
  animation: content-in 0.18s ease;
}

.app-content.is-loading {
  opacity: 0.62;
}

/* Shared page primitives */
.page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.page-note {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.page-title,
.page-copy,
.page-stat-line {
  margin: 0;
}

.page-title {
  font-size: 1.15rem;
  line-height: 1.2;
}

.page-copy {
  line-height: 1.5;
}

.page-stat-line {
  font-size: 1.08rem;
  line-height: 1.3;
}

.page-panel {
  background: var(--background-body);
  border: var(--app-border-width) solid var(--border);
  border-radius: var(--app-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-panel-muted {
  background: var(--app-surface-panel-muted);
}

/* Shared form controls */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

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

.hidden {
  display: none;
}

.app-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.app-form .field-group {
  flex: 1 1 180px;
}

.app-form-actions {
  display: flex;
  align-items: stretch;
}

.app-field {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  padding: var(--app-inset-md);
  border-radius: var(--app-radius-md);
  border: var(--app-border-width) solid var(--app-border-muted);
  background: var(--app-surface-interactive);
  color: var(--text-main);
  font: inherit;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.app-field:hover {
  background: var(--app-surface-interactive-hover);
  border-color: var(--app-border-muted-hover);
}

.app-field:focus {
  outline: none;
  background: var(--background-body);
  border-color: var(--links);
  box-shadow: var(--app-focus-ring);
}

.app-button,
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--app-control-min-height);
  padding: 0 var(--app-button-padding-x);
  border-radius: var(--app-radius-md);
  border: var(--app-border-width) solid var(--app-border-muted);
  background: var(--app-surface-interactive);
  color: var(--text-main);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.app-button:hover {
  background: var(--app-surface-interactive);
  border-color: var(--app-border-muted);
}

.app-button-danger:hover {
  background: rgba(233, 69, 96, 0.08);
  border-color: rgba(233, 69, 96, 0.2);
}

@media (hover: hover) {
  .app-button:hover {
    background: var(--app-surface-interactive-hover);
    border-color: var(--app-border-muted-hover);
  }
}

.app-button:active,
.page-link:active {
  transform: scale(0.98);
}

.app-button:focus {
  background: var(--app-surface-interactive);
  border-color: var(--app-border-muted);
  box-shadow: none;
}

.app-button:focus-visible,
.page-link:focus-visible {
  outline: none;
  border-color: var(--links);
  box-shadow: var(--app-focus-ring);
}

.app-button-danger {
  background: rgba(233, 69, 96, 0.08);
  border-color: rgba(233, 69, 96, 0.2);
  color: #e94560;
}

.app-button-danger:focus {
  background: rgba(233, 69, 96, 0.08);
  border-color: rgba(233, 69, 96, 0.2);
}

/* Shared feedback and list surfaces */
.page-feedback {
  margin: 0;
  padding: var(--app-inset-md);
  border-radius: var(--app-radius-md);
  border: var(--app-border-width) solid var(--border);
  line-height: 1.45;
}

.page-feedback-success {
  background: rgba(76, 175, 80, 0.08);
  border-color: rgba(76, 175, 80, 0.2);
}

.page-feedback-warning {
  background: rgba(233, 176, 0, 0.09);
  border-color: rgba(233, 176, 0, 0.2);
}

.page-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-results-panel {
  gap: 12px;
}

#search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.results-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: var(--app-border-width) solid var(--border);
  border-radius: var(--app-radius-md);
  padding: var(--app-inset-md);
  box-sizing: border-box;
}

.results-item span {
  min-width: 0;
}

.results-item small {
  color: var(--text-muted);
}

.dependency-error {
  border: var(--app-border-width) solid #b94a48;
  background: rgba(185, 74, 72, 0.12);
  color: var(--text-main);
  border-radius: 8px;
  padding: var(--app-inset-md);
}

@keyframes content-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Review support content */
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sentence-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sentence-row > div:last-child {
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 12px;
}

.sentence-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78em;
  color: var(--text-muted);
  white-space: nowrap;
}

.sentence-stats span {
  display: block;
}

.previous-label {
  margin: 8px 0 4px;
  color: var(--text-muted);
}

.previous-sentence,
.previous-translation {
  margin: 0;
}

.previous-translation {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.def-part {
  margin-bottom: 8px;
}

.def-part ol {
  margin: 4px 0 0 0;
  padding-left: 28px;
}

.def-part li {
  margin: 3px 0;
}

.def-example {
  color: var(--text-muted);
  font-style: italic;
}

/* Review card */
.card-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card-swipeable {
  width: 100%;
  max-width: 520px;
  background: var(--background-body);
  border: var(--app-border-width) solid var(--border);
  border-radius: var(--app-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
  transition: transform 0.3s ease, opacity 0.3s ease;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.card-stats {
  text-align: center;
  line-height: 1.2;
  margin: 0;
}

/* Swipe indicators */
.card-swipe-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.15s;
}

.card-swipe-left {
  right: 20px;
  color: #e94560;
}

.card-swipe-right {
  left: 20px;
  color: #4caf50;
}

/* Review interactive surfaces */
.card-word-area,
.card-sentence-text {
  position: relative;
  border-radius: var(--app-radius-md);
  background: var(--app-surface-interactive);
  border: var(--app-border-width) solid var(--app-card-border-muted);
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.card-word-area:hover,
.card-sentence-text:hover {
  background: var(--app-surface-interactive-hover);
  border-color: var(--app-card-border-muted-hover);
}

.card-word-area:active,
.card-sentence-text:active {
  background: var(--app-surface-interactive-active);
}

.card-word-area {
  text-align: center;
  padding: 16px 52px;
  cursor: pointer;
}

.card-audio-surface[data-audio-state="disabled"] {
  cursor: default;
}

.card-audio-surface[data-audio-state="disabled"]:hover {
  background: var(--app-surface-interactive);
  border-color: var(--app-card-border-muted);
}

.card-audio-surface[data-audio-state="disabled"]:active {
  background: var(--app-surface-interactive);
}

.card-word {
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
}

.card-audio-cue {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-main, rgba(15, 23, 42, 0.78));
  background: var(--background-body, rgba(255, 255, 255, 0.94));
  border: var(--app-border-width) solid var(--app-border-muted, rgba(15, 23, 42, 0.12));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  opacity: 0.78;
  pointer-events: none;
  transition: color 0.15s, border-color 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.card-audio-cue .app-icon {
  width: 13px;
  height: 13px;
}

.card-audio-cue-word {
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
}

.card-audio-cue-word .app-icon {
  width: 15px;
  height: 15px;
}

.card-audio-cue-sentence {
  width: 22px;
  height: 22px;
}

.card-audio-surface[data-audio-state="enabled"]:hover .card-audio-cue {
  color: var(--text-main, rgba(15, 23, 42, 0.92));
  border-color: var(--app-border-muted-hover, rgba(15, 23, 42, 0.18));
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12);
  opacity: 0.94;
}

.card-audio-surface[data-audio-state="enabled"]:active .card-audio-cue {
  color: var(--links, #2563eb);
  opacity: 1;
}

.card-audio-surface[data-audio-state="disabled"] .card-audio-cue {
  opacity: 0.34;
}

/* Expandable sections */
.card-section {
  border-top: 1px solid var(--border);
}

.card-section-depends {
  display: none;
}

.card-section-depends.visible {
  display: block;
}

.card-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.card-section-header:hover {
  color: var(--text-main);
}

.card-section-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 0.32em solid transparent;
  border-bottom: 0.32em solid transparent;
  border-left: 0.5em solid currentColor;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.card-section.open > .card-section-header .card-section-arrow {
  transform: rotate(90deg);
}

.card-section-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.25s ease;
  padding: 0 4px;
}

.card-section-body > .card-section-body-inner {
  min-height: 0;
  overflow: hidden;
}

.card-section.open > .card-section-body {
  grid-template-rows: 1fr;
  padding: 0 4px 12px;
}

.card-sentence-text {
  padding: 10px 40px 10px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.card-previous-item {
  border: var(--app-border-width) solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
}

.card-previous-item p {
  margin: 4px 0;
}

/* Answer buttons */
.card-answer-form {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.answer-btn {
  flex: 1 1 0;
  min-height: var(--app-control-min-height);
  border-radius: var(--app-radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, filter 0.1s, box-shadow 0.15s;
}

.answer-btn:active {
  transform: scale(0.96);
  filter: brightness(0.95);
}

.answer-btn:focus,
.answer-btn:hover {
  box-shadow: none;
}

.answer-btn:focus-visible {
  outline: none;
}

.answer-again {
  --answer-bg: rgba(233, 69, 96, 0.12);
  --answer-border: rgba(233, 69, 96, 0.25);
  --answer-ring: rgba(233, 69, 96, 0.18);
  background: rgba(233, 69, 96, 0.12);
  color: #e94560;
  border: 1.5px solid rgba(233, 69, 96, 0.25);
}

.answer-good {
  --answer-bg: rgba(76, 175, 80, 0.12);
  --answer-border: rgba(76, 175, 80, 0.25);
  --answer-ring: rgba(76, 175, 80, 0.18);
  background: rgba(76, 175, 80, 0.12);
  color: #4caf50;
  border: 1.5px solid rgba(76, 175, 80, 0.25);
}

.answer-again:hover,
.answer-again:focus,
.answer-again:focus-visible,
.answer-good:hover,
.answer-good:focus,
.answer-good:focus-visible {
  background: var(--answer-bg);
  border-color: var(--answer-border);
}

.answer-again:focus-visible,
.answer-good:focus-visible {
  box-shadow: 0 0 0 2px var(--answer-ring);
}

#definition {
  padding: 8px 0 0;
  margin: 0;
  font-size: 0.95em;
}

#definition:empty {
  display: none;
}

.card-page {
  gap: 8px;
}

/* Wiggle animation for swipe onboarding */
@keyframes card-wiggle {
  0% { transform: translateX(0); }
  20% { transform: translateX(30px) rotate(1.2deg); }
  40% { transform: translateX(-25px) rotate(-1deg); }
  60% { transform: translateX(15px) rotate(0.6deg); }
  80% { transform: translateX(-8px) rotate(-0.3deg); }
  100% { transform: translateX(0) rotate(0); }
}

.card-swipeable.wiggle {
  animation: card-wiggle 1s ease-in-out;
}

.app-icon {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.debug-info {
  display: none;
}

body.debug-visible .debug-info {
  display: block;
}

body.debug-visible button.debug-info {
  display: inline-block;
}

.review-layout-debug {
  display: none;
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: 8px;
  z-index: 40;
  max-width: min(92vw, 420px);
  margin: 0;
  padding: 8px 10px;
  white-space: pre-wrap;
  font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-main);
  background: color-mix(in srgb, var(--background-body) 92%, transparent);
  border: var(--app-border-width) solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

/* Settings page */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.settings-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
}

.settings-select {
  width: auto;
  min-width: 120px;
  margin: 0;
}

.settings-logout {
  margin-top: 8px;
  border-top: var(--app-border-width) solid var(--border);
  padding-top: 16px;
}

.settings-logout form {
  margin: 0;
}

.settings-logout-btn {
  width: 100%;
}

/* Toggle switch */
.settings-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.settings-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: var(--app-border-muted);
  transition: background 0.2s;
}

.settings-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}

.settings-toggle-input:checked + .settings-toggle-track {
  background: var(--links);
}

.settings-toggle-input:checked + .settings-toggle-track::after {
  transform: translateX(20px);
}

.settings-toggle-input:focus-visible + .settings-toggle-track {
  box-shadow: var(--app-focus-ring);
}

.settings-mobile-only {
  display: none;
}

@media (max-width: 640px) {
  .settings-mobile-only {
    display: flex;
  }

  /* Hide review buttons when setting is on (mobile only) */
  .hide-review-buttons .card-answer-form {
    display: none;
  }
}

/* Home page activity */
.activity-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  margin: 16px 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.chart-bar {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bar-learned {
  background: #4caf50;
  height: calc(var(--val) / var(--max) * 100%);
  min-height: 0;
  border-radius: 2px 2px 0 0;
}

.bar-reviewed {
  background: #2196f3;
  height: calc(var(--val) / var(--max) * 100%);
  min-height: 0;
  border-radius: 2px 2px 0 0;
}

.chart-label {
  font-size: 0.65em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Edit page */
.edit-page .field-group {
  scroll-margin-top: 8px;
}

.word-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.word-input-row .app-field {
  flex: 1;
  min-width: 0;
}

.word-input-row .app-button {
  flex-shrink: 0;
}

/* Bottom tab bar — visible only on mobile */
.app-tab-bar {
  display: none;
}

/* Mobile layout */
@media (max-width: 640px) {
  .app-shell {
    --app-mobile-content-bottom-gap: 28px;
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    padding: 0;
    gap: 0;
    overflow: hidden;
  }

  .app-content {
    min-height: 0;
    overflow-y: auto;
    padding: 10px 10px var(--app-mobile-content-bottom-gap);
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
  }

  .page-panel {
    padding: 16px;
    gap: 14px;
  }

  .app-form {
    flex-direction: column;
    align-items: stretch;
  }

  .app-form .field-group {
    flex: 0 0 auto;
  }

  .app-form .field-group,
  .page-link-row,
  .results-item,
  .results-item .app-button {
    width: 100%;
  }

  .page-link-row,
  .results-item {
    flex-direction: column;
    align-items: stretch;
  }

  .app-header {
    padding: calc(4px + env(safe-area-inset-top)) 10px 4px;
    flex-shrink: 0;
  }

  /* Hide desktop nav on mobile */
  .app-nav {
    display: none;
  }

  .app-topbar {
    justify-content: center;
    gap: 6px;
  }

  /* Show bottom tab bar on mobile */
  .app-tab-bar {
    display: flex;
    position: relative;
    z-index: 20;
    flex-shrink: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--background-body);
    border-top: var(--app-border-width) solid var(--border);
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
  }

  .app-tab-bar .app-nav-text {
    display: none;
  }

  .app-tab-bar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    border-radius: var(--app-radius-sm);
    -webkit-tap-highlight-color: transparent;
  }

  .app-tab-bar a.active {
    color: var(--links);
  }

  .app-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 1;
  }

  .app-tab-icon .app-icon {
    width: 20px;
    height: 20px;
  }

  .app-tab-label {
    line-height: 1;
  }

  .card-page {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    padding-bottom: 0;
    margin-bottom: calc(-1 * var(--app-mobile-content-bottom-gap));
    overflow: hidden;
  }

  .card-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .card-swipeable {
    min-height: 100%;
    box-sizing: border-box;
  }

  .card-answer-form {
    position: relative;
    bottom: auto;
    width: calc(100% + 20px);
    max-width: none;
    margin: 0 -10px 0;
    z-index: 15;
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
    background: var(--background-body);
    border-top: var(--app-border-width) solid var(--border);
    box-shadow: var(--app-shadow-sticky);
  }

  .card-answer-form button {
    margin: 0;
    min-height: 54px;
    font-size: 17px;
  }
}

/* Narrow desktop fallback */
@media (max-width: 380px) {
  .app-nav {
    font-size: 0.82rem;
  }

  .app-nav a {
    padding: 0.5rem 0.4rem;
  }
}

.promo-code-form {
  margin-top: 1rem;
}

.promo-code-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.promo-code-input {
  flex: 1 1 auto;
}

.promo-code-submit {
  flex: 0 0 auto;
}

.promo-code-message {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.promo-code-message-success {
  color: #2e7d32;
}

.promo-code-message-error {
  color: #b42318;
}
