:root {
  --bg: #07060c;
  --card: #15121f;
  --accent: #d946ef;
  --success: #06b6d4;
  --text: #f1ebf7;
  --muted: #a79fc0;
  --border: #2c2542;
}

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

/* hidden attribute ကို အမြဲ အနိုင်ရစေ — .results/.image-results တို့ရဲ့
   display:flex က hidden ကို override မလုပ်အောင် (reset မှာ မပျောက်တဲ့ bug ဖြေ) */
[hidden] {
  display: none !important;
}

body {
  font-family: "Segoe UI", "Padauk", "Myanmar Text", system-ui, sans-serif;
  /* ရောင်စုံ မီးခိုး glow — အနက်ပေါ်မှာ magenta/blue/cyan/orange */
  background:
    radial-gradient(ellipse 50% 40% at 12% 16%, rgba(217, 70, 239, 0.22), transparent 60%),
    radial-gradient(ellipse 46% 40% at 88% 12%, rgba(59, 130, 246, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 45% at 82% 86%, rgba(6, 182, 212, 0.18), transparent 60%),
    radial-gradient(ellipse 46% 42% at 14% 88%, rgba(249, 115, 22, 0.18), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  text-align: center;
  padding: 24px 16px 12px;
}
.topbar h1 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.title-lamp {
  height: 1.7em;
  width: auto;
  display: block;
}
.title-grad {
  background: linear-gradient(90deg, #f97316, #ec4899, #d946ef, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.container {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* captured photo preview (shown only after a shot is taken) */
.preview-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
/* photo flow စဉ် — နှိပ်ထားတဲ့ button တစ်ခုပဲ ပြ၊ ကျန်တာ ဖျောက် */
.actions.solo .btn:not(.is-active) {
  display: none;
}
.btn {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  /* 3D ဖောင်းကြွ — အောက်ခြေ side-wall အထူ + float အရိပ် + အပေါ်/အောက် inset */
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.45), 0 11px 7px rgba(0, 0, 0, 0.3),
    0 18px 34px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -6px 12px rgba(0, 0, 0, 0.32);
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* ကြည့်ပါရစေ — မီးခွက်ပုံ သီးသန့် (ဘောင်/နောက်ခံ မရှိ) */
.lamp-btn {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s;
}
.lamp-btn img {
  height: 56px;
  width: auto;
  display: block;
}
.lamp-btn:active {
  transform: scale(0.93);
}
.lamp-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn:active {
  /* နှိပ်လိုက်ရင် side-wall ပြားသွား — ဖိကျသွားသလို */
  transform: translateY(7px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 3px 5px rgba(0, 0, 0, 0.3),
    0 6px 14px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -3px 8px rgba(0, 0, 0, 0.28);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.32), 0 10px 20px rgba(0, 0, 0, 0.45);
}
.btn-primary {
  background: linear-gradient(135deg, #d946ef, #8b5cf6);
  color: #fff;
}
.btn-success {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  flex: 0 0 auto;
  min-width: auto;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3), 0 12px 22px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
/* reset button now sits above the preview — keep it compact, never stretch */
#resetBtn {
  flex: 0 0 auto;
  align-self: center;
}
.btn-extract {
  background: linear-gradient(135deg, #fb923c, #ec4899);
  color: #fff;
}
.btn-filter {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
}
.btn-chat {
  background: linear-gradient(135deg, #d946ef, #8b5cf6);
  color: #fff;
}
.btn-report {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
}
.btn-share {
  background: linear-gradient(135deg, #f59e0b, #f43f5e);
  color: #fff;
}
.btn-convert {
  background: linear-gradient(135deg, #34d399, #8b5cf6);
  color: #fff;
}

.image-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.image-results h2 {
  font-size: 1rem;
  color: var(--muted);
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.crop-item {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
}
.crop-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.crop-item figcaption {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}
.crop-dl {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}
.crop-dl:hover {
  text-decoration: underline;
}

.filter-box {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.filter-go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.45), 0 11px 7px rgba(0, 0, 0, 0.3),
    0 18px 34px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -6px 12px rgba(0, 0, 0, 0.32);
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.2s;
}
.filter-go:active {
  transform: translateY(7px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 3px 5px rgba(0, 0, 0, 0.3),
    0 6px 14px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -3px 8px rgba(0, 0, 0, 0.28);
}
.filter-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.filter-input::placeholder {
  color: var(--muted);
}
.filter-input:focus {
  outline: none;
  border-color: var(--accent);
}
.filter-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* Photo to any — format drop-down */
.format-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.format-select option {
  color: var(--text);
  background: var(--card);
}

.status {
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  background: var(--card);
  font-size: 0.95rem;
}
.status.error {
  background: #7f1d1d;
  color: #fecaca;
}
.status.loading {
  color: var(--muted);
}

.results {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.result-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  position: relative;
}
.result-block h2 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--muted);
}
.result-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}
.result-text.mm {
  font-size: 1.25rem;
}
.result-text.en {
  font-size: 1rem;
  color: var(--muted);
}
.copy-btn {
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 24px 20px;
}
.foot-aladdin {
  width: 56px;
  height: auto;
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--muted);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

/* ===== Live camera overlay ===== */
.camera-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  flex-direction: column;
}
.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 28px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}
.cam-ctrl {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cam-shutter {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.cam-shutter:active {
  transform: scale(0.95);
}

/* ===== ဒါဘာလဲ — actions + အသေးစိတ် ===== */
.describe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.describe-actions .copy-btn {
  margin-top: 0;
}
.describe-more {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  color: var(--text);
}

/* ===== Mobile ===== */
@media (max-width: 480px) {
  .topbar {
    padding: 18px 14px 6px;
  }
  .topbar h1 {
    font-size: 1.3rem;
  }
  .subtitle {
    font-size: 0.85rem;
  }
  .container {
    padding: 12px;
    gap: 12px;
  }
  /* ခလုတ်တွေ — တစ်တန်းကို ၂ ခုစီ သပ်သပ်ရပ်ရပ် */
  .btn {
    min-width: 0;
    flex: 1 1 calc(50% - 5px);
    padding: 12px 8px;
    font-size: 0.92rem;
  }
  .btn-ghost {
    flex: 1 1 calc(50% - 5px);
  }
  /* action ခလုတ်တွေ — screen ပြည့် လေးထောင့်စပ်စပ် card ပုံစံ (icon အပေါ်, စာအောက်) */
  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 14px;
    margin-bottom: 10px;
  }
  .actions .btn {
    flex: none;
    flex-direction: column;
    gap: 7px;
    min-height: 100px;
    padding: 16px 8px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 700;
    justify-content: center;
  }
  .actions .btn i {
    font-size: 1.7rem;
  }
  /* မဆုံးခင် မ-ဂဏန်း (Reporting) ကျန်ရင် တစ်တန်းလုံး ဖြန့် */
  .actions .btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  /* solo mode — ကျန်တဲ့ button တစ်ခုကို တစ်တန်းလုံး ဖြန့် */
  .actions.solo .btn.is-active {
    grid-column: 1 / -1;
  }
  .filter-input {
    font-size: 0.95rem;
  }
  .result-text.mm {
    font-size: 1.15rem;
  }
  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 10px;
  }
}

/* ===== စကားစမြည် — chat ===== */
.chat-view {
  position: fixed;
  inset: 0;
  z-index: 110;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #0b0912;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.55);
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.2), rgba(6, 182, 212, 0.12));
}
.chat-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.chat-title-art {
  height: 30px;
  width: auto;
}
.chat-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.from-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #8b5cf6, #6d4ee0);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.from-aladdin {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 5px;
}
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.chat-input:focus {
  outline: none;
  border-color: var(--accent);
}
.chat-send {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #d946ef, #8b5cf6);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}
.chat-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ===== Excel Report ===== */
.excel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.excel-card h2 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.excel-card h2 .fa-file-excel {
  color: #21a366;
}
.excel-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.excel-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.excel-name {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 12px;
  word-break: break-word;
}

/* ===== Report dropdown ===== */
.report-dd {
  position: relative;
  display: inline-block;
}
.dd-caret {
  font-size: 0.72em;
  margin-left: 4px;
}
.report-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  z-index: 120;
}
.report-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.report-item:hover {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.18), rgba(6, 182, 212, 0.12));
}
.report-item-label {
  font-weight: 600;
  color: var(--text);
}
.report-item-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ===== Copy / Paste — cross-device share board ===== */
.share-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.share-card h2 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.share-card h2 .fa-share-nodes {
  color: #f59e0b;
}
.share-sub {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.share-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-pane h3 {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.share-textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg, rgba(0, 0, 0, 0.2));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-sizing: border-box;
}
.share-textarea:focus {
  outline: none;
  border-color: #f59e0b;
}
.share-code-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px dashed #f59e0b;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(244, 63, 94, 0.08));
}
.share-code-label {
  color: var(--muted);
  font-size: 0.85rem;
}
.share-code {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.share-code-box .copy-btn {
  margin-top: 0;
  margin-left: auto;
}
.share-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 18px 0;
}
.share-divider::before,
.share-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.share-divider span {
  padding: 0 12px;
}
.share-get-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.share-code-input {
  flex: 1 1 140px;
  min-width: 0;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  text-align: center;
  color: var(--text);
  background: var(--bg, rgba(0, 0, 0, 0.2));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-sizing: border-box;
}
.share-code-input:focus {
  outline: none;
  border-color: #f59e0b;
}
.share-get-go {
  flex: 0 0 auto;
  min-width: auto;
}
#shareResult {
  margin-top: 14px;
}

