:root {
  --ink: #15181e; --ink2: #4b5563; --mute: #8a909c; --card: #f7f8fa; --line: #f1f2f5; --line2: #e5e7eb;
  --orange: #f2803a; --coral: #e2725b; --blue: #2f80ed; --gold: #c58a3a; --green: #34c759;
  --grad: linear-gradient(90deg, #f2803a, #e2725b);
  --top: env(safe-area-inset-top, 0px);
  --serif: 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif;
}
[data-frame='device'] { --top: 44px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #fff; color: var(--ink); font-family: var(--sans); }
body { overscroll-behavior: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#app { position: relative; width: 100%; max-width: 480px; height: var(--app-h, 100dvh); margin: 0 auto; overflow: hidden; background: #fff; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.warm { background: radial-gradient(90% 50% at 50% 0%, #fff1e3 0%, #fff 60%); }
.statusbar { height: var(--top); flex-shrink: 0; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 0; min-height: 38px; }
.h1 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 700; }
.h2 { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.link { font-size: 12px; color: var(--mute); background: none; border: 0; padding: 0; }
.back { color: var(--mute); font-size: 14px; background: none; border: 0; padding: 0; min-width: 44px; text-align: left; }

/* genie */
.hero { margin: 22px 16px 0; text-align: center; }
.orb { width: 88px; height: 88px; margin: 0 auto; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.orb.float { box-shadow: 0 20px 50px rgba(47,128,237,.22); animation: ah-float 4s ease-in-out infinite; }
.orb.breathe { animation: ah-breathe 2.6s ease-in-out infinite; }
.hero-title { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-top: 18px; line-height: 1.4; }
.spell { margin: 22px 16px 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: 0 12px 30px rgba(21,24,30,.08); }
.spell textarea { width: 100%; min-height: 48px; border: 0; outline: none; resize: none; font: 14px/1.6 var(--sans); color: var(--ink); background: none; padding: 0; caret-color: var(--orange); }
.spell textarea::placeholder { color: #b3b8c2; }
.spell-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.price { font-size: 11px; color: var(--mute); white-space: nowrap; }
.mic { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; }
.mic.on { background: #eef3fd; box-shadow: 0 0 0 3px rgba(47,128,237,.25); }
.go { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; border: 0; white-space: nowrap; }
.go:disabled { opacity: .35; }
.chips { display: flex; gap: 6px; padding: 12px 16px 0; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; white-space: nowrap; background: var(--card); border: 1px solid var(--line); font-size: 12px; }
.section { margin: 16px 16px 0; }
.label { font-size: 12px; color: var(--mute); margin-bottom: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 14px; background: #f7f4ef; overflow: hidden; border: 0; padding: 0; display: block; }
.tile img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.tile .tag { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; font-size: 10px; font-weight: 600; background: rgba(255,255,255,.92); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.tile .spin { position: absolute; left: 50%; top: 50%; margin: -14px 0 0 -14px; }
.notice { margin: 12px 16px 0; padding: 10px 12px; border-radius: 14px; background: #fff4ef; color: var(--coral); font-size: 12px; display: flex; gap: 8px; align-items: center; }

/* tab bar */
.tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: flex-start; padding: 12px 8px 0; font-size: 11px; z-index: 30; }
.tab { width: 60px; text-align: center; line-height: 1.2; color: var(--mute); background: none; border: 0; padding: 0; font-size: 11px; }
.tab .ic { height: 26px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.tab[aria-current='page'] { color: var(--ink); font-weight: 600; }
.tab.genie { color: var(--blue); font-weight: 600; }

/* generating */
.gen-title { font-family: var(--serif); font-size: 20px; font-weight: 700; margin-top: 16px; padding: 0 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer { font-size: 12px; color: var(--mute); margin-top: 6px; font-variant-numeric: tabular-nums; }
.cards { margin: 20px 16px 0; display: flex; gap: 8px; }
.card { flex: 1; min-width: 0; border-radius: 16px; background: var(--card); border: 1px solid var(--line); padding: 8px; text-align: left; }
.card .pic { height: 96px; border-radius: 10px; background: #eef3fd; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card .pic.idle { background: var(--line); }
.card .pic.done { background: #f4f1ec; }
.card .pic.bad { background: #fff4ef; }
.card .pic img { width: 92px; height: 92px; object-fit: contain; }
.card .nm { font-size: 12px; font-weight: 600; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .st { font-size: 10px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .st.run { color: var(--blue); }
.card .st.ok { color: var(--green); }
.card .st.bad { color: var(--coral); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #cfe0fa; border-top-color: var(--blue); animation: ah-spin 1s linear infinite; display: inline-block; }
.steps { list-style: none; margin: 18px 16px 0; padding: 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(21,24,30,.08); display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--mute); }
.steps li.done { color: var(--ink); }
.steps li.now { color: var(--blue); font-weight: 600; }
.dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.done .dot { background: var(--green); border: 0; }
.now .dot { border-color: var(--blue); }
.now .dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.actions { margin: auto 16px 110px; display: flex; gap: 10px; }
.btn { flex: 1; height: 50px; border-radius: 14px; font-size: 14px; font-weight: 700; border: 0; display: flex; align-items: center; justify-content: center; }
.btn.light { background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.btn.dark { flex: 1.3; background: var(--ink); color: #fff; }
.btn.warm { background: var(--grad); color: #fff; }
.btn:disabled { opacity: .4; }

/* drawer & modal */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(21,24,30,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 0; padding: 0; }
.drawer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -20px 60px rgba(21,24,30,.2); animation: ah-up .32s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom, 0px); }
.handle { display: flex; justify-content: center; padding: 10px 0 0; }
.handle span { width: 40px; height: 4px; border-radius: 2px; background: var(--line2); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px 0; }
.drawer-title { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.x { width: 28px; height: 28px; border-radius: 50%; background: var(--card); border: 0; display: flex; align-items: center; justify-content: center; }
.drawer-body { padding: 14px 20px 34px; }
.muted { font-size: 12px; color: var(--mute); }
.card.pick { background: var(--card); }
.card.pick[aria-pressed='true'] { background: #fff; border: 2px solid var(--orange); padding: 7px; }
.card.pick:disabled { opacity: .55; }
.wide { margin-top: 14px; height: 50px; width: 100%; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; border: 0; }
.wide:disabled { opacity: .4; }
.modal-wrap { position: absolute; inset: 0; z-index: 50; background: rgba(21,24,30,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 100%; background: #fff; border-radius: 24px; padding: 24px 20px; animation: ah-pop .25s ease; }
.modal.center { text-align: center; }
.mint-row { display: flex; gap: 12px; margin-top: 14px; }
.mint-pic { width: 90px; height: 90px; border-radius: 14px; background: #f4f1ec; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mint-pic img { width: 84px; height: 84px; object-fit: contain; }
.bill { margin-top: 14px; display: flex; justify-content: space-between; font-size: 13px; padding: 12px 14px; border-radius: 14px; background: var(--card); }
.gold { font-weight: 700; color: var(--gold); }
.row2 { display: flex; gap: 10px; margin-top: 16px; }
.row2 .btn { height: 48px; }

/* home */
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(145deg, #f2803a, #e2725b); color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(242,128,58,.35); padding: 0; }
.search { flex: 1; min-width: 0; height: 36px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12px; color: var(--mute); }
.search b { font-family: var(--serif); font-weight: 700; color: var(--orange); font-size: 13px; white-space: nowrap; }
.search i { width: 1px; height: 14px; background: var(--line2); flex-shrink: 0; }
.search input { border: 0; outline: none; background: none; width: 100%; min-width: 0; font-size: 12px; font-family: inherit; color: var(--ink); }
.round { width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.pills { display: flex; gap: 6px; padding: 10px 16px 0; justify-content: center; font-size: 12px; }
.pill { padding: 6px 14px; border-radius: 999px; white-space: nowrap; background: var(--card); border: 1px solid var(--line); color: var(--ink2); font-size: 12px; }
.pill[aria-current='page'] { background: var(--ink); color: #fff; font-weight: 600; border-color: var(--ink); }
.pill:disabled { opacity: .45; }
.viewport { position: relative; flex: 1; margin: 8px 0 84px; overflow: hidden; background: radial-gradient(90% 60% at 50% 30%, #ffe1c8 0%, #fff4ea 55%, #f3e9f5 100%); }
.viewport.deco { margin: 8px 0 0; background: #f3f5f8; }
.scene-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.float-tl { position: absolute; left: 16px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.float-tr { position: absolute; right: 16px; top: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.plate { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.92); border-radius: 12px; padding: 6px 10px; box-shadow: 0 6px 16px rgba(21,24,30,.08); font-family: var(--serif); font-size: 15px; font-weight: 700; }
.glass { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.92); border-radius: 12px; padding: 5px 10px; font-size: 11px; color: var(--ink2); border: 0; }
.tools { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.tool { width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid rgba(21,24,30,.1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 0; }
.tool.dark { background: var(--ink); border-color: var(--ink); }
.arrival { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.96); border-radius: 14px; padding: 6px 12px 6px 6px; box-shadow: 0 8px 20px rgba(21,24,30,.16); border: 0; text-align: left; max-width: calc(100% - 90px); }
.arrival .pic { width: 40px; height: 40px; border-radius: 10px; background: #f4f1ec; display: flex; align-items: center; justify-content: center; animation: ah-ring 2.6s ease-in-out infinite; flex-shrink: 0; }
.arrival .pic img { width: 36px; height: 36px; object-fit: contain; }
.arrival small { display: block; font-size: 10px; font-weight: 700; color: var(--orange); }
.arrival span { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-chip { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; display: flex; align-items: center; gap: 8px; background: rgba(21,24,30,.88); color: #fff; border-radius: 999px; padding: 6px 12px 6px 8px; font-size: 12px; border: 0; z-index: 5; font-variant-numeric: tabular-nums; }
.job-chip .spin { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255,255,255,.3); border-top-color: #fff; }
.loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* decorate */
.save { padding: 6px 12px; border-radius: 999px; white-space: nowrap; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; border: 0; }
.save:disabled { opacity: .5; }
.deco-tags { position: absolute; left: 16px; top: 12px; display: flex; gap: 6px; }
.deco-tags span, .deco-tags button { background: #fff; border-radius: 10px; padding: 5px 10px; font-size: 11px; border: 0; box-shadow: 0 4px 12px rgba(0,0,0,.08); display: flex; align-items: center; gap: 4px; }
.deco-tags button { color: var(--coral); }
.deco-tags button:disabled { opacity: .45; }
.toolbar { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.toolbar > div { display: flex; gap: 4px; background: var(--ink); color: #fff; border-radius: 10px; padding: 4px; font-size: 11px; pointer-events: auto; }
.toolbar button { padding: 3px 8px; border-radius: 7px; background: none; border: 0; color: #fff; font-size: 11px; display: flex; align-items: center; gap: 3px; }
.toolbar button.on { background: rgba(255,255,255,.14); }
.toolbar button.del { color: #ff8a80; }
.toolbar em { font-style: normal; font-size: 10px; background: #fff; border-radius: 999px; padding: 2px 8px; box-shadow: 0 4px 10px rgba(0,0,0,.1); color: var(--ink); white-space: nowrap; }
.tray { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0; padding: 12px 16px calc(26px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(21,24,30,.08); }
.tray-tabs { display: flex; gap: 6px; font-size: 11px; margin-bottom: 10px; align-items: center; }
.tray-tabs span { padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: var(--ink); color: #fff; }
.tray-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tray-item { flex: 0 0 calc((100% - 32px) / 5); aspect-ratio: 1; border-radius: 12px; background: #f4f1ec; display: flex; align-items: center; justify-content: center; border: 2px solid transparent; padding: 0; position: relative; }
.tray-item[aria-pressed='true'] { border-color: var(--orange); }
.tray-item img { width: 86%; height: 86%; object-fit: contain; }
.tray-item .in { position: absolute; right: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.toast { position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); top: calc(var(--top) + 56px); z-index: 70; background: rgba(21,24,30,.9); color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 999px; white-space: nowrap; animation: ah-pop .25s ease; }

/* me / placeholders */
.list { margin: 12px 16px 100px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.line { display: flex; justify-content: space-between; font-size: 13px; padding: 10px 12px; background: var(--card); border-radius: 12px; }
.soon { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--mute); font-size: 13px; padding-bottom: 84px; }
.sheet-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sheet-list button, .sheet-list div { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--card); border: 0; font-size: 14px; text-align: left; }
.sheet-list div span:last-child { margin-left: auto; color: var(--mute); font-size: 12px; }

@keyframes ah-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ah-breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,128,237,.35); } 50% { box-shadow: 0 0 0 16px rgba(47,128,237,0); } }
@keyframes ah-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,128,58,.45); } 50% { box-shadow: 0 0 0 9px rgba(242,128,58,0); } }
@keyframes ah-spin { to { transform: rotate(360deg); } }
@keyframes ah-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes ah-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* stage 2 · genie hub */
.genie-title { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.streak { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--orange); position: relative; }
.streak.due::after { content: ''; position: absolute; right: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.thread { flex: 1; overflow-y: auto; padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.msg { max-width: 82%; display: flex; flex-direction: column; gap: 6px; }
.msg.me { align-self: flex-end; background: var(--grad); color: #fff; border-radius: 18px 18px 4px 18px; padding: 9px 13px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.msg.ai { align-self: flex-start; }
.bubble { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 9px 13px; font-size: 14px; line-height: 1.6; box-shadow: 0 6px 16px rgba(21,24,30,.06); }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #b3b8c2; animation: ah-dot 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ah-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ref { display: inline-flex; align-items: center; gap: 4px; vertical-align: -6px; margin: 0 2px; padding: 2px 8px 2px 2px; border-radius: 999px; border: 1px solid #f1e2d4; background: #fff7ef; font-size: 12px; font-weight: 600; }
.ref img { width: 20px; height: 20px; object-fit: contain; border-radius: 50%; background: #f4f1ec; }
.card-line { display: flex; align-items: center; gap: 6px; align-self: flex-start; padding: 6px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--ink2); }
.card-line svg { width: 14px; height: 14px; }
.card-line.bad { color: var(--coral); background: #fff4ef; border-color: #ffe0d6; }
.job-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(21,24,30,.06); text-align: left; min-width: 230px; }
.job-pics { display: flex; gap: 2px; }
.job-pics img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #f4f1ec; }
.job-orb { width: 44px; height: 44px; border-radius: 12px; background: #eef3fd; display: flex; align-items: center; justify-content: center; color: var(--blue); }
.job-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.job-meta b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.job-meta small { font-size: 11px; color: var(--mute); display: flex; align-items: center; gap: 4px; }
.spin.sm { width: 12px; height: 12px; border-width: 2px; }
.spin.light { width: 16px; height: 16px; border-color: rgba(255,255,255,.3); border-top-color: #fff; }
.dock { padding: 0 0 96px; }
.dock .chips { padding: 0 16px 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.dock .spell { margin-top: 0; }
.go.send { width: 36px; padding: 0; display: flex; align-items: center; justify-content: center; }
.quest { position: absolute; left: 16px; bottom: 16px; background: rgba(255,255,255,.92); border-radius: 12px; padding: 6px 10px; font-size: 11px; box-shadow: 0 6px 16px rgba(21,24,30,.08); white-space: nowrap; max-width: calc(100% - 90px); overflow: hidden; text-overflow: ellipsis; }
.quest b { color: var(--orange); }
.arrival.up { bottom: 56px; }
.line.rich { justify-content: flex-start; gap: 10px; border: 0; text-align: left; align-items: center; }
.line.rich img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #f4f1ec; flex-shrink: 0; }
.line.rich > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line.rich small { font-size: 11px; display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plus { color: var(--green); font-weight: 700; }

/* composer: text, mic and send on one row */
.spell.inline { display: flex; align-items: flex-end; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 24px; }
.spell.inline textarea { flex: 1; min-height: 24px; max-height: 110px; padding: 6px 0; line-height: 1.5; font-size: 16px; }
.spell.inline .mic { margin-left: 0; flex-shrink: 0; }
.spell.inline .go.send { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; }
.kb .tabs { display: none; }
.kb .dock { padding-bottom: 10px; }
.kb .hero, .kb .section { display: none; }
.spell.inline .attach { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; }
.spell.inline .attach.on { box-shadow: 0 0 0 2px var(--orange) inset; }
.spell.inline .attach:disabled { opacity: .35; }
.photo-chip { position: relative; width: 64px; height: 64px; margin: 0 0 8px 20px; }
.photo-chip img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; box-shadow: 0 6px 16px rgba(21,24,30,.12); }
.photo-chip .x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.msg-photo { align-self: flex-end; width: 132px; height: 132px; flex-shrink: 0; object-fit: cover; background: var(--card); border-radius: 16px; margin-bottom: -4px; box-shadow: 0 6px 16px rgba(21,24,30,.1); }
.scroll.gen { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding-bottom: 100px; -webkit-overflow-scrolling: touch; }
.scroll.gen .actions { margin: auto 16px 0; padding-top: 18px; }
.prop-card { min-width: 250px; }
.prop-card.open { border-color: #f5c9a8; box-shadow: 0 8px 20px rgba(242,122,58,.12); }
.prop-acts { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.prop-acts .x { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--card); color: var(--mute); display: flex; align-items: center; justify-content: center; }
.go.prop { height: 32px; padding: 0 12px; font-size: 12px; background: var(--grad); }
.prop-state { margin-left: auto; font-size: 11px; color: var(--mute); display: flex; align-items: center; gap: 3px; flex-shrink: 0; }

/* growth: level, nine tiers, gold (E2) */
.coin { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe6a3, #e0a93c 60%, #b57d22); box-shadow: inset 0 0 0 1px rgba(150,100,20,.35); vertical-align: -1px; margin-right: 3px; }
.plate.grow { flex-direction: column; align-items: flex-start; gap: 4px; border: 0; text-align: left; font-size: 14px; min-width: 112px; }
.plate.grow b { font-family: var(--sans); font-size: 12px; color: var(--gold); margin-right: 2px; }
.plate.grow small { font-family: var(--sans); font-size: 10px; font-weight: 500; color: var(--mute); }
i.lvbar { display: block; width: 100%; height: 4px; border-radius: 4px; background: var(--line2); overflow: hidden; }
i.lvbar > i { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .6s ease; }
i.lvbar.big { height: 8px; margin-top: 4px; }
.float-tr button.glass { cursor: pointer; }
.coinbtn { border: 0; background: none; padding: 0 0 0 8px; font: inherit; color: var(--ink); }
.wallet2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; font-size: 14px; }
.wallet2 .xchg { display: flex; gap: 6px; margin-left: auto; }
.tiers .tier { display: flex; align-items: center; gap: 10px; }
.tiers .tier > span:first-child { display: flex; flex-direction: column; }
.tiers .tier small { color: var(--mute); font-size: 11px; }
.tiers .tier > :last-child { margin-left: auto; font-size: 12px; }
.tiers .tier.current { background: #fff5ea; box-shadow: inset 0 0 0 1px #f5c79a; }
.tiers .tier.owned { opacity: .6; }
.tiers .tier .now { color: var(--orange); font-weight: 700; }
.btn.mini { flex: 0 0 auto; height: 32px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.drawer.tall { max-height: 86%; display: flex; flex-direction: column; }
.drawer.tall .drawer-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tiers .tier { padding: 9px 12px; }

/* streaming Genie reply (DEC-031) */
.bubble.live .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--orange); animation: ah-blink 1s steps(2) infinite; }
.bubble.working { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13px; }
@keyframes ah-blink { 50% { opacity: 0; } }
