﻿:root{
  --page:#d6d9df;
  --chrome:#ece9d8;
  --chrome2:#d7d0bb;
  --panel:#f7f3e8;
  --panel2:#fffdf7;
  --ink:#1d2530;
  --muted:#596272;
  --line:#8d97a6;
  --line-dark:#4c5c70;
  --blue:#244a7c;
  --blue2:#456fa3;
  --gold:#c9962d;
  --green:#3f7e53;
  --red:#9b2f2f;
  --shadow:2px 2px 0 rgba(0,0,0,.22);
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:Tahoma,Verdana,Arial,sans-serif;
  font-size:13px;
  color:var(--ink);
  background:
    linear-gradient(#eef1f6,#c9ced8 260px,#b9c0cc 261px,#d8dbe1 100%);
}
body:before{
  content:"";
  position:fixed;inset:0;
  background:linear-gradient(90deg,rgba(255,255,255,.22) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.2) 1px,transparent 1px);
  background-size:16px 16px;
  pointer-events:none;
  opacity:.38;
}
.app{
  width:1180px;
  margin:10px auto 26px;
  border:1px solid #3b4d63;
  border-top-color:#72839a;
  background:#e9e5d5;
  box-shadow:0 3px 18px rgba(0,0,0,.28);
  position:relative;
}
.topbar{
  height:72px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:8px 12px;
  color:#fff;
  border-bottom:1px solid #172d47;
  background:linear-gradient(#315d91,#173a63 55%,#102943);
}
.brand{display:flex;align-items:center;gap:10px}.sigil{
  width:48px;height:48px;
  display:grid;place-items:center;
  border:1px solid #0a2038;
  background:linear-gradient(#f7f3e8,#c7bea4);
  color:#173a63;
  font:bold 29px Georgia,serif;
  box-shadow:inset 1px 1px 0 #fff,1px 1px 0 rgba(0,0,0,.35);
}
.brand h1{margin:0;font:bold 22px Georgia,serif;letter-spacing:.01em;text-shadow:1px 1px 0 #001a33}.brand p{margin:3px 0 0;color:#d9e4f2;font-size:11px}.userbox{
  display:flex;align-items:center;gap:8px;
  padding:7px 8px;
  border:1px solid #0d263f;
  background:rgba(255,255,255,.12);
  box-shadow:inset 1px 1px 0 rgba(255,255,255,.2);
}.userbox select{
  font-family:Tahoma,Verdana,Arial,sans-serif;
  padding:3px 22px 3px 5px;
  border:1px solid #28394d;
  background:#fff;
  color:#111;
}
.layout{display:grid;grid-template-columns:245px 1fr 275px;gap:8px;padding:8px}.panel{
  background:var(--chrome);
  border:1px solid var(--line-dark);
  box-shadow:var(--shadow),inset 1px 1px 0 #fff;
  overflow:hidden;
}.panel.pad{padding:8px}.panel-title{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  margin:-8px -8px 8px;
  padding:6px 8px;
  border-bottom:1px solid #8e8067;
  background:linear-gradient(#fdf8e8,#d9ceb5);
}.panel-title h2{font:bold 14px Tahoma,Verdana,sans-serif;margin:0;color:#1c365a}.small{font-size:11px;color:var(--muted);line-height:1.3}.character{
  padding:8px;
  color:#fff;
  border-bottom:1px solid #0c223a;
  background:linear-gradient(#2b527f,#17385d);
}.portrait{display:flex;gap:8px;align-items:center}.avatar{
  width:46px;height:46px;
  display:grid;place-items:center;
  border:1px solid #071b2f;
  background:linear-gradient(#fff7dd,#cbb879);
  color:#1b2c3f;font-size:25px;
  box-shadow:inset 1px 1px 0 #fff;
}.ctitle{font-weight:bold;font-size:14px}.statgrid{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}.cstat{
  padding:6px;
  border:1px solid rgba(255,255,255,.3);
  background:rgba(0,0,0,.14);
  box-shadow:inset 1px 1px 0 rgba(255,255,255,.14);
}.cstat b{display:block;font-size:19px;color:#fff}.xpbar{
  height:15px;margin:9px 0 5px;
  border:1px solid #0b1e33;
  background:#1e2b3b;
  box-shadow:inset 1px 1px 3px rgba(0,0,0,.8);
}.xpfill{height:100%;width:0%;background:linear-gradient(#ffe8a0,#d08d20 55%,#9e6412);border-right:1px solid #5b3909}.resource{
  margin:8px 0 0;
  padding:7px;
  border:1px solid #9f927a;
  background:#fbf7e7;
  box-shadow:inset 1px 1px 0 #fff;
}.resource b{font-size:22px;color:#17385d}.navtabs{display:grid;gap:6px;padding:8px}.achievement-list{display:grid;gap:5px;padding:0 8px 8px}.badge{
  display:flex;gap:7px;align-items:center;
  padding:6px;
  border:1px solid #a39781;
  background:linear-gradient(#fffdf6,#ece3ce);
  font-size:12px;
}.badge.locked{opacity:.48;filter:grayscale(1)}
button,input{font:inherit}button{
  border:1px solid #4a5665;
  border-top-color:#fff;
  border-left-color:#fff;
  background:linear-gradient(#ffffff,#d7d7d7);
  color:#111;
  padding:5px 9px;
  font-weight:bold;
  cursor:pointer;
  box-shadow:1px 1px 0 rgba(0,0,0,.22);
}.primary,.dark{
  color:#fff;
  border-color:#071d33;
  border-top-color:#8aa5c3;
  border-left-color:#8aa5c3;
  background:linear-gradient(#4c78ad,#1f4d82 58%,#14365b);
}.ghost{background:linear-gradient(#f8f1de,#e5d8bb)}.danger{color:var(--red)}button:disabled{opacity:.5;cursor:not-allowed}button:hover:not(:disabled){filter:brightness(1.04)}button:active:not(:disabled){border-top-color:#4a5665;border-left-color:#4a5665;border-bottom-color:#fff;border-right-color:#fff;box-shadow:inset 1px 1px 2px rgba(0,0,0,.3)}
.lesson{min-height:520px;display:flex;flex-direction:column}.lesson-head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:12px;
  padding:10px;
  border-bottom:1px solid #8e8067;
  background:linear-gradient(#fff8e8,#ded2b7);
}.qtype{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#174a7d;font-weight:bold}.prompt{
  margin-top:8px;
  font:bold clamp(34px,4.5vw,64px) Georgia,serif;
  line-height:.98;
  letter-spacing:-.03em;
  color:#1b232d;
}.hint{margin-top:6px;color:#596272}.lesson-body{padding:10px;display:grid;gap:9px}.choices{display:grid;gap:7px}.choice{text-align:left;background:linear-gradient(#fff,#eee)}.feedback{min-height:25px;font-weight:bold}.good{color:#0d6830}.bad{color:#9b1e1e}.lesson-footer{margin-top:auto;display:flex;gap:8px;flex-wrap:wrap;padding:8px 10px;border-top:1px solid #9b8d73;background:#d9ceb5}.sentence-stage{display:grid;gap:8px}.answer-lane,.word-bank{
  min-height:70px;
  display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px;
  padding:8px;
  border:1px solid #8b8b8b;
  background:#fff;
  box-shadow:inset 1px 1px 2px rgba(0,0,0,.18);
}.answer-lane{background:#fff8dc;border-style:dashed}.answer-lane.over,.word-bank.over{outline:2px solid #2e64a1}.tile{
  padding:6px 10px;
  border:1px solid #6b5a35;
  background:linear-gradient(#fff1c2,#d0ad5c);
  font-weight:bold;
  cursor:grab;
  user-select:none;
  box-shadow:1px 1px 0 rgba(0,0,0,.25);
}.tile:active{cursor:grabbing}.tile.dragging{opacity:.4}.tile.used{opacity:.25;pointer-events:none}.placeholder{color:#777;align-self:center}.deck{display:grid;gap:5px;max-height:320px;overflow:auto}.word{display:flex;justify-content:space-between;gap:8px;padding:6px;border:1px solid #a69a83;background:#fffdf6}.word b{font-size:15px}.word span{font-size:11px;color:#606877}.skill-wrap{margin:0 8px 8px;padding:8px}.tree-shell{border:1px solid #4c5c70;background:#c7c0aa;box-shadow:inset 1px 1px 0 #fff}.tree-toolbar{
  height:35px;
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:5px 7px;
  border-bottom:1px solid #625640;
  background:linear-gradient(#fdf8e8,#d8ccb0);
}.zoom-controls{display:flex;gap:4px;align-items:center}.zoom-controls button{padding:3px 8px}.tree-viewport{
  height:690px;
  position:relative;
  overflow:hidden;
  cursor:grab;
  background:#edf1f6;
  background-image:linear-gradient(#d3dbe6 1px,transparent 1px),linear-gradient(90deg,#d3dbe6 1px,transparent 1px),linear-gradient(#f7f9fc,#dfe5ee);
  background-size:24px 24px,24px 24px,100% 100%;
}.tree-viewport:active{cursor:grabbing}.tree-stage{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}.tree{position:relative;width:1280px;min-height:1520px}.branch{position:absolute;background:#6a7c91;height:2px;transform-origin:left center;border-radius:0;opacity:.75;z-index:1;box-shadow:0 1px 0 rgba(255,255,255,.7)}.node{
  position:absolute;width:168px;min-height:112px;
  z-index:2;text-align:left;
  padding:7px;
  border:1px solid #566477;
  background:linear-gradient(#ffffff,#e7e7e7);
  box-shadow:2px 2px 0 rgba(0,0,0,.22),inset 1px 1px 0 #fff;
}.node.owned{border-color:#2f6b3e;background:linear-gradient(#f7fff8,#cfe9d4)}.node.available{border-color:#9a6500;background:linear-gradient(#fff9db,#efd07f)}.node.locked{opacity:.45;filter:saturate(.3)}.node .icon{font-size:18px;float:right;margin-left:5px}.node h3{font:bold 12px Tahoma,Verdana,sans-serif;margin:0 0 4px;color:#17385d;line-height:1.15}.node p{font-size:11px;color:#535c69;margin:0 0 6px;line-height:1.25}.node button{font-size:11px;padding:3px 8px}.cost{display:inline-flex;font-size:10px;font-weight:bold;background:#f6e8bb;border:1px solid #c0a460;padding:2px 5px;margin-bottom:5px;color:#60451f}.legend{display:flex;gap:5px;flex-wrap:wrap}.key{font-size:11px;border:1px solid #968a72;background:#fdf8e8;padding:3px 6px}@media(max-width:1200px){.app{width:98vw}.layout{grid-template-columns:230px minmax(0,1fr) 250px}}@media(max-width:900px){.layout{grid-template-columns:1fr}.tree-viewport{height:600px}.topbar{height:auto;align-items:flex-start;flex-direction:column}}

/* Late-2000s desk theme, warmer and less blue-heavy */
:root{
  --page:#d8d4c7;
  --chrome:#e7dfcd;
  --chrome2:#cfc2a4;
  --panel:#f5eedc;
  --panel2:#fffaf0;
  --ink:#211d18;
  --muted:#5e5549;
  --line:#9b8e76;
  --line-dark:#514538;
  --blue:#6e2d25;
  --blue2:#925044;
  --gold:#b4842b;
  --green:#526f38;
  --red:#8f2e25;
}
body{color:#211d18;background:linear-gradient(#ebe4d4,#cfc5ac 260px,#bdb197 261px,#ded7c8 100%)}
.app{border-color:#4f4234;border-top-color:#8d7d63;background:#e3dac4}
.topbar{color:#fff;border-bottom-color:#36281f;background:linear-gradient(#7b3d32,#5a2c25 55%,#3d1f1b)}
.brand h1{text-shadow:1px 1px 0 #24130f}.brand p{color:#f0dfc0}.sigil{border-color:#3c241b;color:#542920;background:linear-gradient(#fff6dc,#d3c08a)}
.userbox{border-color:#3b211b;background:rgba(255,244,218,.14)}
.topnav{display:flex;align-items:flex-end;gap:3px;align-self:stretch;padding-top:27px}
.tabbtn{height:31px;padding:5px 14px;border-color:#4c3e32;border-top-color:#fff6df;border-left-color:#fff6df;background:linear-gradient(#f9efd7,#cbbd9e);color:#2b211a;box-shadow:1px 1px 0 rgba(0,0,0,.25)}
.tabbtn.active{background:linear-gradient(#fffaf0,#e7dfcd);border-bottom-color:#e7dfcd;color:#5a2c25}
.page{display:none}.page.active{display:block}
.learn-layout{grid-template-columns:minmax(0,1fr) 300px}.character-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:8px;padding:8px}.character-sidebar{align-self:start}
.panel-title h2,.node h3{color:#5a2c25}.qtype{color:#6e2d25}.prompt{color:#231c16}.small.light{color:#f8ecd7}.character{border-bottom-color:#3b211b;background:linear-gradient(#754139,#4f2924)}
.avatar{border-color:#3b211b;color:#5a2c25;background:linear-gradient(#fff7dc,#cdbd84)}.cstat{background:rgba(0,0,0,.18);border-color:rgba(255,255,255,.32)}
.resource b{color:#5a2c25}.primary,.dark{color:#fff;border-color:#321b16;border-top-color:#bc8174;border-left-color:#bc8174;background:linear-gradient(#8d4a3f,#633128 58%,#44211d)}
.xpbar{border-color:#2c1a16;background:#281d18}.xpfill{background:linear-gradient(#fff0a8,#c89431 55%,#8a5a18)}
.lesson-head{background:linear-gradient(#fff6e2,#d5c7aa)}.lesson-footer{background:#d3c5aa}.answer-lane{background:#fff4cf}.answer-lane.over,.word-bank.over{outline:2px solid #8f4a3a}.tile{border-color:#6c562d;background:linear-gradient(#fff1bd,#c8a24e);color:#221b12}
.tree-shell{border-color:#514538;background:#c8b991}.tree-toolbar{background:linear-gradient(#fff7df,#d0c0a2);border-bottom-color:#75664f}.tree-viewport{background:#ede8da;background-image:linear-gradient(#d7cfbc 1px,transparent 1px),linear-gradient(90deg,#d7cfbc 1px,transparent 1px),linear-gradient(#f9f5ea,#e3dac8)}
.branch{background:#7c6c50}.node{border-color:#625342;background:linear-gradient(#fffaf0,#e2d8c3);color:#211d18}.node.owned{border-color:#526f38;background:linear-gradient(#fbfff3,#d9e7c9)}.node.available{border-color:#94651c;background:linear-gradient(#fff8d8,#e1c16b)}.node.locked{opacity:.55;filter:saturate(.35)}.node p{color:#51483d}.cost{background:#f4e6b8;border-color:#b4964e;color:#4d3818}.key{background:#fff8e8;color:#332a20}
@media(max-width:1200px){.learn-layout{grid-template-columns:minmax(0,1fr) 280px}.character-layout{grid-template-columns:250px minmax(0,1fr)}}@media(max-width:900px){.learn-layout,.character-layout{grid-template-columns:1fr}.topnav{padding-top:0;align-self:auto}.topbar{height:auto;align-items:flex-start;flex-direction:column}}


/* Final 2007 education-portal pass: lighter blue chrome, fixed viewport, separated top bar */
html,body{height:100%;min-height:0;overflow:hidden;}
body{
  background:#bfc9d4;
  background-image:
    linear-gradient(#e9eef4 0,#c8d2dd 72px,#b7c1cc 73px,#d8dde3 100%);
  color:#1e242b;
}
body:before{opacity:.18;background-size:18px 18px;}
.topbar{
  width:1180px;
  height:58px;
  margin:8px auto 0;
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap:10px;
  padding:0 9px;
  color:#102333;
  border:1px solid #566f84;
  border-top-color:#d9e7f2;
  border-left-color:#d9e7f2;
  border-bottom-color:#2f475a;
  background:linear-gradient(#d9ebf8,#9fc2dc 52%,#7fa9c8 53%,#6891b1);
  box-shadow:2px 2px 0 rgba(0,0,0,.2),inset 1px 1px 0 #f9fdff;
}
.app{
  width:1180px;
  height:calc(100vh - 76px);
  margin:6px auto 0;
  border:1px solid #4f5d68;
  border-top-color:#eef5fa;
  border-left-color:#eef5fa;
  background:#d9d2bd;
  box-shadow:2px 2px 0 rgba(0,0,0,.25);
  overflow:hidden;
}
.brand{height:56px;min-width:340px;}
.sigil{
  width:42px;height:42px;
  border-color:#50606b;
  color:#1d405d;
  background:linear-gradient(#fffdfa,#d9c99f);
  font-size:25px;
  align-self:center;
}
.brand h1{font-size:20px;color:#102333;text-shadow:1px 1px 0 #eef7ff;}
.brand p{color:#263d50;text-shadow:1px 1px 0 rgba(255,255,255,.45);}
.topnav{align-self:flex-end;padding-top:0;margin-top:auto;}
.tabbtn{
  height:29px;
  padding:4px 17px;
  border:1px solid #526a7e;
  border-top-color:#f6fbff;
  border-left-color:#f6fbff;
  background:linear-gradient(#f8fbfd,#c6d9e7 55%,#a8c4d9);
  color:#172b3d;
  box-shadow:1px 1px 0 rgba(0,0,0,.22);
}
.tabbtn.active{
  background:linear-gradient(#fffef8,#efe4ca);
  color:#4a2c18;
  border-bottom-color:#efe4ca;
}
.userbox{
  align-self:center;
  color:#102333;
  border-color:#5b7284;
  background:rgba(255,255,255,.38);
  box-shadow:inset 1px 1px 0 rgba(255,255,255,.7);
}
.page{height:100%;overflow:hidden;}
.layout{height:100%;padding:7px;gap:7px;}
.learn-layout{grid-template-columns:minmax(0,1fr) 290px;}
.character-layout{height:100%;grid-template-columns:258px minmax(0,1fr);gap:7px;padding:7px;overflow:hidden;}
.panel{background:#e8dec7;border-color:#4f5d68;box-shadow:1px 1px 0 rgba(0,0,0,.24),inset 1px 1px 0 #fff;}
.panel-title{background:linear-gradient(#fff8e6,#d2c2a3);border-bottom-color:#7d6f56;}
.panel-title h2,.node h3{color:#273e52;}
.character{background:linear-gradient(#bcd8ec,#739fbd 55%,#527f9f);border-bottom-color:#405d73;color:#102333;}
.small.light{color:#102333;}
.ctitle{color:#102333;}
.cstat{background:rgba(255,255,255,.38);border-color:rgba(55,82,102,.5);}
.cstat b{color:#102333;}
.resource b{color:#273e52;}
.primary,.dark{color:#fff;border-color:#264257;border-top-color:#d4e6f3;border-left-color:#d4e6f3;background:linear-gradient(#7ca9ca,#416f91 58%,#2d526f);}
.qtype{color:#365e7b;}.prompt{color:#1f2427;}
.lesson{min-height:0;height:100%;}
.lesson-head{padding:8px 10px;background:linear-gradient(#fff8e7,#d8c8aa);}
.prompt{font-size:clamp(30px,4vw,54px);}
.lesson-body{padding:9px;}
.lesson-footer{padding:7px 9px;background:#d2c2a3;}
.deck{max-height:calc(100vh - 190px);overflow:auto;}
.character-sidebar{height:100%;overflow:hidden;display:flex;flex-direction:column;}
.achievement-list{overflow:auto;min-height:0;}
.skill-wrap{height:100%;margin:0;padding:7px;display:flex;flex-direction:column;}
.skill-wrap>.panel-title{flex:0 0 auto;}
.tree-shell{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;background:#c5b894;border-color:#4f5d68;}
.tree-toolbar{height:32px;flex:0 0 auto;background:linear-gradient(#fff8e6,#d0c0a2);}
.tree-viewport{flex:1 1 auto;height:auto;min-height:0;background:#e9edf1;background-image:linear-gradient(#ccd6de 1px,transparent 1px),linear-gradient(90deg,#ccd6de 1px,transparent 1px),linear-gradient(#f8fafb,#e1e7eb);}
.node{background:linear-gradient(#fffefa,#ddd2bc);border-color:#596a77;color:#202020;}
.node p{color:#3f464c;}.node.locked{opacity:.62;filter:saturate(.45)}
.node.owned{background:linear-gradient(#fbfff3,#d6e5c4);border-color:#526f38}.node.available{background:linear-gradient(#fff9d8,#e5c674);border-color:#8b641f}
button{border-color:#4e5b65;border-top-color:#fff;border-left-color:#fff;background:linear-gradient(#ffffff,#d8d8d8);color:#111;}
.answer-lane.over,.word-bank.over{outline:2px solid #527f9f;}
@media(max-width:1200px){.topbar,.app{width:98vw}.learn-layout{grid-template-columns:minmax(0,1fr) 270px}.character-layout{grid-template-columns:250px minmax(0,1fr)}}
@media(max-width:900px){html,body{overflow:auto}.topbar,.app{width:98vw;height:auto}.app{min-height:calc(100vh - 76px);overflow:visible}.page{height:auto}.learn-layout,.character-layout{grid-template-columns:1fr;height:auto}.topbar{height:auto;align-items:flex-start;flex-direction:column}.tree-viewport{height:520px}.topnav{align-self:auto}.character-sidebar{height:auto}}


/* Readability and late-2000s portal refinements */
body{font-size:13px;}
.topbar{height:62px;}
.brand{min-width:310px;}
.topnav{gap:2px;flex-wrap:nowrap;overflow:hidden;}
.tabbtn{height:28px;padding:4px 9px;font-size:12px;white-space:nowrap;}
.userbox{font-size:12px;}
.app{height:calc(100vh - 82px);}
.small{color:#3e454b;font-size:12px;line-height:1.35;}
.panel-title h2{font-size:15px;}
.bodycopy{font-size:13px;line-height:1.45;color:#242a30;margin:0;}
.node h3{font-size:13px;color:#1e394f;}
.node p{font-size:12px;color:#2d3338;line-height:1.3;}
.node .cost{font-size:11px;color:#33250f;}
.badge{font-size:13px;color:#242a30;}
.word{font-size:13px;color:#242a30;}
.word span{font-size:12px;color:#3e454b;}
.choice{font-size:14px;color:#222;}
.hint{color:#3e454b;font-size:13px;}
.qtype{font-size:12px;}
.feedback{font-size:14px;}
.statgrid{display:none;}
.stat-table{margin-top:8px;border:1px solid rgba(47,71,90,.55);background:rgba(255,255,255,.42);box-shadow:inset 1px 1px 0 rgba(255,255,255,.6);}
.stat-table div{display:flex;justify-content:space-between;align-items:center;padding:5px 7px;border-bottom:1px solid rgba(47,71,90,.28);}
.stat-table div:last-child{border-bottom:0;}
.stat-table span{font-size:12px;color:#102333;}
.stat-table b{font-size:15px;color:#102333;}
.portal-page{height:100%;padding:7px;overflow:hidden;}
.two-col{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:7px;}
.unit-list,.dictionary-list,.grammar-list{display:grid;gap:6px;max-height:calc(100vh - 162px);overflow:auto;padding-right:3px;}
.unit,.dict-entry,.grammar-entry{border:1px solid #9d927d;background:linear-gradient(#fffef8,#e9dfc9);box-shadow:inset 1px 1px 0 #fff;padding:8px;color:#23282e;}
.unit h3,.dict-entry h3,.grammar-entry h3{margin:0 0 4px;font:bold 14px Tahoma,Verdana,sans-serif;color:#1e394f;}
.unit .meter{height:13px;margin-top:6px;border:1px solid #5d6670;background:#fff;box-shadow:inset 1px 1px 2px rgba(0,0,0,.25);}
.unit .meter span{display:block;height:100%;background:linear-gradient(#b8d7ef,#6e9bbb 55%,#4f7f9f);}
.info-table{border:1px solid #9d927d;background:#fffaf0;}
.info-table div{display:flex;justify-content:space-between;gap:12px;padding:7px;border-bottom:1px solid #d1c5ad;}
.info-table div:last-child{border-bottom:0;}
.info-table b{color:#1e394f;}
.info-table span{color:#252b30;text-align:right;}
.module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.module-grid button{text-align:left;min-height:52px;}
.dict-search{margin-bottom:8px;}
.dict-search input{width:100%;padding:6px;border:1px solid #6b747d;background:#fff;color:#111;font:13px Tahoma,Verdana,Arial,sans-serif;}
.review-box{display:grid;grid-template-columns:90px 1fr auto;gap:10px;align-items:center;border:1px solid #9d927d;background:#fffaf0;padding:12px;}
.review-box b{font-size:38px;color:#1e394f;}
.review-box span{font-size:14px;}

.review-calendar{border:1px solid #7f7563;background:#efe5cf;box-shadow:2px 2px 0 rgba(0,0,0,.16),inset 1px 1px 0 #fff;overflow:hidden;}
.calendar-head{display:grid;grid-template-columns:32px 1fr 32px;align-items:center;border-bottom:1px solid #8e8067;background:linear-gradient(#fff8e6,#d4c4a6);}
.calendar-head button{height:28px;border:0;border-right:1px solid #9d927d;background:linear-gradient(#fdfdfd,#d8d8d8);font:bold 13px Tahoma,Verdana,sans-serif;color:#1e394f;}
.calendar-head button:last-child{border-right:0;border-left:1px solid #9d927d;}
.calendar-title{text-align:center;font:bold 14px Georgia,serif;color:#1e394f;letter-spacing:.02em;}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid #fff;}
.calendar-dow{padding:5px 2px;text-align:center;font:bold 11px Tahoma,Verdana,sans-serif;color:#1e394f;background:linear-gradient(#d8ecfb,#a9cbe1);border-right:1px solid #8aa2b4;border-bottom:1px solid #7f95a5;}
.calendar-dow:nth-child(7n){border-right:0;}
.calendar-day{min-height:54px;padding:4px;border-right:1px solid #c7bca7;border-bottom:1px solid #c7bca7;background:linear-gradient(#fffdf7,#eee7d8);position:relative;color:#222;}
.calendar-day:nth-child(7n){border-right:0;}
.calendar-day.other{background:#ddd6c7;color:#74706a;}
.calendar-day.today{outline:2px solid #9c6b17;outline-offset:-3px;background:linear-gradient(#fff4c8,#ead39c);}
.calendar-num{font:bold 12px Tahoma,Verdana,sans-serif;}
.calendar-dot{position:absolute;right:5px;bottom:5px;width:9px;height:9px;border:1px solid #47633c;background:linear-gradient(#cce9b5,#6f9c49);box-shadow:inset 1px 1px 0 rgba(255,255,255,.6);}
.calendar-due{position:absolute;left:4px;bottom:3px;font-size:10px;color:#1e394f;background:#fff8e6;border:1px solid #b7aa8f;padding:1px 3px;}
.review-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px;}
.review-summary div{border:1px solid #9d927d;background:#fffaf0;padding:7px;box-shadow:inset 1px 1px 0 #fff;}
.review-summary b{display:block;font-size:18px;color:#1e394f;}
.review-queue{margin-top:8px;border:1px solid #9d927d;background:#fffaf0;padding:8px;}
.review-queue h3{margin:0 0 6px;font:bold 13px Tahoma,Verdana,sans-serif;color:#1e394f;}
.review-queue ul{margin:0;padding-left:18px;line-height:1.55;}
@media(max-width:1100px){.tabbtn{padding:4px 6px;font-size:11px}.brand{min-width:260px}.two-col{grid-template-columns:1fr 260px}}



/* Fixes: readable achievements, orthogonal skill links, reset dialog */
.branch{display:none;}
.branch-svg{position:absolute;left:0;top:0;z-index:0;pointer-events:none;overflow:visible;}
.branch-svg path{fill:none;stroke:#6d624e;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;opacity:.82;}
.node{z-index:5;background-clip:padding-box;}
.node.locked{opacity:1;filter:saturate(.45);background:linear-gradient(#f7f7f7,#dddddd);color:#3e3e3e;}
.node.locked h3{color:#565656}.node.locked p{color:#5f5f5f}.node.locked button{color:#555;}
.achievement-list{padding:8px;display:grid;gap:7px;background:#e3d8bf;border-top:1px solid #796d57;}
.achievement-title{font:bold 13px Tahoma,Verdana,sans-serif;color:#1e394f;border:1px solid #9d927d;background:linear-gradient(#fff8e6,#d4c4a6);padding:6px 7px;box-shadow:inset 1px 1px 0 #fff;}
.achievement-card{display:grid;grid-template-columns:30px 1fr auto;align-items:center;gap:8px;padding:7px;border:1px solid #95866b;background:linear-gradient(#fffdf6,#e6ddc8);box-shadow:inset 1px 1px 0 #fff;color:#222;}
.achievement-card.locked{background:linear-gradient(#eee8dc,#d6ccb6);color:#676767;}
.achievement-card .aicon{font-size:18px;text-align:center;}
.achievement-card h4{margin:0 0 2px;font:bold 12px Tahoma,Verdana,sans-serif;color:#1e394f;}
.achievement-card.locked h4{color:#606060;}
.achievement-card p{margin:0;font-size:11px;line-height:1.3;color:#454545;}
.achievement-card .astate{font-size:10px;font-weight:bold;border:1px solid #9d927d;background:#fff8e6;padding:2px 5px;color:#333;}
.confirm-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.28);z-index:50;display:none;align-items:center;justify-content:center;}
.confirm-backdrop.show{display:flex;}
.confirm-box{width:390px;border:1px solid #35485a;background:#efe5cf;box-shadow:4px 4px 0 rgba(0,0,0,.28),inset 1px 1px 0 #fff;font:12px Tahoma,Verdana,sans-serif;color:#222;}
.confirm-head{padding:7px 9px;color:#102333;font-weight:bold;background:linear-gradient(#d8ecfb,#8bb5d3 60%,#6b9bbb);border-bottom:1px solid #405d73;}
.confirm-body{padding:12px;line-height:1.45;}
.confirm-actions{display:flex;justify-content:flex-end;gap:7px;padding:9px 12px;border-top:1px solid #b5a88e;background:#ded2b7;}
.confirm-actions .danger-confirm{color:#fff;border-color:#6c201a;border-top-color:#e5b1a9;border-left-color:#e5b1a9;background:linear-gradient(#b64a3d,#7d241c);}



/* Added refinements: XP-era scrollbars, achievement meters, tooltips, tree views, stronger bevels */
*{scrollbar-color:#86abc6 #e7dfcd;scrollbar-width:thin;}
::-webkit-scrollbar{width:15px;height:15px;background:#e7dfcd;}
::-webkit-scrollbar-track{background:linear-gradient(90deg,#d8cdb5,#f4eddd);border:1px solid #8a7d66;box-shadow:inset 1px 1px 0 #fff;}
::-webkit-scrollbar-thumb{background:linear-gradient(#d9ecf8,#83abc8 52%,#5f8eaf);border:1px solid #486579;border-top-color:#f7fbff;border-left-color:#f7fbff;box-shadow:inset 1px 1px 0 rgba(255,255,255,.75),1px 1px 0 rgba(0,0,0,.18);}
::-webkit-scrollbar-thumb:hover{background:linear-gradient(#e8f4fb,#9dbfd5 52%,#6c99b7);}
::-webkit-scrollbar-corner{background:#d8cdb5;}
.panel,.unit,.dict-entry,.grammar-entry,.achievement-card,.resource,.tree-shell,.word,.choice{box-shadow:2px 2px 0 rgba(0,0,0,.16),inset 1px 1px 0 #fff;}
.achievement-list{padding:8px;gap:8px;background:#ddd1b6;border-top:1px solid #796d57;}
.achievement-title{font:bold 13px Tahoma,Verdana,sans-serif;color:#1e394f;border:1px solid #8e8067;background:linear-gradient(#fff8e6,#d2c2a3);padding:6px 7px;box-shadow:inset 1px 1px 0 #fff;}
.achievement-card{display:grid;grid-template-columns:30px 1fr auto;gap:8px;align-items:center;padding:7px;border:1px solid #8f836d;background:linear-gradient(#fffdf7,#e8dec7);color:#1f252b;}
.achievement-card.locked{background:linear-gradient(#eee7d8,#d6cbb4);color:#555;}
.achievement-card .aicon{font-size:18px;text-align:center;}
.achievement-card h4{margin:0 0 2px;font:bold 13px Tahoma,Verdana,sans-serif;color:#1e394f;}
.achievement-card p{margin:0 0 5px;font-size:12px;line-height:1.25;color:#333b42;}
.achievement-card.locked p{color:#555;}
.ach-meter{height:12px;border:1px solid #5d6670;background:#fff;box-shadow:inset 1px 1px 2px rgba(0,0,0,.28);margin-top:5px;}
.ach-meter span{display:block;height:100%;background:linear-gradient(#c5def0,#7da6c3 55%,#507f9f);}
.achievement-card.done .ach-meter span{background:linear-gradient(#dff0ca,#83aa58 55%,#567936);}
.ach-progress{font-size:11px;color:#2e3941;margin-top:3px;}
.astate{font-size:11px;font-weight:bold;border:1px solid #867b67;background:#fff8e6;color:#222;padding:3px 6px;white-space:nowrap;}
.node{overflow:visible;}
.node::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);width:210px;padding:7px 8px;border:1px solid #35485a;background:#fff8dd;color:#172330;box-shadow:3px 3px 0 rgba(0,0,0,.25),inset 1px 1px 0 #fff;z-index:30;font:12px Tahoma,Verdana,sans-serif;line-height:1.35;opacity:0;pointer-events:none;transition:opacity .08s;}
.node::before{content:"";position:absolute;left:50%;bottom:100%;transform:translateX(-50%);border:6px solid transparent;border-top-color:#35485a;opacity:0;z-index:31;pointer-events:none;}
.node:hover::after,.node:hover::before{opacity:1;}
.branch-svg{z-index:0;}
.node{z-index:2;}
.tree-view{border:1px solid #9d927d;background:#fffaf0;padding:8px;max-height:calc(100vh - 180px);overflow:auto;}
.tree-view ul{list-style:none;margin:0 0 0 18px;padding:0;border-left:1px dotted #7f8d99;}
.tree-view li{position:relative;margin:0;padding:4px 0 4px 14px;color:#222;}
.tree-view li:before{content:"";position:absolute;left:0;top:13px;width:10px;border-top:1px dotted #7f8d99;}
.tree-folder{font-weight:bold;color:#1e394f;}
.tree-leaf{color:#2b333a;}
.tree-locked{color:#777;}
.tree-icon{display:inline-block;width:16px;text-align:center;margin-right:4px;}
.confirm-box{border-top-color:#e9f3fb;border-left-color:#e9f3fb;}
.confirm-head:before{content:"âš  ";}

.debug-head:before{content:"âš™ ";}
.debug-row{display:flex;gap:8px;align-items:center;margin-top:10px}
.debug-row label{min-width:70px;font-weight:bold;color:#1d2530}
.debug-row input{flex:1;padding:6px 8px;border:1px solid #6d7e91;background:#fffdf7;font:13px Tahoma,Arial,sans-serif;box-shadow:inset 1px 1px 2px rgba(0,0,0,.18)}
.debug-note{font-size:12px;color:#394654;margin-top:8px;line-height:1.35}


/* Mobile companion layout: keeps the 2005-2009 portal style, but fits in one viewport */
@media (max-width: 760px){
  html,body{
    width:100%;
    height:100%;
    min-height:0;
    overflow:hidden !important;
    overscroll-behavior:none;
    font-size:12px;
    background:#bfc9d4;
  }
  body{
    padding:0;
    -webkit-text-size-adjust:100%;
  }
  .topbar{
    width:100vw !important;
    height:96px !important;
    margin:0 !important;
    padding:5px 6px 4px;
    box-sizing:border-box;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:44px 38px;
    gap:4px 6px;
    border-left:0;
    border-right:0;
    box-shadow:0 2px 0 rgba(0,0,0,.24),inset 1px 1px 0 #f9fdff;
  }
  .brand{
    grid-column:1;
    grid-row:1;
    height:42px;
    min-width:0 !important;
    overflow:hidden;
  }
  .sigil{width:35px;height:35px;font-size:22px;margin-right:6px;flex:0 0 auto;}
  .brand h1{font-size:17px;line-height:19px;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .brand p{font-size:10px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
  .userbox{
    grid-column:2;
    grid-row:1;
    align-self:center;
    display:grid;
    grid-template-columns:1fr;
    gap:3px;
    min-width:112px;
    padding:4px;
    font-size:10px;
  }
  .userbox span{display:none;}
  .userbox select{width:100%;font-size:12px;padding:3px 20px 3px 4px;}
  .topnav{
    grid-column:1 / -1;
    grid-row:2;
    align-self:stretch !important;
    display:flex;
    gap:2px;
    overflow-x:auto !important;
    overflow-y:hidden;
    padding:3px 2px 6px !important;
    margin:0;
    scrollbar-width:thin;
    -webkit-overflow-scrolling:touch;
  }
  .tabbtn{
    flex:0 0 auto;
    min-width:74px;
    height:28px;
    padding:4px 8px;
    font-size:12px;
  }
  .app{
    width:100vw !important;
    height:calc(100dvh - 96px) !important;
    min-height:0 !important;
    margin:0 !important;
    border-left:0;
    border-right:0;
    overflow:hidden !important;
    box-sizing:border-box;
  }
  .page{
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  .layout,.portal-page,.character-layout{
    height:100% !important;
    min-height:0 !important;
    padding:5px !important;
    gap:5px !important;
    box-sizing:border-box;
    overflow:hidden !important;
  }
  .learn-layout{
    display:grid;
    grid-template-columns:1fr !important;
    grid-template-rows:minmax(0,1fr) 136px;
  }
  .learn-layout .lesson{min-height:0;height:auto;overflow:hidden;}
  .learn-layout aside.panel{min-height:0;overflow:hidden;}
  .lesson-head{padding:7px 8px;gap:8px;}
  .lesson-head .dark{padding:6px 8px;font-size:12px;align-self:start;}
  .prompt{font-size:clamp(26px,9vw,40px) !important;line-height:1.02;}
  .hint{font-size:12px;}
  .lesson-body{min-height:0;overflow:auto;padding:7px;}
  .lesson-footer{padding:6px 7px;gap:6px;}
  .choice,.tile,button{min-height:30px;}
  .choices{gap:6px;}
  .answer-lane,.word-bank{min-height:54px;padding:8px;}
  .word-bank{max-height:94px;overflow:auto;}
  .deck{max-height:88px !important;overflow:auto;}
  .word{padding:5px;font-size:12px;}
  .panel-title{padding:6px 7px;gap:6px;}
  .panel-title h2{font-size:14px;}
  .small,.bodycopy{font-size:11px;line-height:1.3;}
  .two-col{
    display:grid;
    grid-template-columns:1fr !important;
    grid-template-rows:minmax(0,1fr) 118px;
    height:100%;
    min-height:0;
    overflow:hidden;
  }
  .two-col>section,.two-col>aside{min-height:0;overflow:hidden;}
  .unit-list,.dictionary-list,.grammar-list,.tree-view{
    max-height:none !important;
    height:calc(100% - 42px);
    overflow:auto;
  }
  .module-grid{grid-template-columns:1fr 1fr;gap:6px;overflow:auto;max-height:calc(100% - 44px);}
  .module-grid button{min-height:42px;font-size:12px;}
  .review-box{grid-template-columns:62px 1fr;gap:8px;padding:9px;}
  .review-box button{grid-column:1 / -1;}
  .review-box b{font-size:30px;}
  .character-layout{
    display:grid;
    grid-template-columns:1fr !important;
    grid-template-rows:176px minmax(0,1fr);
  }
  .character-sidebar{height:auto !important;min-height:0;overflow:hidden;}
  .character{padding:7px;}
  .avatar{width:42px;height:42px;}
  .stat-table{margin-top:6px;display:grid;grid-template-columns:1fr 1fr;}
  .stat-table div{padding:4px 6px;}
  .resource{margin-top:6px;padding:7px;}
  .achievement-list{display:none;}
  .character-sidebar .primary,.character-sidebar #newQuestionFromCharacter{display:none;}
  .skill-wrap{min-height:0;height:auto !important;padding:5px;}
  .skill-wrap>.panel-title{display:grid;grid-template-columns:1fr;gap:4px;}
  .legend{gap:3px;}
  .key{font-size:10px;padding:2px 4px;}
  .tree-toolbar{height:30px;padding:4px 6px;}
  .tree-toolbar .small{max-width:55%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .zoom-controls button{padding:2px 7px;min-height:24px;}
  .tree-viewport{height:auto !important;min-height:0 !important;touch-action:none;}
  .node::after,.node::before{display:none;}
  .confirm-box{width:calc(100vw - 28px);}
  .debug-row{display:grid;grid-template-columns:1fr;gap:5px;}
}

@media (max-width: 420px){
  .topbar{height:102px !important;grid-template-rows:45px 43px;}
  .app{height:calc(100dvh - 102px) !important;}
  .tabbtn{min-width:68px;font-size:11px;padding:4px 6px;}
  .learn-layout{grid-template-rows:minmax(0,1fr) 118px;}
  .prompt{font-size:clamp(24px,10vw,34px) !important;}
  .character-layout{grid-template-rows:166px minmax(0,1fr);}
  .stat-table span{font-size:11px;}
  .stat-table b{font-size:13px;}
  .resource b{font-size:24px;}
  .two-col{grid-template-rows:minmax(0,1fr) 96px;}
}


/* Character page refinements */
.topbar{overflow:visible;}
.topnav{min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;}
.topnav::-webkit-scrollbar{height:10px;}
.topnav::-webkit-scrollbar-track{background:#d8e7f1;border:1px inset #8da9ba;}
.topnav::-webkit-scrollbar-thumb{background:linear-gradient(#f7fbff,#9fc4dc 45%,#6d9cb8);border:1px solid #4f748b;}
.userbox{min-width:195px;}
.userbox select{max-width:96px;}
.character-sidebar .navtabs{border-top:1px solid #6e6049;background:#dcd0b5;}
.character-sidebar .navtabs .resource{margin-bottom:2px;}
.character-sidebar .navtabs button:not(.danger){display:none;}
.branch-svg path{stroke:#706656;stroke-width:2;opacity:.9;}
.node{z-index:2;}
.node h3,.node p,.node .cost,.node button{position:relative;z-index:3;}


.achievement-category{border:1px solid #8e8067;background:#efe4cc;margin-bottom:8px;box-shadow:inset 1px 1px 0 #fff;}
.achievement-category-title{font:bold 12px Tahoma,Verdana,sans-serif;color:#1b3656;background:linear-gradient(#fdf7e8,#ccb894);border-bottom:1px solid #9a8a6e;padding:5px 7px;letter-spacing:.02em;}
.achievement-category .achievement-card{margin:7px;}

.user-avatar{width:28px;height:28px;border:1px solid #28394d;border-radius:2px;object-fit:cover;box-shadow:inset 1px 1px 0 rgba(255,255,255,.35);}
.auth-btn{padding:4px 8px;font-size:11px;white-space:nowrap;}
.sync-status{font-size:10px;color:#d9e4f2;opacity:.85;min-width:0;}
.sync-status[data-state="error"]{color:#ffb4b4;}
.sync-status[data-state="saved"]{color:#b8f0c8;}
.userbox{align-items:center;}
.userbox #userLabel{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
