/* Aalo - Modern UI Design System */
/* Concatenated from design-tokens, components, games, accessibility, and main styles */
/* Hallmark · genre: playful-soft · macrostructure: calm workbench · design-system: design.md · designed-as-app */
/* Hallmark · pre-emit critique: P5 H5 E4 S4 R4 V4 */
/* Hallmark · genre: playful-soft · macrostructure: calm workbench · design-system: design.md · designed-as-app */

/* Hallmark · genre: playful-soft · macrostructure: calm workbench · design-system: design.md · designed-as-app */
/* Hallmark · pre-emit critique: P5 H5 E4 S4 R4 V4 */

/* ==========================================================================
   Aalo design tokens — brand-anchored OKLCH
   Canonical source. app/assets/stylesheets/application.css is regenerated
   from this + the other source sheets after edits.
   ========================================================================== */

:root {
  /* Ground & clouds */
  --color-bg: oklch(96.6% 0.008 254);
  --color-bg-elevated: oklch(99.5% 0.003 254);
  --color-cloud-1: oklch(94.3% 0.010 255);
  --color-cloud-2: oklch(91.5% 0.015 255);
  --color-cloud-3: oklch(88.6% 0.020 252);
  --color-surface: oklch(99.5% 0.003 254);
  --color-surface-subtle: oklch(97.8% 0.006 254);

  /* Brand */
  --color-primary: oklch(50% 0.085 245);
  --color-primary-hover: oklch(43% 0.085 245);
  --color-primary-subtle: oklch(95% 0.015 245);
  --color-accent: oklch(63% 0.14 40);
  --color-accent-hover: oklch(57% 0.13 40);
  --color-accent-fill: oklch(58% 0.13 38);
  --color-accent-subtle: oklch(96% 0.015 40);

  /* Status */
  --color-success: oklch(58% 0.11 150);
  --color-success-subtle: oklch(95.5% 0.03 150);
  --color-warning: oklch(66% 0.12 80);
  --color-warning-subtle: oklch(96.5% 0.04 85);
  --color-error: oklch(55% 0.13 25);
  --color-error-subtle: oklch(96% 0.02 25);

  /* Ink */
  --color-text: oklch(29% 0.028 255);
  --color-text-secondary: oklch(47% 0.028 255);
  --color-text-muted: oklch(51% 0.02 252);

  /* Ink on filled brand/status surfaces (buttons, toasts, game anchors) */
  --color-on-primary: oklch(99% 0.002 250);

  /* Hairlines */
  --color-border: oklch(88% 0.012 250);
  --color-border-subtle: oklch(92.5% 0.01 250);

  /* Depth — soft, matte, never coloured */
  --color-shadow: oklch(29% 0.028 255 / 0.07);
  --color-shadow-lg: oklch(29% 0.028 255 / 0.12);

  /* Focus — instant, never animated */
  --color-focus: oklch(52% 0.145 38);

  /* Typography */
  --font-size-xs: 16px;
  --font-size-sm: 18px;
  --font-size-base: 20px;
  --font-size-lg: 24px;
  --font-size-xl: 30px;
  --font-size-2xl: 40px;
  --font-size-3xl: 56px;
  --font-family: 'Inter', 'Noto Sans Bengali', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Touch targets */
  --touch-target-min: 60px;
  --touch-target-preferred: 72px;
  --touch-target-large: 88px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px var(--color-shadow);
  --shadow-md: 0 2px 8px var(--color-shadow);
  --shadow-lg: 0 8px 24px var(--color-shadow-lg);
  --shadow-xl: 0 16px 48px var(--color-shadow-lg);
  --shadow-inner: inset 0 2px 4px var(--color-shadow);

  /* Motion — motion-cut; no overshoot easings exist anymore */
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

[data-theme='dark'] {
  --color-bg: oklch(22% 0.015 255);
  --color-bg-elevated: oklch(26% 0.018 255);
  --color-cloud-1: oklch(25% 0.018 255);
  --color-cloud-2: oklch(29% 0.02 254);
  --color-cloud-3: oklch(33% 0.022 253);
  --color-surface: oklch(30% 0.02 255);
  --color-surface-subtle: oklch(27% 0.018 255);

  --color-primary: oklch(70% 0.10 245);
  --color-primary-hover: oklch(78% 0.09 245);
  --color-primary-subtle: oklch(33% 0.05 245);
  --color-accent: oklch(72% 0.115 40);
  --color-accent-hover: oklch(78% 0.10 40);
  --color-accent-fill: oklch(64% 0.125 38);
  --color-accent-subtle: oklch(32% 0.045 40);

  --color-success: oklch(72% 0.10 150);
  --color-success-subtle: oklch(31% 0.05 150);
  --color-warning: oklch(76% 0.11 80);
  --color-warning-subtle: oklch(32% 0.055 85);
  --color-error: oklch(70% 0.12 25);
  --color-error-subtle: oklch(31% 0.06 25);

  --color-text: oklch(93% 0.008 254);
  --color-text-secondary: oklch(78% 0.014 254);
  --color-text-muted: oklch(70% 0.015 253);

  --color-border: oklch(38% 0.02 254);
  --color-border-subtle: oklch(33% 0.018 255);

  --color-shadow: rgb(0 0 0 / 0.3);
  --color-shadow-lg: rgb(0 0 0 / 0.45);

  --color-focus: oklch(78% 0.12 42);
}

@media (prefers-color-scheme: dark) {
  [data-theme='system'] {
    --color-bg: oklch(22% 0.015 255);
    --color-bg-elevated: oklch(26% 0.018 255);
    --color-cloud-1: oklch(25% 0.018 255);
    --color-cloud-2: oklch(29% 0.02 254);
    --color-cloud-3: oklch(33% 0.022 253);
    --color-surface: oklch(30% 0.02 255);
    --color-surface-subtle: oklch(27% 0.018 255);

    --color-primary: oklch(70% 0.10 245);
    --color-primary-hover: oklch(78% 0.09 245);
    --color-primary-subtle: oklch(33% 0.05 245);
    --color-accent: oklch(72% 0.115 40);
    --color-accent-hover: oklch(78% 0.10 40);
    --color-accent-fill: oklch(64% 0.125 38);
    --color-accent-subtle: oklch(32% 0.045 40);

    --color-success: oklch(72% 0.10 150);
    --color-success-subtle: oklch(31% 0.05 150);
    --color-warning: oklch(76% 0.11 80);
    --color-warning-subtle: oklch(32% 0.055 85);
    --color-error: oklch(70% 0.12 25);
    --color-error-subtle: oklch(31% 0.06 25);

    --color-text: oklch(93% 0.008 254);
    --color-text-secondary: oklch(78% 0.014 254);
    --color-text-muted: oklch(70% 0.015 253);

    --color-border: oklch(38% 0.02 254);
    --color-border-subtle: oklch(33% 0.018 255);

    --color-shadow: rgb(0 0 0 / 0.3);
    --color-shadow-lg: rgb(0 0 0 / 0.45);

    --color-focus: oklch(78% 0.12 42);
  }
}

@media (min-width: 768px) {
  :root {
    --font-size-base: 22px;
    --font-size-lg: 26px;
    --font-size-xl: 34px;
    --font-size-2xl: 44px;
    --font-size-3xl: 60px;
  }
}

@media (min-width: 1024px) {
  :root {
    --touch-target-min: 52px;
    --touch-target-preferred: 64px;
  }
}

/* ===== Functional keyframes only ===== */

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Game-cue pulse — functional attention signal, exempt from motion-cut,
   collapsed by prefers-reduced-motion. Used ONLY inside game stages. */
@keyframes cue-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animation utilities — enter once, then rest */
.animate-fade-in-up { animation: fade-in-up var(--duration-slow) var(--ease-out) both; }
.animate-fade-in { animation: fade-in var(--duration-normal) var(--ease-out) both; }
.animate-scale-in { animation: scale-in var(--duration-normal) var(--ease-out) both; }
.animate-slide-in-right { animation: slide-in-right var(--duration-normal) var(--ease-out) both; }

.stagger-1 { animation-delay: 60ms; }
.stagger-2 { animation-delay: 120ms; }
.stagger-3 { animation-delay: 180ms; }

/* ===== components.css ===== */
/* Hallmark · genre: playful-soft · macrostructure: calm workbench · design-system: design.md · designed-as-app */
/* Component voice: solid matte surfaces, hairline borders, one warm accent
 * per screen. No gradients, no glass, no overshoot motion anywhere. */

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: var(--touch-target-min);
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

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

.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--accent {
  background: var(--color-accent-fill);
  color: var(--color-on-primary);
}

.btn--accent:hover {
  background: var(--color-accent-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--ghost:hover {
  background: var(--color-primary-subtle);
}

.btn--danger {
  background: transparent;
  border-color: var(--color-error);
  color: var(--color-error);
}

.btn--danger:hover {
  background: var(--color-error-subtle);
}

.btn--large {
  min-height: var(--touch-target-preferred);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Dense square button for row-level actions (edit/delete inside lists).
 * Smaller than primary CTAs by design; never the only path to a task. */
.btn--icon {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-width: 1px;
}

/* ===== Cards ===== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  min-width: 0;
}

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-2xs);
}

.card__subtitle {
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.card--interactive {
  cursor: pointer;
}

.card--interactive:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.card--interactive:active {
  box-shadow: var(--shadow-sm);
}

/* ===== Inputs ===== */
.input {
  width: 100%;
  min-height: var(--touch-target-preferred);
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.input::placeholder {
  color: var(--color-text-muted);
}

/* ===== Toggle Switch ===== */
.toggle {
  --toggle-width: 60px;
  --toggle-height: 34px;
  --toggle-thumb: 28px;
  position: relative;
  width: var(--toggle-width);
  height: var(--toggle-height);
  flex-shrink: 0;
  display: inline-block;
}

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

.toggle__track {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--duration-normal) var(--ease-out);
}

.toggle input:checked + .toggle__track {
  background: var(--color-primary);
}

.toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: var(--toggle-thumb);
  height: var(--toggle-thumb);
  background: var(--color-bg-elevated);
  border-radius: var(--radius-full);
  transition: transform var(--duration-normal) var(--ease-out);
  box-shadow: var(--shadow-md);
}

.toggle input:checked ~ .toggle__thumb {
  transform: translateX(calc(var(--toggle-width) - var(--toggle-thumb) - 6px));
}

/* ===== Accordion ===== */
.accordion__item {
  border-bottom: 1px solid var(--color-border-subtle);
}

.accordion__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--touch-target-min);
  padding: var(--space-md) 0;
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.accordion__checkbox:checked ~ .accordion__content {
  max-height: 500px;
}

.accordion__checkbox {
  display: none;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(20% 0.02 255 / 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.modal-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-overlay--open .modal {
  animation: scale-in var(--duration-normal) var(--ease-out);
}

@media (max-width: 374px) {
  .modal {
    padding: var(--space-lg);
  }
}

.modal__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.modal__actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  justify-content: flex-end;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 32px;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.2;
}

.badge--success {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.badge--warning {
  background: var(--color-warning-subtle);
  color: oklch(50% 0.11 80);
}

.badge--error {
  background: var(--color-error-subtle);
  color: var(--color-error);
}

.badge--info {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

[data-theme='dark'] .badge--warning,
.system-dark .badge--warning {
  color: var(--color-warning);
}

@media (prefers-color-scheme: dark) {
  [data-theme='system'] .badge--warning {
    color: var(--color-warning);
  }
}

/* ===== Skeleton Loader ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-border-subtle) 25%,
    var(--color-surface-subtle) 50%,
    var(--color-border-subtle) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ===== Tooltip ===== */
.tooltip {
  position: relative;
  display: inline-flex;
}

.tooltip__content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.tooltip:hover .tooltip__content,
.tooltip:focus-within .tooltip__content {
  opacity: 1;
}

/* ===== List / Row ===== */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.list__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: var(--touch-target-min);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  min-width: 0;
}

.list__item:hover {
  background: var(--color-surface-subtle);
  border-color: var(--color-border);
}

.list__item--active {
  background: var(--color-primary-subtle);
  border-color: var(--color-primary);
}

/* ===== Progress Bar ===== */
.progress {
  width: 100%;
  height: 14px;
  background: var(--color-border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  min-width: 6px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  pointer-events: none;
}

@media (min-width: 600px) {
  .toast-container {
    left: auto;
    right: var(--space-xl);
    align-items: flex-end;
  }
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--touch-target-min);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--duration-normal) var(--ease-out);
  max-width: 420px;
  pointer-events: auto;
}

.toast svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.toast--success {
  background: var(--color-success);
  color: var(--color-on-primary);
}

.toast--error {
  background: var(--color-error);
  color: var(--color-on-primary);
}

.toast--info {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: var(--space-2xs);
  border-bottom: 1px solid var(--color-border-subtle);
}

.tab {
  flex: 1;
  min-height: var(--touch-target-preferred);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab:hover {
  color: var(--color-text);
}

/* ===== Stat Card ===== */
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  min-width: 0;
}

.stat-card__value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-primary);
}

.stat-card__label {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

/* ===== Feature Card ===== */
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.feature-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.feature-card__icon svg {
  width: 36px;
  height: 36px;
}

.feature-card__icon--accent {
  background: var(--color-accent-subtle);
  color: var(--color-accent-fill);
}

.feature-card__icon--success {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.feature-card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2xs);
}

.feature-card__description {
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

/* ===== Hero — typographic, calm ===== */
.hero {
  padding: var(--space-2xl) 0 var(--space-md);
  max-width: 560px;
}

.hero__title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--color-text);
  overflow-wrap: anywhere;
  min-width: 0;
  margin-bottom: var(--space-sm);
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

/* ===== games.css ===== */
/* Hallmark · genre: playful-soft · macrostructure: calm workbench (game stage variant) · design-system: design.md · designed-as-app */
/* Game stages: one lit surface, functional colour cues only.
 * Correct = success fill · Incorrect = error fill · Stimulus = accent fill.
 * Motion here is functional cueing and collapses under reduced-motion. */

/* ===== Game Hub ===== */
.game-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
}

