/* Kora AI assistant app */
:root {
  --font: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --bg: #14121a;
  --panel: #1d1a25;
  --panel-2: #26222f;
  --ink: #f4f1ff;
  --ink-2: #a39fb3;
  --line: rgba(255, 255, 255, 0.08);
  --coral: #ff8a65;
  --violet: #c8a6ff;
  --cyan: #7cc4ff;
  --mint: #7ee0b5;
  --accent: #c8a6ff;
  --sheet: #1d1a25;
  --grad: linear-gradient(120deg, var(--coral), var(--violet) 55%, var(--cyan));
}
body { background: #0c0b10; }
.sbar { color: #fff; }
.muted { color: var(--ink-2); font-size: 13px; }
.iconbtn { color: var(--ink); }
.iconbtn:hover { background: rgba(255, 255, 255, 0.06); }

/* Buttons and chips */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 54px; border-radius: var(--r-btn); font-weight: 700; font-size: 16px;
}
.btn.grad { background: var(--grad); color: #17131f; }
.btn.light { background: var(--panel-2); color: var(--ink); margin-top: 10px; }
.btn.danger { background: #ff6b6b; color: #1a0d0d; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.pad { padding: 14px 16px 2px; }
.chip {
  flex: none; height: 36px; padding: 0 15px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink-2); transition: background 0.2s, color 0.2s;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.badge {
  display: inline-block; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--grad); color: #17131f; vertical-align: 2px; margin-left: 4px;
}

/* The orb: three blurred blobs drifting inside a circle */
.orb { position: relative; border-radius: 50%; overflow: hidden; isolation: isolate; flex: none; background: #2a2335; }
.orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 -10px 30px rgba(0, 0, 0, 0.25); }
.orb i { position: absolute; width: 70%; height: 70%; border-radius: 50%; filter: blur(14px); mix-blend-mode: screen; }
.orb i:nth-child(1) { background: var(--coral); left: -8%; top: 4%; animation: drift1 7s ease-in-out infinite; }
.orb i:nth-child(2) { background: var(--violet); right: -10%; top: -6%; animation: drift2 8s ease-in-out infinite; }
.orb i:nth-child(3) { background: var(--cyan); left: 18%; bottom: -16%; animation: drift3 6s ease-in-out infinite; }
.orb.xs { width: 44px; height: 44px; }
.orb.xs i { filter: blur(6px); }
.orb.sm { width: 76px; height: 76px; }
.orb.sm i { filter: blur(9px); }
.orb.md { width: 88px; height: 88px; margin: 0 auto 14px; }
.orb.big { width: 220px; height: 220px; }
.orb.big i { filter: blur(26px); }
@keyframes drift1 { 50% { transform: translate(28%, 22%) scale(1.15); } }
@keyframes drift2 { 50% { transform: translate(-30%, 26%) scale(0.9); } }
@keyframes drift3 { 50% { transform: translate(12%, -34%) scale(1.2); } }

/* Home */
.scr[data-screen="home"] { display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 0 16px; }
.model { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 15px; }
.model b { font-weight: 700; }
.model .ic { color: var(--ink-2); }
.spark { width: 18px; height: 18px; border-radius: 50%; background: var(--grad); }
.hero { display: grid; justify-items: start; gap: 18px; padding: 30px 22px 10px; }
.hero h1 { font-size: 30px; line-height: 1.12; letter-spacing: -0.035em; font-weight: 750; }
.hero h1 span { color: var(--ink-2); font-weight: 600; }
.ideas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 16px 12px; }
.idea {
  display: grid; justify-items: start; align-content: start; gap: 4px; text-align: left; min-height: 124px;
  padding: 14px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line);
  transition: background 0.2s, transform 0.2s var(--ease);
}
.idea:hover { background: var(--panel-2); transform: translateY(-2px); }
.idea b { font-size: 15px; font-weight: 700; margin-top: 8px; letter-spacing: -0.01em; }
.idea small { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.i-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }

