/* ============================================================
   LUMI — Island Studio Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── TOKENS ──
   (Original Island Studio palette lived here. It's fully superseded by
   the Lucaya/Lumi :root block further down — that's the one actually in
   effect. Consolidated into one block down there so there's a single
   source of truth instead of two :root definitions silently overriding
   each other.) */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font-b); background: var(--sand); color: var(--navy); overflow: hidden; }
button { cursor: pointer; font-family: var(--font-b); border: none; background: none; }
input, textarea, select { font-family: var(--font-b); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
*::-webkit-scrollbar { width: 4px; }
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── SHELL ── */
.shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── TOPBAR ── */
.topbar {
  height: 64px; background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 12px;
  flex-shrink: 0; z-index: 10;
}
.topbar-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #FF8A66, #FF6B4A);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255,107,74,.3); flex-shrink: 0;
}
.logo-mark svg { color: #fff; }
.logo-word { font-family: var(--font-h); font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: -.03em; }
.topbar-spacer { flex: 1; }
.upgrade-btn {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #F8D47A, #D99A26);
  color: var(--gold-dark); border-radius: var(--r-md);
  padding: 8px 16px; font-size: 13px; font-weight: 700; font-family: var(--font-h);
  box-shadow: var(--sh-pro); transition: all .18s;
}
.upgrade-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(217,154,38,.3); }
.upgrade-btn.hidden { display: none !important; }
.topbar-icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all .18s; position: relative;
}
.topbar-icon-btn:hover { background: var(--sand); color: var(--navy); }
.notif-dot {
  position: absolute; top: 7px; right: 7px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--coral); border: 1.5px solid var(--white);
}
.profile-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--sand); border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 5px 12px 5px 5px; transition: all .18s;
}
.profile-chip:hover { background: var(--white); border-color: var(--coral); }
.profile-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--aqua));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-name { font-size: 12px; font-weight: 600; color: var(--navy); }

/* ── BODY ── */
.body { display: flex; flex: 1; overflow: hidden; }

/* ── SIDEBAR ── */
.sidebar {
  width: 264px; min-width: 264px;
  background: linear-gradient(180deg, #FFF9F1 0%, var(--white) 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
}
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 14px 10px; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em; padding: 0 8px; margin-bottom: 6px;
}