@media (min-width: 600px) {
  .game-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .game-hub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.game-card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  cursor: pointer;
  min-width: 0;
}

.game-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.game-card__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.game-card:hover .game-card__icon {
  background: var(--color-accent-subtle);
  color: var(--color-accent-fill);
}

.game-card__icon svg {
  width: 40px;
  height: 40px;
}

.game-card--accent .game-card__icon {
  background: var(--color-accent-subtle);
  color: var(--color-accent-fill);
}

.game-card--success .game-card__icon {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.game-card__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}

.game-card__description {
  font-size: var(--font-size-sm);
  line-height: 1.45;
  color: var(--color-text-secondary);
}

/* ===== Game Stage ===== */
.game-screen {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
}

@media (max-width: 480px) {
  .game-screen {
    padding: var(--space-lg);
    min-height: 50vh;
  }
}

/* ===== Peripheral Light ===== */
.peripheral-light__anchor {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: cue-pulse 2.4s var(--ease-in-out) infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: var(--color-on-primary);
  line-height: 1;
}

.peripheral-light__grid {
  position: relative;
  width: min(300px, 80vw);
  height: min(300px, 80vw);
  border-radius: var(--radius-full);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
}

.peripheral-light__target {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-accent-fill);
  border: none;
  cursor: pointer;
  animation: pulse-in var(--duration-normal) var(--ease-out);
  z-index: 1;
}