/* Composer */
.composer {
  display: flex; align-items: center; gap: 2px; margin: auto 12px 8px; padding: 6px 6px 6px 4px;
  border-radius: 28px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
}
.composer input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; font-size: 16px; padding: 0 6px; }
.composer input::placeholder { color: var(--ink-2); }
.composer .iconbtn { width: 42px; height: 42px; color: var(--ink-2); }
.send {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--ink); color: var(--bg); transition: transform 0.2s var(--ease), opacity 0.2s;
}
.composer:not(.has-text) .send { display: none; }
.composer.has-text .mic { display: none; }
.composer.docked { position: sticky; bottom: 0; margin: 0; border-radius: 28px 28px 0 0; border-width: 1px 0 0; padding: 8px 10px calc(var(--bottom) + 6px) 8px; background: rgba(29, 26, 37, 0.96); backdrop-filter: blur(14px); }
[data-os="android"] .composer:not(.docked) { border-radius: 30px; }

/* Chat thread */
.scr[data-screen="chat"] { display: flex; flex-direction: column; padding-bottom: 0; }
.scr[data-screen="chat"] .bar { position: sticky; top: 0; z-index: 3; background: rgba(20, 18, 26, 0.92); backdrop-filter: blur(12px); }
.bar .title, .bar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 14px 16px 22px; }
.msg { max-width: 100%; font-size: 15.5px; line-height: 1.55; }
.msg.me {
  align-self: flex-end; max-width: 82%; padding: 10px 15px; border-radius: 22px 22px 6px 22px;
  background: var(--panel-2); color: var(--ink);
}
.msg.ai { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.msg.ai .orb { width: 28px; height: 28px; margin-top: 2px; }
.msg.ai .orb i { filter: blur(4px); }
.msg.ai .body { display: grid; gap: 10px; min-width: 0; }
.msg.ai p, .msg.ai li { color: #e7e3f3; }
.msg.ai ol, .msg.ai ul { padding-left: 20px; display: grid; gap: 6px; }
.msg.ai strong { color: #fff; font-weight: 750; }
.msg.ai .typing-dot { display: inline-block; width: 8px; height: 8px; margin-left: 3px; border-radius: 50%; background: var(--violet); vertical-align: 1px; animation: blink 0.9s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.code {
  border-radius: 16px; background: #0d0c12; border: 1px solid var(--line); overflow: hidden;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
}
.code header { display: flex; justify-content: space-between; align-items: center; padding: 7px 8px 7px 14px; font-family: var(--font); font-size: 12px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.code header button { font-size: 12px; font-weight: 700; color: var(--ink); padding: 4px 8px; border-radius: 8px; }
.code pre { padding: 12px 14px; overflow-x: auto; white-space: pre; color: #d9d4ea; }
.code .k { color: var(--violet); }
.code .s { color: var(--mint); }
.code .c { color: #6f6a80; }
.code .f { color: var(--cyan); }
.acts { display: flex; gap: 2px; margin-left: -8px; }
.acts button { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.acts button:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.acts button[aria-pressed="true"] { color: var(--violet); }
.acts .ic { width: 17px; height: 17px; }
.follow { display: flex; flex-wrap: wrap; gap: 8px; }
.follow .chip { height: 34px; font-size: 13px; color: var(--ink); }

/* Voice */
.scr.voice { display: flex; flex-direction: column; background: radial-gradient(120% 70% at 50% 40%, #2a2138 0%, var(--bg) 70%); }
.voice-in { flex: 1; display: grid; place-content: center; justify-items: center; gap: 30px; padding: 0 30px; text-align: center; }
.v-state { font-size: 15px; font-weight: 700; color: var(--ink-2); min-height: 22px; }
.v-text { font-size: 21px; line-height: 1.4; font-weight: 650; letter-spacing: -0.015em; min-height: 90px; max-width: 320px; }
.v-text.off { visibility: hidden; }
.v-ctl { display: flex; justify-content: center; gap: 26px; padding: 10px 0 18px; }
.vbtn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: var(--ink); transition: background 0.2s; }
.vbtn[aria-pressed="true"][data-mute] { background: var(--ink); color: var(--bg); }
.vbtn[aria-pressed="false"][data-v-caption] { color: var(--ink-2); }
.vbtn.end { background: #ff5d5d; color: #fff; }

/* Image */
.img-wrap { display: grid; gap: 14px; padding: 6px 16px 10px; }
.prompt textarea {
  width: 100%; resize: none; border: 1px solid var(--line); outline: 0; border-radius: 20px; padding: 14px 16px;
  background: var(--panel); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.5;
}
.prompt textarea:focus { border-color: rgba(200, 166, 255, 0.5); }
.ratio { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--panel); }
.ratio button { flex: 1; height: 36px; border-radius: 11px; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.ratio button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); }
[data-os="android"] .ratio, [data-os="android"] .ratio button { border-radius: 999px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shot { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: var(--ar, 1); background: var(--panel); }
.shot canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot.load::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.08) 50%, transparent 80%);
  background-size: 200% 100%; animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.shot .save { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); color: #fff; backdrop-filter: blur(6px); }
.shot .save .ic { width: 16px; height: 16px; }

/* Explore */
.search { display: flex; align-items: center; gap: 10px; height: 48px; margin: 4px 16px 0; padding: 0 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); }
[data-os="android"] .search { border-radius: 999px; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; color: var(--ink); min-width: 0; }
.search input::-webkit-search-cancel-button { filter: invert(1); }
.feature {
  display: flex; align-items: center; gap: 14px; margin: 16px 16px 4px; padding: 16px; border-radius: 22px; cursor: pointer;
  background: linear-gradient(120deg, rgba(255, 138, 101, 0.16), rgba(200, 166, 255, 0.16) 60%, rgba(124, 196, 255, 0.14));
  border: 1px solid rgba(200, 166, 255, 0.22);
}
.feature > div:not(.orb) { flex: 1; display: grid; gap: 3px; }
.feature b { font-size: 15px; font-weight: 750; }
.feature small { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.prompts { list-style: none; display: grid; gap: 8px; padding: 12px 16px 0; }
.prompts button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); text-align: left; }
.prompts .p-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.prompts button > span:not(.p-ic):not(.ic) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.prompts b { font-size: 15px; font-weight: 700; }
.prompts small { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompts .ic:last-child { color: var(--ink-2); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-2); font-size: 14px; }

/* History */
.day { padding: 20px 20px 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hist { list-style: none; margin: 0 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.hist li + li { border-top: 1px solid var(--line); }
.hist button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 14px; text-align: left; }
.hist button > span:not(.h-ic) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.hist b { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist small { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist .h-ic { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--panel-2); color: var(--ink-2); }
.hist .h-ic .ic { width: 17px; height: 17px; }

/* Profile */
.me { display: grid; justify-items: center; gap: 6px; padding: 10px 20px 8px; text-align: center; }
.me b { font-size: 20px; margin-top: 6px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--grad); color: #17131f; font-weight: 800; font-size: 15px; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; }
.upsell {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 14px 16px 0; padding: 14px 16px; border-radius: 22px; text-align: left;
  background: linear-gradient(120deg, #3a2a3f, #2c2547 60%, #1f2a40); border: 1px solid rgba(200, 166, 255, 0.25);
}
.upsell > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.upsell b { font-size: 15px; font-weight: 750; }
.upsell small { font-size: 13px; color: var(--ink-2); }
.up-ic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #17131f; }
.panel { margin: 14px 16px 0; padding: 16px 18px; background: var(--panel); border-radius: 22px; border: 1px solid var(--line); }
.panel.list { padding: 4px 18px; }
.usage { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; }
.usage span { color: var(--ink-2); }
.meter { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--grad); transform: scaleX(var(--p)); transform-origin: left; transition: transform 0.6s var(--ease); }
.switch-row, .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; width: 100%; font-size: 15px; font-weight: 600; text-align: left; }
.switch-row + .switch-row, .switch-row + .nav-row, .nav-row + .nav-row, .nav-row + .switch-row { border-top: 1px solid var(--line); }
.switch-row > span, .nav-row > span { display: flex; align-items: center; gap: 12px; }
.switch-row span .ic, .nav-row span .ic { color: var(--ink-2); }
.nav-row em { font-style: normal; color: var(--ink-2); font-size: 14px; }
.switch-row input {
  appearance: none; width: 51px; height: 31px; border-radius: 999px; background: #3a3545; position: relative; cursor: pointer; flex: none;
  transition: background 0.25s;
}
.switch-row input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform 0.3s var(--ease);
}
.switch-row input:checked { background: #8f6fe0; }
.switch-row input:checked::after { transform: translateX(20px); }
[data-os="android"] .switch-row input { width: 52px; height: 32px; background: #2a2633; box-shadow: inset 0 0 0 2px #7d7690; }
[data-os="android"] .switch-row input::after { top: 8px; left: 8px; width: 16px; height: 16px; background: #7d7690; box-shadow: none; transition: transform 0.3s var(--ease), width 0.2s, height 0.2s, top 0.2s, left 0.2s; }
[data-os="android"] .switch-row input:checked { background: var(--violet); box-shadow: none; }
[data-os="android"] .switch-row input:checked::after { top: 4px; left: 4px; width: 24px; height: 24px; background: #2b1d4d; transform: translateX(20px); }

/* Tab bar: frosted pill on iOS, Material bar on Android */
.tabs {
  position: absolute; z-index: 60; left: 18px; right: 18px; bottom: calc(var(--bottom) - 6px);
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; height: 66px; padding: 0 6px;
  border-radius: 26px; background: rgba(38, 34, 47, 0.88); color: var(--ink-2);
  backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.7);
}
.tab { display: grid; justify-items: center; gap: 3px; height: 100%; align-content: center; font-size: 11px; font-weight: 700; }
.tab em { font-style: normal; }
.tab[aria-current="true"] { color: var(--ink); }
.tab .pill { display: grid; place-items: center; width: 40px; height: 28px; border-radius: 14px; transition: background 0.25s; }
.tab[aria-current="true"] .pill { background: rgba(200, 166, 255, 0.16); color: var(--violet); }
[data-os="android"] .tabs {
  left: 0; right: 0; bottom: 0; height: calc(80px + var(--bottom)); padding: 0 6px var(--bottom); border-radius: 0;
  background: #1b1822; border: 0; box-shadow: 0 -1px 0 var(--line); backdrop-filter: none;
}
[data-os="android"] .tab .pill { width: 60px; height: 32px; border-radius: 16px; }
[data-os="android"] .tab[aria-current="true"] .pill { background: #4a3a72; color: #ecdfff; }
[data-os="android"] .scr.has-tabs { padding-bottom: calc(var(--bottom) + 104px); }

/* Sheets */
.sheet { color: var(--ink); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 18px; text-align: left; border: 1px solid transparent; }
.opt + .opt { margin-top: 6px; }
.opt[aria-pressed="true"] { background: var(--panel-2); border-color: var(--line); }
.opt > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.opt b { font-size: 15px; font-weight: 700; }
.opt small { font-size: 13px; color: var(--ink-2); }
.o-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--panel-2); color: var(--violet); }
.opt .tick { color: var(--violet); opacity: 0; }
.opt[aria-pressed="true"] .tick { opacity: 1; }
.voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vc { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: 20px; background: var(--panel-2); border: 1px solid transparent; }
.vc[aria-pressed="true"] { border-color: var(--violet); }
.vc-orb { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--a), var(--b)); }
.vc[aria-pressed="true"] .vc-orb { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.1); } }
.vc b { font-size: 15px; }
.vc small { font-size: 12px; color: var(--ink-2); }
.attach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.attach button { display: grid; justify-items: center; gap: 8px; font-size: 14px; font-weight: 650; }
.attach button > span:not(.ic) { width: 100%; height: 76px; border-radius: 20px; display: grid; place-items: center; background: var(--panel-2); color: var(--violet); }
.sheet.plus { text-align: center; background: linear-gradient(180deg, #2a2238, var(--sheet) 45%); }
.perks { list-style: none; display: grid; gap: 10px; text-align: left; margin: 4px 0 18px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; }
.perks .ic { color: var(--mint); margin-top: 2px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.plan { position: relative; display: grid; gap: 4px; padding: 16px 12px; border-radius: 18px; background: var(--panel-2); border: 2px solid transparent; }
.plan[aria-checked="true"] { border-color: var(--violet); }
.plan b { font-size: 15px; }
.plan span { font-size: 13px; color: var(--ink-2); }
.plan .badge { position: absolute; top: -10px; left: 50%; translate: -50% 0; margin: 0; }
.fine { font-size: 12px; color: var(--ink-2); margin-top: 12px; }
.share-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 16px; background: var(--panel-2); margin-bottom: 6px; font-family: var(--mono); font-size: 13px; }
.toast { background: rgba(244, 241, 255, 0.96); color: #17131f; }