/* Mode items */
.mode-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  transition: all .18s ease; margin-bottom: 2px;
}
.mode-item:hover { background: var(--coral-light); transform: translateX(3px); }
.mode-item.active {
  background: var(--coral-light); border-color: var(--coral-border);
  box-shadow: 0 6px 18px rgba(255,107,74,.14);
}
.mode-icon-wrap {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0; background: var(--sand);
  transition: all .18s;
}
.mode-item.active .mode-icon-wrap {
  background: linear-gradient(135deg, #FF8A66, #FF6B4A);
  box-shadow: 0 4px 12px rgba(255,107,74,.3);
}
.mode-info { flex: 1; min-width: 0; }
.mode-name { font-size: 13px; font-weight: 600; color: var(--navy); }
.mode-sub  { font-size: 11px; color: var(--muted); }
.mode-item.active .mode-name { color: #D84C2F; }
.soon-badge {
  font-size: 9px; font-weight: 700; background: #F2E8DC;
  color: var(--muted); padding: 2px 7px; border-radius: var(--r-full);
}
.pro-badge {
  background: linear-gradient(135deg, #F8D47A, #D99A26);
  color: var(--gold-dark); border-radius: var(--r-full);
  font-size: 9px; font-weight: 700; padding: 2px 7px;
}

/* Tool items — deliberately flatter/quieter than mode-item so it's visually
   clear these open a popup rather than navigate to a new screen. No active
   state (they're momentary actions, not a "current location"). */
.tool-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px; border-radius: var(--r-sm);
  cursor: pointer; transition: background .15s ease; margin-bottom: 1px;
}
.tool-item:hover { background: var(--sand); }
.tool-icon-wrap {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; color: var(--muted); opacity: .8;
}
.tool-name { font-size: 12.5px; font-weight: 500; color: var(--navy); }
.tool-sub  { font-size: 10px; color: var(--muted); }

/* History */
.hist-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--r-sm);
  cursor: pointer; transition: background .15s; margin-bottom: 1px;
}
.hist-item:hover { background: var(--sand); }
.hist-item.active { background: var(--coral-light); }
.hist-item.active .hist-title { color: #D84C2F; }
.hist-icon { font-size: 13px; flex-shrink: 0; opacity: .6; }
.hist-info { flex: 1; min-width: 0; }
.hist-title { font-size: 12px; font-weight: 500; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-time  { font-size: 10px; color: var(--muted); }

/* Usage + Pro cards */
.sidebar-bottom { padding: 12px 10px; border-top: 1px solid var(--border-soft); flex-shrink: 0; }
.usage-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px; margin-bottom: 10px;
}
.usage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.usage-title  { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.usage-manage { font-size: 11px; color: var(--aqua); font-weight: 600; cursor: pointer; }
.usage-bar    { height: 6px; background: var(--sand); border-radius: var(--r-full); margin-bottom: 6px; overflow: hidden; }
.usage-fill   { height: 100%; background: linear-gradient(90deg, var(--aqua), #45D3CD); border-radius: var(--r-full); transition: width .4s; }
.usage-text   { font-size: 11px; color: var(--slate); }
.pro-card {
  background: linear-gradient(135deg, #FFF8E6, #FFF3D6);
  border: 1px solid #F2C66D; border-radius: var(--r-md); padding: 14px;
}
.pro-card-title { font-family: var(--font-h); font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.pro-card-sub   { font-size: 11px; color: var(--slate); margin-bottom: 10px; line-height: 1.5; }
.pro-card-btn {
  width: 100%; background: linear-gradient(135deg, #F8D47A, #D99A26);
  color: var(--gold-dark); border-radius: var(--r-sm);
  padding: 9px; font-size: 12px; font-weight: 700; font-family: var(--font-h);
  box-shadow: var(--sh-pro); transition: all .18s;
}
.pro-card-btn:hover { transform: translateY(-1px); }

/* ── MAIN ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--white); min-width: 0; }
.mode-panel { display: none; flex: 1; flex-direction: column; overflow: hidden; animation: fadeIn .18s ease-out; }
.mode-panel.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── CHAT MODE ── */
.chat-canvas { flex: 1; overflow-y: auto; padding: 24px; }
.chat-inner  { max-width: 740px; margin: 0 auto; }

.greeting { text-align: center; padding: 40px 0 28px; }
.greeting-sun   { font-size: 36px; margin-bottom: 12px; }
.greeting-title { font-family: var(--font-h); font-size: 30px; font-weight: 700; color: var(--navy); letter-spacing: -.03em; margin-bottom: 6px; }
.greeting-sub   { font-size: 15px; color: var(--slate); }

.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
.sugg-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px; cursor: pointer;
  transition: all .18s; text-align: left;
}
.sugg-card:hover { border-color: var(--coral); box-shadow: var(--sh-hover); transform: translateY(-2px); }
.sugg-icon  { font-size: 20px; margin-bottom: 8px; }
.sugg-title { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.sugg-sub   { font-size: 12px; color: var(--muted); }

/* Style preset chips */
.preset-bar { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.preset-chip {
  display: flex; align-items: center; gap: 5px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-full); padding: 5px 12px;
  font-size: 12px; font-weight: 600; color: var(--slate);
  cursor: pointer; transition: all .15s;
}
.preset-chip:hover { border-color: var(--coral); color: var(--navy); }
.preset-chip.active { border-color: var(--coral); background: var(--coral-light); color: #D84C2F; }
.preset-chip.active.aqua-preset { border-color: var(--aqua); background: var(--aqua-light); color: var(--aqua-h); }
.preset-chip.active.navy-preset { border-color: var(--navy); background: #EEF4FA; color: var(--navy); }
.preset-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Messages */
.messages { display: flex; flex-direction: column; gap: 0; }
.msg-row { padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.msg-row:last-child { border-bottom: none; }
.msg-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.msg-label.user-lbl { color: var(--coral); }
.msg-lumi-icon {
  width: 20px; height: 20px; background: linear-gradient(135deg, #FF8A66, #FF6B4A);
  border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10px;
}
.msg-text { font-size: 15px; line-height: 1.75; color: var(--navy); white-space: pre-wrap; word-break: break-word; }
.msg-text code { background: var(--sand); padding: 1px 6px; border-radius: 4px; font-family: var(--font-code); font-size: 13px; }
.msg-text pre { background: #1E2433; border-radius: var(--r-md); padding: 16px; margin: 10px 0; overflow-x: auto; font-family: var(--font-code); font-size: 13px; line-height: 1.6; color: #E8F0FE; }
.msg-user-bubble { background: var(--coral-light); border: 1px solid var(--coral-border); border-radius: var(--r-md); padding: 12px 16px; display: inline-block; max-width: 80%; }

/* Typing */
.typing-dots { display: flex; gap: 5px; align-items: center; padding: 4px 0; }
.typing-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); animation: tdot .9s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: .18s; }
.typing-dot:nth-child(3) { animation-delay: .36s; }
@keyframes tdot { 0%,100% { opacity: .3; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }

/* Q&A flow */
.qa-card {
  background: linear-gradient(135deg, var(--aqua-light), #E6F9F8);
  border: 1px solid rgba(28,183,176,.25); border-radius: var(--r-md);
  padding: 16px; margin: 12px 0;
}
.qa-progress { font-size: 11px; color: var(--aqua); font-weight: 700; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.qa-question { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 12px; line-height: 1.5; }
.qa-input {
  width: 100%; background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 14px; font-size: 14px;
  color: var(--navy); outline: none; transition: border-color .15s; font-family: var(--font-b);
}
.qa-input:focus { border-color: var(--aqua); }
.qa-next-btn {
  background: var(--aqua); color: #fff; border-radius: var(--r-sm);
  padding: 9px 20px; font-size: 13px; font-weight: 700; margin-top: 10px;
  transition: all .15s;
}
.qa-next-btn:hover { background: var(--aqua-h); }
.qa-skip { font-size: 12px; color: var(--muted); margin-left: 10px; cursor: pointer; }

/* Input bar */
.input-bar { padding: 14px 24px 18px; border-top: 1px solid var(--border-soft); flex-shrink: 0; background: var(--white); }
.input-inner { max-width: 740px; margin: 0 auto; }
.input-box {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 12px 14px;
  display: flex; align-items: flex-end; gap: 10px;
  transition: all .18s; box-shadow: var(--sh-soft);
}
.input-box:focus-within { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(28,183,176,.1), var(--sh-soft); }
.chat-input {
  flex: 1; border: none; outline: none; font-family: var(--font-b);
  font-size: 14px; color: var(--navy); resize: none; background: transparent;
  line-height: 1.5; max-height: 160px; overflow-y: auto;
}
.chat-input::placeholder { color: var(--muted); }
.input-actions { display: flex; align-items: center; gap: 6px; }
.input-icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all .15s;
}
.input-icon-btn:hover { background: var(--sand); color: var(--navy); }
.send-btn {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #FF8A66, #FF6B4A);
  border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-coral); transition: all .18s; flex-shrink: 0;
}
.send-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255,107,74,.4); }
.send-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.input-footer { text-align: center; font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ── IMAGE MODE ── */
.image-mode { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.img-toolbar {
  padding: 10px 20px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--sand); flex-shrink: 0;
}
.img-toolbar-label { font-size: 11px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.img-pill {
  font-size: 11px; color: var(--slate); background: var(--white);
  border: 1px solid var(--border); border-radius: var(--r-full);
  padding: 5px 13px; transition: all .15s; font-family: var(--font-b);
}
.img-pill.active { background: var(--coral); color: #fff; border-color: var(--coral); }
.img-pill:hover:not(.active) { border-color: var(--coral); color: var(--coral); }
.img-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.img-body { flex: 1; display: flex; overflow: hidden; }
.img-sidebar {
  width: 156px; min-width: 156px; border-right: 1px solid var(--border);
  background: var(--sand); overflow-y: auto; padding: 8px 0;
}
.img-tpl-section { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 8px 12px 3px; }
.img-tpl-btn {
  display: block; width: 100%; text-align: left; padding: 7px 12px;
  font-size: 11px; color: var(--slate); font-family: var(--font-b);
  transition: all .15s; margin-bottom: 1px;
}
.img-tpl-btn:hover, .img-tpl-btn.active { background: var(--coral-light); color: #D84C2F; }
.img-canvas { flex: 1; overflow-y: auto; padding: 20px; background: #FAFAF8; }
.img-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; gap: 8px; }
.img-empty-icon  { font-size: 48px; }
.img-empty-title { font-family: var(--font-h); font-size: 18px; font-weight: 700; color: var(--navy); }
.img-empty-sub   { font-size: 13px; color: var(--muted); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.img-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-card);
  transition: all .18s;
}
.img-card:hover { box-shadow: var(--sh-hover); transform: translateY(-2px); }
.img-card img { width: 100%; display: block; }
.img-loading-card {
  height: 200px; background: linear-gradient(90deg, var(--sand) 25%, var(--border-soft) 50%, var(--sand) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.img-card-foot { padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; }
.img-card-label { font-size: 11px; color: var(--slate); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.img-save-btn {
  background: var(--sand); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 3px 10px; font-size: 10px; color: var(--slate); font-weight: 600;
  flex-shrink: 0; transition: all .15s;
}
.img-save-btn:hover { border-color: var(--coral); color: var(--coral); }
.img-input-wrap {
  padding: 12px 20px; border-top: 1px solid var(--border); flex-shrink: 0;
  display: flex; gap: 8px; align-items: center; background: var(--white);
}
.img-prompt-input {
  flex: 1; background: var(--sand); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 10px 16px; font-size: 13px;
  color: var(--navy); outline: none; transition: all .15s;
}
.img-prompt-input:focus { border-color: var(--aqua); background: var(--white); }
.enhance-btn {
  background: var(--white); color: var(--aqua); border: 1.5px solid var(--aqua);
  border-radius: var(--r-md); padding: 9px 14px; font-size: 12px; font-weight: 700;
  white-space: nowrap; transition: all .15s;
}
.enhance-btn:hover { background: var(--aqua-light); }
.generate-btn {
  background: linear-gradient(135deg, #FF8A66, #FF6B4A); color: #fff;
  border-radius: var(--r-md); padding: 9px 18px; font-size: 13px; font-weight: 700;
  white-space: nowrap; box-shadow: var(--sh-coral); transition: all .18s;
}
.generate-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255,107,74,.4); }
.generate-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.img-usage-bar { padding: 6px 20px; background: var(--sand); border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--muted); text-align: center; }

/* ── AUDIO MODE ── */
.audio-mode { flex: 1; overflow-y: auto; padding: 32px 24px; }
.audio-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.audio-section { display: flex; flex-direction: column; gap: 14px; }
.audio-section-divider { height: 1px; background: var(--border-soft); margin: 4px 0; }
.audio-header-row { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.audio-mode-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--aqua), #45D3CD);
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.audio-mode-title { font-family: var(--font-h); font-size: 22px; font-weight: 700; color: var(--navy); }
.audio-mode-sub { font-size: 13px; color: var(--slate); }
.voice-section-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.voice-search-input {
  width: 100%; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-md);
  padding: 9px 12px; font-size: 13px; color: var(--navy); margin-bottom: 10px; outline: none;
}
.voice-search-input:focus { border-color: var(--aqua); }
.voice-empty-note { grid-column: 1/-1; text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }
.voice-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 14px; cursor: pointer;
  transition: all .18s; text-align: center;
}
.voice-card:hover, .voice-card.active { border-color: var(--aqua); box-shadow: 0 0 0 2px rgba(28,183,176,.15); transform: translateY(-1px); }
.voice-avatar { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.voice-name { font-size: 12px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.voice-tag { font-size: 10px; color: var(--muted); background: var(--sand); border-radius: var(--r-full); padding: 2px 8px; display: inline-block; }
.audio-script-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 16px; }
.audio-script-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.audio-textarea {
  width: 100%; border: none; outline: none; font-size: 14px;
  color: var(--navy); resize: none; min-height: 100px; line-height: 1.7;
  background: transparent; font-family: var(--font-b);
}
.audio-controls-row { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; }
.ctrl-label { font-size: 12px; color: var(--slate); font-weight: 600; white-space: nowrap; width: 48px; }
.ctrl-range { flex: 1; accent-color: var(--aqua); }
.ctrl-val { font-size: 12px; color: var(--slate); width: 32px; text-align: right; }
.audio-player { background: linear-gradient(135deg, var(--aqua-light), #DFFAF8); border: 1px solid rgba(28,183,176,.2); border-radius: var(--r-md); padding: 16px; }
.waveform { height: 48px; display: flex; align-items: center; gap: 3px; margin-bottom: 12px; }
.wbar { width: 3px; background: var(--aqua); border-radius: 2px; opacity: .5; }
.wbar.playing { animation: wv 1.2s ease-in-out infinite; opacity: 1; }
@keyframes wv { 0%,100% { height: 8px; } 50% { height: 36px; } }
.player-controls { display: flex; align-items: center; gap: 10px; }
.play-btn {
  width: 36px; height: 36px; background: var(--aqua); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px;
  transition: all .15s;
}
.play-btn:hover { background: var(--aqua-h); }
.player-time { font-size: 12px; color: var(--slate); font-family: var(--font-code); }
.player-actions { margin-left: auto; display: flex; gap: 6px; }
.player-action {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 5px 12px; font-size: 11px; font-weight: 600; color: var(--slate);
  transition: all .15s;
}
.player-action:hover { border-color: var(--aqua); color: var(--aqua); }
.speak-btn {
  background: linear-gradient(135deg, var(--aqua), #45D3CD); color: #fff;
  border-radius: var(--r-md); padding: 11px 24px; font-size: 14px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(28,183,176,.3); transition: all .18s;
}
.speak-btn:hover { transform: translateY(-1px); }
.stop-btn {
  background: #E53E3E; color: #fff; border-radius: var(--r-md);
  padding: 11px 24px; font-size: 14px; font-weight: 700; transition: all .15s;
}
.audio-btn-row { display: flex; gap: 10px; align-items: center; }

/* ── CODE MODE ── */
.code-mode { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.code-topbar {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; background: var(--sand);
}
.lang-select {
  font-family: var(--font-b); font-size: 12px; color: var(--slate);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 6px 10px; outline: none;
}
.code-action-btn {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 5px 12px; font-size: 11px; font-weight: 600; color: var(--slate); font-family: var(--font-b);
  transition: all .15s;
}
.code-action-btn:hover { background: var(--coral-light); color: #D84C2F; border-color: var(--coral-border); }
.code-area { flex: 1; overflow-y: auto; padding: 20px; background: #FAFAF8; }
.code-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; gap: 8px; }
.code-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 480px; margin-top: 8px; }
.code-chip {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-full);
  padding: 7px 14px; font-size: 12px; color: var(--slate); font-family: var(--font-b);
  cursor: pointer; transition: all .15s;
}
.code-chip:hover { border-color: var(--coral); color: var(--coral); background: var(--coral-light); }
.code-messages { display: flex; flex-direction: column; gap: 16px; max-width: 740px; }
.code-msg-row { padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.code-msg-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.code-msg-label.user { color: var(--coral); }
.code-msg-text { font-size: 14px; line-height: 1.7; color: var(--navy); }
.code-block { background: #1E2433; border-radius: var(--r-md); padding: 16px; font-family: var(--font-code); font-size: 13px; line-height: 1.7; color: #E8F0FE; overflow-x: auto; margin: 8px 0; }
.code-copy-row { display: flex; gap: 6px; }
.code-copy-btn {
  background: var(--coral-light); color: #D84C2F; border-radius: var(--r-sm);
  padding: 5px 12px; font-size: 11px; font-weight: 700; transition: all .15s; font-family: var(--font-b);
}
.code-copy-btn:hover { background: var(--coral); color: #fff; }
.code-input-row {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center; flex-shrink: 0; background: var(--white);
}
.code-input {
  flex: 1; background: var(--sand); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 10px 16px; font-size: 13px;
  color: var(--navy); outline: none; transition: all .15s;
}
.code-input:focus { border-color: var(--aqua); background: var(--white); }
.code-send-btn {
  width: 36px; height: 36px; background: linear-gradient(135deg, #FF8A66, #FF6B4A);
  border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-coral); transition: all .18s; flex-shrink: 0;
}
.code-send-btn:hover { transform: translateY(-1px); }

/* ── VIDEO COMING SOON ── */
.video-mode {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px; background: linear-gradient(180deg, var(--sand), var(--white));
}
.video-inner { max-width: 580px; text-align: center; }
.video-big-icon  { font-size: 56px; margin-bottom: 16px; }
.video-title     { font-family: var(--font-h); font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -.03em; margin-bottom: 8px; }
.video-sub       { font-size: 15px; color: var(--slate); margin-bottom: 28px; line-height: 1.6; }
.video-cards     { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
.video-card      { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; text-align: left; box-shadow: var(--sh-card); }
.video-card-icon { font-size: 22px; margin-bottom: 8px; }
.video-card-name { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.video-card-sub  { font-size: 11px; color: var(--muted); }
.video-card-badge { font-size: 9px; font-weight: 700; background: var(--gold-light); color: var(--gold); padding: 2px 8px; border-radius: var(--r-full); margin-top: 6px; display: inline-block; border: 1px solid #F2C66D; }
.video-btns { display: flex; gap: 10px; justify-content: center; }
.video-notify-btn { background: linear-gradient(135deg, #FF8A66, #FF6B4A); color: #fff; border-radius: var(--r-md); padding: 11px 24px; font-size: 14px; font-weight: 700; box-shadow: var(--sh-coral); transition: all .18s; }
.video-notify-btn:hover { transform: translateY(-1px); }
.video-pro-btn { background: var(--gold-light); color: var(--gold-dark); border: 1px solid #F2C66D; border-radius: var(--r-md); padding: 11px 24px; font-size: 14px; font-weight: 700; transition: all .15s; }
.video-pro-btn:hover { background: #FFE8A0; }

/* ── MODALS ── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,42,67,.4); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); width: 100%; max-width: 480px; max-height: 85vh;
  overflow-y: auto; box-shadow: var(--sh-hover); margin: 24px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-title { font-family: var(--font-h); font-size: 16px; font-weight: 700; color: var(--navy); }
.modal-close { width: 28px; height: 28px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: var(--muted); transition: all .15s; }
.modal-close:hover { background: var(--sand); color: var(--navy); }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 20px; }
.modal-section { display: flex; flex-direction: column; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
.modal-section:last-child { border-bottom: none; padding-bottom: 0; }
.modal-section-title { font-size: 13px; font-weight: 600; color: var(--navy); }
.modal-section-desc  { font-size: 12px; color: var(--muted); }
.modal-sub-status { font-size: 13px; color: var(--slate); }
.modal-textarea {
  font-family: var(--font-b); font-size: 13px; color: var(--navy);
  background: var(--sand); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px; outline: none; resize: vertical; min-height: 80px; line-height: 1.5;
}
.modal-textarea:focus { border-color: var(--aqua); }
.modal-footer { text-align: center; font-size: 12px; color: var(--muted); }

/* upgrade modal */
.upgrade-price { font-family: var(--font-h); font-size: 48px; font-weight: 800; color: var(--navy); letter-spacing: -2px; }
.upgrade-price span { font-size: 16px; font-weight: 400; color: var(--muted); }
.upgrade-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.upgrade-features li { font-size: 14px; color: var(--slate); }

/* buttons */
.btn-coral {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF8A66, #FF6B4A); color: #fff;
  border-radius: var(--r-md); padding: 11px 22px; font-size: 14px; font-weight: 700;
  font-family: var(--font-h); box-shadow: var(--sh-coral); transition: all .18s; border: none; cursor: pointer;
}
.btn-coral:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(255,107,74,.4); }
.btn-coral:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; color: var(--slate); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 10px 22px; font-size: 14px;
  font-family: var(--font-b); cursor: pointer; transition: all .15s;
}
.btn-outline:hover { border-color: var(--coral); color: var(--navy); }
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #F8D47A, #D99A26); color: var(--gold-dark);
  border-radius: var(--r-md); padding: 11px 22px; font-size: 14px; font-weight: 700;
  font-family: var(--font-h); box-shadow: var(--sh-pro); transition: all .18s; border: none; cursor: pointer; width: 100%;
}
.btn-gold:hover { transform: translateY(-1px); }
.hidden { display: none !important; }

/* login page */
.login-page { background: var(--sand); display: flex; align-items: center; justify-content: center; min-height: 100vh; font-family: var(--font-b); }
.login-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 48px 40px; width: 100%; max-width: 400px; text-align: center; box-shadow: var(--sh-hover); }
.login-logo-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.login-logo-mark { width: 40px; height: 40px; background: linear-gradient(135deg, #FF8A66, #FF6B4A); border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-coral); }
.login-logo-word { font-family: var(--font-h); font-size: 26px; font-weight: 800; color: var(--navy); }
.login-bahamas { display: inline-block; background: var(--coral-light); color: var(--coral); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: var(--r-full); margin-bottom: 20px; }
.login-tagline { font-size: 15px; color: var(--slate); margin-bottom: 28px; line-height: 1.5; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 13px; background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-md); font-family: var(--font-b); font-size: 15px; font-weight: 600;
  color: var(--navy); cursor: pointer; transition: all .18s; box-shadow: var(--sh-soft);
}
.google-btn:hover { box-shadow: var(--sh-hover); border-color: var(--coral); }
.login-footer { margin-top: 18px; font-size: 12px; color: var(--muted); }

/* ============================================================
   v6 ADDITIONS — Mobile, animations, new features
   ============================================================ */

/* ── ANIMATIONS ── */
@keyframes lumiSlideUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes lumiShimmer { 0% { background-position:200% 0; } 100% { background-position:-200% 0; } }
@keyframes lumiFadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes lumiScaleIn { from { opacity:0; transform:scale(.96); } to { opacity:1; transform:scale(1); } }

.sugg-card { animation: lumiSlideUp .4s ease backwards; }
.sugg-card:nth-child(1){animation-delay:.04s}
.sugg-card:nth-child(2){animation-delay:.10s}
.sugg-card:nth-child(3){animation-delay:.16s}
.sugg-card:nth-child(4){animation-delay:.22s}

.modal-box { animation: lumiScaleIn .25s ease; }
.msg-row { animation: lumiFadeIn .3s ease; }

/* Pro badge shimmer on hover */
.pro-badge { background-size: 200% auto; transition: background-position .4s; }
.mode-item:hover .pro-badge { background-position: right center; }

/* ── MOBILE HAMBURGER ── */
.mobile-menu-btn { display:none; width:36px; height:36px; border-radius:var(--r-sm); align-items:center; justify-content:center; color:var(--navy); }
.mobile-menu-btn:hover { background:var(--sand); }
.sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(16,42,67,.4); z-index:90; }
.sidebar-overlay.show { display:block; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .mobile-menu-btn { display:flex; }
  .sidebar {
    position: fixed; left:0; top:0; bottom:0; z-index:100;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(16,42,67,.18);
  }
  .sidebar.open { transform: translateX(0); }
  .suggestions { grid-template-columns: 1fr; }
  .voice-grid { grid-template-columns: 1fr; }
  .preset-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .img-body { flex-direction: column; }
  .img-sidebar { width:100%; min-width:0; max-height:120px; border-right:none; border-bottom:1px solid var(--border); display:flex; flex-wrap:wrap; gap:4px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .logo-word { display:none; }
  #model-selector-btn span:first-child { max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .chat-inner, .messages { padding-left:14px; padding-right:14px; }
  .greeting-title { font-size:24px; }
}
@media (max-width: 500px) {
  .upgrade-btn span { display:none; }
  .profile-name { display:none; }
  .video-cards { grid-template-columns:1fr; }
}

/* ── PROMPT TEMPLATE LIBRARY ── */
.tpl-modal-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tpl-lib-card { background:var(--sand); border:1px solid var(--border); border-radius:var(--r-md); padding:14px; cursor:pointer; transition:all .15s; text-align:left; }
.tpl-lib-card:hover { border-color:var(--coral); background:var(--coral-light); transform:translateY(-1px); }
.tpl-lib-icon { font-size:18px; margin-bottom:6px; }
.tpl-lib-name { font-size:13px; font-weight:600; color:var(--navy); margin-bottom:3px; }
.tpl-lib-desc { font-size:11px; color:var(--muted); line-height:1.4; }
@media(max-width:600px){ .tpl-modal-grid{ grid-template-columns:1fr; } }

/* ── CHAT HISTORY ACTIONS ── */
.hist-item { position:relative; }
.hist-actions { display:none; gap:2px; flex-shrink:0; }
.hist-item:hover .hist-actions { display:flex; }
.hist-action-btn { width:22px; height:22px; border-radius:5px; display:flex; align-items:center; justify-content:center; color:var(--muted); transition:all .15s; }
.hist-action-btn:hover { background:var(--white); color:var(--coral); }

/* ── USAGE DASHBOARD ── */
.usage-dash-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; }
.usage-dash-card { background:var(--sand); border:1px solid var(--border); border-radius:var(--r-md); padding:16px; min-width:0; }
.usage-dash-label { font-size:11px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.usage-dash-num { font-family:var(--font-h); font-size:24px; font-weight:800; color:var(--navy); }
.usage-dash-num span { font-size:13px; font-weight:400; color:var(--muted); }
.usage-dash-bar { height:6px; background:var(--white); border-radius:999px; margin-top:10px; overflow:hidden; }
.usage-dash-fill { height:100%; border-radius:999px; transition:width .5s; }

/* ── EXPORT BUTTON ── */
.export-btn { display:inline-flex; align-items:center; gap:6px; background:var(--white); border:1px solid var(--border); border-radius:var(--r-sm); padding:6px 12px; font-size:12px; font-weight:600; color:var(--slate); transition:all .15s; }
.export-btn:hover { border-color:var(--aqua); color:var(--aqua); }

/* ── PROMPT HISTORY ── */
.ph-item { background:var(--sand); border:1px solid var(--border); border-radius:var(--r-sm); padding:10px 12px; margin-bottom:6px; cursor:pointer; transition:all .15s; }
.ph-item:hover { border-color:var(--coral); background:var(--coral-light); }
.ph-text { font-size:13px; color:var(--navy); line-height:1.4; }
.ph-time { font-size:10px; color:var(--muted); margin-top:4px; }

/* ── PHOTO EDITOR ── */
.photoedit-mode { flex: 1; overflow-y: auto; padding: 32px 24px; }
.photoedit-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

.photoedit-upload-zone {
  border: 1.5px dashed var(--border); border-radius: var(--r-md);
  background: var(--white); padding: 28px; transition: border-color .15s;
}
.photoedit-upload-zone.drag-over { border-color: var(--coral); background: var(--coral-light); }
#photoedit-upload-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 0; }
.photoedit-upload-icon { font-size: 34px; margin-bottom: 4px; }
.photoedit-upload-title { font-family: var(--font-h); font-size: 16px; font-weight: 700; color: var(--navy); }
.photoedit-upload-sub { font-size: 12px; color: var(--muted); max-width: 360px; line-height: 1.5; margin-bottom: 8px; }
.photoedit-choose-btn {
  background: linear-gradient(135deg, var(--coral), #FF8A66); color: #fff;
  border-radius: var(--r-md); padding: 10px 20px; font-size: 13px; font-weight: 700;
  font-family: var(--font-h); box-shadow: 0 8px 20px rgba(255,107,74,.22); transition: all .18s;
}
.photoedit-choose-btn:hover { transform: translateY(-1px); }

.photoedit-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photoedit-img-card { background: var(--sand); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px; text-align: center; }
.photoedit-img-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.photoedit-img-card img { width: 100%; max-height: 280px; object-fit: contain; border-radius: var(--r-sm); background: repeating-conic-gradient(#EEE 0% 25%, #FAFAFA 0% 50%) 50% / 16px 16px; }
.photoedit-download-btn {
  margin-top: 10px; width: 100%; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 7px; font-size: 12px; font-weight: 600; color: var(--navy); transition: all .15s;
}
.photoedit-download-btn:hover { border-color: var(--aqua); color: var(--aqua-h); }
.photoedit-replace-btn { margin-top: 12px; font-size: 12px; color: var(--coral); font-weight: 600; text-decoration: underline; }

.photoedit-section-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.photoedit-action-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.photoedit-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-md);
  padding: 14px 8px; font-size: 12px; font-weight: 600; color: var(--navy); transition: all .15s;
}
.photoedit-action-btn:hover { border-color: var(--coral); background: var(--coral-light); transform: translateY(-1px); }
.photoedit-action-btn.active { border-color: var(--coral); background: var(--coral-light); box-shadow: 0 4px 12px rgba(255,107,74,.15); }
.photoedit-action-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.photoedit-action-icon { font-size: 20px; }

.photoedit-edit-prompt-wrap { display: flex; gap: 8px; margin-top: 12px; }
.photoedit-edit-prompt-input {
  flex: 1; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-md);
  padding: 10px 14px; font-size: 13px; color: var(--navy); outline: none;
}
.photoedit-edit-prompt-input:focus { border-color: var(--coral); }
.photoedit-go-btn {
  background: linear-gradient(135deg, var(--coral), #FF8A66); color: #fff;
  border-radius: var(--r-md); padding: 10px 18px; font-size: 13px; font-weight: 700; white-space: nowrap;
}

@media (max-width: 600px) {
  .photoedit-compare { grid-template-columns: 1fr; }
  .photoedit-action-row { grid-template-columns: 1fr 1fr; }
}


/* ── Credit top-up card ── */
.credit-pack-card {
  margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, #FFF8E6, #FFF3D6);
  border: 1px solid #F2C66D; border-radius: var(--r-md); padding: 14px;
}
.credit-pack-card.hidden { display: none !important; }
.credit-pack-title { font-family: var(--font-h); font-size: 13px; font-weight: 800; color: var(--navy); margin-bottom: 3px; }
.credit-pack-sub { font-size: 11px; line-height: 1.45; color: var(--slate); }
.credit-pack-btn {
  flex-shrink: 0; background: linear-gradient(135deg, #F8D47A, #D99A26); color: var(--gold-dark);
  border-radius: var(--r-sm); padding: 9px 12px; font-size: 12px; font-weight: 800; font-family: var(--font-h);
  box-shadow: var(--sh-pro); transition: all .18s;
}
.credit-pack-btn:hover { transform: translateY(-1px); }
.credit-pack-btn:disabled { opacity: .65; cursor: wait; transform: none; }
@media (max-width: 560px) {
  .credit-pack-card { flex-direction: column; align-items: stretch; }
  .credit-pack-btn { width: 100%; }
}


/* ============================================================
   LUCAYA / LUMI VISUAL WRAP — visual-only skin
   Keeps the existing app structure and feature logic intact.
   ============================================================ */
/* ============================================================
   LUMI BRAND TOKENS — single source of truth
   (Previously split across two :root blocks — the original Island
   Studio palette and a later Lucaya/Lumi visual wrap that silently
   overrode most of it. Consolidated here into one block so changing
   a color only ever means editing it in one place.)
   ============================================================ */
:root {
  --sand: #F8FBFF;
  --white: #FFFFFF;
  --coral: #1363DF;
  --coral-h: #0A4DFF;
  --coral-light: #EEF5FF;
  --coral-border: #BBD7FF;
  --aqua: #00C2FF;
  --aqua-h: #008FD2;
  --aqua-light: #EAF8FF;
  --gold: #1363DF;
  --gold-light: #EEF5FF;
  --gold-dark: #0B1020;
  --navy: #0B1020;
  --slate: #526174;
  --muted: #7A8798;
  --border: #E3E8F0;
  --border-soft: #EDF2F7;
  --green: #38A169;
  --red: #E53E3E;
  --font-h: 'Sora', 'Inter', system-ui, sans-serif;
  --font-b: 'Inter', system-ui, sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;
  --sh-soft: 0 18px 50px rgba(7,19,40,.08);
  --sh-card: 0 8px 30px rgba(7,19,40,.07);
  --sh-hover: 0 24px 80px rgba(7,19,40,.12);
  --sh-pro: 0 12px 34px rgba(19,99,223,.18);
  --sh-coral: 0 12px 30px rgba(19,99,223,.22);
}
html, body { background: linear-gradient(180deg,#fff 0%,#f8fbff 58%,#fff 100%); }
.shell { background: #F8FBFF; }
.topbar {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(7,19,40,.04);
}
.logo-mark {
  background: #fff;
  border: 1px solid #E5ECF5;
  box-shadow: 0 12px 30px rgba(19,99,223,.12);
  overflow: hidden;
}
.logo-mark.logo-mark-img img,
.login-logo-mark.logo-mark-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-word,
.login-logo-word { letter-spacing: -.04em; }
.upgrade-btn,
.pro-card-btn,
.btn-gold,
.img-generate-btn,
.speak-btn,
.code-send-btn,
.photoedit-go-btn,
.video-notify-btn {
  background: linear-gradient(135deg,#1363DF,#0A4DFF) !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(19,99,223,.22) !important;
}
.sidebar {
  background: linear-gradient(180deg,#FFFFFF 0%,#FBFCFF 100%);
  border-right: 1px solid #E5ECF5;
}
.sidebar-label { color: #7A8798; }
.mode-item,
.tool-item,
.hist-item { border-radius: 14px; }
.mode-item:hover { background: #EEF5FF; transform: translateX(3px); }
.mode-item.active {
  background: #EEF5FF;
  border-color: #BBD7FF;
  box-shadow: 0 10px 28px rgba(19,99,223,.12);
}
.mode-icon-wrap {
  background: #F5F7FB;
  color: #1363DF;
}
.mode-item.active .mode-icon-wrap {
  background: linear-gradient(135deg,#1363DF,#00D4FF);
  box-shadow: 0 10px 24px rgba(19,99,223,.22);
}
.mode-item.active .mode-name { color: #1363DF; }
.tool-item:hover,
.hist-item:hover { background: #F5F7FB; }
.tool-icon-wrap { color: #1363DF; }
.pro-badge,
.soon-badge {
  background: #EEF5FF;
  color: #1363DF;
  border: 1px solid #BBD7FF;
}
.usage-card,
.pro-card,
.sugg-card,
.modal-box,
.img-main-card,
.img-sidebar,
.audio-section,
.audio-player,
.code-topbar,
.photoedit-card,
.photoedit-upload-card,
.video-card {
  border-color: #E3E8F0;
  box-shadow: 0 8px 30px rgba(7,19,40,.05);
}
.pro-card {
  background: linear-gradient(180deg,#FFFFFF,#F2F7FF);
  border-color: #BBD7FF;
}
.usage-fill,
.ctrl-range::-webkit-slider-thumb {
  background: linear-gradient(90deg,#1363DF,#00D4FF);
}
.main { background: linear-gradient(180deg,#FFFFFF 0%,#F8FBFF 100%); }
.greeting-title,
.audio-mode-title,
.video-title,
.img-panel-title,
.photoedit-title { letter-spacing: -.04em; }
.greeting-sun,
.audio-mode-icon,
.img-panel-icon,
.photoedit-icon,
.video-big-icon {
  background: linear-gradient(135deg,#1363DF,#00D4FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.chat-input-wrap,
.prompt,
.img-prompt-wrap,
.code-input-row,
.audio-script-card,
.voice-search-input,
.photoedit-edit-prompt-input {
  border-color: #DDE6F2 !important;
  box-shadow: 0 8px 30px rgba(7,19,40,.04);
}
.send-btn,
.img-generate-btn,
.photoedit-action-btn.active,
.play-btn {
  background: linear-gradient(135deg,#1363DF,#0A4DFF) !important;
}
.preset-chip.active,
.preset-chip.active.aqua-preset,
.preset-chip.active.navy-preset {
  border-color: #1363DF;
  background: #EEF5FF;
  color: #1363DF;
}
.voice-card.selected,
.img-style-chip.active,
.img-size-chip.active,
.photoedit-action-btn:hover,
.code-chip:hover {
  border-color: #1363DF !important;
  background: #EEF5FF !important;
}
.msg-lumi-icon {
  background: linear-gradient(135deg,#1363DF,#00D4FF);
}
.msg-label.user-lbl,
.usage-manage,
.profile-chip:hover,
.topbar-icon-btn:hover { color: #1363DF; }
.profile-avatar { background: linear-gradient(135deg,#1363DF,#00D4FF); }
.login-page {
  background: radial-gradient(circle at 75% 20%,rgba(0,212,255,.14),transparent 32%), linear-gradient(180deg,#fff,#f4f8ff);
}
.login-card { border-color: #DDE6F2; box-shadow: 0 24px 80px rgba(7,19,40,.12); }
.login-logo-mark { background:#fff; border:1px solid #E5ECF5; box-shadow:0 12px 30px rgba(19,99,223,.14); overflow:hidden; }
.google-btn:hover { border-color:#1363DF; }
@media (max-width: 760px) {
  .topbar-logo .logo-word { display: inline; }
  .model-selector-wrap { max-width: 160px; }
}

/* ============================================================
   LUCAYA REBRAND V2 — logo, disclaimer, and optional themes
   Visual-only: keeps all existing app behavior and IDs intact.
   ============================================================ */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 14px; margin: 0 0 10px;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-brand img {
  width: 34px; height: 34px; border-radius: 10px;
  background: #fff; border: 1px solid #E5ECF5;
  box-shadow: 0 10px 24px rgba(19,99,223,.12);
}
.sidebar-brand-name {
  font-family: var(--font-h); font-weight: 900; font-size: 15px;
  letter-spacing: -.04em; color: var(--navy);
}
.sidebar-brand-sub { font-size: 10px; color: var(--muted); font-weight: 700; }
.theme-option-row { display: grid; gap: 8px; margin-top: 8px; }
.theme-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--white); color: var(--navy);
  padding: 10px 12px; font-size: 13px; font-weight: 800; text-align: left;
  transition: .16s ease;
}
.theme-option:hover { border-color: #1363DF; background: #EEF5FF; }
.theme-option.active { border-color: #1363DF; background: #EEF5FF; color: #1363DF; box-shadow: 0 8px 26px rgba(19,99,223,.1); }
.theme-swatch { width: 28px; height: 20px; border-radius: 8px; border: 1px solid var(--border); flex: 0 0 auto; }
.theme-swatch-light { background: linear-gradient(180deg,#fff,#f6f9ff); }
.theme-swatch-dark { background: #071328; border-color: #183865; }
.theme-swatch-blue { background: linear-gradient(135deg,#1363DF,#00A8FF); border-color: #62CFFF; }

html[data-theme="dark"] {
  --sand: #071328;
  --white: #0B162C;
  --coral: #2F7DFF;
  --coral-h: #4DA3FF;
  --coral-light: rgba(47,125,255,.16);
  --coral-border: rgba(76,163,255,.28);
  --aqua: #00D4FF;
  --aqua-h: #71E6FF;
  --aqua-light: rgba(0,212,255,.12);
  --gold: #2F7DFF;
  --gold-light: rgba(47,125,255,.16);
  --gold-dark: #FFFFFF;
  --navy: #F8FBFF;
  --slate: #B8C2D6;
  --muted: #7F8CA5;
  --border: rgba(255,255,255,.12);
  --border-soft: rgba(255,255,255,.08);
}
html[data-theme="dark"],
html[data-theme="dark"] body { background: #050B18; color: var(--navy); }
html[data-theme="dark"] .shell { background: radial-gradient(circle at 80% 0%,rgba(0,212,255,.12),transparent 34%), #050B18; }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .main,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .login-card {
  background: rgba(11,22,44,.88) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: var(--navy);
}
html[data-theme="dark"] .main { background: linear-gradient(180deg,#071328,#081426) !important; }
html[data-theme="dark"] .chat-canvas,
html[data-theme="dark"] .mode-panel,
html[data-theme="dark"] .image-mode,
html[data-theme="dark"] .audio-mode,
html[data-theme="dark"] .code-mode,
html[data-theme="dark"] .photoedit-mode,
html[data-theme="dark"] .video-mode { background: transparent !important; }
html[data-theme="dark"] .input-bar,
html[data-theme="dark"] .input-box,
html[data-theme="dark"] .sugg-card,
html[data-theme="dark"] .usage-card,
html[data-theme="dark"] .pro-card,
html[data-theme="dark"] .img-main-card,
html[data-theme="dark"] .img-sidebar,
html[data-theme="dark"] .audio-section,
html[data-theme="dark"] .audio-player,
html[data-theme="dark"] .photoedit-card,
html[data-theme="dark"] .photoedit-upload-card,
html[data-theme="dark"] .voice-card,
html[data-theme="dark"] .theme-option,
html[data-theme="dark"] .code-topbar {
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: var(--navy);
  box-shadow: none !important;
}
html[data-theme="dark"] .chat-input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input,
html[data-theme="dark"] select { color: var(--navy); }
html[data-theme="dark"] .msg-user-bubble { background: rgba(47,125,255,.18); color: var(--navy); }
html[data-theme="dark"] .input-footer,
html[data-theme="dark"] .modal-footer { color: #8DA2C0; }
html[data-theme="dark"] .logo-mark,
html[data-theme="dark"] .sidebar-brand img { background:#071328; border-color:rgba(255,255,255,.16); }
html[data-theme="dark"] .mode-item:hover,
html[data-theme="dark"] .mode-item.active,
html[data-theme="dark"] .tool-item:hover,
html[data-theme="dark"] .hist-item:hover,
html[data-theme="dark"] .theme-option.active { background: rgba(47,125,255,.18) !important; }

html[data-theme="blue"] {
  --sand: #0A4DFF;
  --white: rgba(255,255,255,.16);
  --coral: #FFFFFF;
  --coral-h: #EAF8FF;
  --coral-light: rgba(255,255,255,.16);
  --coral-border: rgba(255,255,255,.26);
  --aqua: #00D4FF;
  --aqua-h: #FFFFFF;
  --aqua-light: rgba(255,255,255,.16);
  --gold: #FFFFFF;
  --gold-light: rgba(255,255,255,.16);
  --gold-dark: #FFFFFF;
  --navy: #FFFFFF;
  --slate: rgba(255,255,255,.82);
  --muted: rgba(255,255,255,.68);
  --border: rgba(255,255,255,.22);
  --border-soft: rgba(255,255,255,.14);
}
html[data-theme="blue"],
html[data-theme="blue"] body { background: linear-gradient(135deg,#1363DF 0%,#00A8FF 100%); color:#fff; }
html[data-theme="blue"] .shell { background: radial-gradient(circle at 84% 4%,rgba(0,212,255,.42),transparent 36%), linear-gradient(135deg,#1363DF 0%,#00A8FF 100%); }
html[data-theme="blue"] .topbar,
html[data-theme="blue"] .sidebar,
html[data-theme="blue"] .main,
html[data-theme="blue"] .modal-box,
html[data-theme="blue"] .login-card {
  background: rgba(5,15,42,.22) !important;
  border-color: rgba(255,255,255,.22) !important;
  color: #fff;
  box-shadow: none !important;
}
html[data-theme="blue"] .main { background: rgba(255,255,255,.06) !important; }
html[data-theme="blue"] .input-bar,
html[data-theme="blue"] .input-box,
html[data-theme="blue"] .sugg-card,
html[data-theme="blue"] .usage-card,
html[data-theme="blue"] .pro-card,
html[data-theme="blue"] .img-main-card,
html[data-theme="blue"] .img-sidebar,
html[data-theme="blue"] .audio-section,
html[data-theme="blue"] .audio-player,
html[data-theme="blue"] .photoedit-card,
html[data-theme="blue"] .photoedit-upload-card,
html[data-theme="blue"] .voice-card,
html[data-theme="blue"] .theme-option,
html[data-theme="blue"] .code-topbar {
  background: rgba(255,255,255,.16) !important;
  border-color: rgba(255,255,255,.24) !important;
  color:#fff;
  box-shadow:none !important;
}
html[data-theme="blue"] .chat-input,
html[data-theme="blue"] textarea,
html[data-theme="blue"] input,
html[data-theme="blue"] select { color:#fff; }
html[data-theme="blue"] .chat-input::placeholder,
html[data-theme="blue"] textarea::placeholder,
html[data-theme="blue"] input::placeholder { color:rgba(255,255,255,.62); }
html[data-theme="blue"] .mode-item:hover,
html[data-theme="blue"] .mode-item.active,
html[data-theme="blue"] .tool-item:hover,
html[data-theme="blue"] .hist-item:hover,
html[data-theme="blue"] .theme-option.active { background: rgba(255,255,255,.18) !important; }
html[data-theme="blue"] .mode-item.active .mode-name,
html[data-theme="blue"] .usage-manage { color:#fff; }
html[data-theme="blue"] .logo-mark,
html[data-theme="blue"] .sidebar-brand img { background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.24); }
html[data-theme="blue"] .input-footer,
html[data-theme="blue"] .modal-footer { color: rgba(255,255,255,.78); }
.login-company-logo { width: 170px; margin: 0 auto 18px; }