.peripheral-light__target--correct {
  background: var(--color-success);
}

.peripheral-light__target--incorrect {
  background: var(--color-error);
}

@keyframes pulse-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

.peripheral-light__hint {
  margin-top: var(--space-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* ===== Sriti Khela (Memory Match) ===== */
.memory-grid {
  display: grid;
  gap: var(--space-sm);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.memory-grid--3x2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.memory-grid--4x3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.memory-grid--4x4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.memory-grid--6x4 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 374px) {
  .memory-grid--4x4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .memory-grid--6x4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.memory-card {
  aspect-ratio: 1;
  border: none;
  padding: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out);
  position: relative;
  transform-style: preserve-3d;
  background: transparent;
}

.memory-card--flipped {
  transform: rotateY(180deg);
}

.memory-card--matched {
  transform: rotateY(180deg);
}

.memory-card--matched .memory-card__front {
  border-color: var(--color-success);
  box-shadow: inset 0 0 0 2px var(--color-success);
}

.memory-card--mismatch {
  transform: rotateY(180deg);
  animation: shake 0.4s var(--ease-out);
}

.memory-card--mismatch .memory-card__front {
  border-color: var(--color-error);
  box-shadow: inset 0 0 0 2px var(--color-error);
}

.memory-card__face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  overflow: hidden;
}

.memory-card__back {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.memory-card__back::after {
  content: '';
  width: 18%;
  aspect-ratio: 1;
  border-radius: var(--radius-full);
  background: oklch(99% 0.002 254 / 0.25);
}

.memory-card__front {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transform: rotateY(180deg);
  font-size: clamp(24px, 7vw, 40px);
}

/* ===== Shobdo Jol (Word Association) ===== */
.word-chain {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  padding: var(--space-lg) 0;
}

.word-chain__item {
  min-height: var(--touch-target-preferred);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.word-chain__item:hover {
  border-color: var(--color-primary);
}

.word-chain__item--selected {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

/* ===== Chokher Alo (Visual Attention) ===== */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xs);
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 374px) {
  .pattern-grid {
    max-width: 280px;
  }
}

.pattern-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  background: var(--color-surface-subtle);
}

.pattern-cell:hover {
  border-color: var(--color-primary);
}

.pattern-cell--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.pattern-cell--highlight {
  background: var(--color-accent-fill);
  border-color: var(--color-accent-fill);
  animation: cue-pulse 1s var(--ease-in-out) infinite;
}

/* ===== Ulta Pulta (rule-switch inhibition) ===== */
.ulta-pulta__progress {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.ulta-pulta__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-border-subtle);
}