/* ----- file send / receive ----- */
.share-file-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.btn-file-pick {
  flex: 0 0 auto;
}
.share-file-name {
  color: var(--muted);
  font-size: 0.85rem;
  word-break: break-all;
}
#shareFileSendBtn {
  margin-top: 10px;
}
.share-progress {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.share-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #f43f5e);
  transition: width 0.15s ease;
}
.share-result-file {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-preview-img,
.share-preview-video {
  max-width: 100%;
  max-height: 320px;
  border-radius: 12px;
  border: 1px solid var(--border);
  align-self: flex-start;
}
.share-preview-audio {
  width: 100%;
}
.share-file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  word-break: break-all;
}
.share-file-size {
  margin-left: auto;
  white-space: nowrap;
}
.share-result-file a.btn-share {
  align-self: flex-start;
  text-decoration: none;
}
.btn-share-clear {
  width: 100%;
  margin-top: 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-share-clear:hover {
  border-color: #f43f5e;
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.08);
}

/* ===== intro splash — rub the lamp to enter ===== */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(217, 70, 239, 0.18), transparent 62%),
    radial-gradient(ellipse 50% 45% at 18% 88%, rgba(249, 115, 22, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 45% at 84% 84%, rgba(6, 182, 212, 0.16), transparent 60%),
    var(--bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.intro-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.intro-enter {
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  padding: 30px;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.intro-glow {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 191, 84, 0.55), rgba(217, 70, 239, 0.25) 45%, transparent 70%);
  filter: blur(8px);
  animation: introGlow 2.6s ease-in-out infinite;
}
.intro-lamp {
  position: relative;
  width: min(56vw, 230px);
  height: auto;
  filter: drop-shadow(0 10px 22px rgba(249, 191, 84, 0.45));
  animation: introFloat 3.4s ease-in-out infinite;
  transition: transform 0.25s ease;
}
.intro-enter:hover .intro-lamp,
.intro-enter:active .intro-lamp {
  transform: scale(1.06) rotate(-3deg);
}
.intro-title {
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.5px;
}
.intro-hint {
  color: var(--muted);
  font-size: 0.95rem;
  animation: introHint 1.8s ease-in-out infinite;
}
@keyframes introFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes introGlow {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 1; }
}
@keyframes introHint {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-lamp, .intro-glow, .intro-hint { animation: none; }
}
