@charset "UTF-8";
:root{--ink:#34423e;--muted:#78877b;--orange:#f17a3a;--orange-dark:#bb4c13;--cream:#fff9ed;--mint:#e0f1e4;--green:#327551;--blue:#e6f1ff;--line:#e9e8dc;--shadow:0 6px 0 #eee8d9;--radius:24px}
*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font-family:"Microsoft YaHei","PingFang SC",sans-serif;line-height:1.6}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}a{color:var(--green)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #72a9e3;outline-offset:3px}.topbar{min-height:98px;border-bottom:2px solid var(--line);background:#fffdf5;display:flex;align-items:center;justify-content:space-between;padding:18px max(28px,calc((100vw - 1380px)/2));gap:20px}.brand{display:flex;gap:12px;align-items:center;color:#3d523f;font-size:23px;text-decoration:none;font-weight:900;letter-spacing:1px}.brand-icon{display:grid;place-items:center;background:#ffe7c3;border-radius:18px;width:56px;height:56px;font-size:35px;transform:rotate(-8deg)}.brand small{display:block;font-size:11px;font-weight:500;letter-spacing:2px;color:var(--muted)}.userbar{display:flex;align-items:center;gap:10px;font-size:14px}.pill{display:inline-block;padding:5px 13px;border-radius:30px;background:#f3edcf;color:#6f7144;font-size:12px;font-weight:700}.shell{max-width:1380px;margin:0 auto;padding:30px 28px 60px;display:grid;grid-template-columns:184px minmax(0,1fr);gap:30px}.shell.guest{display:block;max-width:1120px}.nav{display:flex;flex-direction:column;gap:10px;padding-top:8px}.nav button,.nav a{border:0;background:transparent;padding:13px 16px;text-align:left;border-radius:15px;color:#738174;text-decoration:none;font-weight:700;font-size:14px}.nav button.active{background:#ffead0;color:#ac551c;box-shadow:0 3px 0 #f7d6a9}.nav button:hover{background:#f6edda}.nav .nav-note{margin:25px 5px 0;padding:18px;border:2px dashed #d7dfbd;border-radius:18px;font-size:12px;color:#7e8a68;line-height:1.9}.nav .nav-note span{font-size:25px;display:block;margin-bottom:5px}main{min-width:0}h1,h2,h3,p{margin-top:0}h1{font-size:28px;line-height:1.4;letter-spacing:1px;margin-bottom:8px}h2{font-size:20px;margin-bottom:14px}h3{font-size:16px;margin-bottom:7px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:900;color:#9c9f75;margin-bottom:8px}.muted,.hint{color:var(--muted);font-size:13px}.hint{margin:6px 0 0}.hero{position:relative;overflow:hidden;background:#e4efdb;border:2px solid #d4e4c7;border-radius:var(--radius);padding:28px 30px;margin-bottom:27px;display:flex;justify-content:space-between;align-items:center;min-height:170px}.hero p{margin:0;max-width:520px;color:#728163;font-size:13px}.hero-illustration{font-size:80px;margin-left:18px;line-height:1;transform:rotate(-8deg);filter:drop-shadow(0 7px 0 #cddfc2)}.hero.orange{background:#ffeccf;border-color:#f7dbad}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:20px 0 15px}.section-heading h2{margin:0}.panel{padding:23px;border-radius:var(--radius);background:#fff;border:2px solid var(--line);box-shadow:var(--shadow);margin-bottom:23px}.panel.soft{background:#fff9e8}.shop-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;align-items:start}.shelf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.product{position:relative;text-align:center;background:#fff;border:2px solid var(--line);border-radius:22px;padding:17px 12px 15px;box-shadow:0 4px 0 #eee8da;transition:transform .15s}.product:hover{transform:translateY(-3px)}.product-art{height:85px;display:grid;place-items:center;margin-bottom:10px;background:#fff6df;border-radius:17px}.product:nth-child(4n+2) .product-art{background:#eaf3e8}.product:nth-child(4n+3) .product-art{background:#edf2fc}.product:nth-child(4n) .product-art{background:#f9eaf0}.product-art svg{width:73px;height:73px}.product h3{margin:2px 0 4px;font-size:15px}.price{color:#d66c30;font-weight:900;font-size:17px}.product .btn{font-size:12px;margin-top:12px;width:100%;padding:8px 5px}.btn{border:0;border-radius:13px;background:var(--orange);color:white;font-size:14px;font-weight:800;padding:11px 18px;box-shadow:0 3px 0 #d96028;min-height:43px}.btn:hover{filter:brightness(1.035)}.btn:active{transform:translateY(2px);box-shadow:none}.btn.green{background:var(--green);box-shadow:0 3px 0 #245d3f}.btn.ghost{background:#f0f2ea;color:#667663;box-shadow:0 3px 0 #dfe5d6}.btn.small{padding:6px 12px;font-size:12px;min-height:34px}.btn.danger{background:#fce7e3;color:#b45c48;box-shadow:0 3px 0 #eccac3}.btn.wide{width:100%}.cart-panel{position:sticky;top:20px;padding:21px 18px}.cart-panel h2{font-size:18px}.cart-empty{padding:32px 10px;text-align:center;color:#99a08d;font-size:13px}.cart-empty span{display:block;font-size:44px;margin-bottom:10px}.cart-row{display:flex;gap:9px;align-items:center;padding:12px 0;border-bottom:1px dashed var(--line)}.cart-art svg{width:36px;height:36px}.cart-info{flex:1;min-width:0}.cart-info strong{display:block;font-size:13px}.cart-info small{font-size:11px;color:#929b8b}.qty{display:flex;align-items:center;gap:8px;font-size:13px}.qty button{width:25px;height:25px;border:0;border-radius:8px;background:#f1f3e9;color:#596c50;font-weight:900}.cart-count{text-align:right;margin:12px 0;color:var(--muted);font-size:12px}.amount-line{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;font-weight:800;margin:15px 0}.amount-line input{width:65px;min-height:46px;text-align:center;font-size:19px;padding:7px}.calc-block{border-top:2px dashed #e9dcb9;margin-top:15px;padding-top:17px}.calc-block h3{text-align:center;font-size:14px}.feedback{border-radius:12px;padding:10px 13px;margin-top:13px;font-size:13px;background:#e8f4e8;color:#3b754c}.feedback.error{background:#fff0dc;color:#a26c30}.steps{display:flex;gap:9px;margin-bottom:20px;flex-wrap:wrap}.step{font-size:12px;border-radius:30px;padding:5px 12px;background:#f0eddf;color:#999d88}.step.active{background:#fce0b5;color:#a45e23;font-weight:800}.money-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:20px 0}.money{position:relative;border:0;background:transparent;padding:0;min-width:0;transition:transform .1s}.money:hover{transform:translateY(-3px)}.money svg{width:100%;max-width:165px;max-height:82px;display:block;margin:auto}.money.coin svg{height:72px}.money small{display:block;font-size:12px;color:#7e8977;margin-top:5px}.money-pile{min-height:70px;background:#f7f6ee;border:2px dashed #e5e5d5;border-radius:16px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}.money-chip{background:#fff;border:1px solid #e5e8da;padding:4px 10px;border-radius:18px;color:#6f7d61;font-size:12px}.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.row.right{justify-content:flex-end}.spacer{flex:1}.celebrate{text-align:center;background:#eef6df;padding:35px 20px;border-radius:23px;border:2px dashed #cbdda8}.celebrate .big{font-size:72px}.celebrate h2{font-size:25px;color:#467948}.auth-layout{display:grid;grid-template-columns:1fr 440px;align-items:center;gap:65px;min-height:660px}.auth-story h1{font-size:43px;color:#456347;line-height:1.45}.auth-story p{font-size:15px;line-height:2;color:#839174;max-width:380px}.auth-doodle{font-size:94px;letter-spacing:8px;margin:30px 0;filter:drop-shadow(0 8px 0 #eee4c8)}.feature-chips{display:flex;flex-wrap:wrap;gap:10px}.feature-chips span{border:1px solid #e7e7d4;border-radius:30px;padding:7px 13px;background:#fffdf4;font-size:12px;color:#778265}.auth-card{background:#fff;border:2px solid #eee7d8;box-shadow:0 8px 0 #ebe4d5;border-radius:29px;padding:30px}.auth-card h2{text-align:center;font-size:25px;margin-bottom:4px}.auth-card>.muted{text-align:center;margin-bottom:24px}.segmented{display:flex;background:#f5f3ea;border-radius:13px;padding:4px;margin-bottom:24px;gap:4px}.segmented button{flex:1;border:0;border-radius:10px;padding:9px 8px;background:transparent;color:#8e947f;font-size:13px}.segmented button.active{background:#fff;color:#ba6a30;box-shadow:0 2px 5px #e7e0ce;font-weight:800}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.field{margin-bottom:15px;display:block;font-size:12px;font-weight:700;color:#6c7b63}.field input,.field select{margin-top:6px;width:100%}.field.full{grid-column:1/-1}input,select{border:2px solid #e6e9de;background:#fffdf7;color:var(--ink);padding:10px 12px;border-radius:12px;min-height:44px;max-width:100%}input::placeholder{color:#b0b6a7}input[type=checkbox]{min-height:18px;width:18px;accent-color:var(--green)}input[type=date]{font-size:12px}.auth-link{display:block;text-align:center;margin-top:20px;border:0;background:transparent;color:#b8753e;width:100%;font-size:12px}.stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px;margin:20px 0}.stat{padding:20px 15px;background:#fff;border:2px solid var(--line);border-radius:18px}.stat strong{display:block;font-size:27px;color:#537952}.stat span{font-size:12px;color:#8b9681}.filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:18px}.filters .field{margin:0}.table-wrap{overflow:auto;border-radius:13px;border:1px solid var(--line)}table{border-collapse:collapse;width:100%;font-size:12px;background:#fff}th{background:#f3f5eb;color:#77876c;text-align:left;padding:12px 13px;white-space:nowrap;font-size:11px}td{padding:13px;border-bottom:1px solid #f0f1e7;vertical-align:top;min-width:55px}tbody tr:last-child td{border-bottom:0}td .btn{margin:2px;white-space:nowrap}.badge{display:inline-block;background:#edf4e4;color:#5b8856;border-radius:20px;padding:3px 9px;font-size:11px;white-space:nowrap}.badge.orange{background:#fff0dc;color:#b47e45}.badge.red{background:#fce8e2;color:#b26452}.empty{text-align:center;padding:35px;color:#929e89;font-size:13px}.empty .big{font-size:35px;display:block}.checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:180px;overflow:auto;border:1px solid var(--line);padding:12px;border-radius:12px;background:#fffdf7}.check{display:flex;gap:7px;align-items:center;font-size:12px;color:#718269}.check input{margin:0}.product-editor{background:#fffcf4}.product-list .product-art{height:60px}.product-list .product-art svg{height:50px;width:50px}.timeline{list-style:none;padding:0;margin:0}.timeline li{border-left:2px solid #e2e9d6;padding:0 0 20px 20px;position:relative;margin-left:7px;font-size:13px}.timeline li:before{content:"";position:absolute;width:10px;height:10px;border-radius:50%;background:#a9c591;border:3px solid #edf5e6;left:-7px;top:3px}.timeline small{display:block;color:#98a18e;font-size:11px}.timeline p{margin:4px 0;color:#6f7e65;font-size:12px;overflow-wrap:anywhere}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:1000;background:#3e5944;color:white;padding:13px 23px;border-radius:15px;box-shadow:0 5px 20px #0002;max-width:calc(100vw - 30px);font-size:14px}.toast.error{background:#a86440}.loading{text-align:center;padding:100px 20px;color:#a4a987}.password-box{max-width:520px;margin:30px auto}footer{text-align:center;font-size:11px;color:#a1a48d;padding:20px 20px 30px;border-top:1px solid #eee9db}footer span{display:block;margin-top:3px}[hidden]{display:none!important}.link-button{border:0;background:none;color:var(--green);padding:0;text-decoration:underline;font:inherit}.record-code{font-family:monospace;font-size:10px;color:#9ba28f}.delete-note{font-size:11px;color:#ad8962}.force-note{background:#fff0db;border:1px solid #f1d6ac;padding:13px;border-radius:13px;color:#a47137;margin-bottom:20px;font-size:13px}
@media(min-width:1450px){.shelf{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.shell{grid-template-columns:150px minmax(0,1fr);gap:20px;padding:24px 20px}.shop-layout{grid-template-columns:minmax(0,1fr) 280px;gap:15px}.shelf{grid-template-columns:repeat(2,minmax(0,1fr))}.auth-layout{gap:35px}.auth-story h1{font-size:35px}.stats{gap:7px}.stat{padding:15px 10px}.stat strong{font-size:23px}}
@media(max-width:800px){.topbar{padding:15px 18px;min-height:80px}.brand{font-size:20px}.brand-icon{width:46px;height:46px;font-size:29px}.brand small{font-size:9px}.userbar{font-size:11px;gap:6px}.userbar .pill{display:none}.shell{display:block;padding:16px}.nav{flex-direction:row;overflow:auto;padding:0 0 18px;gap:7px}.nav button,.nav a{white-space:nowrap;padding:9px 12px;font-size:12px}.nav .nav-note{display:none}.auth-layout{grid-template-columns:1fr;gap:20px;min-height:0;max-width:480px;margin:15px auto}.auth-story{text-align:center}.auth-story h1{font-size:27px}.auth-story p,.auth-doodle,.feature-chips{display:none}.auth-story .eyebrow{font-size:10px}.auth-card{padding:24px}.hero{padding:22px;min-height:140px}.hero h1{font-size:23px}.hero-illustration{font-size:60px}.hero p{font-size:12px}.shop-layout{grid-template-columns:minmax(0,1fr) 280px}.shelf{gap:10px}.product{padding:12px 9px}.product-art{height:68px}.product-art svg{height:58px;width:58px}.cart-panel{padding:17px 13px}.stats{grid-template-columns:repeat(3,minmax(0,1fr))}.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.panel{padding:18px}.product-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:570px){.shop-layout{display:block}.shelf{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:22px}.cart-panel{position:static}.product-art{height:90px}.product-art svg{width:75px;height:75px}.product h3{font-size:16px}.product .btn{font-size:13px}.hero-illustration{font-size:50px}.hero h1{font-size:21px}.hero p{max-width:230px}.hero{padding:20px 18px}.topbar .brand small{letter-spacing:1px}.userbar>span:not(.pill){max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.userbar .btn{padding:5px 8px;font-size:11px}.money-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.filters{grid-template-columns:1fr 1fr}.form-grid{gap:10px}.checks{grid-template-columns:1fr}.section-heading{align-items:flex-start}.section-heading h2{font-size:18px}.section-heading .pill{font-size:10px}.hero p{line-height:1.7}.auth-card h2{font-size:23px}.auth-card .form-grid{grid-template-columns:1fr}.auth-card .form-grid .field{margin-bottom:5px}footer{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.question-detail{min-width:150px;max-width:280px;font-size:11px}.question-detail summary{cursor:pointer;color:#557f52}.question-detail p{margin:6px 0;color:#7e8b72;white-space:normal}
.mobile-cart-shortcut{display:none}
.deletion-warning{margin-bottom:20px;padding:17px 19px;border:2px solid #edc0b6;border-radius:17px;background:#fff0ea;color:#a35743;font-size:14px}.deletion-warning p{margin:7px 0 0;line-height:1.8}.data-delete-form textarea{display:block;width:100%;margin-top:7px;resize:vertical;min-height:112px;padding:12px;border:2px solid #e6e9de;border-radius:12px;background:#fffdf7;color:var(--ink);font:inherit;overflow-wrap:anywhere}.delete-confirmation{border-color:#eac4b9}.delete-confirmation .deletion-warning{margin-top:18px}.permanent-delete{background:#b75542;box-shadow:0 3px 0 #913b2b}.delete-preview{min-width:0}.data-delete-form .hint,.delete-confirmation .hint{overflow-wrap:anywhere}
@media(max-width:800px){.product .btn{font-size:14px;min-height:44px}.qty{gap:5px}.qty button{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;font-size:20px;box-shadow:none}.cart-info strong{font-size:15px;overflow-wrap:anywhere}.cart-info small{font-size:13px}.hero p{font-size:14px}.cart-panel h2{font-size:20px}.calc-block h3{font-size:16px}.feedback{font-size:15px}.amount-line input{min-height:48px}.cart-count{font-size:14px}.cart-panel{scroll-margin-top:18px}}
@media(max-width:570px){.shell{padding-bottom:110px}.mobile-cart-shortcut{position:fixed;z-index:30;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 13px;border:2px solid #d6e1c7;border-radius:20px;background:#fffdf3;box-shadow:0 -3px 20px #5a6f3620}.mobile-cart-shortcut strong{display:block;font-size:15px;color:#466a45}.mobile-cart-shortcut small{display:block;font-size:11px;color:#8b967c;margin-top:2px}.mobile-cart-shortcut .btn{font-size:15px;min-height:48px;flex-shrink:0;padding:10px 15px}.cart-info{min-width:0}.product .btn{font-size:14px}.cart-row{gap:7px}.cart-art svg{width:32px;height:32px}.qty{font-size:15px}.money small{font-size:14px}.calc-block .btn{font-size:16px;min-height:48px}}

/* Keep navigation and the welcome panel still while the learning area scrolls. */
body.signed-in{height:100dvh;overflow:hidden;display:flex;flex-direction:column}
.signed-in>.topbar,.signed-in>footer{flex-shrink:0}
.signed-in .shell{flex:1;min-height:0;width:100%;overflow:hidden;padding-bottom:20px}
.signed-in .nav{align-self:start;max-height:100%;overflow-y:auto}
.signed-in main{height:100%;min-height:0;overflow-y:auto;scrollbar-gutter:stable}
.signed-in main.shop-page{display:flex;flex-direction:column;overflow:hidden;scrollbar-gutter:auto}
.shop-page>.hero{flex-shrink:0;margin-bottom:20px}
.shop-content{flex:1;min-height:0;overflow-y:auto;scrollbar-gutter:stable;padding:0 4px 12px 0}
.qty button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;line-height:1;font-size:20px}
@media(max-width:800px){
  .signed-in .shell{display:flex;flex-direction:column;gap:0;padding-bottom:12px}
  .signed-in .nav{flex-shrink:0;align-self:stretch;max-width:100%;overflow-x:auto;overflow-y:hidden}
  .signed-in main{flex:1;width:100%;height:auto}
  .shop-page>.hero{min-height:0;padding:16px 18px;margin-bottom:14px}
  .shop-page>.hero h1{font-size:20px}
  .shop-page>.hero .hero-illustration{font-size:44px}
  .signed-in>footer{padding:8px 16px;font-size:10px}
}
@media(max-width:570px){.shop-content{padding-bottom:110px}}

/* Shelf and cart own separate scroll areas; totals stay outside the item list. */
.shop-content{display:flex;flex-direction:column;overflow:hidden;padding:0 4px 6px 0;scrollbar-gutter:auto}
.shop-content>.steps,.shop-pane-tabs,.shop-content>.feedback{flex-shrink:0}
.shop-content>.feedback{margin:0 0 10px}
.shop-content>.shop-layout{flex:1;min-height:0;align-items:stretch}
.shelf-section{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}
.shelf-section>.section-heading{flex-shrink:0;margin-top:0}
.shelf-section>.shelf{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;align-content:start;padding:0 5px 8px 0;scrollbar-gutter:stable}
.shop-selection:not(.shelf-section){min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:5px}
.shop-layout>.cart-panel{position:static;display:flex;flex-direction:column;min-height:0;height:100%;margin-bottom:0;padding:17px 15px}
.cart-panel>h2,.cart-footer{flex-shrink:0}
.cart-panel>h2{margin-bottom:8px}
.cart-items{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:5px;scrollbar-gutter:stable}
.cart-footer .cart-count{margin:8px 0;font-size:12px}
.cart-footer .calc-block{margin-top:8px;padding-top:10px}
.cart-footer .calc-block h3{margin-bottom:0}
.cart-footer .amount-line{margin:10px 0}
.cart-footer .feedback{margin-top:8px}
.shop-pane-tabs{display:none}
.shop-content[data-stage="completed"]{display:block;overflow-y:auto}
@media(max-width:570px){
  .shop-content{padding:0}
  .shop-content>.steps{gap:4px;margin-bottom:8px}
  .shop-content>.steps .step{font-size:10px;padding:4px 6px}
  .shop-pane-tabs{display:flex;gap:8px;margin-bottom:8px}
  .shop-pane-tabs button{flex:1;min-height:40px;border:0;border-radius:12px;background:#f0eddf;color:#758369;font:inherit;font-size:13px;font-weight:700}
  .shop-pane-tabs button.active{background:#ffdfb4;color:#a45e23}
  .shop-content>.shop-layout{display:flex}
  .shop-layout>.shop-selection,.shop-layout>.cart-panel{width:100%}
  .shop-layout[data-pane="shelf"]>.cart-panel,.shop-layout[data-pane="cart"]>.shop-selection{display:none}
  .shelf-section>.shelf{margin-bottom:0}
  .shop-content>.mobile-cart-shortcut{position:static;flex-shrink:0;margin-top:8px;padding:7px 10px;border-radius:14px;box-shadow:none}
  .shop-content>.mobile-cart-shortcut .btn{min-height:42px;font-size:13px;padding:8px 12px}
  .shop-content[data-pane="cart"]>.mobile-cart-shortcut{display:none}
  .shop-layout>.cart-panel{padding:10px 12px;border-radius:18px}
  .cart-panel>h2{font-size:16px;margin-bottom:4px}
  .cart-footer .cart-count{margin:4px 0}
  .cart-footer .calc-block{margin-top:4px;padding-top:6px}
  .cart-footer .calc-block h3{font-size:14px}
  .cart-footer .amount-line{margin:6px 0}
  .cart-footer .calc-block .btn{min-height:40px;font-size:14px;padding:8px 12px}
  .shop-page>.hero{padding:12px 14px;margin-bottom:10px}
  .shop-page>.hero h1{font-size:18px;margin:0}
  .shop-page>.hero .eyebrow{font-size:9px;letter-spacing:1px;margin-bottom:4px}
  .shop-page>.hero p,.shop-page>.hero .hero-illustration{display:none}
  .signed-in .topbar{gap:8px;padding:12px;min-height:74px}
  .signed-in .brand{font-size:16px;gap:8px;white-space:nowrap;letter-spacing:0}
  .signed-in .brand-icon{width:34px;height:34px;font-size:24px;flex-shrink:0}
  .signed-in .brand small{font-size:8px;letter-spacing:0}
  .signed-in .userbar>span:not(.pill){max-width:60px}
  .signed-in .userbar .btn{white-space:nowrap}
  .signed-in .shell{padding:10px 12px}
  .signed-in .nav{padding-bottom:10px}
  .signed-in>footer{padding:5px 12px}
  .signed-in>footer span{display:none}
}

@media(max-width:570px){
  .shop-content>.steps{flex-wrap:nowrap;gap:3px}
  .shop-content>.steps .step{font-size:9px;padding:3px 4px;white-space:nowrap;letter-spacing:-.2px}
  .cart-items{min-height:64px}
  .cart-footer .calc-block{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .cart-footer .calc-block h3,.cart-footer .amount-line{grid-column:1/-1}
  .cart-footer .amount-line{margin:2px 0}
  .cart-footer .calc-block .btn{font-size:12px;padding:7px 6px;margin-top:0!important}
}

/* Compact framing leaves the available height to the shelf and cart items. */
.shop-page>.hero{min-height:0;padding:12px 20px;margin-bottom:12px;border-radius:18px}
.shop-page>.hero .eyebrow{font-size:9px;letter-spacing:1.5px;margin-bottom:3px}
.shop-page>.hero h1{font-size:22px;line-height:1.3;margin-bottom:4px}
.shop-page>.hero p{font-size:12px;line-height:1.5}
.shop-page>.hero .hero-illustration{font-size:44px;margin-left:12px}
.signed-in>footer{display:flex;justify-content:center;align-items:center;gap:12px;padding:5px 16px;font-size:10px;line-height:1.5}
.signed-in>footer span{display:inline;margin:0}
.cart-footer .calc-block{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px 4px;margin-top:6px;padding-top:8px}
.cart-footer .calc-block h3{grid-column:1/-1;font-size:13px;margin:0;text-align:left}
.cart-footer .amount-line{grid-column:auto;flex-wrap:nowrap;justify-content:flex-start;gap:3px;margin:0;font-size:13px;min-width:0}
.cart-footer .amount-line input{width:34px;min-width:0;height:38px;min-height:38px;padding:3px 2px;font-size:16px;border-radius:9px;appearance:textfield;-moz-appearance:textfield}
.cart-footer .amount-line input::-webkit-inner-spin-button,.cart-footer .amount-line input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.cart-footer .calc-block .btn{width:auto;min-height:38px;padding:6px;font-size:11px;line-height:1.3;white-space:nowrap;margin:0!important;border-radius:9px}
.cart-footer .cart-count{margin:5px 0;font-size:11px}
@media(max-width:570px){
  .shop-page>.hero{padding:10px 14px;margin-bottom:8px}
  .shop-page>.hero h1{font-size:18px;margin:0}
  .shop-page>.hero .eyebrow{letter-spacing:1px}
  .signed-in>footer{padding:4px 12px;font-size:9px}
  .signed-in>footer span{display:none}
}

/* Count selected money beside the pile and keep checkout actions together. */
#payment .payment-selected{display:flex;align-items:center;gap:14px;margin-top:14px}
#payment .payment-selected>.money-pile{flex:1;min-width:0;min-height:58px;padding:10px}
#payment .payment-amount{flex-shrink:0}
#payment .payment-amount h3{font-size:13px;margin:0 0 5px}
#payment .payment-amount .amount-line{gap:5px;margin:0;font-size:14px;flex-wrap:nowrap}
#payment .payment-amount input{width:48px;min-height:40px;height:40px;padding:5px;font-size:18px}
#payment .payment-tools{margin:10px 0}
#payment .payment-checkout{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
#payment .payment-checkout .btn{min-height:40px;padding:8px 13px;font-size:13px}
@media(max-width:570px){
  #payment .payment-selected{flex-wrap:wrap;gap:8px;margin-top:10px}
  #payment .payment-selected>.money-pile{flex-basis:100%}
  #payment .payment-amount{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  #payment .payment-amount h3{font-size:12px;margin:0}
  #payment .payment-amount input{width:42px}
  #payment .payment-checkout{gap:7px}
  #payment .payment-checkout .btn{padding:8px 10px;font-size:12px}
}

#payment .payment-checkout>.feedback{flex-basis:100%;margin:0;font-size:13px;padding:8px 10px}

/* Put the shopping welcome in the existing header instead of a second banner. */
.topbar>.topbar-welcome{flex:1;min-width:0;min-height:0;max-width:680px;margin:0;padding:0 16px;background:none;border:0;border-radius:0;overflow:hidden}
.topbar>.topbar-welcome .eyebrow{font-size:9px;letter-spacing:1px;margin-bottom:3px}
.topbar>.topbar-welcome h1{font-size:20px;line-height:1.3;margin:0 0 3px}
.topbar>.topbar-welcome p{font-size:11px;line-height:1.4}
.topbar>.topbar-welcome .hero-illustration{display:none}
.topbar:has(.topbar-welcome) .brand,.topbar:has(.topbar-welcome) .userbar{flex-shrink:0}
@media(max-width:1100px){.topbar>.topbar-welcome h1{font-size:17px}.topbar>.topbar-welcome p{display:none}}
@media(max-width:800px){
  .topbar:has(.topbar-welcome){flex-wrap:wrap;gap:8px}
  .topbar>.topbar-welcome{order:3;flex-basis:100%;max-width:none;padding:0}
  .topbar>.topbar-welcome .eyebrow{display:none}
  .topbar>.topbar-welcome h1{font-size:15px;margin:0}
}

/* Keep touch/wheel scrolling without visible tracks or reserved scrollbar space. */
html,body,.signed-in main,.nav,.shop-content,.shelf,.cart-items,.shop-selection,.table-wrap,.checks{
  scrollbar-width:none;
  scrollbar-gutter:auto;
}
html::-webkit-scrollbar,body::-webkit-scrollbar,.signed-in main::-webkit-scrollbar,.nav::-webkit-scrollbar,.shop-content::-webkit-scrollbar,.shelf::-webkit-scrollbar,.cart-items::-webkit-scrollbar,.shop-selection::-webkit-scrollbar,.table-wrap::-webkit-scrollbar,.checks::-webkit-scrollbar{display:none;width:0;height:0}
.shelf-section>.shelf,.cart-items{scrollbar-gutter:auto}
.shop-content,.shop-selection,.shelf,.cart-items{ -webkit-overflow-scrolling:touch }
@media(max-width:570px){
  input,select,textarea{font-size:16px}
  .signed-in main,.shop-layout>.shop-selection,.shop-layout>.cart-panel{min-width:0}
  #payment .money-grid{gap:9px;margin:12px 0}
  #payment .money small{font-size:12px}
  #payment .money.coin svg{height:54px}
  #payment .money svg{max-height:64px}
  #payment .panel{padding:12px}
}
@media(max-height:600px) and (max-width:800px){
  .signed-in .topbar{min-height:54px;padding:7px 12px;gap:4px}
  .topbar>.topbar-welcome{display:none}
  .signed-in .shell{padding:6px 12px}
  .signed-in .nav{padding-bottom:6px}
  .signed-in .nav button,.signed-in .nav a{padding:7px 10px}
  .signed-in>footer{display:none}
  .shop-content>.steps{margin-bottom:6px}
  .shop-pane-tabs{margin-bottom:5px}
  .shop-pane-tabs button{min-height:34px}
  .shop-content>.feedback{padding:5px 8px;font-size:12px;margin-bottom:6px}
  .cart-footer .calc-block{padding-top:4px;margin-top:4px}
}

/* Leave room for multi-digit yuan amounts while keeping jiao compact. */
.cart-footer .amount-line input:first-child{width:58px;flex-shrink:0}
.cart-footer .amount-line input:last-of-type{width:28px;flex-shrink:0}
.cart-footer .calc-block{column-gap:3px}

/* Both payment columns fill the same fixed learning area. */
.shop-layout>#payment{height:100%;margin-bottom:0;box-sizing:border-box}

/* Compact money examples and keep the counting controls visually aligned. */
.shop-layout>#payment{padding:14px 18px}
#payment>.section-heading{margin:0 0 6px}
#payment>.section-heading h2{font-size:18px}
#payment>.hint{margin:0;font-size:12px;line-height:1.5}
#payment .money-grid{gap:9px 12px;margin:12px 0}
#payment .money{min-height:44px}
#payment .money svg{max-width:128px;max-height:62px}
#payment .money.coin svg{height:48px}
#payment .money small{font-size:11px;margin-top:3px}
#payment .payment-selected{gap:10px;margin-top:10px;padding:10px;border:1px solid #e6e9db;border-radius:14px;background:#fafbf4}
#payment .payment-selected>.money-pile{min-height:52px;border:0;background:transparent;padding:4px}
#payment .payment-amount{border-left:1px solid #e1e6d7;padding-left:10px}
#payment .payment-amount h3{font-size:12px;color:#6c7b63;white-space:nowrap}
#payment .payment-amount input:first-child{width:64px}
#payment .payment-amount input:last-of-type{width:40px}
#payment .payment-tools{display:inline-flex;vertical-align:top;margin:10px 8px 0 0;gap:6px}
#payment .payment-checkout{display:flex;margin-top:8px;gap:8px}
#payment .payment-tools .btn{min-height:34px;padding:6px 10px}
#payment .payment-checkout .btn{min-height:38px;padding:8px 12px}
#payment .payment-checkout>.feedback{border-left:3px solid #78aa7c;border-radius:8px;line-height:1.5}
@media(max-width:570px){
  .shop-layout>#payment{padding:12px}
  #payment>.section-heading h2{font-size:16px}
  #payment .money-grid{gap:8px;margin:10px 0}
  #payment .money svg{max-width:105px;max-height:52px}
  #payment .money.coin svg{height:42px}
  #payment .payment-selected{padding:8px;gap:6px}
  #payment .payment-selected>.money-pile{min-height:36px}
  #payment .payment-amount{border-left:0;border-top:1px solid #e1e6d7;padding:8px 0 0;width:100%;justify-content:space-between}
  #payment .payment-amount input:first-child{width:60px}
  #payment .payment-amount input:last-of-type{width:38px}
  #payment .payment-checkout .btn{font-size:12px;padding:8px 10px}
}

/* Count, check and confirm in one action row below the full-width money pile. */
#payment .payment-checkout{align-items:flex-end;gap:10px}
#payment .payment-checkout>.payment-amount{border:0;padding:0;margin-right:4px}
#payment .payment-checkout>.payment-amount h3{margin-bottom:5px}
#payment .payment-selected>.money-pile{width:100%}
@media(max-width:570px){
  #payment .payment-checkout>.payment-amount{width:100%;justify-content:flex-start;gap:10px;margin-right:0}
  #payment .payment-checkout>.payment-amount h3{margin:0}
  #payment .payment-selected>.money-pile{flex-basis:auto}
}

/* Keep counting and feedback above the bottom payment action bar. */
.shop-layout>#payment{display:flex;flex-direction:column}
#payment>.section-heading,#payment>.hint,#payment>.money-grid,#payment>.payment-selected,#payment>.payment-tools,#payment .payment-feedback,#payment .payment-amount,#payment>.calc-block{flex-shrink:0}
#payment .payment-feedback:empty{display:none}
#payment .payment-feedback .feedback{margin:8px 0;padding:8px 10px;border-left:3px solid #78aa7c;border-radius:8px;line-height:1.5;font-size:13px}
#payment .payment-amount{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;border:0;padding:0;margin:8px 0 12px;width:100%}
#payment .payment-amount h3{margin:0;font-size:13px;white-space:nowrap}
#payment .payment-amount input:first-child{width:104px;flex-shrink:0}
#payment .payment-amount input:last-of-type{width:44px;flex-shrink:0}
#payment>.payment-checkout{position:sticky;bottom:0;z-index:2;flex-shrink:0;align-items:center;margin-top:auto;padding:12px 0 0;background:#fff;border-top:1px solid #e9e8dc;flex-wrap:nowrap}
@media(max-width:570px){
  #payment .payment-amount{gap:5px;justify-content:flex-start}
  #payment .payment-amount h3{font-size:12px}
  #payment .payment-amount .amount-line{gap:3px;font-size:13px}
  #payment .payment-amount input:first-child{width:88px}
  #payment .payment-amount input:last-of-type{width:36px}
  #payment>.payment-checkout{gap:6px;padding-top:9px}
  #payment>.payment-checkout .btn{font-size:11px;padding:8px}
}

.shop-layout>#payment{overflow:hidden}
#payment>.payment-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
#payment>.payment-body::-webkit-scrollbar{display:none}
#payment>.payment-body>.section-heading{margin:0 0 6px}
#payment>.payment-body>.section-heading h2{font-size:18px}
#payment>.payment-body>.hint{margin:0;font-size:12px}
#payment>.payment-checkout{position:static;flex-shrink:0}
@media(max-width:570px){#payment>.payment-body>.section-heading h2{font-size:16px}}

/* Keep money editing beside the pile and raise change beside paid counting. */
#payment .payment-selected{flex-wrap:wrap}
#payment .payment-selected>.money-pile{width:auto;flex:1 1 180px}
#payment .payment-selected>.payment-tools{flex:0 0 auto;margin:0;align-self:center}
#payment .payment-counting{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;margin:8px 0 12px}
#payment .payment-counting>.payment-amount{width:auto;margin:0}
#payment .payment-change{display:flex;flex:1 1 280px;flex-wrap:wrap;align-items:center;gap:8px;margin:0;padding:0;border:0;text-align:left}
#payment .payment-change h3{flex-basis:100%;margin:0;font-size:13px}
#payment .payment-change .amount-line{justify-content:flex-start;gap:5px;margin:0;font-size:14px}
#payment .payment-change .amount-line input{height:40px;min-height:40px;padding:5px;font-size:18px}
#payment .payment-change .amount-line input:first-child{width:104px}
#payment .payment-change .amount-line input:last-of-type{width:44px}
#payment .payment-change>.row{margin:0}
#payment .payment-change .btn{min-height:40px;padding:8px 10px;font-size:12px}
@media(max-width:570px){
  #payment .payment-selected>.money-pile{flex-basis:100%}
  #payment .payment-selected>.payment-tools{margin-left:auto}
  #payment .payment-change{flex-basis:100%;gap:6px}
  #payment .payment-change .amount-line input:first-child{width:88px}
  #payment .payment-change .amount-line input:last-of-type{width:36px}
}
#payment .verified-amount input{background:#f0f7eb;color:#39714b;border-color:#c9ddc1;cursor:default}
#payment>.payment-checkout:empty{padding-top:0;border-top:0;min-height:0}

/* Align change counting with paid counting; keep its action at the panel bottom. */
#payment .payment-counting{gap:10px 16px}
#payment .payment-change{flex:1 1 390px;flex-wrap:nowrap;gap:8px}
#payment .payment-change h3{flex:0 0 auto;white-space:nowrap;text-align:left}
#payment .payment-change .amount-line{flex-wrap:nowrap;flex-shrink:0}
#payment>.payment-checkout{justify-content:center}
@media(max-width:570px){
  #payment .payment-change{flex-basis:100%;flex-wrap:wrap}
  #payment .payment-change h3{flex-basis:100%}
  .shop-layout[data-pane="cart"]>#payment{display:none}
  .shop-layout>.shop-selection,.shop-layout>.cart-panel{flex:0 0 100%;min-width:0}
}

/* Daily arithmetic challenges, original answer review and mistake navigation. */
.daily-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.daily-tabs .btn{min-height:42px}
.daily-setup{max-width:850px}
.daily-setup h2,.daily-history h2{margin:0 0 16px}
.daily-start-form>.hint{margin:12px 0 16px}
.daily-history-list{display:flex;flex-direction:column;gap:12px}
.daily-record{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;background:#fffdf5;border:1px solid #ece8d9;border-radius:16px;min-width:0}
.daily-record>div{min-width:0;flex:1}
.daily-record strong,.daily-record small{display:block}
.daily-record small{margin-top:4px;overflow-wrap:anywhere}
.daily-record>.btn{flex-shrink:0}
.daily-record-numbers{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-top:8px;font-size:13px}
.daily-record-numbers .btn{padding:4px 8px;min-height:32px}
.daily-correct-text{color:#39774c}
.daily-error-text,.daily-record .daily-error-link{color:#b45c42}
.daily-exercise-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.daily-exercise-heading h2{margin:0 0 4px}
.daily-exercise-heading p{margin:0;font-size:12px}
.daily-time{flex-shrink:0;padding:9px 14px;border-radius:13px;background:#fff0d7;color:#896233;font-size:13px}
.daily-clock{font-variant-numeric:tabular-nums;font-size:21px}
.daily-summary{display:flex;flex-wrap:wrap;gap:12px 24px;padding:14px 18px;margin-bottom:16px;border-radius:14px;background:#f1f7e9;font-size:15px}
.daily-questions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.daily-question{padding:18px;border:2px solid #eae8d9;border-radius:18px;background:#fffef9;min-width:0;scroll-margin:20px}
.daily-question-title{display:flex;align-items:center;gap:10px;font-size:21px;line-height:1.5;overflow-wrap:anywhere}
.daily-number{display:grid;place-items:center;flex-shrink:0;min-width:28px;height:28px;border-radius:50%;background:#ffebc6;color:#9e743e;font-size:12px;font-weight:700}
.daily-question .field{margin:14px 0 0;font-size:12px}
.daily-question input{max-width:180px;font-size:21px;font-weight:700;min-height:46px}
.daily-question input[aria-invalid="true"]{border-color:#c36a4e;background:#fff3ef}
.daily-question.is-correct{border-color:#c5ddba;background:#f7fbf1}
.daily-question.is-wrong{border-color:#e9b29f;background:#fff5ef}
.daily-question:focus{outline:3px solid #e5b650;outline-offset:3px}
.daily-answer-review{display:flex;flex-wrap:wrap;gap:5px 16px;margin:12px 0 0;font-size:13px;line-height:1.7}
.daily-question.is-wrong .daily-answer-review strong{color:#b45c42}
.daily-question.is-correct .daily-answer-review strong{color:#39774c}
.daily-wrong-links{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:18px;font-size:13px}
.daily-wrong-links .btn{color:#b45c42;border-color:#e9b29f}
.daily-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:22px}
.daily-question-form>.feedback{margin-bottom:14px}
.daily-mistake-entry .daily-answer-review{display:block}
@media(max-width:650px){
  .daily-questions{grid-template-columns:1fr;gap:10px}
  .daily-question{padding:14px}
  .daily-question-title{font-size:20px}
  .daily-record{flex-wrap:wrap;padding:13px;gap:10px}
  .daily-record>div{flex-basis:100%}
  .daily-record>.btn{margin-left:auto}
  .daily-exercise-heading{align-items:flex-start;flex-wrap:wrap;gap:10px}
  .daily-exercise-heading h2{font-size:18px}
  .daily-time{padding:6px 10px}
  .daily-clock{font-size:19px}
  .daily-tabs{gap:6px;margin-bottom:12px}
  .daily-tabs .btn{font-size:12px;padding:8px 10px;flex:1;white-space:nowrap}
  .daily-summary{gap:8px 14px;padding:12px;font-size:13px}
}

/* Leave more of the phone screen for questions and keep elapsed time in view. */
.daily-hero{min-height:0;padding:16px 22px;margin-bottom:16px}
.daily-hero h1{font-size:24px;margin-bottom:4px}
.daily-hero p{font-size:12px}
.daily-hero .eyebrow{font-size:9px;margin-bottom:4px}
.daily-hero .hero-illustration{font-size:44px}
.daily-exercise-heading{position:sticky;top:0;z-index:2;background:#fff;padding:8px 0}
@media(max-width:650px){
  .daily-hero{padding:12px 14px;margin-bottom:12px}
  .daily-hero h1{font-size:18px}
  .daily-hero .eyebrow{display:none}
  .daily-hero .hero-illustration{font-size:32px}
}

/* Answer directly beside the equation, with a compact numeric control. */
.daily-question-title>strong{min-width:0}
.daily-question-title input{width:90px;max-width:90px;flex:0 0 90px;padding:6px 8px;text-align:center}
.daily-equation.has-answer{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
@media(max-width:650px){
  .daily-question-title{gap:6px;font-size:18px}
  .daily-question-title input{width:64px;max-width:64px;flex-basis:64px;font-size:18px;padding:5px 3px}
  .daily-question-title .daily-number{min-width:24px;height:24px}
}

/* Original wrong answers stay visible while corrections unlock the next practice. */
.daily-correction{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px 10px;margin-top:14px;padding-top:12px;border-top:1px dashed #e3b79f}
.daily-correction .field{margin:0;flex:0 1 130px}
.daily-correction input{width:100%;max-width:130px;font-size:18px;min-height:42px}
.daily-correction .btn{min-height:42px}
.daily-correction-status{flex-basis:100%;font-size:12px;color:#b45c42}
.daily-correction-status.is-done{color:#39774c;font-weight:700}
.daily-correction.is-done input{background:#eff7e8;border-color:#b8d6a9;color:#39774c}
.daily-correction-reminder{margin-bottom:16px}
@media(max-width:650px){
  .daily-correction .field{flex-basis:110px}
  .daily-correction .btn{padding:8px;font-size:12px}
}

.brand-icon img{display:block;width:100%;height:100%;object-fit:contain;transform:rotate(8deg)}

/* Total-check feedback stays above the fixed cart actions, outside the item list. */
.cart-footer .calc-block>.total-feedback{grid-column:1/-1;grid-row:2}
.cart-footer .calc-block>.total-feedback:empty{display:none}
.cart-footer .total-feedback>.feedback{margin:0;padding:7px 9px;font-size:12px;line-height:1.5}

/* Guardian notice is readable without preselecting registration consent. */
.guardian-notice{margin:12px 0 8px;padding:10px 12px;background:#f7f9ef;border:1px solid #e1e7d4;border-radius:12px;font-size:12px;line-height:1.7;color:#52644c;overflow-wrap:anywhere}
.guardian-notice summary{cursor:pointer;font-weight:700;color:#39714b}
.guardian-notice p{margin:8px 0}
.guardian-notice small{color:#7b866f}
.guardian-instruction{font-size:12px;color:#7c856f;margin:8px 0}
.guardian-consent{display:flex;align-items:flex-start;gap:8px;margin:8px 0 16px;font-size:12px;line-height:1.7;color:#52644c;cursor:pointer}
.guardian-consent input{flex:0 0 18px;width:18px;height:18px;margin:2px 0 0;accent-color:#39714b}
.guardian-consent span{min-width:0;overflow-wrap:anywhere}

.footer-legal,.signed-in>footer .footer-legal{display:inline-flex;align-items:center;gap:10px;margin:0;flex-shrink:0}
.footer-legal .btn{min-height:28px;padding:2px 0;font-size:11px;border-radius:3px}
.legal-dialog{width:min(680px,calc(100vw - 28px));max-height:85dvh;padding:22px;border:1px solid #e1e7d4;border-radius:18px;color:#3d523f;background:#fffdf7;box-shadow:0 12px 50px #0003}
.legal-dialog::backdrop{background:#25382b88}
.legal-dialog h2{margin:0 0 12px;font-size:20px}
.legal-dialog-content{overflow-y:auto;max-height:calc(85dvh - 150px);font-size:14px;line-height:1.8;overflow-wrap:anywhere;margin-bottom:16px}
.legal-dialog-content p{margin:0 0 12px}
.legal-dialog-content small{font-size:12px;color:#7b866f}
.legal-dialog-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px}
.legal-reading-status{font-size:12px;color:#667663;margin:0 0 12px;min-height:20px}
.legal-dialog:has(.legal-reading-status) .legal-dialog-content{max-height:calc(85dvh - 190px)}
.registration-legal-links{display:flex;flex-wrap:wrap;gap:4px 10px;margin:6px 0 10px}
.registration-legal-links .btn{padding:2px 0;min-height:26px;font-size:12px;box-shadow:none;border-radius:3px;background:transparent;color:#39714b;text-align:left}
.registration-legal-links .is-read{font-weight:800}
.registration-mode .topbar{min-height:72px;padding-top:10px;padding-bottom:10px}
.registration-mode .shell{padding-top:16px;padding-bottom:18px}
.registration-mode .auth-layout{min-height:0;gap:35px;margin:0 auto}
.registration-mode .auth-card{padding:22px 24px}
.registration-mode .auth-card h2{font-size:23px}
.registration-mode .auth-card>.muted{margin-bottom:12px}
.registration-mode .segmented{margin-bottom:12px}
.registration-mode .field{min-width:0;margin-bottom:10px}
.registration-mode .field input,.registration-mode .field select{font-size:13px;padding:8px;min-height:40px;margin-top:4px}
.registration-mode .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.registration-mode .guardian-consent{font-size:12px;line-height:1.6;margin:6px 0 10px;gap:6px}
.registration-mode .guardian-consent input{min-height:18px}
.registration-mode .guardian-instruction{font-size:11px;line-height:1.6;margin:4px 0}
.registration-mode .auth-link{margin-top:12px}
.registration-mode>footer{padding:6px 12px;font-size:10px;line-height:1.5}
@media(max-width:800px){
  .registration-mode .topbar{min-height:62px;padding:8px 14px}
  .registration-mode .brand{font-size:19px;gap:8px}
  .registration-mode .brand-icon{width:40px;height:40px}
  .registration-mode .shell{padding:10px 12px}
  .registration-mode .auth-layout{max-width:480px;gap:0}
  .registration-mode .auth-story{display:none}
  .registration-mode .auth-card{padding:16px 18px;border-radius:22px}
  .registration-mode .auth-card h2{font-size:21px}
  .registration-mode .auth-card>.muted{font-size:11px;margin-bottom:10px}
  .registration-mode .auth-card .form-grid .field{margin-bottom:8px}
  .registration-mode .form-grid{gap:10px}
  .registration-mode .field input,.registration-mode .field select{font-size:12px;padding:6px;min-height:38px}
  .registration-mode .guardian-consent{font-size:11px;margin-bottom:8px}
  .registration-mode .auth-link{margin-top:10px}
  .registration-mode>footer>span:not(.footer-legal){display:none}
}
@media(max-height:740px) and (max-width:800px){
  .registration-mode .topbar{min-height:50px;padding:5px 12px}
  .registration-mode .brand-icon{width:34px;height:34px}
  .registration-mode .brand small{display:none}
  .registration-mode .shell{padding:6px 10px}
  .registration-mode .auth-card{padding:10px 12px}
  .registration-mode .auth-card h2{font-size:19px}
  .registration-mode .auth-card>.muted{margin-bottom:4px;font-size:10px}
  .registration-mode .segmented{margin-bottom:6px;padding:2px}
  .registration-mode .segmented button{padding:5px}
  .registration-mode .auth-card .form-grid .field{margin-bottom:3px}
  .registration-mode .field input,.registration-mode .field select{min-height:34px;padding:4px 6px;margin-top:2px}
  .registration-mode .registration-legal-links{gap:0 8px;margin:2px 0 4px}
  .registration-mode .registration-legal-links .btn{font-size:11px;min-height:22px}
  .registration-mode .guardian-consent{line-height:1.5;margin:4px 0 6px}
  .registration-mode .auth-link{margin-top:4px}
  .registration-mode .auth-card>.btn{min-height:36px;padding:7px}
  .registration-mode>footer{padding:2px 10px}
}
@media(max-width:570px){
  body>footer,.signed-in>footer{flex-wrap:wrap;gap:2px 8px}
  .legal-dialog{padding:16px}
}
@media(max-height:600px) and (max-width:800px){
  .signed-in>footer{display:flex;justify-content:center;font-size:0;padding:0 10px}
  .signed-in>footer .footer-legal{font-size:11px}
}
.student-management-table table{table-layout:fixed}
.student-management-table th:nth-child(1){width:10%}.student-management-table th:nth-child(2){width:7%}.student-management-table th:nth-child(3){width:19%}.student-management-table th:nth-child(4){width:9%}.student-management-table th:nth-child(5){width:27%}.student-management-table th:nth-child(6){width:28%}
.student-management-table td{overflow-wrap:anywhere}.student-management-actions{gap:5px}.student-management-table td .btn{margin:0;padding:7px 9px;min-height:36px;font-size:11px}
.student-ai-usage{display:flex;flex-direction:column;gap:4px;font-size:12px;line-height:1.6}.student-ai-processing{font-size:12px;color:#ad6c31;font-weight:700}.student-ai-usage .badge{align-self:flex-start}.student-ai-editor .hint{font-size:12px;line-height:1.8}
@media(max-width:700px){.student-management-table{border:0}.student-management-table table,.student-management-table tbody{display:block;width:100%}.student-management-table thead{display:none}.student-management-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:14px;margin-bottom:12px;padding:8px;background:#fff}.student-management-table tr:last-child{margin-bottom:0}.student-management-table td{display:block;min-width:0;border:0;padding:7px}.student-management-table td::before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:4px}.student-management-table td:nth-child(3),.student-management-table td:nth-child(5),.student-management-table td:nth-child(6){grid-column:1/-1}.student-management-table td .btn{min-height:40px;padding:8px 10px}.student-management-table .student-ai-usage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px}.student-ai-usage .student-ai-processing{grid-column:1/-1}.student-management-actions{gap:7px}}