.ulta-pulta__dot--done { background: var(--color-primary); }

.ulta-pulta__dot--now {
  background: var(--color-accent-fill);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.ulta-pulta__card {
  width: min(280px, 82vw);
  min-height: 220px;
  border: 5px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  position: relative;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.ulta-pulta__card.frame-rule-color { border-color: var(--color-primary); }
.ulta-pulta__card.frame-rule-shape { border-color: var(--color-accent-fill); }

.ulta-pulta__rule-badge {
  position: absolute;
  top: -16px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ulta-pulta__card.frame-rule-color .ulta-pulta__rule-badge { color: var(--color-primary); }
.ulta-pulta__card.frame-rule-shape .ulta-pulta__rule-badge { color: var(--color-accent-fill); }

.ulta-pulta__rule-badge svg { width: 24px; height: 24px; }

.ulta-pulta__stimulus svg { width: 84px; height: 84px; }

.ulta-pulta__stimulus--red { color: #c9553d; }
.ulta-pulta__stimulus--blue { color: #3b6fa0; }
.ulta-pulta__stimulus--green { color: #5a9e6f; }
.ulta-pulta__stimulus--gold { color: #d99b2b; }

.ulta-pulta__rule-hint {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.ulta-pulta__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  width: 100%;
  max-width: 380px;
  margin-top: var(--space-lg);
}

.ulta-pulta__tile {
  min-height: 88px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border-subtle);
  background: var(--color-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.ulta-pulta__tile:hover { border-color: var(--color-primary); }
.ulta-pulta__tile:disabled { cursor: default; }

.ulta-pulta__tile.is-correct {
  border-color: var(--color-success);
  background: var(--color-success-subtle);
}

.ulta-pulta__tile.is-wrong {
  border-color: var(--color-error);
  background: var(--color-error-subtle);
}

.ulta-pulta__swatch {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  border: 1px solid rgb(0 0 0 / 0.08);
}

.ulta-pulta__tile--glyph { color: var(--color-text); }
.ulta-pulta__tile--glyph svg { width: 56px; height: 56px; }

/* ===== Game Header ===== */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-subtle);
}

.game-header__score {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-primary);
}

.game-header__timer {
  font-size: var(--font-size-lg);
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ===== Game Progress ===== */
.game-progress {
  width: 100%;
  height: 8px;
  background: var(--color-border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.game-progress__bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
}

/* ===== Feedback ===== */
.feedback-correct {
  animation: fade-in-up var(--duration-fast) var(--ease-out);
}

.feedback-incorrect {
  animation: shake var(--duration-normal) var(--ease-out);
}

/* ===== Combo Display ===== */
.combo-display {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-accent-fill);
  animation: fade-in-up var(--duration-fast) var(--ease-out);
  pointer-events: none;
}

/* ===== accessibility.css ===== */
/* Hallmark · genre: playful-soft · design-system: design.md · designed-as-app */

/* ===== Focus States — instant, never animated ===== */
*:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== Reduced Motion — spatial motion collapses to opacity ≤150ms ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== High Contrast ===== */
[data-high-contrast='true'] {
  --color-text: oklch(12% 0 0);
  --color-text-secondary: oklch(22% 0 0);
  --color-text-muted: oklch(32% 0 0);
  --color-bg: oklch(100% 0 0);
  --color-bg-elevated: oklch(100% 0 0);
  --color-surface: oklch(100% 0 0);
  --color-primary: oklch(38% 0.10 245);
  --color-accent: oklch(50% 0.16 35);
  --color-accent-fill: oklch(46% 0.15 36);
  --color-border: oklch(25% 0 0);
  --color-border-subtle: oklch(40% 0 0);
  --color-success: oklch(44% 0.13 150);
  --color-error: oklch(46% 0.17 25);
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
}

[data-high-contrast='true'][data-theme='dark'] {
  --color-text: oklch(100% 0 0);
  --color-text-secondary: oklch(90% 0 0);
  --color-text-muted: oklch(78% 0 0);
  --color-bg: oklch(8% 0 0);
  --color-bg-elevated: oklch(12% 0 0);
  --color-surface: oklch(14% 0 0);
  --color-primary: oklch(80% 0.10 245);
  --color-border: oklch(75% 0 0);
  --color-border-subtle: oklch(60% 0 0);
}

@media (prefers-color-scheme: dark) {
  [data-high-contrast='true'][data-theme='system'] {
    --color-text: oklch(100% 0 0);
    --color-text-secondary: oklch(90% 0 0);
    --color-text-muted: oklch(78% 0 0);
    --color-bg: oklch(8% 0 0);
    --color-bg-elevated: oklch(12% 0 0);
    --color-surface: oklch(14% 0 0);
    --color-primary: oklch(80% 0.10 245);
    --color-border: oklch(75% 0 0);
    --color-border-subtle: oklch(60% 0 0);
  }
}

/* ===== Screen Reader Only ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Font Size Classes ===== */
.font-size--small { --font-size-base: 18px; }
.font-size--medium { --font-size-base: 20px; }
.font-size--large { --font-size-base: 24px; }
.font-size--extra-large { --font-size-base: 28px; }

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-primary);
  color: oklch(99% 0.002 245);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-size: var(--font-size-base);
  font-weight: 500;
}

.skip-link:focus {
  top: var(--space-md);
}

/* ===== Touch Target Helper ===== */
.touch-target {
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== main.css ===== */

/* Hallmark · genre: playful-soft · macrostructure: calm workbench · design-system: design.md · designed-as-app */

/* ===== Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Cloud field — the brand's ground. Soft radial stacks over the paper tone. */
.cloud-bg {
  background:
    radial-gradient(ellipse at 20% 50%, var(--color-cloud-1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, var(--color-cloud-2) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, var(--color-cloud-3) 0%, transparent 45%),
    var(--color-bg);
}

.cloud-bg--dense {
  background:
    radial-gradient(ellipse at 10% 30%, var(--color-cloud-1) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 10%, var(--color-cloud-2) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 70%, var(--color-cloud-3) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 90%, var(--color-cloud-1) 0%, transparent 40%),
    var(--color-bg);
}

.cloud-bg--subtle {
  background:
    radial-gradient(ellipse at 50% 0%, var(--color-cloud-1) 0%, transparent 60%),
    var(--color-bg);
}

/* ===== App Shell ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: var(--touch-target-large);
}

@media (max-width: 374px) {
  .app-header {
    padding: var(--space-xs) var(--space-sm);
    min-height: 64px;
  }
}

.app-header__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-decoration: none;
}

.app-header__title svg {
  flex-shrink: 0;
}

/* Wordmark — lowercase "aalo" in Outfit, per the logo kit lockup.
 * Bengali/Hindi names fall through to the Noto faces in --font-family. */
.app-wordmark {
  font-family: 'Outfit', var(--font-family);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

@media (max-width: 374px) {
  .app-header__title {
    font-size: var(--font-size-lg);
  }
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.lang-select {
  min-height: var(--touch-target-min);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  cursor: pointer;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  background: var(--color-surface-subtle);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }

[data-theme='dark'] .theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  [data-theme='system'] .theme-toggle .icon-sun { display: none; }
  [data-theme='system'] .theme-toggle .icon-moon { display: block; }
}

/* ===== Bottom Tab Bar ===== */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  justify-content: space-around;
  gap: var(--space-2xs);
  padding: var(--space-2xs) var(--space-xs);
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + var(--space-2xs));
}

@media (max-width: 374px) {
  .app-nav {
    gap: 2px;
    padding-left: var(--space-2xs);
    padding-right: var(--space-2xs);
  }
}

.app-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  max-width: 96px;
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  border: none;
  border-radius: var(--radius-lg);
  background: none;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-weight: 500;
  line-height: 1.2;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

/* Clickable text never wraps (gate 49): truncate instead below 360px. */
.app-nav__item > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-nav__item:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text-secondary);
}

.app-nav__item--active,
.app-nav__item--active:hover {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.app-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.app-nav__icon svg {
  width: 26px;
  height: 26px;
}

.app-content {
  flex: 1;
  padding-bottom: calc(var(--touch-target-large) + env(safe-area-inset-bottom, 0) + var(--space-lg));
  overflow-x: clip;
}

/* ===== Screen Containers ===== */
.screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
  min-width: 0;
  animation: fade-in-up var(--duration-slow) var(--ease-out) both;
}

.screen__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--color-text);
  overflow-wrap: anywhere;
  min-width: 0;
}

.screen__subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-top: var(--space-2xs);
}

