/* ============ tokens ============ */
:root {
  --bg: #fbf6f2; --ink: #3a2e3f; --muted: #8a7b92; --line: #ecdfe4;
  --rose: #e2688a; --rose-deep: #c94f74; --rose-soft: #fbe6ec; --rose-ghost: #fdf3f6;
  --lilac: #a996e0; --lilac-soft: #efeafb; --sage: #7fbba0; --sage-soft: #e6f3ec; --gold: #e3b36a; --gold-soft: #fbf0dc;
  --card: rgba(255,255,255,.82); --shadow: 0 10px 34px rgba(90,60,90,.09); --shadow-sm: 0 4px 14px rgba(90,60,90,.07);
  --r-lg: 24px; --r-md: 16px; --r-sm: 10px; --side: 300px;
  --p: 0; --sy: 0px;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Nunito Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; }
button { font: inherit; cursor: pointer; color: inherit; }
input, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: .78rem; color: var(--muted); }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* ============ animated mesh background ============ */
.mesh { position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 45% at calc(18% + var(--p) * 30%) calc(18% + var(--p) * 40%), rgba(226,104,138,.30), transparent 70%),
    radial-gradient(42% 50% at calc(82% - var(--p) * 25%) calc(28% + var(--p) * 45%), rgba(169,150,224,.34), transparent 70%),
    radial-gradient(45% 45% at calc(55% + var(--p) * 10%) calc(88% - var(--p) * 50%), rgba(127,187,160,.28), transparent 70%),
    radial-gradient(30% 30% at calc(30% - var(--p) * 10%) calc(75% - var(--p) * 30%), rgba(227,179,106,.22), transparent 70%);
  filter: blur(30px) hue-rotate(calc(var(--p) * -25deg)); animation: breathe 18s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1) translate(0, 0) } to { transform: scale(1.08) translate(-1.5%, 1.5%) } }
.petals { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.petals i { position: absolute; display: block; width: var(--s); height: var(--s); border-radius: 50% 50% 50% 0; opacity: .5;
  background: linear-gradient(135deg, rgba(255,255,255,.9), var(--c)); transform: translateY(calc(var(--sy) * var(--depth) * -0.35)) rotate(var(--rot));
  animation: petal var(--d) ease-in-out infinite alternate; animation-delay: var(--delay); }
@keyframes petal { from { margin-top: 0; opacity: .25 } to { margin-top: -30px; opacity: .6 } }

/* ============ shell ============ */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.side { display: flex; flex-direction: column; gap: 14px; padding: 22px 18px; border-right: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.55); backdrop-filter: blur(18px); overflow-y: auto; }
.logo { font-family: var(--serif); font-size: 1.7rem; line-height: 1; }
.logo span { color: var(--rose); }
.logo-sub { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav button { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: transparent; font-weight: 600; color: var(--muted); transition: .15s; text-align: left; }
.nav button:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.nav button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.nav button.active svg { color: var(--rose); }
.nav .badge { margin-left: auto; font-size: .72rem; background: var(--rose-soft); color: var(--rose-deep); border-radius: 999px; padding: 2px 8px; font-weight: 700; }

/* call card */
.callcard { margin-top: auto; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.callcard-top { display: flex; align-items: center; gap: 12px; }
.callcard .name { font-weight: 700; } .callcard .status { font-size: .82rem; color: var(--muted); }
.callcard-text { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.btn-call { justify-content: center; padding: 12px 18px; }
.btn-call svg { width: 18px; height: 18px; }

/* call overlay */
.call { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(58,46,63,.35); backdrop-filter: blur(16px) saturate(1.1); animation: fade .25s ease; }
body.in-call .shell { filter: blur(6px); }
.call-box { width: min(980px, 100%); height: min(640px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 80px rgba(40,20,50,.35); }
.call-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px; color: #fff; text-align: center;
  background: radial-gradient(70% 60% at 30% 20%, rgba(255,255,255,.22), transparent 60%), linear-gradient(160deg, #e2688a 0%, #b57ac9 55%, #7d6bd6 100%); }
.call-orb-wrap { position: relative; width: 150px; height: 150px; display: grid; place-items: center; margin-bottom: 8px; }
.call-orb { width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 2.6rem; color: #fff; cursor: pointer; position: relative; z-index: 2;
  background: linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,.08)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5), 0 20px 50px rgba(0,0,0,.2); transition: transform .3s; }
.call-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); opacity: 0; }
.call[data-mode="listening"] .call-ring, .call[data-mode="connecting"] .call-ring { animation: ripple 2.2s ease-out infinite; }
.call[data-mode="speaking"] .call-ring { animation: ripple 1.1s ease-out infinite; }
.call-ring.r2 { animation-delay: .4s !important } .call-ring.r3 { animation-delay: .8s !important }
.call[data-mode="speaking"] .call-orb { animation: talk .7s ease-in-out infinite; }
.call[data-mode="thinking"] .call-orb { animation: bob 1.6s ease-in-out infinite; opacity: .85; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.call-name { font-family: var(--serif); font-size: 1.7rem; }
.call-status { font-size: .92rem; opacity: .9; min-height: 1.3em; }
.call-timer { font-variant-numeric: tabular-nums; font-size: .85rem; opacity: .75; letter-spacing: .08em; }
.call-controls { display: flex; gap: 22px; margin-top: 14px; }
.cbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: #fff; font-size: .75rem; }
.cbtn svg { width: 56px; height: 56px; padding: 16px; border-radius: 50%; background: rgba(255,255,255,.2); transition: .15s; }
.cbtn:hover svg { background: rgba(255,255,255,.32); }
.cbtn.on svg { background: #fff; color: var(--rose-deep); }
.cbtn.end svg { background: #e0405f; } .cbtn.end:hover svg { background: #c72f4d; }
.call-say { width: 100%; max-width: 360px; margin-top: 16px; }
.call-say input { background: rgba(255,255,255,.92); border-color: transparent; color: var(--ink); }
.call-say input::placeholder { color: var(--muted); }
.call-say .btn { background: #fff; color: var(--rose-deep); box-shadow: none; }
.call-side { display: flex; flex-direction: column; background: #fff; min-height: 0; }
.call-side-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 22px 10px; font-weight: 700; border-bottom: 1px solid var(--line); }
.transcript { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 12px; }
.tline { max-width: 88%; } .tline.user { align-self: flex-end; text-align: right; }
.tline .tw { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 4px 3px; }
.tline .tb { padding: 10px 14px; border-radius: 16px; font-size: .95rem; line-height: 1.5; text-align: left; }
.tline.user .tb { background: var(--rose-soft); border-top-right-radius: 5px; }
.tline.assistant .tb { background: var(--lilac-soft); border-top-left-radius: 5px; }
.tb .w { cursor: pointer; border-radius: 4px; } .tb .w:hover { background: var(--gold-soft); }
.call-side .partial { padding: 8px 22px 16px; }
@media (max-width: 920px) {
  .call { padding: 0; } .call-box { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 100%; border-radius: 0; }
  .call-stage { padding: 22px 18px 16px; } .call-orb-wrap { width: 110px; height: 110px; } .call-orb { width: 88px; height: 88px; font-size: 2rem; }
  .call-say { margin-top: 8px; }
}

/* speaking panel (legacy) */
.talk { margin-top: auto; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.talk-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--serif); font-size: 1.3rem;
  background: linear-gradient(135deg, var(--rose), var(--lilac)); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); position: relative; flex: 0 0 auto; transition: .3s; }
.avatar::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--rose); opacity: 0; }
.avatar[data-mode="listening"]::after { animation: ripple 1.4s ease-out infinite; }
.avatar[data-mode="speaking"] { animation: talk .6s ease-in-out infinite; }
.avatar[data-mode="thinking"] { opacity: .75; }
@keyframes ripple { 0% { transform: scale(.8); opacity: .8 } 100% { transform: scale(1.5); opacity: 0 } }
@keyframes talk { 0%,100% { transform: scale(1) } 50% { transform: scale(1.07) } }
.talk .name { font-weight: 700; }
.talk .status { font-size: .82rem; color: var(--muted); line-height: 1.3; }
.voice-log { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; padding-right: 2px; }
.vline { font-size: .86rem; padding: 7px 11px; border-radius: 12px; line-height: 1.45; }
.vline.user { background: var(--rose-soft); align-self: flex-end; border-bottom-right-radius: 4px; max-width: 92%; }
.vline.assistant { background: var(--lilac-soft); align-self: flex-start; border-bottom-left-radius: 4px; max-width: 96%; }
.partial { font-size: .82rem; color: var(--muted); font-style: italic; min-height: 1.2em; }
.mic-row { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 0; }
.mic { width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep)); box-shadow: 0 10px 22px rgba(201,79,116,.35); transition: transform .15s; }
.mic svg.i { width: 24px; height: 24px; }
.mic:hover { transform: scale(1.05); }
.mic[data-mode="listening"] { background: linear-gradient(135deg, #f0709a, #d93f6e); animation: pulse 1.3s ease-out infinite; }
.mic[data-mode="thinking"], .mic[data-mode="speaking"] { background: linear-gradient(135deg, var(--lilac), #8b78cf); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217,63,110,.45) } 100% { box-shadow: 0 0 0 20px rgba(217,63,110,0) } }
.say-form { display: flex; gap: 6px; }
.say-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: var(--bg); outline: none; font-size: .88rem; }
.say-form input:focus { border-color: var(--rose); }
.logout { border: 0; background: none; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 8px; padding: 6px 12px; }
.logout:hover { color: var(--ink); }

/* main */
.main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 26px 34px 26px; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.main-head .sub { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: .84rem; font-weight: 700; box-shadow: var(--shadow-sm); white-space: nowrap; }
.pill b { color: var(--rose-deep); }
.view { display: none; } .view.active { display: block; flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 20px; animation: fade .25s ease; }
.view-chat.active { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
@keyframes fade { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
.card { background: var(--card); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.9); border-radius: var(--r-lg); box-shadow: var(--shadow); }

/* ============ buttons ============ */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep)); box-shadow: 0 6px 16px rgba(201,79,116,.28); transition: transform .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); } .btn:disabled { opacity: .5; transform: none; cursor: default; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.btn-sm { padding: 7px 13px; font-size: .86rem; }
.btn-icon { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; }

/* ============ chat ============ */
.chat { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; background: rgba(255,255,255,.55); }
.chat-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.chat .messages, .chat .hint, .chat .composer { position: relative; z-index: 1; }
.messages { flex: 1; overflow-y: auto; padding: 26px 28px 10px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.user { align-self: flex-end; align-items: flex-end; } .msg.assistant, .msg.system { align-self: flex-start; }
.who { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 6px 4px; }
.bubble { padding: 13px 17px; border-radius: 18px; line-height: 1.6; word-wrap: break-word; }
.msg.assistant .bubble { background: rgba(255,255,255,.88); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.9); border-top-left-radius: 6px; box-shadow: var(--shadow-sm); }
.msg.user .bubble { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; border-top-right-radius: 6px; }
.msg.system .bubble { background: var(--lilac-soft); border-top-left-radius: 6px; font-size: .92rem; }
.bubble .w { cursor: pointer; border-radius: 4px; transition: background .12s; }
.bubble .w:hover { background: var(--gold-soft); }
.bubble .vocab { display: inline; background: var(--sage-soft); border-radius: 6px; padding: 1px 6px; }
.bubble .vocab i { color: var(--muted); font-style: normal; font-size: .9em; }
.bubble .fix { background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 8px; padding: 5px 11px; margin: 5px 0; font-size: .92em; }
.bubble .li { padding-left: 14px; position: relative; } .bubble .li::before { content: '·'; position: absolute; left: 2px; color: var(--rose); font-weight: 900; }
.bubble .gap { height: 8px; }
.bubble b { font-weight: 700; }
.typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--rose); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s } .typing i:nth-child(3) { animation-delay: .4s }
@keyframes blink { 0%,80%,100% { opacity: .25; transform: translateY(0) } 40% { opacity: 1; transform: translateY(-3px) } }
.hint { text-align: center; font-size: .78rem; color: var(--muted); padding: 4px 0 0; }
.composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 18px 18px; background: linear-gradient(to top, rgba(255,255,255,.75), rgba(255,255,255,0)); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 22px; padding: 12px 16px; background: #fff; outline: none; max-height: 160px; line-height: 1.5; }
.composer textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }

/* popover */
.popover { position: fixed; z-index: 200; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; width: 250px; animation: fade .15s; }
.popover .pw { font-family: var(--serif); font-size: 1.15rem; }
.popover .pq { font-size: .82rem; color: var(--muted); margin: 2px 0 10px; }
.popover .btn { width: 100%; justify-content: center; }
.popover .ok { color: var(--sage); font-weight: 700; font-size: .9rem; }

/* ============ library ============ */
.lib-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.lib-add { display: flex; gap: 8px; flex: 1 1 320px; }
.lib-add input, .lib-search { border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; background: #fff; outline: none; box-shadow: var(--shadow-sm); }
.lib-add input { flex: 1; min-width: 0; } .lib-add input:focus, .lib-search:focus { border-color: var(--rose); }
.lib-search { width: 200px; }
.filters { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.filters button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.filters button.active { background: var(--rose-soft); color: var(--rose-deep); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.wcard { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; position: relative; transition: transform .15s; }
.wcard:hover { transform: translateY(-2px); }
.wcard.known { opacity: .62; }
.wcard .top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wcard .word { font-family: var(--serif); font-size: 1.55rem; }
.wcard .ar { margin-left: auto; font-size: 1rem; color: var(--muted); direction: rtl; }
.pos { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--lilac-soft); color: #6a56b3; }
.pos.noun { background: var(--rose-soft); color: var(--rose-deep); } .pos.verb { background: var(--lilac-soft); color: #6a56b3; }
.pos.adjective { background: var(--sage-soft); color: #3f8a66; } .pos.adverb { background: var(--gold-soft); color: #a3762c; } .pos.phrase { background: #e8eef9; color: #4c6aa8; }
.lvl { font-size: .7rem; font-weight: 700; color: var(--muted); }
.def { font-size: .98rem; }
.ex { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ex li { font-size: .9rem; color: #5c4f63; padding-left: 16px; position: relative; font-style: italic; }
.ex li::before { content: '“'; position: absolute; left: 0; top: -2px; font-family: var(--serif); color: var(--rose); font-size: 1.2rem; }
.wcard .foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; font-size: .78rem; color: var(--muted); }
.wcard .foot .sp { margin-left: auto; display: flex; gap: 6px; }
.wcard .foot button { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.wcard .foot button:hover { color: var(--ink); border-color: var(--rose); }
.wcard .foot button.on { background: var(--sage-soft); color: #3f8a66; border-color: transparent; }
.wcard .mark { position: absolute; top: 14px; right: 16px; color: var(--sage); }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .serif { font-size: 1.4rem; color: var(--ink); margin-bottom: 6px; }

/* card backgrounds: five designs, chosen per word */
.wcard { overflow: hidden; }
.wcard::before { content: attr(data-initial); position: absolute; right: -6px; bottom: -34px; font-family: var(--serif); font-size: 9rem; line-height: 1; font-weight: 600; opacity: .06; pointer-events: none; }
.wcard > * { position: relative; }
.wcard.bg-1 { background: radial-gradient(60% 50% at 100% 0%, rgba(226,104,138,.28), transparent 70%), radial-gradient(1.5px 1.5px at 20px 20px, rgba(226,104,138,.35) 50%, transparent 51%) 0 0 / 22px 22px, linear-gradient(160deg, #fff7f9, #ffe9ef); }
.wcard.bg-2 { background: repeating-linear-gradient(135deg, rgba(169,150,224,.14) 0 2px, transparent 2px 14px), radial-gradient(50% 60% at 0% 100%, rgba(169,150,224,.35), transparent 70%), linear-gradient(160deg, #f6f3ff, #ebe4ff); }
.wcard.bg-3 { background: radial-gradient(circle at 12% 95%, transparent 40px, rgba(127,187,160,.18) 41px, rgba(127,187,160,.18) 44px, transparent 45px, transparent 70px, rgba(127,187,160,.14) 71px, rgba(127,187,160,.14) 74px, transparent 75px, transparent 100px, rgba(127,187,160,.10) 101px, rgba(127,187,160,.10) 104px, transparent 105px), linear-gradient(160deg, #f3faf6, #e2f2ea); }
.wcard.bg-4 { background: repeating-radial-gradient(ellipse at 110% -20%, rgba(227,179,106,.16) 0 3px, transparent 3px 26px), linear-gradient(160deg, #fffaf0, #fdeed4); }
.wcard.bg-5 { background: linear-gradient(rgba(76,106,168,.07) 1px, transparent 1px) 0 0 / 26px 26px, linear-gradient(90deg, rgba(76,106,168,.07) 1px, transparent 1px) 0 0 / 26px 26px, radial-gradient(60% 50% at 100% 100%, rgba(130,160,230,.32), transparent 70%), linear-gradient(160deg, #f4f7ff, #e6edff); }
.wcard.bg-1::before { color: var(--rose-deep) } .wcard.bg-2::before { color: #6a56b3 } .wcard.bg-3::before { color: #3f8a66 } .wcard.bg-4::before { color: #a3762c } .wcard.bg-5::before { color: #4c6aa8 }
.wcard .foot button { background: rgba(255,255,255,.7); }

/* ============ progress ============ */
.pgrid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.pgrid > .card { padding: 24px 26px; }
.hero { display: flex; align-items: center; gap: 22px; }
.ring-wrap { position: relative; width: 132px; height: 132px; flex: 0 0 auto; }
.ring { width: 132px; height: 132px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--rose-soft); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--rose); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label .n { font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.ring-label .c { font-size: .72rem; color: var(--muted); margin-top: 3px; }
.bar { display: grid; grid-template-columns: 96px 1fr 40px; align-items: center; gap: 10px; margin: 8px 0; font-size: .9rem; }
.track { height: 9px; border-radius: 999px; background: var(--rose-ghost); overflow: hidden; }
.fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--lilac), var(--rose)); transition: width 1s ease; }
.summary { background: #fff; border-radius: var(--r-md); padding: 14px 16px; margin: 6px 0 12px; border: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .two ul { margin: 6px 0 0; padding-left: 16px; } .two li { margin: 4px 0; font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .86rem; }
.chip.soft { background: var(--lilac-soft); border-color: transparent; }
.span2 { grid-column: 1 / -1; }
.journey svg { width: 100%; height: 140px; }
.journey .l { fill: none; stroke: var(--rose); stroke-width: 2.5; stroke-linejoin: round; }
.journey .a { fill: url(#jg); opacity: .5; } .journey .d { fill: #fff; stroke: var(--rose); stroke-width: 2; }
.journey .t { fill: var(--rose-deep); font-size: 11px; font-weight: 700; } .journey .g { stroke: var(--line); stroke-dasharray: 3 4; }

/* ============ mobile ============ */
.tabbar { display: none; }
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; height: 100dvh; }
  .side { position: fixed; inset: auto 0 0 0; z-index: 60; max-height: 88dvh; padding-bottom: 28px; border-radius: 24px 24px 0 0; transform: translateY(105%); transition: transform .3s ease; border-right: 0; box-shadow: 0 -10px 40px rgba(90,60,90,.2); }
  body.talk-open .side { transform: none; }
  .side { display: none; }
  .main { padding: 16px 14px 92px; height: 100dvh; }
  h1 { font-size: 1.45rem; } .main-head { margin-bottom: 12px; } .main-head .sub { display: none; }

  .msg { max-width: 92%; } .messages { padding: 18px 14px 8px; }
  .pgrid, .two { grid-template-columns: 1fr; }
  .hero { flex-direction: column; text-align: center; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; background: rgba(255,255,255,.9); backdrop-filter: blur(16px); border-radius: 22px; box-shadow: var(--shadow); padding: 6px; }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px; font-size: .68rem; font-weight: 700; color: var(--muted); }
  .tabbar button.active { color: var(--rose-deep); background: var(--rose-soft); }
  .lib-search { width: 100%; }
}
.talk-close { display: none; border: 0; background: none; margin-left: auto; color: var(--muted); }

/* ============ login ============ */
.login-body { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 540px; padding: 42px 40px 36px; text-align: center; animation: rise .8s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: none } }
.stamp { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--rose), var(--lilac)); color: #fff; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.login-title { font-family: var(--serif); font-size: 2rem; min-height: 1.2em; margin-bottom: 14px; }
.letter p { margin: 9px 0; font-size: 1.06rem; min-height: 1.2em; color: #4d4054; }
.signature { margin: 16px 0 4px; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; text-align: left; animation: rise .6s ease both; }
.login-form label { display: flex; flex-direction: column; gap: 5px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.login-form input { border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; background: #fff; outline: none; font-size: 1rem; letter-spacing: 0; text-transform: none; }
.login-form input:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.login-form .btn { justify-content: center; padding: 14px; font-size: 1rem; margin-top: 4px; }
.login-msg { text-align: center; min-height: 1.4em; margin: 0; font-weight: 700; color: var(--rose-deep); }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline dotted; padding: 6px; font-size: .88rem; }
.shake { animation: shake .5s; } @keyframes shake { 0%,100% { transform: none } 20%,60% { transform: translateX(-8px) } 40%,80% { transform: translateX(8px) } }


/* ============ cinematic chat (video backdrop + liquid glass) ============ */
.liquid-glass { position: relative; overflow: hidden; border: none; background: rgba(255,255,255,.01); background-blend-mode: luminosity; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); box-shadow: inset 0 1px 1px rgba(255,255,255,.1); }
.liquid-glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.15) 20%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,.15) 80%, rgba(255,255,255,.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.chat.obsidian { position: relative; background: #000; border: 0; color: #fff; }
.chat-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; z-index: 0; opacity: 0; pointer-events: none; }
.chat.obsidian::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.75), rgba(0,0,0,.25) 12%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 65%, rgba(0,0,0,.6)), color-mix(in srgb, var(--accent) var(--tint, 0%), transparent); }
.chat-video, .login-video { filter: var(--video-filter, none); }
.login-shade { background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.25) 40%, rgba(0,0,0,.7)), color-mix(in srgb, var(--accent) var(--tint, 0%), transparent); }
.ob-chrome { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 26px; pointer-events: none;
  font-family: 'Inter', var(--sans); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.85); line-height: 1.5; }
.ob-chrome span { text-align: center; } .ob-chrome span:first-child { text-align: left; } .ob-chrome .ob-pill { text-align: right; }
.ob-chrome em { font-style: normal; color: rgba(255,255,255,.5); }
.chat.obsidian .messages, .chat.obsidian .hint, .chat.obsidian .composer { position: relative; z-index: 3; }
.chat.obsidian .messages { padding: 84px 48px 10px; gap: 22px; }
.chat.obsidian .msg { max-width: 62%; }
.chat.obsidian .who { font-family: 'Instrument Serif', serif; font-style: italic; font-size: .95rem; letter-spacing: .02em; text-transform: none; color: rgba(255,255,255,.7); margin: 0 4px 6px; }
.chat.obsidian .bubble { border-radius: 22px; padding: 18px 22px; font-family: 'Inter', var(--sans); font-size: .95rem; line-height: 1.65; font-weight: 400; }
.chat.obsidian .msg.assistant .bubble { color: #fff; background: color-mix(in srgb, var(--accent) var(--bubble-tint, 0%), rgba(10,10,12,.4)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 0; box-shadow: inset 0 1px 1px rgba(255,255,255,.12), 0 20px 50px rgba(0,0,0,.35); }
.chat.obsidian .msg.assistant .bubble::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.12) 25%, rgba(255,255,255,0) 45%, rgba(255,255,255,0) 60%, rgba(255,255,255,.12) 80%, rgba(255,255,255,.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.chat.obsidian .msg.assistant .bubble { position: relative; }
.chat.obsidian .msg.user .bubble { background: color-mix(in srgb, var(--btn-bg) 92%, transparent); color: var(--btn-ink); box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.chat.obsidian .msg.system .bubble { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(10px); }
.chat.obsidian .msg.assistant .bubble a { color: #fff; }
.chat.obsidian .bubble .w:hover { background: rgba(255,255,255,.18); }
.chat.obsidian .msg.user .bubble .w:hover { background: rgba(0,0,0,.08); }
.chat.obsidian .bubble .vocab { background: rgba(227,179,106,.25); color: #f6dcae; }
.chat.obsidian .msg.user .bubble .vocab { background: rgba(255,255,255,.25); color: inherit; }
.chat.obsidian .bubble .vocab i { color: inherit; opacity: .75; }
.chat.obsidian .bubble .fix { background: rgba(255,255,255,.08); border-left: 2px solid #e3b36a; color: #fff; }
.chat.obsidian .bubble .li::before { color: #e3b36a; }
.chat.obsidian .typing i { background: #fff; }
.chat.obsidian .hint { color: rgba(255,255,255,.6); }
.chat.obsidian .composer { padding: 18px 40px 26px; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0)); }
.chat.obsidian .composer textarea { border: 0; border-radius: 999px; padding: 13px 22px; background: rgba(255,255,255,.06); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; box-shadow: inset 0 1px 1px rgba(255,255,255,.14), 0 0 0 1px rgba(255,255,255,.18); font-family: 'Inter', var(--sans); }
.chat.obsidian .composer textarea::placeholder { color: rgba(255,255,255,.45); }
.chat.obsidian .composer textarea:focus { box-shadow: inset 0 1px 1px rgba(255,255,255,.14), 0 0 0 1px rgba(255,255,255,.55); }
.chat.obsidian .btn-icon { background: #fff; color: #000; box-shadow: 0 10px 24px rgba(0,0,0,.35); border-radius: 50%; width: 46px; height: 46px; }
.chat.obsidian .btn-icon svg { color: #000; }
body.chat-full .main { padding: 0; }
body.chat-full .main-head { display: none; }
body.chat-full .view-chat.active { padding: 0; }
body.chat-full .chat.obsidian { border-radius: 0; box-shadow: none; }
@media (max-width: 920px) {
  body.chat-full .main { padding: 0 0 84px; }
  .chat.obsidian .messages { padding: 70px 16px 8px; } .chat.obsidian .msg { max-width: 92%; } .chat.obsidian .composer { padding: 14px 14px 18px; }
  .ob-chrome span:nth-child(2) { display: none; }
}

/* ============================================================
   DARK CINEMATIC THEME (overrides everything above)
   ============================================================ */
:root {
  --accent: #e3b36a;
  --bg: #050506; --bg-2: #15151a; --bg-rgb: 12,12,16; --fg-rgb: 255,255,255; --shade-rgb: 0,0,0;
  --ink: #f4f4f2; --muted: rgba(var(--fg-rgb),.55); --line: rgba(var(--fg-rgb),.12);
  --btn-bg: #fff; --btn-ink: #000; --chat-bg: #000; --chat-ink: #fff;
  --card-grad: linear-gradient(160deg, #101018, #07070a);
  --rose: var(--btn-bg); --rose-deep: var(--btn-bg); --rose-soft: rgba(var(--fg-rgb),.10); --rose-ghost: rgba(var(--fg-rgb),.06);
  --lilac: #bfc6ff; --lilac-soft: rgba(191,198,255,.12); --sage: #9fd8bd; --sage-soft: rgba(159,216,189,.12); --gold: var(--accent); --gold-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --card: rgba(var(--fg-rgb),.045); --shadow: 0 24px 60px rgba(var(--shade-rgb),.5); --shadow-sm: 0 8px 24px rgba(var(--shade-rgb),.35);
  --serif: 'Instrument Serif', Georgia, serif; --sans: 'Inter', system-ui, sans-serif;
}
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; }
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 20% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), radial-gradient(50% 40% at 90% 100%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--bg); }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
h1 { font-size: 2.3rem; } h2 { font-size: 1.6rem; }
.glass, .card, .side, .talk, .callcard, .popover, .tabbar, .filters, .lib-add input, .lib-search, .summary, .pill, .composer textarea { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card { background: var(--card); border: 1px solid rgba(var(--fg-rgb),.08); box-shadow: var(--shadow), inset 0 1px 1px rgba(var(--fg-rgb),.08); }

/* sidebar */
.side { background: rgba(var(--fg-rgb),.035); border-right: 1px solid rgba(var(--fg-rgb),.08); }
.logo { color: var(--ink); } .logo span { color: var(--gold); } .logo-sub { color: var(--muted); }
.nav button { color: var(--muted); } .nav button:hover { background: rgba(var(--fg-rgb),.06); color: var(--ink); }
.nav button.active { background: rgba(var(--fg-rgb),.10); color: var(--ink); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.14); } .nav button.active svg { color: var(--gold); }
.nav .badge { background: rgba(var(--fg-rgb),.14); color: var(--ink); }
.callcard { background: rgba(var(--fg-rgb),.05); border: 1px solid rgba(var(--fg-rgb),.08); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.1); }
.callcard .name { color: var(--ink); }
.avatar { background: linear-gradient(135deg, #2a2a30, #0d0d10); color: var(--ink); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.25), 0 0 0 1px rgba(var(--fg-rgb),.15); font-family: var(--serif); font-style: italic; }
.logout { color: var(--muted); } .logout:hover { color: var(--ink); }

/* buttons */
.btn { background: var(--btn-bg); color: var(--btn-ink); box-shadow: 0 10px 30px rgba(var(--shade-rgb),.35); font-weight: 600; }
.btn:hover { background: color-mix(in srgb, var(--btn-bg) 90%, var(--btn-ink)); }
.btn-ghost { background: rgba(var(--fg-rgb),.06); color: var(--ink); border: 1px solid rgba(var(--fg-rgb),.14); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.12); }
.btn-call { background: var(--btn-bg); color: var(--btn-ink); }
.linkish { color: var(--muted); }

/* header + pill */
.main-head .sub { color: var(--muted); }
.pill { background: rgba(var(--fg-rgb),.06); border: 1px solid rgba(var(--fg-rgb),.12); color: var(--ink); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.1); }
.pill b { color: var(--gold); }

/* library */
.lib-add input, .lib-search { background: rgba(var(--fg-rgb),.06); border: 1px solid rgba(var(--fg-rgb),.12); color: var(--ink); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.1); }
.lib-add input::placeholder, .lib-search::placeholder, .composer textarea::placeholder, .say-form input::placeholder { color: rgba(var(--fg-rgb),.4); }
.lib-add input:focus, .lib-search:focus { border-color: rgba(var(--fg-rgb),.5); }
.filters { background: rgba(var(--fg-rgb),.06); border: 1px solid rgba(var(--fg-rgb),.12); }
.filters button { color: var(--muted); } .filters button.active { background: var(--btn-bg); color: var(--btn-ink); }
.wcard { color: var(--ink); }
.wcard.bg-1, .wcard.bg-2, .wcard.bg-3, .wcard.bg-4, .wcard.bg-5 { background: var(--card); }
.wcard.bg-1 { background: radial-gradient(70% 60% at 100% 0%, rgba(227,179,106,.22), transparent 70%), var(--card); }
.wcard.bg-2 { background: radial-gradient(70% 60% at 0% 100%, rgba(140,160,255,.22), transparent 70%), var(--card); }
.wcard.bg-3 { background: radial-gradient(70% 60% at 100% 100%, rgba(159,216,189,.20), transparent 70%), var(--card); }
.wcard.bg-4 { background: radial-gradient(70% 60% at 0% 0%, rgba(var(--fg-rgb),.14), transparent 70%), var(--card); }
.wcard.bg-5 { background: radial-gradient(70% 60% at 50% 120%, rgba(226,120,150,.20), transparent 70%), var(--card); }
.wcard::before { color: var(--ink); opacity: .05; }
.wcard .word { font-family: var(--serif); font-size: 1.8rem; }
.wcard .ar, .wcard .lvl, .wcard .foot, .ex li { color: var(--muted); }
.def { color: rgba(var(--fg-rgb),.9); }
.ex li::before { color: var(--gold); }
.pos { background: rgba(var(--fg-rgb),.12); color: var(--ink); }
.pos.noun { background: rgba(226,120,150,.22); color: #ffd0dd; } .pos.verb { background: rgba(140,160,255,.22); color: #d5dbff; }
.pos.adjective { background: rgba(159,216,189,.22); color: #cdeedd; } .pos.adverb { background: rgba(227,179,106,.22); color: #f6dcae; } .pos.phrase { background: rgba(var(--fg-rgb),.14); color: var(--ink); }
.wcard .foot button { background: rgba(var(--fg-rgb),.06); border-color: rgba(var(--fg-rgb),.14); color: var(--muted); }
.wcard .foot button:hover { color: var(--ink); border-color: rgba(var(--fg-rgb),.5); }
.wcard .foot button.on { background: rgba(159,216,189,.2); color: #cdeedd; }
.wcard .mark { color: var(--sage); }
.empty .serif { color: var(--ink); }

/* progress */
.ring-bg { stroke: rgba(var(--fg-rgb),.1); } .ring-fg { stroke: #fff; }
.track { background: rgba(var(--fg-rgb),.08); } .fill { background: linear-gradient(90deg, rgba(var(--fg-rgb),.7), var(--gold)); }
.summary { background: rgba(var(--fg-rgb),.05); border: 1px solid rgba(var(--fg-rgb),.1); }
.chip { background: rgba(var(--fg-rgb),.06); border: 1px solid rgba(var(--fg-rgb),.12); color: var(--ink); } .chip.soft { background: rgba(var(--fg-rgb),.08); }
.journey .l { stroke: #fff; } .journey .d { fill: var(--bg); stroke: #fff; } .journey .t { fill: var(--gold); } .journey .g { stroke: rgba(var(--fg-rgb),.2); }
.hero { background: var(--card); }

/* popover */
.popover { background: rgba(var(--bg-rgb),.85); border: 1px solid rgba(var(--fg-rgb),.14); color: var(--ink); box-shadow: var(--shadow), inset 0 1px 1px rgba(var(--fg-rgb),.1); }
.popover .pq { color: var(--muted); } .popover .ok { color: var(--sage); }

/* call overlay */
.call { background: rgba(var(--shade-rgb),.55); }
.call-box { box-shadow: 0 40px 100px rgba(var(--shade-rgb),.7); border: 1px solid rgba(var(--fg-rgb),.1); }
.call-stage { background: radial-gradient(70% 60% at 30% 20%, rgba(140,160,255,.18), transparent 60%), radial-gradient(60% 50% at 80% 100%, rgba(227,179,106,.16), transparent 60%), linear-gradient(160deg, var(--bg-2), var(--bg)); }
.call-orb { background: linear-gradient(135deg, rgba(var(--fg-rgb),.18), rgba(var(--fg-rgb),.04)); box-shadow: inset 0 0 0 1px rgba(var(--fg-rgb),.35), 0 20px 50px rgba(var(--shade-rgb),.5); font-style: italic; }
.call-ring { border-color: rgba(var(--fg-rgb),.4); }
.cbtn svg { background: rgba(var(--fg-rgb),.12); } .cbtn:hover svg { background: rgba(var(--fg-rgb),.22); }
.cbtn.on svg { background: var(--btn-bg); color: var(--btn-ink); }
.cbtn.end svg { background: #e0405f; }
.call-say input { background: rgba(var(--fg-rgb),.08); border: 1px solid rgba(var(--fg-rgb),.16); color: var(--ink); }
.call-say .btn { background: var(--btn-bg); color: var(--btn-ink); }
.call-side { background: rgba(var(--bg-rgb),.92); color: var(--ink); }
.call-side-head { border-bottom: 1px solid rgba(var(--fg-rgb),.1); }
.tline .tw { color: var(--muted); }
.tline.user .tb { background: rgba(var(--fg-rgb),.9); color: var(--btn-ink); }
.tline.assistant .tb { background: rgba(var(--fg-rgb),.08); color: var(--ink); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.1); }
.tb .w:hover { background: rgba(var(--fg-rgb),.18); } .tline.user .tb .w:hover { background: rgba(var(--shade-rgb),.08); }

/* mobile tab bar */
.tabbar { background: rgba(var(--bg-rgb),.85); border: 1px solid rgba(var(--fg-rgb),.1); }
.tabbar button { color: var(--muted); } .tabbar button.active { color: var(--btn-ink); background: var(--btn-bg); }

/* login */
.login-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; z-index: 0; opacity: 0; }
.login-shade { position: fixed; inset: 0; z-index: 0; background: linear-gradient(to bottom, rgba(var(--shade-rgb),.55), rgba(var(--shade-rgb),.25) 40%, rgba(var(--shade-rgb),.7)); }
.login-card { background: rgba(var(--bg-rgb),.55); border: 1px solid rgba(var(--fg-rgb),.12); box-shadow: 0 40px 100px rgba(var(--shade-rgb),.6), inset 0 1px 1px rgba(var(--fg-rgb),.12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--ink); }
.stamp { background: rgba(var(--fg-rgb),.1); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.3), 0 0 0 1px rgba(var(--fg-rgb),.2); }
.login-title { font-family: var(--serif); font-weight: 400; font-size: 2.4rem; }
.letter p { color: rgba(var(--fg-rgb),.85); font-size: 1.05rem; }
.signature { color: var(--muted); }
.login-form label { color: var(--muted); }
.login-form input { background: rgba(var(--fg-rgb),.06); border: 1px solid rgba(var(--fg-rgb),.14); color: var(--ink); box-shadow: inset 0 1px 1px rgba(var(--fg-rgb),.1); }
.login-form input:focus { border-color: rgba(var(--fg-rgb),.5); box-shadow: none; }
.login-msg { color: var(--gold); }

/* ============ library card designs (dark) ============ */
.wcard { border: 1px solid rgba(var(--fg-rgb),.10); }
.wcard::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--fg-rgb),.4), rgba(var(--fg-rgb),.08) 30%, rgba(var(--fg-rgb),0) 55%, rgba(var(--fg-rgb),.18));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.wcard::before { font-size: 11rem; opacity: .07; right: -10px; bottom: -44px; }
/* 1 · aurora: violet + blue veils with fine diagonal hatching */
.wcard.bg-1 { background:
  repeating-linear-gradient(135deg, rgba(var(--fg-rgb),.035) 0 1px, transparent 1px 12px),
  radial-gradient(90% 70% at 100% 0%, rgba(120,140,255,.38), transparent 60%),
  radial-gradient(70% 60% at 0% 100%, rgba(190,120,255,.28), transparent 60%),
  var(--card-grad); }
.wcard.bg-1::before { color: #b9c4ff; }
/* 2 · starfield: scattered stars and a warm gold nebula */
.wcard.bg-2 { background:
  radial-gradient(1.4px 1.4px at 12% 18%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 28% 62%, #fff 60%, transparent 61%),
  radial-gradient(1.8px 1.8px at 44% 30%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 58% 78%, #fff 60%, transparent 61%),
  radial-gradient(1.4px 1.4px at 70% 14%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 82% 48%, #fff 60%, transparent 61%),
  radial-gradient(2px 2px at 90% 84%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 20% 88%, #fff 60%, transparent 61%),
  radial-gradient(1.2px 1.2px at 36% 8%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 64% 54%, #fff 60%, transparent 61%),
  radial-gradient(1.6px 1.6px at 6% 46%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 50% 94%, #fff 60%, transparent 61%),
  radial-gradient(80% 60% at 80% 100%, rgba(227,179,106,.34), transparent 60%),
  radial-gradient(60% 50% at 10% 0%, rgba(120,140,255,.22), transparent 60%),
  var(--card-grad); }
.wcard.bg-2::before { color: #f6dcae; }
/* 3 · contour: gold topographic rings */
.wcard.bg-3 { background:
  repeating-radial-gradient(circle at 110% 110%, rgba(227,179,106,.22) 0 1.2px, transparent 1.2px 26px),
  radial-gradient(70% 70% at 110% 110%, rgba(227,179,106,.30), transparent 65%),
  var(--card-grad); }
.wcard.bg-3::before { color: #e3b36a; }
/* 4 · blueprint: fine grid with a sage corner light */
.wcard.bg-4 { background:
  linear-gradient(rgba(var(--fg-rgb),.06) 1px, transparent 1px) 0 0 / 22px 22px,
  linear-gradient(90deg, rgba(var(--fg-rgb),.06) 1px, transparent 1px) 0 0 / 22px 22px,
  radial-gradient(80% 70% at 0% 0%, rgba(159,216,189,.34), transparent 60%),
  var(--card-grad); }
.wcard.bg-4::before { color: #cdeedd; }
/* 5 · silk: soft diagonal bands with a rose light */
.wcard.bg-5 { background:
  repeating-linear-gradient(115deg, rgba(var(--fg-rgb),0) 0 18px, rgba(var(--fg-rgb),.05) 18px 36px, rgba(var(--fg-rgb),0) 36px 70px),
  radial-gradient(80% 70% at 50% 120%, rgba(226,120,150,.36), transparent 60%),
  radial-gradient(50% 40% at 100% 0%, rgba(var(--fg-rgb),.10), transparent 60%),
  var(--card-grad); }
.wcard.bg-5::before { color: #ffd0dd; }

/* ============ photo cards ============ */
.lib-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.wcard.photo { min-height: 500px; padding-top: 250px; justify-content: flex-end; background: #0a0a0d; }
.wcard.photo .photo-layer { position: absolute; inset: 0; z-index: 0; background: var(--photo) center 30% / cover no-repeat;
  -webkit-mask: linear-gradient(to bottom, #000 0, #000 34%, rgba(var(--shade-rgb),.55) 52%, transparent 74%); mask: linear-gradient(to bottom, #000 0, #000 34%, rgba(var(--shade-rgb),.55) 52%, transparent 74%); transition: transform .6s ease; }
.wcard.photo:hover .photo-layer { transform: scale(1.04); }
.wcard.photo::before { display: none; }
.wcard.photo .top { margin-top: auto; }
.wcard.photo .word { font-size: 2rem; text-shadow: 0 2px 14px rgba(var(--shade-rgb),.6); }
.wcard.photo .def { color: rgba(var(--fg-rgb),.92); }
.wcard.photo.known .photo-layer { filter: grayscale(.6); }
@media (max-width: 920px) { .lib-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .wcard.photo { min-height: 420px; padding-top: 180px; } .wcard { padding: 16px; } .wcard.photo .word { font-size: 1.5rem; } }
@media (max-width: 560px) { .lib-grid { grid-template-columns: 1fr; } }

/* ============ library card designs v3: from the video's world ============ */
.wcard.bg-1, .wcard.bg-2, .wcard.bg-3, .wcard.bg-4, .wcard.bg-5 { background-repeat: no-repeat; }
.wcard.bg-1 { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 400 400%22%3E%3Ccircle cx=%22268%22 cy=%22260%22 r=%221.4%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%22271%22 cy=%22261%22 r=%222.0%22 fill=%22white%22 opacity=%220.24%22/%3E%3Ccircle cx=%22274%22 cy=%22261%22 r=%221.8%22 fill=%22white%22 opacity=%220.40%22/%3E%3Ccircle cx=%22277%22 cy=%22262%22 r=%220.9%22 fill=%22white%22 opacity=%220.48%22/%3E%3Ccircle cx=%22280%22 cy=%22264%22 r=%220.9%22 fill=%22white%22 opacity=%220.44%22/%3E%3Ccircle cx=%22282%22 cy=%22265%22 r=%220.9%22 fill=%22white%22 opacity=%220.25%22/%3E%3Ccircle cx=%22284%22 cy=%22266%22 r=%221.6%22 fill=%22white%22 opacity=%220.65%22/%3E%3Ccircle cx=%22287%22 cy=%22268%22 r=%221.0%22 fill=%22white%22 opacity=%220.32%22/%3E%3Ccircle cx=%22288%22 cy=%22270%22 r=%221.9%22 fill=%22white%22 opacity=%220.72%22/%3E%3Ccircle cx=%22290%22 cy=%22272%22 r=%221.8%22 fill=%22white%22 opacity=%220.42%22/%3E%3Ccircle cx=%22291%22 cy=%22274%22 r=%222.6%22 fill=%22white%22 opacity=%220.23%22/%3E%3Ccircle cx=%22292%22 cy=%22276%22 r=%222.3%22 fill=%22white%22 opacity=%220.36%22/%3E%3Ccircle cx=%22292%22 cy=%22278%22 r=%221.1%22 fill=%22white%22 opacity=%220.26%22/%3E%3Ccircle cx=%22292%22 cy=%22281%22 r=%221.4%22 fill=%22white%22 opacity=%220.65%22/%3E%3Ccircle cx=%22291%22 cy=%22283%22 r=%221.1%22 fill=%22white%22 opacity=%220.52%22/%3E%3Ccircle cx=%22290%22 cy=%22286%22 r=%222.0%22 fill=%22white%22 opacity=%220.40%22/%3E%3Ccircle cx=%22289%22 cy=%22288%22 r=%221.8%22 fill=%22white%22 opacity=%220.23%22/%3E%3Ccircle cx=%22287%22 cy=%22290%22 r=%220.9%22 fill=%22white%22 opacity=%220.31%22/%3E%3Ccircle cx=%22285%22 cy=%22293%22 r=%222.0%22 fill=%22white%22 opacity=%220.44%22/%3E%3Ccircle cx=%22282%22 cy=%22295%22 r=%221.4%22 fill=%22white%22 opacity=%220.52%22/%3E%3Ccircle cx=%22279%22 cy=%22298%22 r=%221.6%22 fill=%22white%22 opacity=%220.36%22/%3E%3Ccircle cx=%22276%22 cy=%22300%22 r=%222.2%22 fill=%22white%22 opacity=%220.58%22/%3E%3Ccircle cx=%22272%22 cy=%22302%22 r=%221.2%22 fill=%22white%22 opacity=%220.52%22/%3E%3Ccircle cx=%22267%22 cy=%22304%22 r=%221.7%22 fill=%22white%22 opacity=%220.68%22/%3E%3Ccircle cx=%22262%22 cy=%22306%22 r=%222.1%22 fill=%22white%22 opacity=%220.36%22/%3E%3Ccircle cx=%22257%22 cy=%22308%22 r=%222.6%22 fill=%22white%22 opacity=%220.26%22/%3E%3Ccircle cx=%22251%22 cy=%22310%22 r=%221.6%22 fill=%22white%22 opacity=%220.62%22/%3E%3Ccircle cx=%22245%22 cy=%22311%22 r=%221.1%22 fill=%22white%22 opacity=%220.47%22/%3E%3Ccircle cx=%22238%22 cy=%22313%22 r=%220.9%22 fill=%22white%22 opacity=%220.57%22/%3E%3Ccircle cx=%22232%22 cy=%22314%22 r=%222.2%22 fill=%22white%22 opacity=%220.52%22/%3E%3Ccircle cx=%22224%22 cy=%22315%22 r=%222.4%22 fill=%22white%22 opacity=%220.37%22/%3E%3Ccircle cx=%22217%22 cy=%22315%22 r=%222.1%22 fill=%22white%22 opacity=%220.53%22/%3E%3Ccircle cx=%22209%22 cy=%22316%22 r=%221.8%22 fill=%22white%22 opacity=%220.45%22/%3E%3Ccircle cx=%22202%22 cy=%22316%22 r=%222.3%22 fill=%22white%22 opacity=%220.72%22/%3E%3Ccircle cx=%22194%22 cy=%22316%22 r=%221.7%22 fill=%22white%22 opacity=%220.57%22/%3E%3Ccircle cx=%22185%22 cy=%22315%22 r=%220.9%22 fill=%22white%22 opacity=%220.59%22/%3E%3Ccircle cx=%22177%22 cy=%22315%22 r=%222.0%22 fill=%22white%22 opacity=%220.75%22/%3E%3Ccircle cx=%22169%22 cy=%22313%22 r=%222.3%22 fill=%22white%22 opacity=%220.36%22/%3E%3Ccircle cx=%22161%22 cy=%22312%22 r=%221.5%22 fill=%22white%22 opacity=%220.57%22/%3E%3Ccircle cx=%22152%22 cy=%22310%22 r=%220.8%22 fill=%22white%22 opacity=%220.45%22/%3E%3Ccircle cx=%22144%22 cy=%22309%22 r=%221.1%22 fill=%22white%22 opacity=%220.26%22/%3E%3Ccircle cx=%22136%22 cy=%22306%22 r=%220.9%22 fill=%22white%22 opacity=%220.62%22/%3E%3Ccircle cx=%22128%22 cy=%22304%22 r=%221.0%22 fill=%22white%22 opacity=%220.34%22/%3E%3Ccircle cx=%22120%22 cy=%22301%22 r=%221.5%22 fill=%22white%22 opacity=%220.68%22/%3E%3Ccircle cx=%22113%22 cy=%22298%22 r=%220.9%22 fill=%22white%22 opacity=%220.45%22/%3E%3Ccircle cx=%22106%22 cy=%22294%22 r=%221.8%22 fill=%22white%22 opacity=%220.69%22/%3E%3Ccircle cx=%2299%22 cy=%22290%22 r=%222.3%22 fill=%22white%22 opacity=%220.68%22/%3E%3Ccircle cx=%2293%22 cy=%22286%22 r=%221.3%22 fill=%22white%22 opacity=%220.43%22/%3E%3Ccircle cx=%2287%22 cy=%22282%22 r=%221.4%22 fill=%22white%22 opacity=%220.69%22/%3E%3Ccircle cx=%2281%22 cy=%22277%22 r=%222.5%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%2277%22 cy=%22272%22 r=%221.1%22 fill=%22white%22 opacity=%220.33%22/%3E%3Ccircle cx=%2272%22 cy=%22267%22 r=%221.2%22 fill=%22white%22 opacity=%220.47%22/%3E%3Ccircle cx=%2269%22 cy=%22262%22 r=%221.9%22 fill=%22white%22 opacity=%220.34%22/%3E%3Ccircle cx=%2266%22 cy=%22256%22 r=%220.8%22 fill=%22white%22 opacity=%220.43%22/%3E%3Ccircle cx=%2263%22 cy=%22251%22 r=%221.5%22 fill=%22white%22 opacity=%220.51%22/%3E%3Ccircle cx=%2262%22 cy=%22245%22 r=%222.5%22 fill=%22white%22 opacity=%220.58%22/%3E%3Ccircle cx=%2261%22 cy=%22239%22 r=%221.7%22 fill=%22white%22 opacity=%220.54%22/%3E%3Ccircle cx=%2260%22 cy=%22233%22 r=%222.0%22 fill=%22white%22 opacity=%220.23%22/%3E%3Ccircle cx=%2261%22 cy=%22227%22 r=%222.4%22 fill=%22white%22 opacity=%220.63%22/%3E%3Ccircle cx=%2263%22 cy=%22221%22 r=%222.4%22 fill=%22white%22 opacity=%220.64%22/%3E%3Ccircle cx=%2265%22 cy=%22214%22 r=%221.5%22 fill=%22white%22 opacity=%220.42%22/%3E%3Ccircle cx=%2268%22 cy=%22208%22 r=%221.0%22 fill=%22white%22 opacity=%220.55%22/%3E%3Ccircle cx=%2272%22 cy=%22202%22 r=%220.9%22 fill=%22white%22 opacity=%220.24%22/%3E%3Ccircle cx=%2277%22 cy=%22196%22 r=%221.2%22 fill=%22white%22 opacity=%220.29%22/%3E%3Ccircle cx=%2282%22 cy=%22190%22 r=%221.4%22 fill=%22white%22 opacity=%220.23%22/%3E%3Ccircle cx=%2289%22 cy=%22184%22 r=%220.8%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%2296%22 cy=%22178%22 r=%221.0%22 fill=%22white%22 opacity=%220.40%22/%3E%3Ccircle cx=%22104%22 cy=%22172%22 r=%220.8%22 fill=%22white%22 opacity=%220.68%22/%3E%3Ccircle cx=%22113%22 cy=%22167%22 r=%221.9%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%22123%22 cy=%22161%22 r=%221.3%22 fill=%22white%22 opacity=%220.39%22/%3E%3Ccircle cx=%22232%22 cy=%22260%22 r=%221.5%22 fill=%22white%22 opacity=%220.27%22/%3E%3Ccircle cx=%22229%22 cy=%22259%22 r=%222.3%22 fill=%22white%22 opacity=%220.75%22/%3E%3Ccircle cx=%22226%22 cy=%22259%22 r=%221.6%22 fill=%22white%22 opacity=%220.47%22/%3E%3Ccircle cx=%22223%22 cy=%22258%22 r=%221.0%22 fill=%22white%22 opacity=%220.26%22/%3E%3Ccircle cx=%22220%22 cy=%22256%22 r=%221.4%22 fill=%22white%22 opacity=%220.35%22/%3E%3Ccircle cx=%22218%22 cy=%22255%22 r=%222.3%22 fill=%22white%22 opacity=%220.29%22/%3E%3Ccircle cx=%22216%22 cy=%22254%22 r=%220.8%22 fill=%22white%22 opacity=%220.72%22/%3E%3Ccircle cx=%22213%22 cy=%22252%22 r=%221.8%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%22212%22 cy=%22250%22 r=%221.8%22 fill=%22white%22 opacity=%220.21%22/%3E%3Ccircle cx=%22210%22 cy=%22248%22 r=%221.8%22 fill=%22white%22 opacity=%220.74%22/%3E%3Ccircle cx=%22209%22 cy=%22246%22 r=%222.4%22 fill=%22white%22 opacity=%220.58%22/%3E%3Ccircle cx=%22208%22 cy=%22244%22 r=%221.3%22 fill=%22white%22 opacity=%220.40%22/%3E%3Ccircle cx=%22208%22 cy=%22242%22 r=%221.1%22 fill=%22white%22 opacity=%220.62%22/%3E%3Ccircle cx=%22208%22 cy=%22239%22 r=%221.8%22 fill=%22white%22 opacity=%220.63%22/%3E%3Ccircle cx=%22209%22 cy=%22237%22 r=%221.4%22 fill=%22white%22 opacity=%220.32%22/%3E%3Ccircle cx=%22210%22 cy=%22234%22 r=%222.3%22 fill=%22white%22 opacity=%220.74%22/%3E%3Ccircle cx=%22211%22 cy=%22232%22 r=%222.3%22 fill=%22white%22 opacity=%220.64%22/%3E%3Ccircle cx=%22213%22 cy=%22230%22 r=%222.3%22 fill=%22white%22 opacity=%220.61%22/%3E%3Ccircle cx=%22215%22 cy=%22227%22 r=%221.2%22 fill=%22white%22 opacity=%220.48%22/%3E%3Ccircle cx=%22218%22 cy=%22225%22 r=%221.4%22 fill=%22white%22 opacity=%220.22%22/%3E%3Ccircle cx=%22221%22 cy=%22222%22 r=%220.9%22 fill=%22white%22 opacity=%220.35%22/%3E%3Ccircle cx=%22224%22 cy=%22220%22 r=%221.3%22 fill=%22white%22 opacity=%220.58%22/%3E%3Ccircle cx=%22228%22 cy=%22218%22 r=%222.5%22 fill=%22white%22 opacity=%220.45%22/%3E%3Ccircle cx=%22233%22 cy=%22216%22 r=%222.5%22 fill=%22white%22 opacity=%220.74%22/%3E%3Ccircle cx=%22238%22 cy=%22214%22 r=%222.5%22 fill=%22white%22 opacity=%220.40%22/%3E%3Ccircle cx=%22243%22 cy=%22212%22 r=%221.2%22 fill=%22white%22 opacity=%220.32%22/%3E%3Ccircle cx=%22249%22 cy=%22210%22 r=%221.2%22 fill=%22white%22 opacity=%220.31%22/%3E%3Ccircle cx=%22255%22 cy=%22209%22 r=%221.9%22 fill=%22white%22 opacity=%220.70%22/%3E%3Ccircle cx=%22262%22 cy=%22207%22 r=%222.3%22 fill=%22white%22 opacity=%220.46%22/%3E%3Ccircle cx=%22268%22 cy=%22206%22 r=%222.0%22 fill=%22white%22 opacity=%220.64%22/%3E%3Ccircle cx=%22276%22 cy=%22205%22 r=%221.0%22 fill=%22white%22 opacity=%220.56%22/%3E%3Ccircle cx=%22283%22 cy=%22205%22 r=%222.4%22 fill=%22white%22 opacity=%220.63%22/%3E%3Ccircle cx=%22291%22 cy=%22204%22 r=%222.2%22 fill=%22white%22 opacity=%220.46%22/%3E%3Ccircle cx=%22298%22 cy=%22204%22 r=%221.1%22 fill=%22white%22 opacity=%220.63%22/%3E%3Ccircle cx=%22306%22 cy=%22204%22 r=%221.4%22 fill=%22white%22 opacity=%220.64%22/%3E%3Ccircle cx=%22315%22 cy=%22205%22 r=%222.5%22 fill=%22white%22 opacity=%220.42%22/%3E%3Ccircle cx=%22323%22 cy=%22205%22 r=%221.5%22 fill=%22white%22 opacity=%220.72%22/%3E%3Ccircle cx=%22331%22 cy=%22207%22 r=%222.1%22 fill=%22white%22 opacity=%220.29%22/%3E%3Ccircle cx=%22339%22 cy=%22208%22 r=%221.0%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%22348%22 cy=%22210%22 r=%222.4%22 fill=%22white%22 opacity=%220.64%22/%3E%3Ccircle cx=%22356%22 cy=%22211%22 r=%221.1%22 fill=%22white%22 opacity=%220.65%22/%3E%3Ccircle cx=%22364%22 cy=%22214%22 r=%222.6%22 fill=%22white%22 opacity=%220.56%22/%3E%3Ccircle cx=%22372%22 cy=%22216%22 r=%221.4%22 fill=%22white%22 opacity=%220.50%22/%3E%3Ccircle cx=%22380%22 cy=%22219%22 r=%221.0%22 fill=%22white%22 opacity=%220.21%22/%3E%3Ccircle cx=%22387%22 cy=%22222%22 r=%222.5%22 fill=%22white%22 opacity=%220.56%22/%3E%3Ccircle cx=%22394%22 cy=%22226%22 r=%221.7%22 fill=%22white%22 opacity=%220.71%22/%3E%3Ccircle cx=%22401%22 cy=%22230%22 r=%221.6%22 fill=%22white%22 opacity=%220.68%22/%3E%3Ccircle cx=%22407%22 cy=%22234%22 r=%222.3%22 fill=%22white%22 opacity=%220.32%22/%3E%3Ccircle cx=%22413%22 cy=%22238%22 r=%221.3%22 fill=%22white%22 opacity=%220.36%22/%3E%3Ccircle cx=%22419%22 cy=%22243%22 r=%221.2%22 fill=%22white%22 opacity=%220.52%22/%3E%3Ccircle cx=%22423%22 cy=%22248%22 r=%221.3%22 fill=%22white%22 opacity=%220.43%22/%3E%3Ccircle cx=%22428%22 cy=%22253%22 r=%221.0%22 fill=%22white%22 opacity=%220.70%22/%3E%3Ccircle cx=%22431%22 cy=%22258%22 r=%221.4%22 fill=%22white%22 opacity=%220.45%22/%3E%3Ccircle cx=%22434%22 cy=%22264%22 r=%221.9%22 fill=%22white%22 opacity=%220.70%22/%3E%3Ccircle cx=%22437%22 cy=%22269%22 r=%221.6%22 fill=%22white%22 opacity=%220.70%22/%3E%3Ccircle cx=%22438%22 cy=%22275%22 r=%221.7%22 fill=%22white%22 opacity=%220.49%22/%3E%3Ccircle cx=%22439%22 cy=%22281%22 r=%221.7%22 fill=%22white%22 opacity=%220.21%22/%3E%3Ccircle cx=%22440%22 cy=%22287%22 r=%221.6%22 fill=%22white%22 opacity=%220.30%22/%3E%3Ccircle cx=%22439%22 cy=%22293%22 r=%220.8%22 fill=%22white%22 opacity=%220.64%22/%3E%3Ccircle cx=%22437%22 cy=%22299%22 r=%221.1%22 fill=%22white%22 opacity=%220.46%22/%3E%3Ccircle cx=%22435%22 cy=%22306%22 r=%222.1%22 fill=%22white%22 opacity=%220.51%22/%3E%3Ccircle cx=%22432%22 cy=%22312%22 r=%221.4%22 fill=%22white%22 opacity=%220.49%22/%3E%3Ccircle cx=%22428%22 cy=%22318%22 r=%221.8%22 fill=%22white%22 opacity=%220.63%22/%3E%3Ccircle cx=%22423%22 cy=%22324%22 r=%221.0%22 fill=%22white%22 opacity=%220.51%22/%3E%3Ccircle cx=%22418%22 cy=%22330%22 r=%221.2%22 fill=%22white%22 opacity=%220.35%22/%3E%3Ccircle cx=%22411%22 cy=%22336%22 r=%222.2%22 fill=%22white%22 opacity=%220.48%22/%3E%3Ccircle cx=%22404%22 cy=%22342%22 r=%221.8%22 fill=%22white%22 opacity=%220.62%22/%3E%3Ccircle cx=%22396%22 cy=%22348%22 r=%222.4%22 fill=%22white%22 opacity=%220.44%22/%3E%3Ccircle cx=%22387%22 cy=%22353%22 r=%221.9%22 fill=%22white%22 opacity=%220.48%22/%3E%3Ccircle cx=%22377%22 cy=%22359%22 r=%221.7%22 fill=%22white%22 opacity=%220.58%22/%3E%3Ccircle cx=%22181%22 cy=%22213%22 r=%221.1%22 fill=%22white%22 opacity=%220.43%22/%3E%3Ccircle cx=%22280%22 cy=%22351%22 r=%221.5%22 fill=%22white%22 opacity=%220.19%22/%3E%3Ccircle cx=%22224%22 cy=%22377%22 r=%221.4%22 fill=%22white%22 opacity=%220.15%22/%3E%3Ccircle cx=%2249%22 cy=%22177%22 r=%220.7%22 fill=%22white%22 opacity=%220.18%22/%3E%3Ccircle cx=%2229%22 cy=%22268%22 r=%221.4%22 fill=%22white%22 opacity=%220.41%22/%3E%3Ccircle cx=%2262%22 cy=%22286%22 r=%221.3%22 fill=%22white%22 opacity=%220.15%22/%3E%3Ccircle cx=%22353%22 cy=%22387%22 r=%220.8%22 fill=%22white%22 opacity=%220.43%22/%3E%3Ccircle cx=%22159%22 cy=%22195%22 r=%221.6%22 fill=%22white%22 opacity=%220.39%22/%3E%3Ccircle cx=%2265%22 cy=%22173%22 r=%221.1%22 fill=%22white%22 opacity=%220.22%22/%3E%3Ccircle cx=%2278%22 cy=%22127%22 r=%221.3%22 fill=%22white%22 opacity=%220.11%22/%3E%3Ccircle cx=%22222%22 cy=%22176%22 r=%220.6%22 fill=%22white%22 opacity=%220.22%22/%3E%3Ccircle cx=%22250%22 cy=%22205%22 r=%220.7%22 fill=%22white%22 opacity=%220.44%22/%3E%3Ccircle cx=%22315%22 cy=%22389%22 r=%220.7%22 fill=%22white%22 opacity=%220.19%22/%3E%3Ccircle cx=%2216%22 cy=%22312%22 r=%220.9%22 fill=%22white%22 opacity=%220.15%22/%3E%3Ccircle cx=%22169%22 cy=%22365%22 r=%221.4%22 fill=%22white%22 opacity=%220.19%22/%3E%3Ccircle cx=%2260%22 cy=%22368%22 r=%221.2%22 fill=%22white%22 opacity=%220.35%22/%3E%3Ccircle cx=%2236%22 cy=%2223%22 r=%221.3%22 fill=%22white%22 opacity=%220.25%22/%3E%3Ccircle cx=%2229%22 cy=%22375%22 r=%221.2%22 fill=%22white%22 opacity=%220.38%22/%3E%3Ccircle cx=%2233%22 cy=%22342%22 r=%220.7%22 fill=%22white%22 opacity=%220.40%22/%3E%3Ccircle cx=%22182%22 cy=%22136%22 r=%221.2%22 fill=%22white%22 opacity=%220.42%22/%3E%3Ccircle cx=%22107%22 cy=%2252%22 r=%221.1%22 fill=%22white%22 opacity=%220.18%22/%3E%3Ccircle cx=%2244%22 cy=%2265%22 r=%220.7%22 fill=%22white%22 opacity=%220.17%22/%3E%3Ccircle cx=%22125%22 cy=%22122%22 r=%221.4%22 fill=%22white%22 opacity=%220.20%22/%3E%3Ccircle cx=%22200%22 cy=%2271%22 r=%220.9%22 fill=%22white%22 opacity=%220.11%22/%3E%3Ccircle cx=%22100%22 cy=%226%22 r=%221.3%22 fill=%22white%22 opacity=%220.29%22/%3E%3Ccircle cx=%2276%22 cy=%22190%22 r=%221.5%22 fill=%22white%22 opacity=%220.14%22/%3E%3Ccircle cx=%22328%22 cy=%22173%22 r=%221.1%22 fill=%22white%22 opacity=%220.39%22/%3E%3Ccircle cx=%22157%22 cy=%22203%22 r=%221.3%22 fill=%22white%22 opacity=%220.44%22/%3E%3Ccircle cx=%22137%22 cy=%22333%22 r=%221.3%22 fill=%22white%22 opacity=%220.32%22/%3E%3Ccircle cx=%22162%22 cy=%22139%22 r=%220.7%22 fill=%22white%22 opacity=%220.15%22/%3E%3C/svg%3E") right -80px bottom -90px / 440px auto no-repeat, radial-gradient(70% 55% at 90% 100%, rgba(120,150,255,.28), transparent 60%), var(--card-grad); }
.wcard.bg-1::before { color: #b9c4ff; }
.wcard.bg-2 { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 400 400%22%3E%3Cellipse cx=%22403%22 cy=%22330%22 rx=%2238%22 ry=%2220%22 transform=%22rotate(0 403 330)%22 fill=%22%23f2c14e%22 opacity=%220.55%22/%3E%3Cellipse cx=%22372%22 cy=%22385%22 rx=%2238%22 ry=%2220%22 transform=%22rotate(60 372 385)%22 fill=%22%23f2c14e%22 opacity=%220.55%22/%3E%3Cellipse cx=%22308%22 cy=%22385%22 rx=%2238%22 ry=%2220%22 transform=%22rotate(120 308 385)%22 fill=%22%23f2c14e%22 opacity=%220.55%22/%3E%3Cellipse cx=%22277%22 cy=%22330%22 rx=%2238%22 ry=%2220%22 transform=%22rotate(180 277 330)%22 fill=%22%23f2c14e%22 opacity=%220.55%22/%3E%3Cellipse cx=%22308%22 cy=%22275%22 rx=%2238%22 ry=%2220%22 transform=%22rotate(240 308 275)%22 fill=%22%23f2c14e%22 opacity=%220.55%22/%3E%3Cellipse cx=%22372%22 cy=%22275%22 rx=%2238%22 ry=%2220%22 transform=%22rotate(300 372 275)%22 fill=%22%23f2c14e%22 opacity=%220.55%22/%3E%3Ccircle cx=%22340%22 cy=%22330%22 r=%2215%22 fill=%22%23e3b36a%22 opacity=%220.65%22/%3E%3Cellipse cx=%22296%22 cy=%22385%22 rx=%2225%22 ry=%2213%22 transform=%22rotate(0 296 385)%22 fill=%22%23f2c14e%22 opacity=%220.45%22/%3E%3Cellipse cx=%22275%22 cy=%22420%22 rx=%2225%22 ry=%2213%22 transform=%22rotate(60 275 420)%22 fill=%22%23f2c14e%22 opacity=%220.45%22/%3E%3Cellipse cx=%22235%22 cy=%22420%22 rx=%2225%22 ry=%2213%22 transform=%22rotate(120 235 420)%22 fill=%22%23f2c14e%22 opacity=%220.45%22/%3E%3Cellipse cx=%22214%22 cy=%22385%22 rx=%2225%22 ry=%2213%22 transform=%22rotate(180 214 385)%22 fill=%22%23f2c14e%22 opacity=%220.45%22/%3E%3Cellipse cx=%22235%22 cy=%22350%22 rx=%2225%22 ry=%2213%22 transform=%22rotate(240 235 350)%22 fill=%22%23f2c14e%22 opacity=%220.45%22/%3E%3Cellipse cx=%22275%22 cy=%22350%22 rx=%2225%22 ry=%2213%22 transform=%22rotate(300 275 350)%22 fill=%22%23f2c14e%22 opacity=%220.45%22/%3E%3Ccircle cx=%22255%22 cy=%22385%22 r=%2210%22 fill=%22%23e3b36a%22 opacity=%220.55%22/%3E%3Cellipse cx=%22419%22 cy=%22230%22 rx=%2221%22 ry=%2211%22 transform=%22rotate(0 419 230)%22 fill=%22%23f2c14e%22 opacity=%220.4%22/%3E%3Cellipse cx=%22402%22 cy=%22260%22 rx=%2221%22 ry=%2211%22 transform=%22rotate(60 402 260)%22 fill=%22%23f2c14e%22 opacity=%220.4%22/%3E%3Cellipse cx=%22368%22 cy=%22260%22 rx=%2221%22 ry=%2211%22 transform=%22rotate(120 368 260)%22 fill=%22%23f2c14e%22 opacity=%220.4%22/%3E%3Cellipse cx=%22351%22 cy=%22230%22 rx=%2221%22 ry=%2211%22 transform=%22rotate(180 351 230)%22 fill=%22%23f2c14e%22 opacity=%220.4%22/%3E%3Cellipse cx=%22368%22 cy=%22200%22 rx=%2221%22 ry=%2211%22 transform=%22rotate(240 368 200)%22 fill=%22%23f2c14e%22 opacity=%220.4%22/%3E%3Cellipse cx=%22402%22 cy=%22200%22 rx=%2221%22 ry=%2211%22 transform=%22rotate(300 402 200)%22 fill=%22%23f2c14e%22 opacity=%220.4%22/%3E%3Ccircle cx=%22385%22 cy=%22230%22 r=%228%22 fill=%22%23e3b36a%22 opacity=%220.5%22/%3E%3Cellipse cx=%22320%22 cy=%22250%22 rx=%2212%22 ry=%226%22 transform=%22rotate(0 320 250)%22 fill=%22%23f2c14e%22 opacity=%220.35%22/%3E%3Cellipse cx=%22310%22 cy=%22267%22 rx=%2212%22 ry=%226%22 transform=%22rotate(60 310 267)%22 fill=%22%23f2c14e%22 opacity=%220.35%22/%3E%3Cellipse cx=%22290%22 cy=%22267%22 rx=%2212%22 ry=%226%22 transform=%22rotate(120 290 267)%22 fill=%22%23f2c14e%22 opacity=%220.35%22/%3E%3Cellipse cx=%22280%22 cy=%22250%22 rx=%2212%22 ry=%226%22 transform=%22rotate(180 280 250)%22 fill=%22%23f2c14e%22 opacity=%220.35%22/%3E%3Cellipse cx=%22290%22 cy=%22233%22 rx=%2212%22 ry=%226%22 transform=%22rotate(240 290 233)%22 fill=%22%23f2c14e%22 opacity=%220.35%22/%3E%3Cellipse cx=%22310%22 cy=%22233%22 rx=%2212%22 ry=%226%22 transform=%22rotate(300 310 233)%22 fill=%22%23f2c14e%22 opacity=%220.35%22/%3E%3Ccircle cx=%22300%22 cy=%22250%22 r=%225%22 fill=%22%23e3b36a%22 opacity=%220.44999999999999996%22/%3E%3C/svg%3E") right -30px bottom -40px / 400px auto no-repeat, radial-gradient(70% 60% at 100% 100%, rgba(242,193,78,.24), transparent 60%), var(--card-grad); }
.wcard.bg-2::before { color: #f2c14e; }
.wcard.bg-3 { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 400 400%22%3E%3Cdefs%3E%3ClinearGradient id=%22g%22 x1=%220%22 y1=%220%22 x2=%220%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%23f6d48a%22 stop-opacity=%22.5%22/%3E%3Cstop offset=%221%22 stop-color=%22%23f6d48a%22 stop-opacity=%220%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points=%22230,0 400,0 400,300 120,340%22 fill=%22url(%23g)%22/%3E%3Cline x1=%220%22 y1=%2290%22 x2=%22400%22 y2=%2290%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22116%22 x2=%22400%22 y2=%22116%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22142%22 x2=%22400%22 y2=%22142%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22168%22 x2=%22400%22 y2=%22168%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22194%22 x2=%22400%22 y2=%22194%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22220%22 x2=%22400%22 y2=%22220%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22246%22 x2=%22400%22 y2=%22246%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22272%22 x2=%22400%22 y2=%22272%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22298%22 x2=%22400%22 y2=%22298%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22324%22 x2=%22400%22 y2=%22324%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22350%22 x2=%22400%22 y2=%22350%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%220%22 y1=%22376%22 x2=%22400%22 y2=%22376%22 stroke=%22white%22 stroke-opacity=%22.07%22/%3E%3Cline x1=%2244%22 y1=%2260%22 x2=%2244%22 y2=%22400%22 stroke=%22%23e3b36a%22 stroke-opacity=%22.35%22/%3E%3C/svg%3E") right top / 100% 100% no-repeat, var(--card-grad); }
.wcard.bg-3::before { color: #f6d48a; }
.wcard.bg-4 { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 400 400%22%3E%3Cline x1=%22160%22 y1=%22300%22 x2=%22230%22 y2=%22250%22 stroke=%22white%22 stroke-opacity=%22.3%22/%3E%3Cline x1=%22230%22 y1=%22250%22 x2=%22300%22 y2=%22290%22 stroke=%22white%22 stroke-opacity=%22.3%22/%3E%3Cline x1=%22300%22 y1=%22290%22 x2=%22370%22 y2=%22240%22 stroke=%22white%22 stroke-opacity=%22.3%22/%3E%3Cline x1=%22370%22 y1=%22240%22 x2=%22390%22 y2=%22330%22 stroke=%22white%22 stroke-opacity=%22.3%22/%3E%3Cline x1=%22390%22 y1=%22330%22 x2=%22320%22 y2=%22380%22 stroke=%22white%22 stroke-opacity=%22.3%22/%3E%3Cline x1=%22320%22 y1=%22380%22 x2=%22240%22 y2=%22360%22 stroke=%22white%22 stroke-opacity=%22.3%22/%3E%3Ccircle cx=%22160%22 cy=%22300%22 r=%222.6%22 fill=%22white%22 opacity=%22.9%22/%3E%3Ccircle cx=%22160%22 cy=%22300%22 r=%227%22 fill=%22white%22 opacity=%22.12%22/%3E%3Ccircle cx=%22230%22 cy=%22250%22 r=%222.6%22 fill=%22white%22 opacity=%22.9%22/%3E%3Ccircle cx=%22230%22 cy=%22250%22 r=%227%22 fill=%22white%22 opacity=%22.12%22/%3E%3Ccircle cx=%22300%22 cy=%22290%22 r=%222.6%22 fill=%22white%22 opacity=%22.9%22/%3E%3Ccircle cx=%22300%22 cy=%22290%22 r=%227%22 fill=%22white%22 opacity=%22.12%22/%3E%3Ccircle cx=%22370%22 cy=%22240%22 r=%222.6%22 fill=%22white%22 opacity=%22.9%22/%3E%3Ccircle cx=%22370%22 cy=%22240%22 r=%227%22 fill=%22white%22 opacity=%22.12%22/%3E%3Ccircle cx=%22390%22 cy=%22330%22 r=%222.6%22 fill=%22white%22 opacity=%22.9%22/%3E%3Ccircle cx=%22390%22 cy=%22330%22 r=%227%22 fill=%22white%22 opacity=%22.12%22/%3E%3Ccircle cx=%22320%22 cy=%22380%22 r=%222.6%22 fill=%22white%22 opacity=%22.9%22/%3E%3Ccircle cx=%22320%22 cy=%22380%22 r=%227%22 fill=%22white%22 opacity=%22.12%22/%3E%3Ccircle cx=%22240%22 cy=%22360%22 r=%222.6%22 fill=%22white%22 opacity=%22.9%22/%3E%3Ccircle cx=%22240%22 cy=%22360%22 r=%227%22 fill=%22white%22 opacity=%22.12%22/%3E%3Ccircle cx=%2228%22 cy=%22296%22 r=%220.8%22 fill=%22white%22 opacity=%220.18%22/%3E%3Ccircle cx=%2234%22 cy=%22337%22 r=%221.4%22 fill=%22white%22 opacity=%220.35%22/%3E%3Ccircle cx=%22113%22 cy=%2297%22 r=%220.8%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%2263%22 cy=%22178%22 r=%220.8%22 fill=%22white%22 opacity=%220.46%22/%3E%3Ccircle cx=%22389%22 cy=%22219%22 r=%220.7%22 fill=%22white%22 opacity=%220.46%22/%3E%3Ccircle cx=%22124%22 cy=%22143%22 r=%220.5%22 fill=%22white%22 opacity=%220.25%22/%3E%3Ccircle cx=%22190%22 cy=%22201%22 r=%220.7%22 fill=%22white%22 opacity=%220.30%22/%3E%3Ccircle cx=%222%22 cy=%22106%22 r=%220.6%22 fill=%22white%22 opacity=%220.26%22/%3E%3Ccircle cx=%2217%22 cy=%229%22 r=%220.8%22 fill=%22white%22 opacity=%220.20%22/%3E%3Ccircle cx=%22234%22 cy=%22212%22 r=%221.3%22 fill=%22white%22 opacity=%220.35%22/%3E%3Ccircle cx=%22286%22 cy=%22352%22 r=%220.9%22 fill=%22white%22 opacity=%220.23%22/%3E%3Ccircle cx=%22394%22 cy=%2260%22 r=%221.2%22 fill=%22white%22 opacity=%220.35%22/%3E%3Ccircle cx=%2218%22 cy=%22334%22 r=%221.4%22 fill=%22white%22 opacity=%220.34%22/%3E%3Ccircle cx=%22294%22 cy=%22325%22 r=%220.6%22 fill=%22white%22 opacity=%220.30%22/%3E%3Ccircle cx=%22202%22 cy=%22334%22 r=%221.3%22 fill=%22white%22 opacity=%220.41%22/%3E%3Ccircle cx=%22234%22 cy=%22357%22 r=%221.2%22 fill=%22white%22 opacity=%220.36%22/%3E%3Ccircle cx=%2292%22 cy=%2212%22 r=%220.6%22 fill=%22white%22 opacity=%220.25%22/%3E%3Ccircle cx=%2242%22 cy=%22334%22 r=%221.1%22 fill=%22white%22 opacity=%220.34%22/%3E%3Ccircle cx=%22250%22 cy=%22272%22 r=%221.0%22 fill=%22white%22 opacity=%220.12%22/%3E%3Ccircle cx=%22319%22 cy=%22299%22 r=%221.0%22 fill=%22white%22 opacity=%220.31%22/%3E%3Ccircle cx=%22264%22 cy=%2226%22 r=%221.2%22 fill=%22white%22 opacity=%220.21%22/%3E%3Ccircle cx=%2230%22 cy=%22106%22 r=%221.2%22 fill=%22white%22 opacity=%220.19%22/%3E%3Ccircle cx=%22296%22 cy=%22390%22 r=%221.0%22 fill=%22white%22 opacity=%220.25%22/%3E%3Ccircle cx=%22192%22 cy=%22273%22 r=%221.3%22 fill=%22white%22 opacity=%220.34%22/%3E%3Ccircle cx=%22257%22 cy=%2231%22 r=%220.6%22 fill=%22white%22 opacity=%220.21%22/%3E%3Ccircle cx=%22297%22 cy=%22122%22 r=%221.1%22 fill=%22white%22 opacity=%220.12%22/%3E%3Ccircle cx=%2224%22 cy=%22108%22 r=%221.2%22 fill=%22white%22 opacity=%220.36%22/%3E%3Ccircle cx=%22270%22 cy=%22116%22 r=%221.0%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%22187%22 cy=%2247%22 r=%221.4%22 fill=%22white%22 opacity=%220.19%22/%3E%3Ccircle cx=%22391%22 cy=%22375%22 r=%220.5%22 fill=%22white%22 opacity=%220.28%22/%3E%3Ccircle cx=%22328%22 cy=%22387%22 r=%220.9%22 fill=%22white%22 opacity=%220.21%22/%3E%3Ccircle cx=%2284%22 cy=%22378%22 r=%220.7%22 fill=%22white%22 opacity=%220.32%22/%3E%3Ccircle cx=%2257%22 cy=%22210%22 r=%221.5%22 fill=%22white%22 opacity=%220.17%22/%3E%3Ccircle cx=%22328%22 cy=%22203%22 r=%221.4%22 fill=%22white%22 opacity=%220.37%22/%3E%3Ccircle cx=%2293%22 cy=%22359%22 r=%221.0%22 fill=%22white%22 opacity=%220.13%22/%3E%3Ccircle cx=%221%22 cy=%22197%22 r=%221.0%22 fill=%22white%22 opacity=%220.23%22/%3E%3Ccircle cx=%2256%22 cy=%22138%22 r=%220.8%22 fill=%22white%22 opacity=%220.41%22/%3E%3Ccircle cx=%221%22 cy=%22300%22 r=%221.3%22 fill=%22white%22 opacity=%220.16%22/%3E%3Ccircle cx=%22371%22 cy=%22285%22 r=%221.4%22 fill=%22white%22 opacity=%220.22%22/%3E%3Ccircle cx=%22149%22 cy=%22157%22 r=%221.5%22 fill=%22white%22 opacity=%220.33%22/%3E%3C/svg%3E") right bottom / 100% auto no-repeat, radial-gradient(60% 50% at 20% 0%, rgba(120,150,255,.2), transparent 60%), var(--card-grad); }
.wcard.bg-4::before { color: #dfe6ff; }
.wcard.bg-5 { background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 400 400%22%3E%3Crect x=%2240%22 y=%22374%22 width=%22320%22 height=%2223%22 rx=%223%22 fill=%22%23c9a24a%22 opacity=%22.32%22/%3E%3Crect x=%2258%22 y=%22385%22 width=%22120%22 height=%222%22 fill=%22white%22 opacity=%22.4%22/%3E%3Crect x=%2246%22 y=%22352%22 width=%22310%22 height=%2219%22 rx=%223%22 fill=%22%237d6bd6%22 opacity=%22.32%22/%3E%3Crect x=%2264%22 y=%22361%22 width=%22112%22 height=%222%22 fill=%22white%22 opacity=%22.4%22/%3E%3Crect x=%2252%22 y=%22322%22 width=%22300%22 height=%2227%22 rx=%223%22 fill=%22%23e2688a%22 opacity=%22.32%22/%3E%3Crect x=%2270%22 y=%22335%22 width=%22104%22 height=%222%22 fill=%22white%22 opacity=%22.4%22/%3E%3Crect x=%2258%22 y=%22302%22 width=%22290%22 height=%2217%22 rx=%223%22 fill=%22%239fd8bd%22 opacity=%22.32%22/%3E%3Crect x=%2276%22 y=%22310%22 width=%2296%22 height=%222%22 fill=%22white%22 opacity=%22.4%22/%3E%3Crect x=%2264%22 y=%22278%22 width=%22280%22 height=%2221%22 rx=%223%22 fill=%22%23bfc6ff%22 opacity=%22.32%22/%3E%3Crect x=%2282%22 y=%22288%22 width=%2288%22 height=%222%22 fill=%22white%22 opacity=%22.4%22/%3E%3Crect x=%2270%22 y=%22250%22 width=%22270%22 height=%2225%22 rx=%223%22 fill=%22%23f2c14e%22 opacity=%22.32%22/%3E%3Crect x=%2288%22 y=%22262%22 width=%2280%22 height=%222%22 fill=%22white%22 opacity=%22.4%22/%3E%3C/svg%3E") right -60px bottom -16px / 78% auto no-repeat, radial-gradient(70% 50% at 50% 110%, rgba(226,120,150,.2), transparent 60%), var(--card-grad); }
.wcard.bg-5::before { color: #ffd0dd; }
.wcard { min-height: 300px; }

/* real crops from the video as card art */
.wcard .art { position: absolute; right: 0; bottom: 0; width: 100%; height: 64%; z-index: 0; pointer-events: none; object-fit: cover; object-position: 60% 50%;
  background-size: cover; background-position: 65% 40%; opacity: 1; filter: brightness(1.18) saturate(1.25);
  -webkit-mask: linear-gradient(to top, #000 62%, transparent 100%), linear-gradient(to left, #000 70%, transparent 100%); -webkit-mask-composite: source-in;
  mask: linear-gradient(to top, #000 62%, transparent 100%), linear-gradient(to left, #000 70%, transparent 100%); mask-composite: intersect; height: 70%; }
.wcard.bg-1 .art { height: 78%; object-position: 50% 45%; filter: brightness(1.25) saturate(1.3); }
.wcard .def, .wcard .ex li { text-shadow: 0 1px 8px rgba(var(--shade-rgb),.7); }
.wcard .foot span:first-child { text-shadow: 0 1px 6px rgba(var(--shade-rgb),.8); }
.wcard.bg-5 .art { background-position: 50% 30%; }
.wcard.bg-1 { background: radial-gradient(70% 55% at 90% 100%, rgba(120,150,255,.18), transparent 60%), var(--card-grad); }
.wcard.bg-2 { background: radial-gradient(70% 60% at 100% 100%, rgba(242,193,78,.16), transparent 60%), var(--card-grad); }
.wcard.bg-3 { background: radial-gradient(70% 60% at 100% 100%, rgba(242,193,78,.14), transparent 60%), var(--card-grad); }
.wcard.bg-5 { background: radial-gradient(70% 50% at 50% 110%, rgba(159,216,189,.14), transparent 60%), var(--card-grad); }
.wcard.bg-1::before, .wcard.bg-2::before, .wcard.bg-3::before, .wcard.bg-5::before { display: none; }
.wcard { min-height: 340px; }
.wcard .foot { position: relative; }
.wcard .foot button { background: rgba(var(--shade-rgb),.45); backdrop-filter: blur(6px); }
.wcard.bg-5 .art, .wcard.bg-3 .art { filter: brightness(1.45) saturate(1.3); }

/* ============ themes ============ */
[data-theme="midnight"] { --accent: #8fa3ff; --bg: #070a16; --bg-2: #141a33; --bg-rgb: 14,20,44; --card-grad: linear-gradient(160deg, #10162c, #070a16);
  --chat-bg: radial-gradient(70% 50% at 20% 0%, rgba(120,140,255,.25), transparent 60%), radial-gradient(60% 50% at 90% 100%, rgba(160,120,255,.18), transparent 60%), #070a16; }
[data-theme="rose"] { --accent: #e2688a; --bg: #fbf6f2; --bg-2: #ffffff; --bg-rgb: 255,255,255; --fg-rgb: 58,46,63; --shade-rgb: 120,90,110; --ink: #3a2e3f; --btn-bg: #e2688a; --btn-ink: #ffffff;
  --chat-bg: radial-gradient(60% 50% at 15% 10%, rgba(226,104,138,.28), transparent 60%), radial-gradient(50% 45% at 90% 30%, rgba(169,150,224,.30), transparent 60%), radial-gradient(50% 40% at 60% 100%, rgba(127,187,160,.25), transparent 60%), #fbf6f2; --chat-ink: #3a2e3f;
  --card-grad: linear-gradient(160deg, #ffffff, #fbe6ec); --card: rgba(255,255,255,.75); --lilac: #7d6bd6; --sage: #3f8a66; }
[data-theme="obsidian"] { --accent: #111111; --bg: #e6e5e3; --bg-2: #ffffff; --bg-rgb: 255,255,255; --fg-rgb: 17,17,17; --shade-rgb: 0,0,0; --ink: #111111; --btn-bg: #111111; --btn-ink: #ffffff;
  --chat-bg: radial-gradient(60% 50% at 55% 20%, rgba(255,255,255,.7), transparent 60%), linear-gradient(#ececea, #cfcecb); --chat-ink: #111111;
  --card-grad: linear-gradient(160deg, #ffffff, #ececea); --card: rgba(255,255,255,.7); --lilac: #4c4c66; --sage: #2f6a52; }
[data-theme="mint"] { --accent: #2f8a66; --bg: #f2f8f4; --bg-2: #ffffff; --bg-rgb: 255,255,255; --fg-rgb: 20,50,38; --shade-rgb: 40,80,60; --ink: #14321f; --btn-bg: #2f8a66; --btn-ink: #ffffff;
  --chat-bg: radial-gradient(60% 50% at 15% 10%, rgba(47,138,102,.22), transparent 60%), radial-gradient(50% 45% at 90% 40%, rgba(242,193,78,.22), transparent 60%), #f2f8f4; --chat-ink: #14321f;
  --card-grad: linear-gradient(160deg, #ffffff, #dcefe4); --card: rgba(255,255,255,.75); --lilac: #5b6bd6; --sage: #2f8a66; }
[data-theme="rose"] .wcard .art, [data-theme="obsidian"] .wcard .art, [data-theme="mint"] .wcard .art { opacity: .38; -webkit-mask: linear-gradient(to top, #000 10%, transparent 70%); mask: linear-gradient(to top, #000 10%, transparent 70%); }
[data-font="soft"] { --serif: 'Fraunces', Georgia, serif; --sans: 'Nunito Sans', system-ui, sans-serif; }
[data-font="soft"] h1, [data-font="soft"] h2, [data-font="soft"] .serif, [data-font="soft"] .wcard .word { font-weight: 500; }

/* theme view */
.theme-h { margin: 18px 0 10px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.theme-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left; transition: transform .15s; }
.theme-card:hover { transform: translateY(-2px); } .theme-card.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-card .sw { display: flex; gap: 6px; margin-bottom: 4px; } .theme-card .sw i { width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(var(--fg-rgb),.15); }
.theme-card small { color: var(--muted); font-size: .8rem; }
.accent-row { display: flex; flex-wrap: wrap; gap: 10px; }
.accent { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(var(--fg-rgb),.15); background: var(--c); cursor: pointer; }
.accent.on { outline: 2px solid var(--ink); outline-offset: 3px; }
.accent.reset { width: auto; padding: 0 14px; border-radius: 999px; background: var(--card); color: var(--muted); font-size: .8rem; font-weight: 600; }
.font-row { display: flex; flex-wrap: wrap; gap: 12px; }
.font-card { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left; }
.font-card.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.font-card b { font-size: 1.8rem; font-weight: 400; } .font-card b.editorial { font-family: 'Instrument Serif', serif; } .font-card b.soft { font-family: 'Fraunces', serif; }
.font-card span { display: flex; flex-direction: column; font-weight: 600; } .font-card small { color: var(--muted); font-weight: 400; font-size: .78rem; }

/* call face */
.call-face-wrap { position: relative; width: min(100%, 360px); aspect-ratio: 480 / 383; margin-bottom: 10px; }
.call-face { width: 100%; height: 100%; border-radius: 22px; display: block; box-shadow: 0 30px 70px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.25); background: #111; }
.call-face-tap { position: absolute; inset: 0; border-radius: 22px; cursor: pointer; }
.call-face-wrap .call-ring { border-radius: 26px; inset: -8px; border-width: 1.5px; }
.call[data-mode="speaking"] .call-face { box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent); }
@media (max-width: 920px) { .call-face-wrap { width: min(100%, 260px); } }

/* library card photos */
.wcard .art { height: 100%; opacity: .55; filter: none; -webkit-mask: linear-gradient(to top, #000 30%, transparent 85%); mask: linear-gradient(to top, #000 30%, transparent 85%); background-position: center; }
.wcard.bg-1 .art, .wcard.bg-3 .art, .wcard.bg-5 .art { filter: none; }
.wcard.bg-1::before, .wcard.bg-2::before, .wcard.bg-3::before, .wcard.bg-4::before, .wcard.bg-5::before { display: none; }

/* per-theme video tint and bubble tint */
[data-theme="midnight"] { --tint: 22%; --bubble-tint: 16%; --video-filter: hue-rotate(200deg) saturate(1.15) brightness(.9); }
[data-theme="rose"] { --tint: 26%; --bubble-tint: 22%; --video-filter: sepia(.25) hue-rotate(-25deg) saturate(1.35); }
[data-theme="obsidian"] { --tint: 0%; --bubble-tint: 0%; --video-filter: grayscale(1) contrast(1.1); }
[data-theme="mint"] { --tint: 22%; --bubble-tint: 18%; --video-filter: hue-rotate(55deg) saturate(1.1); }
[data-theme="obsidian"] .chat.obsidian .msg.user .bubble { background: rgba(255,255,255,.92); color: #111; }
[data-theme="obsidian"] .chat.obsidian .btn-icon { background: #fff; } [data-theme="obsidian"] .chat.obsidian .btn-icon svg { color: #000; }
/* call face: no rings, glow only while she speaks */
.call-face-wrap .call-ring { display: none; }
.call-face-wrap { aspect-ratio: 634 / 420; }

.soon { padding: 60px 30px; text-align: center; max-width: 520px; margin: 30px auto; }
.soon-mark { font-size: 2rem; color: var(--accent); margin-bottom: 10px; }
.soon-badge { font-size: .62rem; opacity: .8; }

/* ============ Rose polish (light theme fixes) ============ */
[data-theme="rose"] { --shadow: 0 14px 40px rgba(120,90,110,.12); --shadow-sm: 0 6px 18px rgba(120,90,110,.10); --muted: #8a7b92; --line: rgba(58,46,63,.12); }
[data-theme="rose"] .card { background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); }
[data-theme="rose"] .wcard { background: linear-gradient(160deg, #ffffff, #fbf0f4); }
[data-theme="rose"] .wcard .art { opacity: .28; height: 60%; -webkit-mask: linear-gradient(to top, #000 15%, transparent 95%); mask: linear-gradient(to top, #000 15%, transparent 95%); }
[data-theme="rose"] .wcard .def, [data-theme="rose"] .wcard .ex li, [data-theme="rose"] .wcard .foot span:first-child { text-shadow: none; }
[data-theme="rose"] .wcard .ex li { color: #5c4f63; } [data-theme="rose"] .ex li::before { color: var(--accent); }
[data-theme="rose"] .wcard .foot button { background: rgba(255,255,255,.85); color: #5c4f63; border: 1px solid rgba(58,46,63,.14); backdrop-filter: none; }
[data-theme="rose"] .wcard .foot button:hover { color: var(--ink); border-color: var(--accent); }
[data-theme="rose"] .wcard .foot button.on { background: #e6f3ec; color: #2f6a52; border-color: transparent; }
[data-theme="rose"] .pos { background: rgba(58,46,63,.08); color: #4a3b5c; }
[data-theme="rose"] .pos.noun { background: rgba(226,104,138,.16); color: #b43f68; } [data-theme="rose"] .pos.verb { background: rgba(125,107,214,.16); color: #5b49b3; }
[data-theme="rose"] .pos.adjective { background: rgba(63,138,102,.16); color: #2f6a52; } [data-theme="rose"] .pos.adverb { background: rgba(227,179,106,.22); color: #8a5f16; } [data-theme="rose"] .pos.phrase { background: rgba(76,106,168,.14); color: #3d5a9a; }
[data-theme="rose"] .wcard .lvl, [data-theme="rose"] .wcard .ar { color: #8a7b92; }
[data-theme="rose"] .wcard::after { background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.3) 30%, rgba(255,255,255,0) 55%, rgba(226,104,138,.25)); }
[data-theme="rose"] .nav button.active { background: #fff; box-shadow: var(--shadow-sm); }
[data-theme="rose"] .side { background: rgba(255,255,255,.55); border-right: 1px solid rgba(255,255,255,.8); }
[data-theme="rose"] .callcard { background: #fff; border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); }
[data-theme="rose"] .avatar { background: linear-gradient(135deg, #e2688a, #a996e0); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }
[data-theme="rose"] .pill { background: #fff; color: var(--ink); border: 1px solid var(--line); }
[data-theme="rose"] .filters { background: #fff; } [data-theme="rose"] .filters button.active { background: var(--accent); color: #fff; }
[data-theme="rose"] .lib-add input, [data-theme="rose"] .lib-search { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
[data-theme="rose"] .summary { background: #fff; border: 1px solid var(--line); }
[data-theme="rose"] .track { background: rgba(226,104,138,.10); } [data-theme="rose"] .fill { background: linear-gradient(90deg, #a996e0, var(--accent)); }
[data-theme="rose"] .ring-bg { stroke: rgba(226,104,138,.15); } [data-theme="rose"] .ring-fg { stroke: var(--accent); }
[data-theme="rose"] .chip { background: #fff; } [data-theme="rose"] .chip.soft { background: #efe9fb; }
[data-theme="rose"] .popover { background: #fff; color: var(--ink); border: 1px solid var(--line); }
[data-theme="rose"] .tabbar { background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9); } [data-theme="rose"] .tabbar button.active { background: var(--accent); color: #fff; }
[data-theme="rose"] .call-side { background: #fff; color: var(--ink); } [data-theme="rose"] .call-side-head { border-bottom: 1px solid var(--line); }
[data-theme="rose"] .tline.assistant .tb { background: #efe9fb; color: var(--ink); } [data-theme="rose"] .tline.user .tb { background: #fbe6ec; color: var(--ink); }
[data-theme="rose"] .login-card { background: rgba(255,255,255,.82); color: var(--ink); border: 1px solid rgba(255,255,255,.9); }
[data-theme="rose"] .letter p { color: #4d4054; } [data-theme="rose"] .login-form input { background: #fff; color: var(--ink); }
[data-theme="rose"] .stamp { background: linear-gradient(135deg, #e2688a, #a996e0); color: #fff; }
[data-theme="rose"] .call { background: rgba(58,46,63,.35); }
[data-theme="rose"] .call-stage { color: #fff; background: radial-gradient(70% 60% at 30% 20%, rgba(226,104,138,.35), transparent 60%), radial-gradient(60% 50% at 80% 100%, rgba(169,150,224,.35), transparent 60%), linear-gradient(160deg, #2a1e2e, #120c16); }
[data-theme="rose"] .call-status, [data-theme="rose"] .call-timer, [data-theme="rose"] .call-name, [data-theme="rose"] .cbtn { color: #fff; }
[data-theme="rose"] .cbtn svg { background: rgba(255,255,255,.16); } [data-theme="rose"] .cbtn.on svg { background: #fff; color: #2a1e2e; }
[data-theme="rose"] .call-say input { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); } [data-theme="rose"] .call-say input::placeholder { color: rgba(255,255,255,.65); }

.call-face { object-fit: cover; object-position: 50% 40%; }
.call[data-mode="speaking"] .call-face { animation: talkglow 1.2s ease-in-out infinite; }
@keyframes talkglow { 0%,100% { box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent) } 50% { box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent) } }
