:root {
  --peach: #FFE6DE;
  --lilac: #E8E4FF;
  --mint: #D9F3E7;
  --rose: #FBD5E0;
  --coral: #E36E57;
  --violet: #6F60F0;
  --deep: #5548C8;
  --ink: #2B2140;
  --soft: #7A6B88;
  --card: rgba(255, 255, 255, 0.72);
  --surface: #fff;
  --glass: rgba(255, 255, 255, .55);
  --r: 24px;
  --shadow: 0 10px 30px rgba(111, 96, 240, 0.12);
}

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

body {
  font-family: "Rubik", system-ui, sans-serif;
  color: var(--ink);
  background: var(--lilac);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- animated background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: linear-gradient(135deg, var(--peach), var(--lilac) 55%, var(--mint)); }
.blob { position: absolute; border-radius: 50%; filter: blur(50px); animation: drift 12s ease-in-out infinite alternate; }
.b1 { width: 380px; height: 380px; background: #FFB4A2; opacity: .35; top: -90px; inset-inline-start: -80px; }
.b2 { width: 420px; height: 420px; background: #CFC8FF; opacity: .55; top: 30%; inset-inline-end: -120px; animation-duration: 15s; animation-direction: alternate-reverse; }
.b3 { width: 340px; height: 340px; background: #A9E3CD; opacity: .5; bottom: -100px; inset-inline-start: 30%; animation-duration: 18s; }
@keyframes drift { to { transform: translate(50px, -30px) scale(1.15); } }

.spark { position: absolute; font-size: 22px; animation: tw 3.2s ease-in-out infinite; }
.s1 { top: 12%; left: 18%; color: #FFB4A2; }
.s2 { top: 22%; right: 14%; color: #B3A9FA; animation-delay: -1s; }
.s3 { bottom: 18%; left: 9%; color: #A9E3CD; animation-delay: -2s; }
.s4 { bottom: 30%; right: 22%; color: #F5B8C8; animation-delay: -.5s; }
@keyframes tw { 0%, 100% { opacity: .3; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(20deg); } }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--glass); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(179, 169, 250, .35);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; }
.brand img { width: 40px; height: 40px; animation: bob 3.4s ease-in-out infinite; }
.actions { display: flex; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 6px;
  font: inherit; font-size: .9rem; color: var(--deep);
  background: var(--surface); border: 2px solid #DAD5FF; border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--lilac); }
.chip.lang { font-weight: 800; background: linear-gradient(90deg, var(--peach), var(--lilac), var(--mint)); position: relative; overflow: hidden; }
.chip.lang::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
  animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine { 0% { transform: translateX(-150%); } 60%, 100% { transform: translateX(350%); } }

@keyframes bob { 50% { transform: translateY(-6px) rotate(-5deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------- layout ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 36px clamp(14px, 4vw, 32px) 50px; }
.hero { text-align: center; margin-bottom: 30px; animation: rise .8s ease both; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.15; }
.grad { background: linear-gradient(90deg, var(--coral), var(--violet), var(--coral)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 6s linear infinite; }
@keyframes flow { to { background-position: 200% center; } }
.sub { color: var(--soft); margin-top: 10px; font-size: 1.1rem; }
h2 { font-size: 1.1rem; margin-bottom: 12px; }

.card {
  background: var(--card); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: 20px;
}

.dash { display: grid; grid-template-columns: 300px 1fr; gap: 18px; margin-bottom: 22px; animation: rise .8s .1s ease both; }
.ring-card { display: grid; place-items: center; position: relative; }
.ring { width: 220px; height: 220px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.track { stroke: #EEEAFB; }
.bar { stroke: url(#rg); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.ring-text { position: absolute; text-align: center; display: flex; flex-direction: column; }
.big { font-size: 3rem; font-weight: 800; background: linear-gradient(90deg, var(--coral), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.label { font-size: .85rem; color: var(--soft); }

.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mini { display: flex; flex-direction: column; gap: 6px; transition: transform .25s; }
.mini:hover { transform: translateY(-4px) rotate(-.5deg); }
.mini.wide { grid-column: 1 / -1; }
.mini.peach { background: linear-gradient(135deg, var(--surface), var(--peach)); }
.mini.lilac { background: linear-gradient(135deg, var(--surface), var(--lilac)); }
.mini.mint { background: linear-gradient(135deg, var(--surface), var(--mint)); }
.num { font-size: 2.4rem; font-weight: 800; }
.pop { animation: pop .4s ease; }
@keyframes pop { 50% { transform: scale(1.15); } }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--soft); }
.inline input[type="number"] { width: 90px; }
.inline.full { justify-content: space-between; margin-bottom: 14px; }
.pbar { height: 14px; background: var(--surface); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.pbar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #A9E3CD, var(--violet)); transition: width 1s cubic-bezier(.2, .8, .2, 1); position: relative; }
.pbar span::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 10px, transparent 10px 20px); animation: stripes 1s linear infinite; }
@keyframes stripes { to { background-position: 28px 0; } }
.hint { font-size: .85rem; color: var(--soft); }

.layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; animation: rise .8s .2s ease both; }
aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }

/* ---------- semesters ---------- */
.sem { margin-bottom: 16px; animation: rise .45s ease both; }
.sem.out { animation: out .3s ease forwards; }
@keyframes out { to { opacity: 0; transform: scale(.96) translateY(-10px); } }
.sem-head { display: flex; align-items: center; gap: 10px; }
.sem-name { flex: 1; font-weight: 700; font-size: 1.05rem; background: transparent !important; border-color: transparent !important; }
.sem-name:focus { background: var(--surface) !important; }
.sem-avg { font-weight: 800; padding: 6px 12px; border-radius: 99px; background: var(--lilac); color: var(--deep); min-width: 64px; text-align: center; }
.fold { border: none; background: var(--mint); color: #1F7350; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; transition: transform .3s; font-size: 1rem; }
.sem.closed .fold { transform: rotate(-90deg); }
[dir="rtl"] .sem.closed .fold { transform: rotate(90deg); }
.sem-body { margin-top: 14px; animation: rise .35s ease both; }
.sem.closed .sem-body { display: none; }

.crow { display: grid; grid-template-columns: 1fr 74px 80px 56px 36px; gap: 8px; align-items: center; margin-bottom: 8px; animation: slide .35s ease both; }
.crow.head { font-size: .8rem; color: var(--soft); animation: none; margin-bottom: 6px; }
.crow.out { animation: out .3s ease forwards; }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } }
[dir="ltr"] .crow { animation-name: slideL; }
@keyframes slideL { from { opacity: 0; transform: translateX(-20px); } }

input[type="text"], input[type="number"], select {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid transparent; border-radius: 14px;
  padding: 10px 12px; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { outline: none; border-color: #B3A9FA; box-shadow: 0 0 0 4px rgba(179, 169, 250, .3); }
input.bad { border-color: #F5A3B5; background: var(--bad-bg, #FFF4F6); }
select { width: auto; cursor: pointer; }

.toggle { position: relative; width: 46px; height: 26px; justify-self: center; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: #E6E1F3; border-radius: 99px; cursor: pointer; transition: background .25s; }
.toggle span::before { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; inset-inline-start: 3px; background: var(--surface); border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.toggle input:checked + span { background: linear-gradient(90deg, #A9E3CD, #7FD3B4); }
.toggle input:checked + span::before { transform: translateX(20px); }
[dir="rtl"] .toggle input:checked + span::before { transform: translateX(-20px); }

.icon { border: none; background: var(--surface); color: var(--soft); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; transition: transform .25s, background .2s, color .2s; }
.icon:hover { background: var(--rose); color: #A03A5C; transform: rotate(90deg) scale(1.08); }

.btn { font: inherit; border: none; border-radius: 16px; padding: 12px 18px; cursor: pointer; transition: transform .2s, box-shadow .2s, filter .2s; }
.btn:hover { transform: translateY(-2px); filter: saturate(1.15); }
.btn.primary { width: 100%; font-weight: 700; color: #fff; background: linear-gradient(90deg, var(--coral), var(--violet)); box-shadow: 0 10px 24px rgba(111, 96, 240, .3); }
.btn.soft { width: 100%; color: var(--deep); background: linear-gradient(90deg, var(--peach), var(--lilac)); margin-top: 4px; }
.btn.ghost { background: var(--surface); color: var(--soft); width: 100%; }
.btn.danger:hover { background: var(--rose); color: #A03A5C; }

/* ---------- side ---------- */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--soft); }
.result { padding: 14px; border-radius: 16px; background: var(--surface); text-align: center; font-weight: 500; transition: background .4s; }
.result.ok { background: var(--mint); color: #1F4D38; }
.result.no { background: var(--rose); color: #5C1F33; }

.chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 18px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bar-v { width: 100%; max-width: 38px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #B3A9FA, #FFB4A2); transform-origin: bottom; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; position: relative; }
.chart .bar-v b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--deep); }
.chart .col span { font-size: .75rem; color: var(--soft); }
.chart .empty { margin: auto; color: var(--soft); font-size: .9rem; }
@keyframes grow { from { transform: scaleY(0); } }

footer { text-align: center; color: var(--soft); margin-top: 40px; font-size: .9rem; display: grid; gap: 6px; }
footer a { color: var(--deep); font-weight: 700; text-decoration: none; }
footer a:hover { text-decoration: underline; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 120px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 99px; transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; z-index: 50; opacity: 0; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.confetti { position: fixed; top: -12px; width: 10px; height: 14px; border-radius: 3px; z-index: 60; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .8; } }

@media (max-width: 900px) {
  .dash, .layout { grid-template-columns: 1fr; }
  aside { position: static; }
}
@media (max-width: 560px) {
  .chip b { display: none; }
  .crow { grid-template-columns: 1fr 56px 62px 48px 32px; gap: 6px; }
  .ring { width: 190px; height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- shared look: Fredoka for titles, Rubik for text ---------- */
body{font-family:"Rubik",system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
h1,h2,h3,.brand{font-family:"Fredoka","Rubik",system-ui,sans-serif}

/* ---------- dark mode ---------- */
html[data-theme="dark"]{--peach:#3B2A35;--lilac:#241F38;--mint:#1E3530;--rose:#3A2438;--ink:#F3EFFF;--soft:#BDB3DA;--card:rgba(42,35,64,.74);--surface:#2E2746;--glass:rgba(27,23,40,.72);--deep:#C2B9FF;--violet:#9B8CFF;--bad-bg:#45283A;--shadow:0 10px 30px rgba(0,0,0,.35)}
html[data-theme="dark"] .bg{background:linear-gradient(135deg,#221A2C,#1B1728 55%,#16241F)}
html[data-theme="dark"] .blob{opacity:.16}
html[data-theme="dark"] .chip,html[data-theme="dark"] input,html[data-theme="dark"] select{border-color:#4A4170}
html[data-theme="dark"] .card,html[data-theme="dark"] .top{border-color:rgba(139,124,246,.28)}

html[data-theme="dark"]{color-scheme:dark}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{color:var(--ink);background:var(--surface)}
html[data-theme="dark"] img[src$="logo.svg"]{filter:drop-shadow(0 4px 14px rgba(0,0,0,.35))}

/* ---------- GPA boost planner ---------- */
.boost { margin-top: 22px; animation: rise .8s .3s ease both; position: relative; overflow: hidden; }
.boost::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, #FFB4A2, #B3A9FA, #A9E3CD, #FFB4A2); background-size: 200% auto; animation: flow 5s linear infinite; }
.boost-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.boost-head h2 { font-size: 1.35rem; margin-bottom: 4px; }
.boost-now { display: flex; align-items: center; gap: 12px; background: var(--surface); padding: 10px 18px; border-radius: 20px; }
.boost-now > div { display: flex; flex-direction: column; align-items: center; }
.boost-now b { font-size: 1.6rem; font-weight: 800; color: var(--deep); }
.boost-now b.goal { background: linear-gradient(90deg, var(--coral), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; transition: opacity .3s; }
.boost-now b.goal.dim { opacity: .35; }
.boost-now .arrow { color: var(--coral); font-size: 1.3rem; animation: nudge 1.6s ease-in-out infinite; }
[dir="rtl"] .boost-now .arrow { transform: scaleX(-1); animation-name: nudgeR; }
@keyframes nudge { 50% { transform: translateX(5px); } }
@keyframes nudgeR { 0%, 100% { transform: scaleX(-1); } 50% { transform: scaleX(-1) translateX(5px); } }

.boost-ctrl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.boost-ctrl .inline { font-size: .95rem; color: var(--ink); font-weight: 600; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.qchip, .pchip { font: inherit; border: 2px solid #DAD5FF; background: var(--surface); color: var(--deep); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 700; transition: transform .2s, background .2s, box-shadow .2s, border-color .2s; }
.qchip:hover, .pchip:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); box-shadow: var(--shadow); }
.qchip.on, .pchip.on { background: linear-gradient(90deg, var(--peach), var(--lilac)); border-color: #B3A9FA; animation: pop .35s ease; }
.real { margin: 12px 0 4px; }
.real summary { cursor: pointer; color: var(--soft); font-size: .9rem; width: fit-content; list-style: none; padding: 4px 0; }
.real summary::-webkit-details-marker { display: none; }
.real[open] summary { color: var(--deep); }
.real .fields { margin-top: 10px; max-width: 460px; animation: rise .3s ease both; }

.tabs { display: flex; gap: 6px; background: var(--surface); padding: 6px; border-radius: 18px; margin: 16px 0; overflow-x: auto; }
.tab { flex: 1; font: inherit; border: none; background: transparent; color: var(--soft); padding: 10px 12px; border-radius: 14px; cursor: pointer; white-space: nowrap; transition: background .25s, color .25s, transform .2s; }
.tab:hover { color: var(--deep); transform: translateY(-1px); }
.tab.on { background: linear-gradient(90deg, var(--peach), var(--lilac), var(--mint)); color: var(--ink); font-weight: 700; box-shadow: 0 6px 16px rgba(111, 96, 240, .15); }
.pane.swap { animation: rise .35s ease both; }

.b-empty { padding: 16px; border-radius: 16px; background: var(--surface); text-align: center; color: var(--soft); margin-top: 6px; }
.b-empty.no { background: var(--rose); color: #5C1F33; }
.b-max { font-size: .9rem; color: var(--soft); margin-bottom: 12px; }
html[data-theme="dark"] .b-empty.no { color: var(--ink); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 10px; }
.plan { background: var(--surface); border-radius: 20px; padding: 16px; border: 2px solid transparent; animation: rise .45s ease both; transition: transform .25s, box-shadow .25s; position: relative; }
.plan:nth-child(2) { animation-delay: .07s; } .plan:nth-child(3) { animation-delay: .14s; } .plan:nth-child(4) { animation-delay: .21s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.star { border-color: #B3A9FA; background: linear-gradient(160deg, var(--surface) 55%, var(--lilac)); }
.plan-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.plan-top h3 { font-size: 1.05rem; }
.plan-top p { font-size: .8rem; color: var(--soft); }
.pi { font-size: 1.5rem; display: inline-block; animation: bob 3.4s ease-in-out infinite; }
.plan-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.plan-line b { color: var(--deep); }
.plan-line small { color: var(--soft); font-weight: 400; }
.tag { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.tag.ok { background: var(--mint); color: #1F7350; }
.tag.mid { background: var(--peach); color: #A2472F; }
.tag.no { background: var(--rose); color: #A03A5C; }
html[data-theme="dark"] .tag { color: var(--ink); }
.plan-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.plan-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: .88rem; padding: 6px 10px; background: var(--lilac); border-radius: 12px; animation: slide .35s ease both; }
.plan-list li.more { display: block; text-align: center; background: transparent; color: var(--soft); }
.cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move i { font-style: normal; color: var(--coral); display: inline-block; }
[dir="rtl"] .move i { transform: scaleX(-1); }
.plan-list em { font-style: normal; font-weight: 700; color: #1F7350; font-size: .8rem; }
html[data-theme="dark"] .plan-list em { color: #A9E3CD; }

.pchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.pchip { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.pchip i { font-style: normal; font-size: .78rem; color: var(--soft); }
.pchip:disabled { opacity: .45; cursor: not-allowed; }

.wi { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.wi select { max-width: 70%; }
.wi-range { display: flex; flex-direction: column; gap: 8px; color: var(--soft); font-size: .9rem; }
.wi-range b { color: var(--deep); font-size: 1.1rem; }
.wi-range input { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 99px; background: linear-gradient(90deg, #FFB4A2, #B3A9FA var(--p, 50%), var(--surface) var(--p, 50%)); outline: none; }
[dir="rtl"] .wi-range input { direction: ltr; }
.wi-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 4px solid var(--violet); cursor: grab; box-shadow: 0 4px 12px rgba(111, 96, 240, .35); transition: transform .2s; }
.wi-range input::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
.wi-range input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 4px solid var(--violet); cursor: grab; }
.wi-res { display: flex; align-items: baseline; gap: 12px; background: var(--surface); padding: 14px 18px; border-radius: 18px; }
.wi-res b { font-size: 2rem; font-weight: 800; background: linear-gradient(90deg, var(--coral), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wi-res em { font-style: normal; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--lilac); color: var(--soft); }
.wi-res em.up { background: var(--mint); color: #1F7350; }
.wi-res em.down { background: var(--rose); color: #A03A5C; }
html[data-theme="dark"] .wi-res em { color: var(--ink); }

.imp { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.imp-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr auto; gap: 12px; align-items: center; animation: slide .4s ease both; }
.imp-bar { height: 12px; background: var(--surface); border-radius: 99px; overflow: hidden; }
.imp-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #A9E3CD, var(--violet)); transform-origin: left; animation: growX .8s cubic-bezier(.2, .8, .2, 1) both; }
[dir="rtl"] .imp-bar span { transform-origin: right; }
@keyframes growX { from { transform: scaleX(0); } }
.imp-n { display: flex; flex-direction: column; align-items: flex-end; font-size: .85rem; }
.imp-n b { color: var(--deep); }
.imp-n small { color: var(--soft); font-size: .75rem; }

@media (max-width: 560px) {
  .boost-now { width: 100%; justify-content: center; }
  .imp-row { grid-template-columns: 1fr auto; }
  .imp-bar { grid-column: 1 / -1; grid-row: 2; }
  .tab b { font-size: .85rem; }
  .wi select { max-width: 100%; }
}
.qchip, .plan-list em, .wi-res em { direction: ltr; unicode-bidi: isolate; }

/* ---------- design polish ---------- */
::selection { background: #DAD5FF; color: var(--ink); }
html { scroll-behavior: smooth; scrollbar-color: #C9C1FF transparent; }
::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: linear-gradient(#FFB4A2, #B3A9FA); border-radius: 99px; }

.top { transition: box-shadow .3s, padding .3s; }
.top.scrolled { box-shadow: 0 8px 28px rgba(111, 96, 240, .14); padding-block: 8px; }

.hero-badge { position: relative; width: 92px; height: 92px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 30px; background: var(--surface); box-shadow: 0 14px 34px rgba(111, 96, 240, .22); animation: bob 3.6s ease-in-out infinite; }
.hero-badge img { width: 62px; height: 62px; }
.hero-badge::before { content: ""; position: absolute; inset: -4px; border-radius: 34px; padding: 4px; background: conic-gradient(from var(--a, 0deg), #FFB4A2, #B3A9FA, #A9E3CD, #FFB4A2); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 5s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
.orbit { position: absolute; inset: -18px; animation: orbit 9s linear infinite; pointer-events: none; }
.orbit i { position: absolute; width: 10px; height: 10px; border-radius: 50%; }
.orbit i:nth-child(1) { top: 0; left: 50%; background: #FFB4A2; }
.orbit i:nth-child(2) { bottom: 10%; left: 4%; background: #B3A9FA; width: 8px; height: 8px; }
.orbit i:nth-child(3) { bottom: 10%; right: 4%; background: #A9E3CD; width: 12px; height: 12px; }
@keyframes orbit { to { transform: rotate(360deg); } }

.pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pills > * { font-size: .88rem; font-weight: 600; color: var(--deep); text-decoration: none; background: var(--glass); backdrop-filter: blur(8px); border: 1px solid rgba(179, 169, 250, .45); padding: 7px 14px; border-radius: 999px; animation: rise .6s ease both; transition: transform .25s, box-shadow .25s, background .25s; }
.pills > *:nth-child(2) { animation-delay: .08s; } .pills > *:nth-child(3) { animation-delay: .16s; } .pills > *:nth-child(4) { animation-delay: .24s; }
.pills > *:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--surface); }
.pills a { background: linear-gradient(90deg, var(--peach), var(--lilac)); border-color: #B3A9FA; }

/* spotlight that follows the cursor on cards */
.card, .plan { position: relative; }
.card::after, .plan::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(179, 169, 250, .22), transparent 70%); }
.card:hover::after, .plan:hover::after { opacity: 1; }
.card { transition: box-shadow .3s, transform .3s; }
.card.side:hover, .sem:hover { box-shadow: 0 16px 40px rgba(111, 96, 240, .18); }
html[data-theme="dark"] .card::after, html[data-theme="dark"] .plan::after { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(155, 140, 255, .16), transparent 70%); }

/* glowing ring */
.ring-card::before { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(179, 169, 250, .35), transparent 65%); animation: glow 3.5s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.12); opacity: .6; } }
.ring, .ring-text { position: relative; }
.ring-text { position: absolute; }

/* mini card icons */
.mini { position: relative; overflow: hidden; }
.mini::before { position: absolute; inset-inline-end: 14px; top: 12px; font-size: 1.6rem; opacity: .85; animation: bob 3.4s ease-in-out infinite; }
.mini.peach::before { content: "📘"; } .mini.lilac::before { content: "📝"; animation-delay: -1s; } .mini.mint::before { content: "🎓"; animation-delay: -2s; top: auto; bottom: 10px; }

/* gradient primary button shine */
.btn.primary { position: relative; overflow: hidden; background-size: 200% auto; transition: background-position .5s, transform .2s, box-shadow .2s; }
.btn.primary:hover { background-position: right center; box-shadow: 0 14px 30px rgba(111, 96, 240, .38); }
.btn, .chip, .qchip, .tab, .pchip { position: relative; overflow: hidden; }
.ripple { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .7); transform: translate(-50%, -50%) scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
html[data-theme="dark"] .ripple { background: rgba(194, 185, 255, .35); }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(30); opacity: 0; } }

/* semester accent strip */
.sem { overflow: hidden; }
.sem::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: linear-gradient(180deg, #FFB4A2, #B3A9FA, #A9E3CD); opacity: .9; }
.sem-avg { transition: transform .3s; } .sem:hover .sem-avg { transform: scale(1.08); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); animation: none !important; }
.reveal.in { opacity: 1; transform: none; }

footer { position: relative; }
footer::before { content: ""; display: block; width: 120px; height: 4px; margin: 0 auto 18px; border-radius: 99px; background: linear-gradient(90deg, #FFB4A2, #B3A9FA, #A9E3CD); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- demo banner, backup row, undo toast ---------- */
.demo { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; background: linear-gradient(120deg, var(--surface), var(--peach) 60%, var(--lilac)); animation: rise .5s ease both; }
.demo[hidden] { display: none; }
.demo > span { font-size: 1.8rem; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
.demo p { flex: 1; font-weight: 500; }
.demo .btn { width: auto; margin: 0; white-space: nowrap; font-weight: 700; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.backup-hint { margin-bottom: 8px; }
#demoBtn2 { margin-bottom: 8px; color: var(--deep); }
.toast.act { pointer-events: auto; display: flex; align-items: center; gap: 14px; }
.toast-act { font: inherit; font-weight: 800; border: none; background: linear-gradient(90deg, #FFB4A2, #B3A9FA); color: #2B2140; padding: 5px 14px; border-radius: 99px; cursor: pointer; }
@media (max-width: 560px) { .demo { flex-wrap: wrap; } .demo .btn { width: 100%; } }
html[data-theme="dark"] .toast { background: #F3EFFF; color: #2B2140; }

/* consistency fixes: one font everywhere, no sideways scroll on mobile */
button,input,select,textarea{font-family:inherit}
html,body{overflow-x:clip;max-width:100%}

/* ===== Mobile stability: no sideways drift, pinch-zoom stays allowed ===== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body{max-width:100%;overflow-x:hidden;overflow-x:clip;overscroll-behavior-x:none}
:where(img,svg,video,canvas,iframe,table){max-width:100%}
:where(img,video){height:auto}
:where(h1,h2,h3,h4,p,li,a,span,td,th,label,button){overflow-wrap:break-word}
@media (pointer:coarse){input,select,textarea{font-size:max(16px,1em)}}

/* ---------- v3: hero links, semester credits, avg line, paste dialog, print ---------- */
.pills a { cursor: pointer; }
.pills a:not([href="#boost"]) { background: var(--glass); border-color: rgba(179, 169, 250, .45); }
.pills a:focus-visible { outline: 3px solid #B3A9FA; outline-offset: 2px; }
.flash { animation: flash 1.1s ease; }
@keyframes flash { 30% { box-shadow: 0 0 0 6px rgba(179, 169, 250, .55), var(--shadow); } }
.sem-avg small { font-weight: 600; opacity: .7; font-size: .78em; }
.icon.paste:hover { background: var(--mint); color: var(--deep); transform: scale(1.12) rotate(-6deg); }
.chart { position: relative; }
.chart .avg-line { position: absolute; inset-inline: 0; height: 0; border-top: 2px dashed rgba(111, 96, 240, .55); pointer-events: none; z-index: 1; animation: rise .6s .3s ease both; }
.chart .avg-line em { position: absolute; inset-inline-end: 0; top: -20px; font: 700 .68rem Rubik, sans-serif; font-style: normal; color: #6F60F0; background: var(--surface); padding: 1px 7px; border-radius: 99px; }
.paste-dlg { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: 90vh; overflow: auto; width: min(520px, 92vw); border: none; padding: 22px; color: var(--ink); background: var(--surface); border-radius: 24px; box-shadow: 0 30px 80px rgba(60, 40, 120, .3); }
.paste-dlg[open] { animation: pop-in .35s cubic-bezier(.3, 1.4, .5, 1); }
.paste-dlg::backdrop { background: rgba(43, 33, 64, .35); backdrop-filter: blur(4px); }
.paste-dlg h2 { margin: 0 0 6px; }
.paste-dlg textarea { width: 100%; box-sizing: border-box; margin: 10px 0 4px; padding: 12px 14px; border-radius: 16px; border: 2px solid #E3DEFF; background: var(--card); color: inherit; font: 500 .95rem Rubik, system-ui, sans-serif; resize: vertical; transition: border-color .25s, box-shadow .25s; }
.paste-dlg textarea:focus { outline: 0; border-color: #8B7CF6; box-shadow: 0 0 0 5px rgba(139, 124, 246, .18); }
.paste-dlg .row2 { margin-top: 10px; }
.paste-dlg .btn:disabled { opacity: .5; cursor: not-allowed; }
@keyframes pop-in { from { opacity: 0; transform: scale(.92) translateY(14px); } }

@media print {
  .bg, nav.top, .demo, #addSem, aside .card:not(#target), .boost, .na-faq, #faq, footer .links, .built-by, .toast, .icon, .add-course, .fold, .toggle, [class*="na-top"], [class*="na-prog"], [class*="na-install"] { display: none !important; }
  .confetti, .nk-tab, [class^="nk-"], .crow.head span:nth-child(4) { display: none !important; }
  .layout, .dash { display: block !important; } .layout > *, .dash > * { margin-bottom: 14px; }
  .mini-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px; }
  .ring-card { display: flex; justify-content: center; }
  body { background: #fff !important; color: #222 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; background: #fff !important; }
  .sem.closed .sem-body, .sem.print-open .sem-body { display: block !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  input { border: none !important; background: transparent !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- grade sheet upload: modal ---------- */
.scan-modal { position: fixed; inset: 0; z-index: 2147483002; display: grid; place-items: center; padding: 16px; background: rgba(43, 33, 64, .35); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.scan-modal.show { opacity: 1; }
.scan-modal[hidden] { display: none; }
.scan-sheet { position: relative; width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; background: var(--surface); transform: translateY(18px) scale(.97); transition: transform .3s cubic-bezier(.3, .9, .3, 1); }
.scan-modal.show .scan-sheet { transform: none; }
.scan-sheet h2 { font-size: 1.15rem; margin-bottom: 12px; padding-inline-end: 36px; }
.scan-x { position: absolute; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border: 0; border-radius: 12px; cursor: pointer; background: var(--lilac); color: var(--ink); font: inherit; transition: transform .2s; }
.scan-x:hover { transform: rotate(90deg); }
.scan-note { background: var(--peach); border-radius: 14px; padding: 8px 12px; margin-bottom: 12px; font-size: .88rem; }
.scan-into { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.scan-into label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.scan-into select, .scan-row input, .scan-area { font: inherit; color: var(--ink); background: var(--lilac); border: 2px solid transparent; border-radius: 12px; padding: 8px 10px; transition: border-color .2s; }
.scan-into select:focus, .scan-row input:focus, .scan-area:focus { outline: none; border-color: var(--violet); }
.scan-into .btn { width: auto; padding: 8px 14px; }
.scan-head, .scan-row { display: grid; grid-template-columns: 52px 1fr 76px 84px; gap: 8px; align-items: center; }
.scan-head { font-size: .8rem; color: var(--soft); font-weight: 600; padding: 0 2px 6px; }
.scan-list { display: grid; gap: 8px; }
.scan-row { animation: rise .4s ease both; transition: opacity .2s; }
.scan-row input { width: 100%; min-width: 0; }
.scan-row.off { opacity: .4; }
.scan-row.pass .gr { background: var(--mint); }
.scan-gname { font-weight: 700; color: var(--deep); margin-top: 8px; }
.scan-actions { display: flex; gap: 10px; margin-top: 18px; }
.scan-actions .btn { margin: 0; }
.scan-actions .btn.ghost { width: auto; background: var(--lilac); }
.scan-actions .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.scan-area { width: 100%; resize: vertical; line-height: 1.6; }
.scan-busy { text-align: center; padding: 18px 0 6px; }
.scan-paper { position: relative; width: 96px; height: 120px; margin: 0 auto 16px; border-radius: 14px; background: var(--lilac); padding: 18px 14px; display: grid; gap: 10px; align-content: start; overflow: hidden; box-shadow: var(--shadow); }
.scan-paper i { height: 8px; border-radius: 6px; background: linear-gradient(90deg, #FFB4A2, #B3A9FA); opacity: .55; }
.scan-paper i:nth-child(2) { width: 70%; } .scan-paper i:nth-child(4) { width: 50%; }
.scan-status { font-weight: 600; margin-bottom: 12px; }
.scan-bar { height: 8px; border-radius: 8px; background: var(--lilac); overflow: hidden; }
.scan-bar span { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, var(--coral), var(--violet)); transition: width .3s; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .6; } }
@media (max-width: 520px) { .scan-head, .scan-row { grid-template-columns: 46px 1fr 58px 64px; gap: 6px; } .scan-sheet { padding: 18px 14px; } }
@media (prefers-reduced-motion: reduce) { .scan-beam, .scan-row, .scan-bar span { animation: none !important; } }
.scan-actions .btn, .scan-into .btn { white-space: nowrap; }
@media (max-width: 520px) {
  .scan-into label { flex: 1 1 100%; flex-wrap: wrap; } .scan-into select { flex: 1; min-width: 0; }
  .scan-head, .scan-row { grid-template-columns: 40px 1fr 52px 60px; }
  .scan-row .toggle { width: 38px; height: 22px; }
  .scan-row input { padding: 8px 6px; }
}

/* ---------- grade sheet upload: card ---------- */
@keyframes beam { 0%, 100% { top: 12%; } 50% { top: 82%; } }
.scan-paper .scan-beam { position: absolute; inset-inline: 8px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #FFB4A2, #B3A9FA); box-shadow: 0 0 10px #B3A9FA; animation: beam 2.2s ease-in-out infinite; }
.scan { position: relative; isolation: isolate; margin-bottom: 18px; padding: 22px; border-radius: 28px; background: linear-gradient(135deg, #FFF6F2, #F1EEFF 50%, #ECFAF3); box-shadow: 0 18px 40px rgba(111, 96, 240, .16); animation: rise .6s ease both; transition: transform .3s, box-shadow .3s; }
.scan::before { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 30px; padding: 2px; background: conic-gradient(from var(--ang, 0deg), #FFB4A2, #CFC8FF, #A9E3CD, #F5B8C8, #FFB4A2); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spinB 6s linear infinite; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spinB { to { --ang: 360deg; } }
.scan.drag { transform: scale(1.02); box-shadow: 0 24px 50px rgba(111, 96, 240, .3); }
.scan.drag::before { animation-duration: 1.2s; }
.scan-spark { position: absolute; z-index: -1; font-size: 15px; opacity: .7; animation: tw 3s ease-in-out infinite; pointer-events: none; }
.scan-spark.k1 { top: 14px; inset-inline-end: 26%; color: #F28C7A; } .scan-spark.k2 { bottom: 54px; inset-inline-start: 10px; color: #8B7CF6; animation-delay: -1s; } .scan-spark.k3 { top: 46%; inset-inline-end: 12px; color: #4DB38A; animation-delay: -2s; }
.scan-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.scan-logo { position: relative; flex: none; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: #fff; box-shadow: 0 10px 24px rgba(111, 96, 240, .2); animation: floatY 3.6s ease-in-out infinite; }
.scan-logo img { width: 42px; height: 42px; }
.scan-logo::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px dashed #CFC8FF; animation: spinB2 12s linear infinite; }
@keyframes spinB2 { to { transform: rotate(360deg); } }
@keyframes floatY { 50% { transform: translateY(-6px); } }
.scan-new { display: inline-block; font-size: .74rem; font-weight: 800; color: #fff; background: linear-gradient(90deg, var(--coral), var(--violet)); padding: 3px 12px; border-radius: 99px; margin-bottom: 6px; box-shadow: 0 6px 14px rgba(227, 110, 87, .3); }
.scan-top h3 { font-size: 1.25rem; line-height: 1.3; background: linear-gradient(90deg, var(--coral), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scan-top p { color: var(--soft); font-size: .92rem; margin-top: 3px; }
.scan-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.scan-opt { position: relative; overflow: hidden; font: inherit; color: var(--ink); border: 0; border-radius: 22px; padding: 18px 12px 16px; cursor: pointer; display: grid; justify-items: center; gap: 6px; text-align: center; background: #fff; box-shadow: 0 8px 22px rgba(111, 96, 240, .12); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s; animation: rise .6s ease both; }
.scan-opt.o1 { animation-delay: .08s; } .scan-opt.o2 { animation-delay: .16s; } .scan-opt.o3 { animation-delay: .24s; }
.scan-opt::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: .9; transition: opacity .3s; }
.scan-opt.o1::before { background: linear-gradient(160deg, #FFE6DE, #fff 75%); } .scan-opt.o2::before { background: linear-gradient(160deg, #E8E4FF, #fff 75%); } .scan-opt.o3::before { background: linear-gradient(160deg, #D9F3E7, #fff 75%); }
.scan-opt > * { position: relative; z-index: 1; }
.scan-opt::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: 1; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .8), transparent); transform: skewX(-18deg); transition: left .7s ease; }
.scan-opt:hover::after, .scan-opt:focus-visible::after { left: 130%; }
.scan-opt:hover, .scan-opt:focus-visible { transform: translateY(-6px) scale(1.03); box-shadow: 0 18px 34px rgba(111, 96, 240, .25); outline: none; }
.scan-opt:active { transform: scale(.97); }
.scan-opt b { font-size: 1rem; }
.scan-opt small { color: var(--soft); font-size: .78rem; line-height: 1.35; }
.scan-opt .go { margin-top: 4px; font-size: .78rem; font-weight: 800; padding: 4px 12px; border-radius: 99px; color: #fff; transition: transform .3s; }
.scan-opt.o1 .go { background: #E8846F; } .scan-opt.o2 .go { background: #7B6DF2; } .scan-opt.o3 .go { background: #3FA57B; }
.scan-opt:hover .go { transform: scale(1.08); }
.ill { width: 74px; height: 74px; }
.ill svg { width: 100%; height: 100%; overflow: visible; }
/* document: page, lines, scan beam, upload arrow */
.ill-doc .beam { animation: docBeam 2.4s ease-in-out infinite; }
@keyframes docBeam { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(30px); } }
.ill-doc .up { animation: upArrow 1.6s ease-in-out infinite; transform-origin: center; }
@keyframes upArrow { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-5px); } }
/* camera: lens ring turns, flash bursts */
.ill-cam .lens { transform-origin: 37px 42px; animation: spinB2 6s linear infinite; }
.ill-cam .flash { transform-origin: 56px 20px; animation: flash 2.6s ease-in-out infinite; }
@keyframes flash { 0%, 70%, 100% { opacity: 0; transform: scale(.4); } 78% { opacity: 1; transform: scale(1.2); } 88% { opacity: 0; transform: scale(1.6); } }
.scan-opt:hover .ill-cam .flash { animation-duration: 1s; }
/* hand typing: line draws, pencil follows */
.ill-pen .ln { stroke-dasharray: 40; animation: write 2.4s ease-in-out infinite; }
.ill-pen .ln.l2 { animation-delay: .4s; }
@keyframes write { 0% { stroke-dashoffset: 40; } 60%, 100% { stroke-dashoffset: 0; } }
.ill-pen .pen { animation: penMove 2.4s ease-in-out infinite; }
@keyframes penMove { 0% { transform: translate(-22px, 0); } 60% { transform: translate(0, 0); } 80% { transform: translate(-22px, 10px); } 100% { transform: translate(-22px, 0); } }
.scan-opt:hover .ill { animation: pop .5s ease; }
@keyframes pop { 40% { transform: scale(1.15) rotate(-4deg); } }
.scan-drop { margin-top: 14px; text-align: center; color: var(--soft); font-size: .82rem; }
.scan-drop b { color: var(--deep); }
html[data-theme="dark"] .scan { background: linear-gradient(135deg, #2E2440, #262041 50%, #1E3330); }
html[data-theme="dark"] .scan-opt, html[data-theme="dark"] .scan-logo { background: #2E2746; }
html[data-theme="dark"] .scan-opt.o1::before { background: linear-gradient(160deg, #4A3040, #2E2746 75%); } html[data-theme="dark"] .scan-opt.o2::before { background: linear-gradient(160deg, #3A3366, #2E2746 75%); } html[data-theme="dark"] .scan-opt.o3::before { background: linear-gradient(160deg, #24453B, #2E2746 75%); }
html[data-theme="dark"] .scan-opt::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .12), transparent); }
@media (max-width: 640px) {
  .scan { padding: 18px 14px; }
  .scan-top h3 { font-size: 1.08rem; }
  .scan-btns { grid-template-columns: 1fr; }
  .scan-opt { grid-template-columns: 62px 1fr auto; justify-items: start; align-items: center; text-align: start; column-gap: 12px; row-gap: 2px; padding: 12px 14px; }
  .scan-opt .ill { grid-row: span 2; width: 58px; height: 58px; }
  .scan-opt .go { grid-row: 1 / span 2; grid-column: 3; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .scan, .scan::before, .scan *, .scan-opt::after { animation: none !important; transition: none !important; } }