/* ===== Section Headers — left-aligned workbench rhythm ===== */
.section-header {
  margin-bottom: var(--space-lg);
  text-align: left;
}

.section-header__label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  margin-bottom: var(--space-2xs);
}

.section-header__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-2xs);
  overflow-wrap: anywhere;
  min-width: 0;
}

.section-header__description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  max-width: 560px;
}

/* ===== Grid Layouts ===== */
.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: minmax(0, 1fr);
}

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

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 599px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== Responsive Helpers ===== */
@media (max-width: 480px) {
  .screen {
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-lg);
  }

  .results__stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-header__title {
    font-size: var(--font-size-xl);
  }
}

@media (max-width: 374px) {
  .screen {
    padding: var(--space-md) var(--space-sm);
  }

  .hero {
    padding: var(--space-xl) var(--space-md);
  }

  .empty-state {
    padding: var(--space-2xl) var(--space-md);
  }
}

@media (min-width: 600px) {
  .results__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== Login ===== */
.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  animation: scale-in var(--duration-normal) var(--ease-out) both;
}

.login-card__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-2xl);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.login-card__brand .app-wordmark {
  font-family: 'Outfit', var(--font-family);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.login-card__tagline {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.login-card__footer {
  margin-top: var(--space-lg);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.login-card__footer a {
  color: var(--color-primary);
  font-weight: 500;
}

.login-error {
  display: none;
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-error-subtle);
  color: var(--color-error);
  font-size: var(--font-size-sm);
  text-align: left;
}

.login-error.is-visible {
  display: block;
}

/* ===== Form Layout ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 480px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

@media (max-width: 374px) {
  .form-row-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: left;
}

.form__label {
  font-size: var(--font-size-base);
  color: var(--color-text);
  font-weight: 500;
}

.form__hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.form__error {
  font-size: var(--font-size-sm);
  color: var(--color-error);
}

/* ===== Results / Score Display ===== */
.results {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.results__score {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-primary);
  animation: fade-in-up var(--duration-slow) var(--ease-out) both;
}

.results__label {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

.results__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.results__stat {
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.results__stat-value {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
}

.results__stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2xs);
}

/* ===== Daily check-in section (Anubhuti mood, Ghum sleep) ===== */
.daily-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mood-card__row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.mood-card__row > div {
  flex: 1;
  min-width: 0;
}

.mood-card__face {
  font-size: 44px;
  line-height: 1;
}

.mood-card__faces {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.mood-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: var(--touch-target-preferred);
  padding: var(--space-xs) var(--space-2xs);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.mood-face:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.mood-face__emoji {
  font-size: 30px;
  line-height: 1;
}

.mood-face__emoji {
  font-size: 28px;
  line-height: 1;
}

/* Clickable text never wraps (gate 49): single line, size steps down. */
.mood-face__label {
  font-size: clamp(11px, 3.2vw, 14px);
  color: var(--color-text-secondary);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

@media (max-width: 374px) {
  .mood-card__faces {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-2xs);
  }

  .mood-face__emoji {
    font-size: 24px;
  }
}

.mood-face--selected {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.sleep-hours {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-2xs);
}

.sleep-hour-chip {
  min-height: var(--touch-target-min);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.sleep-hour-chip:hover {
  border-color: var(--color-primary);
}

.sleep-hour-chip--selected {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

/* ===== Damu breathing pause ===== */
.breathe-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.breathe-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.breathe-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.breathe-circle {
  width: min(240px, 60vw);
  height: min(240px, 60vw);
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: breathe-cycle 8s var(--ease-in-out) infinite;
}

/* Functional cue: the circle paces the breath. Collapsed by
   reduced-motion; the text cues keep guiding. */
@keyframes breathe-cycle {
  0% { transform: scale(0.62); }
  50% { transform: scale(1); }
  100% { transform: scale(0.62); }
}

.breathe-circle__inner {
  width: 34%;
  aspect-ratio: 1;
  border-radius: var(--radius-full);
  background: var(--color-accent-fill);
}

.breathe-cue {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text);
}

.breathe-count {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-top: calc(-1 * var(--space-md));
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  gap: var(--space-md);
}

.empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
}

.empty-state__icon svg {
  width: 36px;
  height: 36px;
}

.empty-state__title {
  font-size: var(--font-size-xl);
  color: var(--color-text);
  font-weight: 700;
}

.empty-state__description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  max-width: 320px;
}

/* ===== Bazar Hishab ===== */
/* Hallmark · genre: playful-soft · one transaction per screen · design-system: design.md · designed-as-app */

.bazar-hishab__mode-select,
.bazar-hishab__difficulty {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
}

.bazar-hishab__mode-chip {
  min-height: 60px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.bazar-hishab__mode-chip.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle, var(--color-surface));
  color: var(--color-primary);
}

.bazar-hishab__mode-chip:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.bazar-hishab__progress {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-md);
}

.bazar-hishab__dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-cloud-2);
}

.bazar-hishab__dot--done { background: var(--color-success); }
.bazar-hishab__dot--now { background: var(--color-accent); }

.bazar-hishab__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.bazar-hishab__items {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.bazar-hishab__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
}

.bazar-hishab__item-art {
  font-size: 72px;
  line-height: 1.1;
}

.bazar-hishab__item-price {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}

.bazar-hishab__ask {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

.bazar-hishab__repeat {
  min-height: 52px;
}

.bazar-hishab__target {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-md);
  min-height: 48px;
  margin-top: var(--space-md);
}

.bazar-hishab__target-num {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text);
}

.bazar-hishab__dots {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 180px;
  row-gap: 4px;
  align-items: center;
}

.bazar-hishab__dot-mark {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  margin-left: 2px;
}

.bazar-hishab__dot-mark--gap {
  margin-left: 8px;
}

.bazar-hishab__dots-empty {
  color: var(--color-text-muted);
}

.bazar-hishab__tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  min-height: 48px;
  margin-top: var(--space-xs);
}

.bazar-hishab__tray-total {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-primary);
}

.bazar-hishab__gentle {
  width: 100%;
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-warning);
}

.bh-note {
  min-width: 88px;
  min-height: 88px;
  border-radius: var(--radius-md);
  border: 3px solid var(--color-border);
  font-size: var(--font-size-lg);
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out);
}

.bh-note:active {
  transform: scale(0.96);
}

.bh-note:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Tints echo real taka colour families; denomination text always shown. */
.bh-note--two        { background: #dfe8dc; }
.bh-note--five       { background: #f5e3c8; }
.bh-note--ten        { background: #d9e6d0; }
.bh-note--twenty     { background: #f4d8c0; }
.bh-note--fifty      { background: #e3d3ea; }
.bh-note--hundred    { background: #cfe0ef; }
.bh-note--fivehundred{ background: #f0d3cf; }

@media (prefers-color-scheme: dark) {
  .bh-note--two        { background: #37413a; }
  .bh-note--five       { background: #4a4030; }
  .bh-note--ten        { background: #35422f; }
  .bh-note--twenty     { background: #4a3a2c; }
  .bh-note--fifty      { background: #3f3447; }
  .bh-note--hundred    { background: #2c3b4a; }
  .bh-note--fivehundred{ background: #473230; }
}

.bazar-hishab__notes {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-md);
}

.bazar-hishab__actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.bazar-hishab__option {
  min-width: 120px;
  min-height: 88px;
  border-radius: var(--radius-md);
  border: 3px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
}

.bazar-hishab__option.is-correct {
  border-color: var(--color-success);
  background: var(--color-surface);
}

.bazar-hishab__option.is-wrong {
  border-color: var(--color-error);
}

.bazar-hishab__option:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.bazar-hishab__feedback {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-success);
}

/* ===== Shobdo Dhara ===== */
/* Hallmark · genre: playful-soft · voice-first fluency · design-system: design.md · designed-as-app */

.shobdo-dhara__mode-select {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
}

.shobdo-dhara__chip {
  min-height: 60px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
}

.shobdo-dhara__chip.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.shobdo-dhara__chip:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.shobdo-dhara__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.shobdo-dhara__cat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}

.shobdo-dhara__cat-art {
  font-size: 40px;
  line-height: 1;
}

.shobdo-dhara__clock {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.shobdo-dhara__stream {
  width: 100%; /* column-flex parent uses align-items:center — never rely on stretch */
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-content: flex-start;
  min-height: 160px;
  max-height: 320px;
  overflow-y: auto;
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--color-surface-subtle, var(--color-cloud-1));
}

.shobdo-dhara__word {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  font-size: var(--font-size-lg); /* >= 24px per PRD chip rule */
  font-weight: 600;
  color: var(--color-text);
  animation: sd-drop var(--duration-slow) var(--ease-spring);
}

.shobdo-dhara__word--cluster {
  border-color: var(--color-success);
  color: var(--color-success);
}

@keyframes sd-drop {
  from { transform: translateY(-12px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .shobdo-dhara__word { animation: none; }
}

.shobdo-dhara__gentle {
  min-height: 28px;
  margin-top: var(--space-xs);
  text-align: center;
  font-size: var(--font-size-base);
  color: var(--color-warning);
}

.shobdo-dhara__input-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: stretch;
  margin-top: var(--space-sm);
}

.shobdo-dhara__input {
  flex: 1 1 120px;
  min-width: 0; /* shrink inside 320-375px viewports next to the 88px mic */
  min-height: var(--touch-target-min);
  padding: 0 var(--space-md);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--font-size-lg); /* >= 24px input text */
  color: var(--color-text);
}

/* The microphone is the largest element on screen — 88px with a soft
 * listening glow (PRD: Visual Design / Audio Design). */
.shobdo-dhara__mic {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 3px solid var(--color-primary);
  background: var(--color-surface);
  color: var(--color-primary);
  cursor: pointer;
}

.shobdo-dhara__mic svg {
  width: 40px;
  height: 40px;
}

.shobdo-dhara__mic.is-listening {
  animation: sd-glow 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .shobdo-dhara__mic.is-listening { animation: none; }
}

@keyframes sd-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 111, 160, 0.35); }
  50% { box-shadow: 0 0 0 14px rgba(59, 111, 160, 0.08); }
}

.shobdo-dhara__hint {
  min-height: 28px;
  text-align: center;
  font-size: var(--font-size-base);
  color: var(--color-accent);
}

.shobdo-dhara__break {
  margin-bottom: var(--space-lg);
}

/* ===== Awaaj ===== */
/* Hallmark · genre: playful-soft · auditory recognition · design-system: design.md · designed-as-app */

.awaaj__volume {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.awaaj__volume label {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.awaaj__volume input[type="range"] {
  width: 140px;
  min-height: var(--touch-target-min);
}

.awaaj__difficulty {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.awaaj__chip {
  min-height: 60px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
}

.awaaj__chip.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.awaaj__chip:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.awaaj__progress {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.awaaj__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-cloud-2);
}

.awaaj__dot--done { background: var(--color-success); }
.awaaj__dot--now { background: var(--color-accent); }

.awaaj__now-playing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

/* Gentle expanding ring — functional now-playing cue, reduced-motion safe. */
.awaaj__ring {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.awaaj__ring.is-playing {
  animation: aw-ring 1.4s ease-out infinite;
}

@keyframes aw-ring {
  from { box-shadow: 0 0 0 0 rgba(224, 122, 95, 0.4); }
  to { box-shadow: 0 0 0 18px rgba(224, 122, 95, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .awaaj__ring.is-playing { animation: none; }
}

.awaaj__replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-width: 88px;
  min-height: 88px;
  border-radius: var(--radius-lg);
  border: 3px solid var(--color-primary);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: var(--font-size-lg);
  font-weight: 700;
  cursor: pointer;
}

.awaaj__replay svg { width: 32px; height: 32px; }

.awaaj__replay:disabled {
  opacity: 0.45;
  cursor: default;
}

.awaaj__replay:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.awaaj__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

@media (min-width: 600px) {
  .awaaj__cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.awaaj__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-height: 132px; /* art + label well above the 60px touch floor */
  padding: var(--space-md) var(--space-sm);
  border-radius: var(--radius-md);
  border: 3px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out);
}

.awaaj__card:active { transform: scale(0.97); }

.awaaj__card:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.awaaj__card-art {
  font-size: 56px;
  line-height: 1.15;
}

.awaaj__card-label {
  font-size: var(--font-size-base); /* >= 24px heading rule satisfied by label+context */
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
}

.awaaj__card.is-correct {
  border-color: var(--color-success);
}

.awaaj__card.is-wrong {
  border-color: var(--color-error);
}

.awaaj__story {
  min-height: 56px;
  margin-top: var(--space-md);
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
}

/* ===== Aajker Din ===== */
/* Hallmark · genre: playful-soft · daily orientation ritual · design-system: design.md · designed-as-app */

.aajker-din {
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-sm);
}

.aajker-din__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.aajker-din__title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text);
}

.aajker-din__skip {
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: none;
  background: none;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.aajker-din__skip:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.aajker-din__context {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.aajker-din__question {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.aajker-din__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--space-sm);
}

.aajker-din__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 88px; /* PRD: tiles >= 88px */
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.aajker-din__tile:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.aajker-din__tile:disabled {
  cursor: default;
}

/* Correct-answer sunrise uses the brand warm gradient (PRD). */
.aajker-din__tile.is-sunrise {
  border-color: transparent;
  background: linear-gradient(160deg, #f47c5c, #f4a988 55%, #e8b04b);
  color: #fff;
}

.aajker-din__tile.is-glowing {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.18);
}

.aajker-din__tile.is-wrong {
  opacity: 0.5;
}

.aajker-din__tile.is-shake {
  animation: ad-shake 0.4s var(--ease-in-out);
}

@keyframes ad-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .aajker-din__tile.is-shake { animation: none; }
}

.aajker-din__gentle {
  min-height: 24px;
  margin-top: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-warning);
}

.aajker-din__confirm {
  margin-top: var(--space-sm);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-success);
}

.aajker-din__streak {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* ===== Tal ===== */
/* Hallmark · genre: playful-soft · rhythm tap · design-system: design.md · designed-as-app */

.tal__difficulty {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.tal__chip {
  min-height: 60px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
}

.tal__chip.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.tal__chip:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.tal__volume {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.tal__volume label {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.tal__volume input[type="range"] {
  width: 140px;
  min-height: var(--touch-target-min);
}

.tal__progress {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-md);
}

.tal__progress .tal__dot {
  width: 10px;
  height: 10px;
}

.tal__taal {
  text-align: center;
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}

.tal__rail {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--space-md) 0;
  min-height: 28px;
}

.tal__dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-cloud-2);
  transition: transform var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.tal__dot--hit {
  background: var(--color-accent);
}

.tal__dot.is-now {
  transform: scale(1.5);
  background: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
  .tal__dot.is-now { transform: none; background: var(--color-primary); }
}

.tal__phase {
  min-height: 32px;
  text-align: center;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* One large drum pad — the biggest target on screen (PRD: >= 160px). */
.tal__pad {
  display: block;
  width: 200px;
  height: 160px;
  margin: var(--space-md) auto;
  border-radius: var(--radius-xl);
  border: 3px solid var(--color-primary);
  background: var(--color-surface);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out);
}

.tal__pad:disabled {
  opacity: 0.55;
  cursor: default;
}

.tal__pad:not(:disabled):active,
.tal__pad.is-pressed {
  transform: scale(0.96);
  background: var(--color-accent-subtle, #fbe9e2);
}

.tal__pad:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.tal__pad-face {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 38% 32%, #f4a988, #f47c5c 70%);
}

/* ===== Thik Jaygay ===== */
/* Hallmark · genre: playful-soft · sort & sequence · design-system: design.md · designed-as-app */

.thik-jaygay__mode-select {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.thik-jaygay__chip {
  min-height: 60px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
}

.thik-jaygay__chip.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.thik-jaygay__chip:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.thik-jaygay__progress {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.thik-jaygay__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-cloud-2);
}

.thik-jaygay__dot--done { background: var(--color-success); }
.thik-jaygay__dot--now { background: var(--color-accent); }

.thik-jaygay__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-height: 132px;
  justify-content: center;
  margin: 0 auto;
  max-width: 240px;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 3px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  transition: transform var(--duration-slow) var(--ease-spring),
              border-color var(--duration-fast) var(--ease-out);
}

.thik-jaygay__card-label {
  font-size: var(--font-size-lg); /* 24px label per PRD */
  font-weight: 700;
}

.thik-jaygay__card.is-sorted {
  border-color: var(--color-success);
  transform: translateY(8px) scale(0.95);
}

/* Errorless correction: card glows warm as it "flies" to the right basket. */
.thik-jaygay__card.is-corrected {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 6px rgba(224, 122, 95, 0.15);
  transform: translateY(24px) scale(0.85);
}

.thik-jaygay__baskets {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.thik-jaygay__basket {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  min-width: 108px;
  min-height: 96px;
  justify-content: center;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  border: 3px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 700;
  cursor: pointer;
}

.thik-jaygay__basket:not(:disabled):active { transform: scale(0.97); }

.thik-jaygay__basket:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.thik-jaygay__basket.is-glowing {
  border-color: var(--color-success);
  box-shadow: 0 0 0 5px rgba(90, 158, 111, 0.2);
}

.thik-jaygay__gentle {
  min-height: 28px;
  margin-top: var(--space-sm);
  text-align: center;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-accent);
}

.thik-jaygay__question {
  text-align: center;
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.thik-jaygay__strip {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  min-height: 64px;
  margin-bottom: var(--space-md);
}

.thik-jaygay__locked {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-success);
  color: var(--color-success);
  animation: tj-lock var(--duration-slow) var(--ease-spring);
}

@keyframes tj-lock {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .thik-jaygay__locked { animation: none; }
}

.thik-jaygay__steps {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.thik-jaygay__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  min-width: 108px;
  min-height: 108px;
  justify-content: center;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.thik-jaygay__step:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.thik-jaygay__step:not(:disabled):active { transform: scale(0.97); }

/* ===== Hata Gona ===== */
/* Hallmark · genre: playful-soft · dual-task walk · design-system: design.md · designed-as-app */

.hg-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.hg-stage {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hg-counter {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.hg-challenge {
  text-align: center;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.hg-gentle {
  min-height: 32px;
  text-align: center;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-success);
}

/* Giant pause/done control — reachable without looking (PRD safety). */
.hg-pause {
  width: 100%;
  min-height: 88px;
  border-radius: var(--radius-xl);
  border: 3px solid var(--color-primary);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: var(--font-size-xl);
  font-weight: 800;
  cursor: pointer;
}

.hg-pause:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.hg-answer-row {
  display: flex;
  gap: var(--space-sm);
}

.hg-input {
  flex: 1 1 120px;
  min-width: 0;
  min-height: var(--touch-target-min);
  padding: 0 var(--space-md);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

/* ===== Chehara Chinno ===== */
/* Hallmark · genre: playful-soft · familiar faces · design-system: design.md · designed-as-app */

.chehara__difficulty {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.chehara__chip {
  min-height: 60px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
}

.chehara__chip.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.chehara__chip:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.chehara__progress {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.chehara__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-cloud-2);
}

.chehara__dot--done { background: var(--color-success); }
.chehara__dot--now { background: var(--color-accent); }

.chehara__photo-wrap {
  display: flex;
  justify-content: center;
}

.chehara__photo {
  width: min(72vw, 300px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 3px solid var(--color-border);
  background: var(--color-surface);
}

.chehara__ask {
  text-align: center;
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  margin: var(--space-md) 0;
}

.chehara__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: stretch;
  max-width: 360px;
  margin: 0 auto;
}

.chehara__option {
  min-height: 72px;
  padding: 0 var(--space-lg);
  border-radius: var(--radius-md);
  border: 3px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-lg);
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.chehara__option:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.chehara__option.is-dimmed {
  opacity: 0.4; /* wrong picks simply dim — never a buzzer */
}

.chehara__option.is-correct {
  border-color: var(--color-success);
}

.chehara__options--faces {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.chehara__option--face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  width: 140px;
  min-height: 160px;
  padding: var(--space-sm);
}

.chehara__face {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
}

.chehara__story {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-sm);
  text-align: center;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
}

.chehara__gentle {
  min-height: 28px;
  text-align: center;
  font-size: var(--font-size-base);
  color: var(--color-accent);
}

/* People chips in the Sriti tagging form. */
.people-chips {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: var(--space-2xs);
}

.people-chip {
  min-height: 52px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
}

.people-chip.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-subtle, var(--color-surface));
}
