/* Generated by scripts/build_startup_styles.js; edit source CSS, then rebuild. */

/* Source: /vendor/katex/katex.min.css?v=0.18.0 */
@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_AMS-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_AMS-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_AMS-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url("/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Caligraphic-Bold.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Caligraphic-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url("/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Fraktur-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url("/vendor/katex/fonts/KaTeX_Main-Bold.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Main-Bold.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Main-Bold.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url("/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Main-BoldItalic.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Main-Italic.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Main-Italic.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Main-Italic.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Main-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Main-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Main-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url("/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Math-BoldItalic.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Math-Italic.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Math-Italic.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Math-Italic.ttf") format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url("/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_SansSerif-Bold.ttf") format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_SansSerif-Italic.ttf") format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_SansSerif-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Script-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Script-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Script-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Size1-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Size1-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Size1-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Size2-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Size2-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Size2-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Size3-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Size3-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Size3-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Size4-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Size4-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Size4-Regular.ttf") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url("/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2") format("woff2"),url("/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff") format("woff"),url("/vendor/katex/fonts/KaTeX_Typewriter-Regular.ttf") format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.18.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.katex-newline{display:block}.katex .katex-base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .katex-base,.katex .katex-strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .katex-vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .katex-thinbox{display:inline-flex;flex-direction:row;max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline,.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-rule,.katex .katex-underline .underline-line,.katex .mfrac .frac-line{min-height:1px}.katex .mspace{display:inline-block}.katex .katex-smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.katex-inner,.katex .llap>.katex-inner,.katex .rlap>.katex-inner{position:absolute}.katex .clap>.katex-fix,.katex .llap>.katex-fix,.katex .rlap>.katex-fix{display:inline-block}.katex .llap>.katex-inner{right:0}.katex .clap>.katex-inner,.katex .rlap>.katex-inner{left:0}.katex .clap>.katex-inner>span{margin-left:-50%;margin-right:50%}.katex .katex-rule{border:0 solid;display:inline-block;position:relative}.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.katex-root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .katex-sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .katex-sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .katex-sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .katex-sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .katex-sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .katex-sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .katex-sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .katex-sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .katex-sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .katex-sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .katex-sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .katex-sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .katex-sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .katex-sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .katex-sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .katex-sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .katex-sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .katex-sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .katex-sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .katex-sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .katex-sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .katex-sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .katex-sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .katex-sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .katex-sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .katex-sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .katex-sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .katex-sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .katex-sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .katex-sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .katex-sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .katex-sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .katex-sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .katex-sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .katex-sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .katex-sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .katex-sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .katex-sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .katex-sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .katex-sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .katex-sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .katex-sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .katex-sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .katex-sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .katex-sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .katex-sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .katex-sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .katex-sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .katex-sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .katex-sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .katex-sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .katex-sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .katex-sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .katex-sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .katex-sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .katex-sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .katex-sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .katex-sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .katex-sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .katex-sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .katex-sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .katex-sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .katex-sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .katex-sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .katex-sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .katex-sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .katex-sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .katex-sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .katex-sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .katex-sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .katex-sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .katex-sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .katex-sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .katex-sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .katex-sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .katex-sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .katex-sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .katex-sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .katex-sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .katex-sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .katex-sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .katex-sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .katex-sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .katex-sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .katex-sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .katex-sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .katex-sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .katex-sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .katex-sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .katex-sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .katex-sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .katex-sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .katex-sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .katex-sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .katex-sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .katex-sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .katex-sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .katex-sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .katex-sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .katex-sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .katex-sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .katex-sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .katex-sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .katex-sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .katex-sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .katex-sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .katex-sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .katex-sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .katex-sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .katex-sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .katex-sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .katex-sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .katex-sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .katex-sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .katex-sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .katex-sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .katex-sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .katex-sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .katex-sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .katex-sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .katex-sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .katex-accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .katex-accent .accent-body{position:relative}.katex .katex-accent .accent-body:not(.accent-full){width:0}.katex .katex-overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .katex-stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .katex-stretchy:after,.katex .katex-stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .katex-sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.katex-tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.katex-tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}


/* Source: /styles.css?v=178 */
/* Restored from the detailed 15k-line stylesheet, compacted mechanically and stabilized for the current UI. */
:root { --blue: #1769ff; --blue-dark: #0f4fc8; --blue-soft: #edf4ff; --ink: #111827; --muted: #6b7280; --line: #e5e7eb; --line-strong: #d7dee9; --soft: #f5f8ff; --green: #009241; --red: #ef4444; --amber: #f59e0b; --bg: #f5f7fb; --card: #ffffff; --shadow: 0 18px 40px rgba(17, 24, 39, 0.08); --shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.07); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", sans-serif; letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
button { border: 0; background: transparent; cursor: pointer; }
textarea { min-height: 116px; resize: vertical; }
.boot { display: grid; min-height: 100vh; place-items: center; color: var(--blue); font-size: 24px; font-weight: 800; }
.app-shell { min-height: 100vh; padding-bottom: 104px; }
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(215, 222, 233, 0.92); background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(18px); box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 150px; border: 0; border-radius: 8px; background: transparent; padding: 0 4px; font-weight: 900; color: var(--ink); }
button.brand:hover, button.brand:focus-visible { background: transparent; outline: none; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button, .ghost, .chip, .small-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: #374151; padding: 0 13px; white-space: nowrap; font-weight: 800; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.nav .icon, .ghost .icon, .small-button .icon, .chip .icon { width: 16px; height: 16px; }
.nav button.active, .chip.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.nav button:hover, .ghost:hover, .small-button:hover, .chip:hover { border-color: #bfd3ff; background: #f8fbff; color: var(--blue); }
.nav button.active:hover, .chip.active:hover { background: var(--blue-dark); color: #fff; }
.account { display: flex; align-items: center; gap: 8px; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; overflow: hidden; }
.avatar img, .profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.icon-button, .icon-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 40px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .question-card, .answer-card, .notice-card { border: 1px solid var(--line); border-radius: 8px; background: var(--card); box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04); }
.panel { padding: 18px; }
.hero { display: grid; gap: 18px; padding: 26px 0 10px; }
.simple-hero { grid-template-columns: minmax(0, 1fr); }
.simple-hero .search-row { max-width: 720px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 60px); line-height: 1.05; letter-spacing: 0; }
.hero p { max-width: 600px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.input, .textarea, .select { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); padding: 11px 12px; outline: none; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.12); }
.primary, .danger, .success { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 8px; padding: 0 16px; color: #fff; font-weight: 800; transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.primary { background: var(--blue); }
.primary:hover { background: var(--blue-dark); }
.success { background: var(--green); }
.danger { background: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.section-title h2, .panel h2, .panel h3 { margin: 0; letter-spacing: 0; }
.section-title h2, .panel h2 { font-size: 20px; }
.panel h3 { font-size: 16px; }
.muted { color: var(--muted); }
.mini { font-size: 13px; }
.question-list, .answer-list, .notice-list { display: grid; gap: 10px; }
.admin-user-list, .log-list { display: grid; gap: 8px; }
.admin-user-search { display: grid; gap: 8px; margin-bottom: 10px; }
.user-edit-form { padding-top: 2px; }
.inline-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.log-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; border-bottom: 1px solid var(--line); padding: 7px 0; color: var(--muted); font-size: 12px; }
.active-note { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.08); }
.question-card, .answer-card, .notice-card { display: grid; gap: 10px; padding: 14px; }
.question-card:hover { border-color: #bfd3ff; box-shadow: var(--shadow-soft); }
.card-head { display: flex; justify-content: space-between; gap: 12px; }
.card-head h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; border-radius: 999px; background: #eef2ff; color: #3151b7; padding: 0 9px; font-size: 12px; font-weight: 800; }
.badge.waiting { background: #fff7ed; color: #c2410c; }
.badge.reserved { background: #eff6ff; color: #1d4ed8; }
.badge.answered, .badge.followUp { background: #ecfeff; color: #0e7490; }
.badge.selected, .badge.resolved { background: #ecfdf5; color: #047857; }
.badge.hidden, .badge.reported { background: #fef2f2; color: #b91c1c; }
.professional-badge { background: #eef2ff; color: #1d4ed8; }
.level-badge { background: #f8fafc; color: #334155; }
.level-badge .icon, .professional-badge .icon { width: 14px; height: 14px; }
.rank-guide, .ranking-list { display: grid; gap: 8px; }
.rank-row, .ranking-row { display: grid; align-items: center; gap: 10px; }
.rank-row { grid-template-columns: 1fr auto; }
.ranking-row { grid-template-columns: 28px 1fr auto; border-bottom: 1px solid var(--line); padding: 8px 0; }
.ranking-row:last-child { border-bottom: 0; }
.ranking-row > strong { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 13px; }
.ranking-name { margin-bottom: 5px; font-weight: 900; }
.space-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.space-tabs::-webkit-scrollbar { display: none; }
.space-panel > .section-title:first-child { margin-top: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 14px; box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03); }
.stat strong { display: block; font-size: 25px; line-height: 1; }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.storage-panel, .admin-storage-tools { display: grid; gap: 12px; }
.storage-meter { width: 100%; height: 10px; overflow: hidden; border: 1px solid rgba(23, 105, 255, 0.14); border-radius: 999px; background: #edf4ff; }
.storage-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1769ff, #2dd4bf); transition: width 0.2s ease; }
.storage-meter.over span { background: linear-gradient(90deg, #f97316, #ef4444); }
.storage-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.storage-summary div { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbff; padding: 10px; }
.storage-summary strong { font-size: 18px; }
.storage-summary span { color: var(--muted); font-size: 12px; }
.storage-user-list { display: grid; gap: 8px; max-height: 430px; overflow: auto; padding-right: 2px; }
.storage-user-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 0.8fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px; }
.storage-user-row.over { border-color: rgba(239, 68, 68, 0.35); background: #fff7f7; }
.storage-user-usage { display: grid; gap: 6px; min-width: 0; color: #374151; font-size: 12px; font-weight: 800; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; color: #374151; font-weight: 700; }
.legal-box, .danger-zone, .ad-slot { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbff; padding: 12px; }
.legal-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.legal-preview { border: 1px solid #dce6f5; border-radius: 10px; background: #fff; padding: 9px 10px; }
.legal-preview summary { cursor: pointer; color: var(--ink); font-weight: 900; }
.legal-preview .policy-detail { margin-top: 10px; max-height: 280px; overflow: auto; }
.policy-detail { display: grid; gap: 8px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbff; padding: 13px; }
.policy-detail h3, .policy-detail p { margin: 0; }
.policy-detail p { color: #4b5563; font-size: 13px; line-height: 1.55; }
.danger-zone { background: #fff7f7; }
.ad-slot { margin-top: 22px; min-height: 72px; place-items: center; color: var(--muted); }
.note-textarea { min-height: 420px; line-height: 1.75; background-image: linear-gradient(to bottom, transparent 31px, #e8eef8 32px); background-size: 100% 32px; }
.note-tabs { margin-bottom: 12px; }
.note-list { max-height: 650px; overflow: auto; padding-right: 2px; }
.note-card { cursor: pointer; }
.note-card .note-thumb { aspect-ratio: 3 / 4; height: min(240px, 58vw); }
.note-preview-card { display: grid; gap: 8px; width: min(360px, 100%); border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; padding: 8px; text-align: left; }
.note-preview-card img, .note-thumb, .hand-note-summary img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #f8fafc; object-fit: contain; }
.note-preview-card img { max-height: min(72vh, 720px); }
.note-preview-card span { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-size: 13px; font-weight: 900; }
.note-inspector { position: sticky; top: 88px; }
.hand-note-summary img { max-height: 420px; object-fit: contain; }
.market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.market-card .note-thumb { aspect-ratio: 3 / 4; height: min(320px, 78vw); }
.note-full-preview { display: block; width: 100%; border: 0; background: transparent; padding: 0; }
.profile-photo-row { display: flex; align-items: center; gap: 14px; }
.profile-photo-preview { display: grid; width: 76px; height: 76px; place-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 24px; font-weight: 900; }
.compact-select { width: min(220px, 100%); }
.note-editor-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; background: rgba(12, 18, 32, 0.72); }
.note-editor { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(1280px, 100%); height: min(920px, 100%); margin: auto; overflow: hidden; border: 1px solid rgba(207, 216, 231, 0.55); border-radius: 12px; background: #f7f9fd; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28); }
.note-editor-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.96); padding: 10px; }
.note-title-input { min-width: 0; border: 0; background: transparent; color: var(--ink); font-weight: 900; outline: none; }
.note-editor-body { display: grid; grid-template-columns: 94px minmax(0, 1fr); min-height: 0; }
.note-toolrail { display: flex; flex-direction: column; gap: 7px; overflow: auto; border-right: 1px solid var(--line); background: #fff; padding: 10px 8px; }
.note-toolrail.disabled { opacity: 0.55; pointer-events: none; }
.note-toolrail .ghost { justify-content: flex-start; min-height: 40px; padding: 0 8px; }
.note-toolrail .ghost.active { border-color: rgba(15, 107, 255, 0.12); background: #eef5ff; color: var(--blue); }
.note-colors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 4px; }
.note-colors button { aspect-ratio: 1; border: 2px solid #fff; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px var(--line-strong); }
.note-colors button.active { box-shadow: 0 0 0 3px rgba(15, 107, 255, 0.22); }
.note-size { width: 100%; }
.hand-canvas-stage { min-height: 0; overflow: auto; background: radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.35) 1px, transparent 0) 0 0 / 18px 18px, #eef2f8; padding: 14px; touch-action: none; }
#handCanvas { display: block; margin: 0 auto; border-radius: 10px; background: #fff; box-shadow: 0 10px 36px rgba(16, 24, 40, 0.18); touch-action: none; }
.compact-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.help { color: var(--muted); font-size: 12px; font-weight: 500; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field-block { display: grid; gap: 8px; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.subject-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grade-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 276px; overflow: auto; padding-bottom: 2px; }
.answer-type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.unit-grid { max-height: 94px; overflow: auto; padding-bottom: 2px; }
.choice-btn { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: #374151; padding: 0 12px; font-weight: 800; }
.course-choice { display: grid; min-height: 64px; align-content: center; justify-items: start; gap: 3px; text-align: left; }
.course-choice small { color: var(--muted); font-size: 12px; font-weight: 700; }
.course-choice.active small { color: rgba(255, 255, 255, 0.82); }
.choice-btn.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.choice-btn:hover { border-color: #bfd3ff; background: #f8fbff; color: var(--blue); }
.choice-btn.active:hover { background: var(--blue-dark); color: #fff; }
.media-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-actions.single { grid-template-columns: 1fr; }
.media-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; border: 1px solid #bfd3ff; border-radius: 8px; background: #f8fbff; color: var(--blue); font-weight: 900; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
.media-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline-check { display: flex; grid-template-columns: none; align-items: center; gap: 8px; }
.submit-wide { width: 100%; }
.big-input { min-height: 142px; }
.image-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-item { position: relative; }
.preview-item button { position: absolute; top: 6px; right: 6px; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: rgba(17, 24, 39, 0.82); color: #fff; font-size: 18px; line-height: 1; }
.image-preview img, .question-image { max-width: 180px; max-height: 180px; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.hand-image-list { align-items: stretch; }
.question-image-action { position: relative; display: grid; overflow: hidden; border-radius: var(--radius); background: #fff; }
.question-image-action img { display: block; }
.question-image-action span { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; border-radius: 8px; background: rgba(15, 107, 255, 0.94); color: #fff; padding: 0 9px; font-size: 12px; font-weight: 900; }
.question-image-action .icon { width: 14px; height: 14px; }
.detail { display: grid; gap: 16px; }
.detail-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.content-box { white-space: pre-wrap; line-height: 1.65; }
.bottom-ask { position: fixed; right: max(16px, calc((100vw - 1120px) / 2)); bottom: 18px; z-index: 30; min-width: 128px; box-shadow: 0 14px 30px rgba(23, 105, 255, 0.24); }
.mobile-tabbar { display: none; }
.auth-wrap { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.auth-card { width: min(430px, 100%); border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 24px; box-shadow: var(--shadow); }
.auth-card .brand { margin-bottom: 18px; }
.auth-hidden-button { width: 100%; justify-content: center; margin: -4px 0 14px; }
.public-hidden-wrap { align-items: flex-start; padding-top: 42px; }
.public-hidden-card { width: min(760px, 100%); }
.public-hidden-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.public-hidden-head .brand { margin: 0; }
.guest-login-pill { justify-content: center; min-width: 106px; }
.login-required-panel { display: grid; gap: 12px; max-width: 640px; }
.auth-invite-notice { display: flex; align-items: flex-start; gap: 9px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #1e3a8a; margin-bottom: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.auth-invite-notice svg { flex: 0 0 auto; }
.tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.tabs button { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #374151; font-weight: 800; }
.tabs button.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.toast { position: fixed; top: 76px; right: 18px; z-index: 240; max-width: min(420px, calc(100vw - 36px)); border-radius: 8px; background: #111827; color: #fff; padding: 12px 14px; box-shadow: var(--shadow); }
.empty { border: 1px dashed #cbd5e1; border-radius: 8px; color: var(--muted); padding: 20px; text-align: center; }
.compact-empty { padding: 14px; text-align: left; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(15, 23, 42, 0.34); padding: 20px; }
.tutorial-modal { display: grid; gap: 16px; width: min(420px, 100%); border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 20px; box-shadow: var(--shadow); }
.tutorial-modal h2 { margin: 0; }
.document-viewer-backdrop { z-index: 220; padding: 18px; }
.document-viewer-modal { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; width: min(1100px, 100%); height: min(820px, calc(100vh - 36px)); border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 14px; box-shadow: var(--shadow); }
.document-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.document-viewer-head strong { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-viewer-head span { display: block; color: var(--muted); font-size: 12px; }
.document-viewer-actions { display: inline-flex; align-items: center; flex-shrink: 0; gap: 8px; }
.document-viewer-frame { width: 100%; height: min(82dvh, 860px); border: 1px solid #d8e2ef; border-radius: 8px; background: #f8fafc; }
.admin-pdf-backdrop { z-index: 230; padding: 10px; }
.admin-pdf-modal { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; width: min(1280px, 100%); height: min(940px, calc(100dvh - 20px)); border: 1px solid rgba(148, 163, 184, 0.26); border-radius: 18px; background: #f8fafc; padding: 12px; box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28); }
.admin-pdf-head { border: 1px solid rgba(226, 232, 240, 0.9); border-radius: 14px; background: rgba(255, 255, 255, 0.92); padding: 10px 12px; }
.admin-pdf-stage { position: relative; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 16px; background: #111827; touch-action: none; user-select: none; cursor: grab; }
.admin-pdf-stage.dragging { cursor: grabbing; }
.admin-pdf-frame { width: 100%; height: 100%; min-height: min(78dvh, 820px); border: 0; background: #111827; pointer-events: none; }
.admin-pdf-gesture-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; background: rgba(15, 23, 42, 0.82); color: #fff; padding: 10px 14px; font-size: 13px; font-weight: 900; pointer-events: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.admin-pdf-tools { display: grid; gap: 10px; }
.admin-pdf-current { display: grid; gap: 4px; border: 1px solid #d8e2ef; border-radius: 12px; background: #f8fbff; padding: 10px; }
.admin-pdf-current span, .admin-pdf-help { color: var(--muted); font-size: 12px; font-weight: 850; }
.admin-pdf-help { display: grid; gap: 5px; border: 1px solid rgba(20, 104, 255, 0.14); border-radius: 12px; background: rgba(239, 246, 255, 0.78); padding: 10px; }
.admin-pdf-help span { display: inline-flex; align-items: center; gap: 7px; }
.tutorial-steps { display: grid; gap: 10px; }
.tutorial-steps div { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.tutorial-steps strong { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 14px; }
.table { width: 100%; border-collapse: collapse; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; font-size: 14px; }
.table th { background: #f9fafb; color: #374151; }
.hide-mobile { display: inline; }
@media (max-width: 820px) {
  body { background: #fff; }
  .topbar-inner, .container { width: min(100% - 24px, 1120px); }
  .topbar-inner { align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0 8px; }
  .brand { min-width: auto; }
  .brand img { width: 42px; height: 42px; }
  .account { margin-left: auto; }
  .nav { order: 3; width: 100%; padding: 2px 0 4px; }
  .nav button { min-height: 34px; gap: 5px; padding: 0 10px; font-size: 13px; }
  .nav button .icon { width: 15px; height: 15px; }
  .grid.two, .grid.three, .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-textarea { min-height: 320px; }
  .hero { gap: 12px; padding: 16px 0 4px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 15px; }
  .search-row { grid-template-columns: 1fr; }
  .inline-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel { padding: 14px; }
  .section-title { margin: 18px 0 9px; }
  .compact-title { align-items: flex-end; }
  .subject-grid, .category-grid, .answer-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-grid { grid-template-columns: 1fr; max-height: 300px; }
  .choice-btn { min-height: 46px; }
  .media-button { min-height: 64px; }
  .question-card, .answer-card, .notice-card { padding: 13px; }
  .card-head { align-items: flex-start; }
  .hide-mobile { display: none; }
  .bottom-ask { display: none; }
  .mobile-tabbar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 35; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(16px); padding: 7px 8px max(7px, env(safe-area-inset-bottom)); }
  .mobile-tabbar button { display: grid; gap: 3px; place-items: center; min-height: 48px; border-radius: 8px; background: transparent; color: #6b7280; font-size: 11px; font-weight: 800; }
  .mobile-tabbar button .icon { width: 20px; height: 20px; }
  .app-shell { padding-bottom: 92px; }
}
:root { --blue: #0f6bff; --blue-dark: #0b4fd1; --blue-soft: #edf5ff; --blue-tint: #f6f9ff; --ink: #101828; --muted: #667085; --line: #e6eaf2; --line-strong: #cfd8e7; --soft: #f7f9fc; --green: #078849; --red: #dc2626; --amber: #d97706; --bg: #f4f7fb; --card: #ffffff; --shadow: 0 18px 42px rgba(16, 24, 40, 0.10); --shadow-soft: 0 10px 28px rgba(16, 24, 40, 0.08); --radius: 8px; }
html { min-width: 320px; -webkit-text-size-adjust: 100%; }
body { background: linear-gradient(180deg, #f8fbff 0, #f4f7fb 300px, #f7f9fc 100%); color: var(--ink); font-size: 15px; line-height: 1.45; }
button, input, select, textarea { letter-spacing: 0; }
button:focus-visible, .input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: 3px solid rgba(15, 107, 255, 0.18); outline-offset: 2px; }
.topbar { border-bottom: 1px solid rgba(207, 216, 231, 0.84); background: rgba(255, 255, 255, 0.88); box-shadow: 0 10px 30px rgba(16, 24, 40, 0.04); }
.topbar-inner, .container { width: min(1180px, calc(100% - 40px)); }
.topbar-inner { min-height: 68px; padding: 10px 0; }
.brand { min-width: 142px; color: #0b1220; font-size: 16px; }
.brand img { width: 54px; height: 54px; filter: drop-shadow(0 5px 12px rgba(15, 107, 255, 0.14)); }
.nav { flex: 1; justify-content: center; gap: 4px; }
.nav button, .ghost, .chip, .small-button { min-height: 38px; border-color: transparent; background: transparent; color: #475467; padding: 0 11px; font-size: 14px; font-weight: 800; }
.nav button:hover, .ghost:hover, .small-button:hover, .chip:hover { border-color: #dbe7ff; background: #f5f9ff; color: var(--blue); }
.nav button.active, .chip.active { border-color: rgba(15, 107, 255, 0.12); background: #eef5ff; color: var(--blue); box-shadow: inset 0 0 0 1px rgba(15, 107, 255, 0.06); }
.nav button.active:hover, .chip.active:hover { background: #e3efff; color: var(--blue-dark); }
.account { min-width: 190px; justify-content: flex-end; color: #344054; font-size: 14px; font-weight: 750; }
.avatar { width: 32px; height: 32px; background: #e8f1ff; box-shadow: inset 0 0 0 1px rgba(15, 107, 255, 0.12); }
.container { padding: 24px 0 48px; }
.grid { gap: 18px; }
.grid.two { grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr); align-items: start; }
.panel, .question-card, .answer-card, .notice-card, .stat, .auth-card, .tutorial-modal { border-color: rgba(207, 216, 231, 0.82); border-radius: var(--radius); background: rgba(255, 255, 255, 0.98); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.panel { padding: 20px; }
.hero { gap: 16px; border: 1px solid rgba(207, 216, 231, 0.78); border-radius: var(--radius); background: #fff; padding: 24px; box-shadow: var(--shadow-soft); }
.hero h1 { font-size: clamp(36px, 4.2vw, 54px); letter-spacing: 0; }
.hero p { color: #475467; }
.search-row { grid-template-columns: minmax(0, 1fr) 108px; }
.input, .textarea, .select { min-height: 46px; border-color: #d5deeb; border-radius: var(--radius); background: #fff; color: #101828; padding: 11px 13px; box-shadow: inset 0 1px 1px rgba(16, 24, 40, 0.02); }
.input::placeholder, .textarea::placeholder { color: #98a2b3; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(15, 107, 255, 0.12); }
.primary, .danger, .success { min-height: 44px; border-radius: var(--radius); padding: 0 16px; font-weight: 900; box-shadow: 0 8px 18px rgba(16, 24, 40, 0.10); }
.primary { background: var(--blue); }
.primary:hover { background: var(--blue-dark); box-shadow: 0 10px 24px rgba(15, 107, 255, 0.22); }
.success { background: var(--green); }
.danger { background: var(--red); }
.ghost, .small-button { border-color: #d9e2ef; background: #fff; }
.section-title { margin: 24px 0 12px; }
.section-title h2, .panel h2 { color: #101828; font-size: 19px; font-weight: 900; }
.panel h3 { color: #101828; font-weight: 900; }
.question-list, .answer-list, .notice-list { gap: 12px; }
.question-card, .answer-card, .notice-card { gap: 11px; padding: 16px; transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease; }
.question-card:hover, .notice-card:hover, .answer-card:hover { border-color: #bcd2ff; box-shadow: var(--shadow-soft); }
.question-card:hover { transform: translateY(-1px); }
.card-head { align-items: flex-start; }
.card-head h3, .question-card strong, .answer-card strong, .notice-card strong { color: #101828; font-weight: 900; }
.badge { min-height: 24px; border: 1px solid transparent; border-radius: 999px; background: #eef4ff; color: #2451b2; padding: 0 9px; font-size: 12px; font-weight: 900; }
.badge.waiting { border-color: #fed7aa; background: #fff7ed; color: #b45309; }
.badge.reserved { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.badge.answered, .badge.followUp { border-color: #a5f3fc; background: #ecfeff; color: #0e7490; }
.badge.selected, .badge.resolved { border-color: #bbf7d0; background: #ecfdf3; color: #047857; }
.badge.hidden, .badge.reported { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.professional-badge { border-color: #bfdbfe; background: #eaf2ff; color: #0f5bdd; }
.strong-professional-badge { border-color: #0f6bff; background: #0f6bff; color: #fff; box-shadow: 0 6px 16px rgba(15, 107, 255, 0.22); }
.strong-professional-badge .icon { color: #fff; }
.level-badge { border-color: #d8dee9; background: #f8fafc; color: #334155; }
.meta { gap: 7px 10px; color: #667085; }
.stats { gap: 12px; }
.stat { padding: 16px; }
.stat strong { color: #101828; font-size: 24px; font-weight: 950; }
.stat span { color: #667085; font-weight: 750; }
.legal-box, .danger-zone, .ad-slot, .policy-detail { border-color: #dce6f5; border-radius: var(--radius); background: #f8fbff; }
.danger-zone { border-color: #fecaca; background: #fff8f8; }
.policy-detail { box-shadow: inset 3px 0 0 rgba(15, 107, 255, 0.42); }
.choice-btn, .media-button, .tabs button { border-radius: var(--radius); }
.choice-grid, .chips { gap: 7px; }
.choice-btn { min-height: 44px; border-color: #d5deeb; color: #344054; }
.choice-btn:hover { border-color: #bcd2ff; background: #f5f9ff; }
.choice-btn.active { background: var(--blue); color: #fff; box-shadow: 0 8px 18px rgba(15, 107, 255, 0.18); }
.course-choice { min-height: 68px; }
.media-button { min-height: 62px; border-color: #bcd2ff; background: #f5f9ff; }
.media-button .icon { width: 22px; height: 22px; }
.image-preview img, .question-image { border-color: #d5deeb; border-radius: var(--radius); box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08); }
.content-box { color: #1d2939; line-height: 1.72; }
.detail { gap: 18px; }
.detail-title h1 { margin: 12px 0 8px; font-size: clamp(26px, 3vw, 36px); line-height: 1.2; letter-spacing: 0; }
.community-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.community-sidebar { position: sticky; top: 88px; display: grid; gap: 10px; }
.community-board { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 48px; border: 1px solid #d9e2ef; border-left: 4px solid var(--board-color, var(--blue)); border-radius: var(--radius); background: #fff; color: #344054; padding: 0 12px; text-align: left; font-weight: 900; }
.community-board span { color: #667085; font-size: 12px; }
.community-board.active { border-color: #bcd2ff; border-left-color: var(--blue); background: #eef5ff; color: var(--blue); }
.community-main { display: grid; gap: 14px; min-width: 0; }
.community-write { gap: 10px; }
.compact-form { gap: 10px; }
.compact-form h3 { margin: 0; }
.compact-textarea { min-height: 92px; }
.community-feed { display: grid; gap: 12px; }
.compact-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.community-post-card { display: grid; gap: 11px; border: 1px solid rgba(207, 216, 231, 0.82); border-radius: var(--radius); background: #fff; padding: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); cursor: pointer; transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease; }
.community-post-card:hover { border-color: #bcd2ff; box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.community-post-card h3 { margin: 7px 0 0; font-size: 18px; line-height: 1.35; }
.community-thumb-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.community-thumb-strip img { width: 100%; aspect-ratio: 4 / 3; border: 1px solid #d5deeb; border-radius: var(--radius); object-fit: cover; }
.document-insert-panel { gap: 10px; }
.document-toolbar { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(130px, 180px); gap: 10px; align-items: stretch; }
.document-button { min-height: 44px; }
.document-server-note { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border: 1px solid #d8e2ef; border-radius: 8px; background: #f8fbff; color: #174a8b; padding: 0 12px; font-size: 12px; font-weight: 900; }
.document-preview-list, .document-attachment-list { display: grid; gap: 8px; }
.document-preview-item, .document-attachment { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; min-width: 0; border: 1px solid #d8e2ef; border-radius: 10px; background: #f8fbff; padding: 10px; color: #1d2939; }
.document-attachment:hover { border-color: #9fc0ff; background: #f0f6ff; }
.document-attachment.expired { opacity: 0.62; cursor: not-allowed; }
.document-type { min-width: 48px; border-radius: 8px; background: #174a8b; color: #fff; padding: 7px 8px; text-align: center; font-size: 12px; font-weight: 950; }
.document-main, .document-preview-item div { display: grid; gap: 2px; min-width: 0; }
.document-main strong, .document-preview-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-main small, .document-preview-item small { color: #667085; font-size: 12px; }
.document-preview-item button { width: 30px; height: 30px; border: 0; border-radius: 999px; background: #fee2e2; color: #991b1b; font-weight: 900; }
.document-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.document-actions a, .document-actions button { min-height: 34px; text-decoration: none; }
.document-inline-preview { display: block; grid-column: 1 / -1; width: 100%; height: clamp(540px, 78dvh, 900px); border: 1px solid #cfd9ea; border-radius: 10px; background: #f8fafc; }
.compact-documents { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bottom-ask { right: max(18px, calc((100vw - 1180px) / 2)); bottom: 20px; min-width: 134px; box-shadow: 0 18px 36px rgba(15, 107, 255, 0.24); }
.auth-wrap { background: linear-gradient(180deg, #f8fbff 0, #eef5ff 100%); }
.auth-card { width: min(440px, 100%); padding: 26px; box-shadow: var(--shadow); }
.tabs { border: 1px solid #dce6f5; border-radius: var(--radius); background: #f8fbff; padding: 4px; }
.tabs button { border: 0; background: transparent; }
.tabs button.active { background: #fff; color: var(--blue); box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08); }
.empty { border-color: #d5deeb; background: #fbfcff; }
.table { display: block; overflow-x: auto; border-color: #dce6f5; background: #fff; }
.table th { background: #f8fbff; white-space: nowrap; }
.table td { min-width: 92px; }
.rank-row, .ranking-row { border-color: #edf1f7; }
.ranking-row > strong { background: #edf5ff; }
@media (min-width: 821px) {
  .nav button span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; }
  .panel:has(.form), .panel:has(.notice-list), .panel:has(.question-list) { align-self: start; }
}
@media (max-width: 820px) {
  body { background: #fff; font-size: 14px; }
  .topbar { box-shadow: 0 8px 22px rgba(16, 24, 40, 0.05); }
  .topbar-inner, .container { width: min(100% - 24px, 1180px); }
  .topbar-inner { min-height: 60px; padding: 9px 0; }
  .brand { min-width: 0; font-size: 15px; }
  .brand img { width: 30px; height: 30px; }
  .account { min-width: 0; gap: 5px; }
  .avatar { width: 30px; height: 30px; font-size: 13px; }
  .nav { order: 3; justify-content: flex-start; width: 100%; gap: 6px; padding: 4px 0 2px; }
  .nav button { min-height: 36px; padding: 0 10px; font-size: 13px; }
  .container { padding: 16px 0 34px; }
  .hero { gap: 13px; padding: 18px; box-shadow: none; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 14px; }
  .search-row, .grid.two, .grid.three, .split, .community-layout, .compact-feed { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 13px; }
  .stat strong { font-size: 21px; }
  .panel { padding: 15px; }
  .question-card, .answer-card, .notice-card { padding: 14px; }
  .card-head, .detail-title { gap: 10px; }
  .detail-title { display: grid; }
  .detail-title h1 { font-size: 25px; }
  .section-title { margin: 20px 0 10px; }
  .section-title h2, .panel h2 { font-size: 18px; }
  .primary, .danger, .success, .input, .select { min-height: 46px; }
  .textarea { min-height: 120px; }
  .inline-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .inline-fields .input { padding-inline: 9px; }
  .subject-grid, .category-grid, .answer-type-grid, .grade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-grid { grid-template-columns: 1fr; max-height: 312px; }
  .choice-btn { min-height: 48px; padding-inline: 10px; }
  .media-button { min-height: 66px; }
  .image-preview img, .question-image { max-width: min(46vw, 170px); max-height: 170px; }
  .ranking-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .community-sidebar { position: static; }
  .community-board { min-height: 44px; }
  .community-post-card { padding: 14px; }
  .ranking-row .badges { gap: 4px; }
  .table { border-radius: var(--radius); }
  .hide-mobile { display: none; }
  .bottom-ask { display: none; }
  .mobile-tabbar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 35; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid rgba(207, 216, 231, 0.9); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(18px); padding: 7px 7px max(7px, env(safe-area-inset-bottom)); }
  .mobile-tabbar button { display: grid; gap: 3px; place-items: center; min-width: 0; min-height: 48px; border-radius: var(--radius); color: #667085; font-size: 10px; font-weight: 900; }
  .mobile-tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-tabbar button .icon { width: 19px; height: 19px; }
  .app-shell { padding-bottom: 92px; }
}
@media (max-width: 420px) {
  .topbar-inner, .container { width: min(100% - 18px, 1180px); }
  .hero { padding: 15px; }
  .hero h1 { font-size: 30px; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .inline-fields { grid-template-columns: 1fr; }
  .subject-grid, .category-grid, .answer-type-grid, .grade-grid { grid-template-columns: 1fr; }
  .mobile-tabbar { padding-inline: 4px; }
  .mobile-tabbar button { font-size: 9px; }
}
@media (max-width: 820px) {
  .topbar-inner { flex-wrap: nowrap; }
  .topbar .nav { display: none; }
  .topbar .account { margin-left: auto; min-width: 0; }
  .topbar .brand { min-width: 0; }
  .space-tabs .chip { min-height: 38px; padding: 0 10px; }
  .note-editor { width: 100%; height: 100%; border-radius: 0; }
  .note-editor-top { grid-template-columns: auto minmax(0, 1fr); }
  .note-editor-top .chips { grid-column: 1 / -1; }
  .note-editor-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .note-toolrail { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
  .note-toolrail .ghost span { display: none; }
  .note-colors { display: flex; min-width: 112px; }
  .note-colors button { width: 28px; }
  .market-grid { grid-template-columns: 1fr; }
  .note-inspector { position: static; }
}
@media (max-width: 420px) {
  .space-tabs { gap: 4px; }
  .space-tabs .chip { gap: 4px; min-height: 36px; padding: 0 7px; font-size: 12px; }
  .space-tabs .chip .icon { width: 14px; height: 14px; }
}
:root { --blue: #174a8b; --blue-dark: #0d3264; --blue-soft: #f1f6fc; --ink: #121417; --muted: #6a7280; --line: #e7eaee; --line-strong: #d9dee6; --bg: #ffffff; --card: #ffffff; --shadow: none; --shadow-soft: none; --radius: 8px; }
body { background: #fff; color: var(--ink); }
.topbar { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.96); box-shadow: none; }
.topbar-inner, .container { width: min(1040px, calc(100% - 32px)); }
.topbar-inner { min-height: 64px; }
.brand { gap: 9px; min-width: 134px; font-size: 15px; font-weight: 900; }
.brand img { width: 44px; height: 44px; border-radius: 0; filter: none; }
.nav { gap: 2px; }
.nav button, .ghost, .chip, .small-button { border-color: transparent; background: transparent; box-shadow: none; color: #4b5563; }
.nav button.active, .chip.active { border-color: transparent; background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.nav button:hover, .ghost:hover, .small-button:hover, .chip:hover { border-color: transparent; background: #f7f9fb; color: var(--blue); }
.hero, .panel, .question-card, .answer-card, .notice-card, .community-post-card, .stat, .auth-card, .tutorial-modal { border: 1px solid var(--line); background: #fff; box-shadow: none; }
.hero { padding: 20px 0; border-width: 0 0 1px; border-radius: 0; }
.hero h1 { font-size: 42px; line-height: 1.08; }
.hero p { color: var(--muted); }
.primary, .danger, .success { box-shadow: none; }
.primary { background: var(--blue); }
.primary:hover { background: var(--blue-dark); box-shadow: none; }
.input, .textarea, .select { border-color: var(--line-strong); box-shadow: none; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 74, 139, 0.1); }
.choice-btn { border-color: var(--line); background: #fff; color: #1f2937; box-shadow: none; }
.choice-btn.active { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: none; }
.minimal-compose { width: min(720px, 100%); margin: 0 auto; gap: 12px; padding: 18px; }
.compose-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.compose-head h2 { margin: 0; font-size: 22px; font-weight: 950; }
.compose-head span { color: var(--muted); font-size: 13px; font-weight: 800; }
.simple-category-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.simple-category-grid .choice-btn { min-height: 42px; }
.compose-textarea { min-height: 132px; border-color: var(--line-strong); font-size: 16px; line-height: 1.55; }
.compact-textarea.compose-textarea { min-height: 92px; }
.advanced-fields { border-top: 1px solid var(--line); padding-top: 8px; }
.advanced-fields summary { display: inline-flex; min-height: 34px; align-items: center; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 900; }
.ask-advanced-fields { border: 1px solid rgba(23, 105, 255, 0.22); border-radius: 12px; padding: 10px; background: linear-gradient(180deg, rgba(23, 105, 255, 0.07), rgba(255, 255, 255, 0.96)); }
.ask-advanced-fields summary { width: 100%; min-height: 48px; justify-content: space-between; gap: 10px; border-radius: 10px; padding: 0 12px; background: #fff; color: var(--blue); box-shadow: 0 8px 24px rgba(23, 105, 255, 0.12); font-size: 15px; }
.ask-advanced-fields summary small { color: var(--muted); font-size: 12px; font-weight: 850; }
.advanced-fields[open] { display: grid; gap: 12px; }
.advanced-fields[open] summary { margin-bottom: 2px; }
.media-button { min-height: 52px; border-color: var(--line); background: #fff; color: var(--blue); box-shadow: none; }
.media-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.image-preview img, .question-image { box-shadow: none; }
.community-modern { display: grid; gap: 14px; width: min(800px, 100%); margin: 0 auto; }
.community-board-row { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.community-board-row::-webkit-scrollbar { display: none; }
.community-board { display: inline-flex; flex: 0 0 auto; gap: 8px; min-height: 38px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 0 12px; }
.community-board.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.board-create-details { width: min(720px, 100%); margin: 0 auto; border-top: 0; padding-top: 0; }
.community-write { width: min(720px, 100%); margin: 0 auto; }
.community-study-room { display: grid; gap: 14px; border-color: color-mix(in srgb, var(--study-color) 22%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--study-color) 7%, #fff), #fff 52%); }
.study-room-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.study-room-head h3 { margin: 4px 0 0; font-size: 20px; }
.study-room-head-actions { display: grid; justify-items: end; gap: 8px; }
.invite-button { border-color: color-mix(in srgb, var(--study-color) 30%, var(--line)); color: color-mix(in srgb, var(--study-color) 85%, #111827); font-weight: 800; }
.study-summary-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.study-summary-pills span { min-width: 92px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px 10px; text-align: right; }
.study-summary-pills b, .study-summary-pills small { display: block; }
.study-summary-pills b { font-size: 15px; }
.study-summary-pills small { color: var(--muted); font-size: 11px; }
.community-invite-box, .invite-landing-panel { border: 1px solid color-mix(in srgb, var(--study-color, #1769ff) 24%, var(--line)); border-radius: 10px; background: rgba(255, 255, 255, .9); }
.community-invite-box { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(180px, 1.5fr) auto; gap: 10px; align-items: center; padding: 10px; }
.community-invite-box strong, .community-invite-box span { display: block; }
.community-invite-box strong { font-size: 14px; }
.community-invite-box span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.invite-landing-panel { display: grid; gap: 6px; max-width: 520px; margin: 28px auto; padding: 18px; }
.study-room-grid { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(260px, 1.1fr); gap: 12px; }
.study-timer-card, .study-leaderboard { border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .92); padding: 14px; }
.study-timer-card { display: grid; gap: 12px; }
.study-timer-card.is-active { border-color: color-mix(in srgb, var(--study-color) 48%, var(--line)); box-shadow: 0 18px 36px rgba(15, 23, 42, .08); }
.study-timer-ring { display: grid; place-items: center; min-height: 148px; border-radius: 8px; background: radial-gradient(circle at 50% 50%, #fff 0 48%, transparent 49%), conic-gradient(from -90deg, color-mix(in srgb, var(--study-color) 76%, #111827) 0 72%, #e5e7eb 73% 100%); text-align: center; }
.study-timer-ring strong, .study-timer-ring span { grid-area: 1 / 1; }
.study-timer-ring strong { align-self: center; font-size: 24px; letter-spacing: 0; }
.study-timer-ring span { align-self: end; margin-bottom: 34px; color: var(--muted); font-size: 12px; }
.study-progress { height: 9px; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.study-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--study-color), #16a34a); transition: width .25s ease; }
.study-confirm-alert { display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(245, 158, 11, 0.32); border-radius: 12px; background: linear-gradient(180deg, #fffbeb, #fff7ed); color: #78350f; }
.study-confirm-alert strong { display: flex; gap: 6px; align-items: center; color: #92400e; }
.study-confirm-alert p { margin: 0; color: #9a3412; font-size: 12px; line-height: 1.45; }
.study-start-warning { display: grid; gap: 6px; padding: 12px; border: 1px solid rgba(245, 158, 11, 0.26); border-radius: 12px; background: #fffbeb; color: #78350f; }
.study-start-warning strong { display: flex; gap: 6px; align-items: center; color: #92400e; }
.study-start-warning p { margin: 0; color: #9a3412; font-size: 12px; line-height: 1.45; }
.study-notification-button { justify-content: center; }
.study-start-form { display: grid; gap: 8px; }
.study-start-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.study-stopwatch-face { display: grid; gap: 5px; border: 1px solid color-mix(in srgb, var(--study-color) 28%, #dbe4f0); border-radius: 10px; background: linear-gradient(180deg, #0f172a, #172033), #0f172a; color: #dbeafe; padding: 16px; text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.study-stopwatch-face span, .study-stopwatch-face small { color: #93c5fd; font-size: 11px; font-weight: 900; }
.study-stopwatch-face strong { color: #f8fafc; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 32px; letter-spacing: 0; line-height: 1.1; }
.study-extra-timers { display: grid; gap: 8px; border-top: 1px solid #e2e8f0; padding-top: 10px; }
.quick-timer-row, .quick-timer-custom { display: flex; gap: 6px; }
.quick-timer-row .small-button { flex: 1 1 0; min-width: 0; padding-inline: 6px; }
.quick-timer-custom input { min-width: 0; }
.exam-timer-list { display: grid; gap: 6px; }
.exam-timer { display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; align-items: center; gap: 8px; border: 1px solid #dce6f3; border-radius: 8px; background: #fff; padding: 7px 8px; }
.exam-timer span { color: var(--muted); font-size: 12px; font-weight: 900; }
.exam-timer strong { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 14px; }
.exam-timer.done { border-color: rgba(239, 68, 68, .35); background: #fff1f2; color: #991b1b; }
.board-note-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) auto; gap: 8px; align-items: end; border: 1px solid #d7e3f1; border-radius: 10px; background: #fff; padding: 10px; }
.board-note-form > div:first-child { display: grid; gap: 3px; align-self: center; }
.board-note-form > div:first-child span { color: var(--muted); font-size: 11px; font-weight: 850; }
.board-position-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.board-position-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 900; }
.board-note-color-row { display: flex; gap: 5px; align-self: center; }
.board-note-color-row button { width: 24px; height: 24px; min-height: 24px; border: 2px solid #fff; border-radius: 50%; background: var(--note-color); padding: 0; box-shadow: 0 0 0 1px #cbd5e1; }
.board-note-color-row button.active { box-shadow: 0 0 0 2px var(--blue); }
.study-leaderboard { display: grid; align-content: start; gap: 8px; }
.mini-title { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.mini-title strong { color: var(--text); font-size: 14px; }
.study-rank { display: grid; grid-template-columns: 28px 28px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.study-rank.me { border-color: color-mix(in srgb, var(--study-color) 42%, var(--line)); background: color-mix(in srgb, var(--study-color) 8%, #fff); }
.rank-no { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f1f5f9; color: var(--muted); font-size: 12px; font-weight: 850; }
.study-rank strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.study-rank em { border-radius: 999px; background: #dcfce7; color: #166534; padding: 3px 6px; font-size: 10px; font-style: normal; font-weight: 900; }
.study-rank b { font-size: 12px; white-space: nowrap; }
.study-active-list { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.study-active-list span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 6px 9px; }
.study-active-list img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.study-active-list small { color: var(--muted); }
.visual-study-grid { grid-template-columns: minmax(0, 1fr) minmax(270px, 340px); align-items: start; }
.study-side-stack { display: grid; gap: 12px; }
.study-classroom { position: relative; display: grid; gap: 10px; min-height: 440px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--study-color) 25%, #cbd5e1); border-radius: 10px; background: linear-gradient(180deg, #f8fafc, #ffffff 52%, #eef6ff); padding: 12px; perspective: 900px; }
.study-classroom::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(15, 23, 42, .04) 1px, transparent 1px) 0 0 / 42px 42px, linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px) 0 0 / 42px 42px; opacity: .45; }
.classroom-board, .classroom-floor, .classroom-caption { position: relative; z-index: 2; }
.classroom-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 78px; align-items: stretch; overflow: hidden; border: 5px solid #8b5e34; border-radius: 8px; background: linear-gradient(135deg, rgba(255, 255, 255, .08), transparent 38%), #17423c; color: #e8fff5; font-size: 20px; font-weight: 950; box-shadow: 0 14px 28px rgba(15, 23, 42, .16); transform: rotateX(3deg); }
.board-main-area { position: relative; display: grid; min-height: 92px; place-items: center; overflow: hidden; border-radius: 5px; }
.board-main-area > img { width: 100%; height: 100%; max-height: 128px; object-fit: cover; }
.class-board-note { position: absolute; z-index: 4; display: grid; gap: 2px; width: min(148px, 30%); min-height: 58px; border: 1px solid rgba(120, 53, 15, .18); border-radius: 3px; background: var(--note-color, #fff7ad); color: #3b2f12; padding: 8px 8px 6px; text-align: left; transform: translate(-50%, -50%) rotate(-1.2deg); box-shadow: 0 9px 18px rgba(15, 23, 42, .22); }
.class-board-note:nth-child(2n) { transform: translate(-50%, -50%) rotate(1.4deg); }
.class-board-note strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 12px; line-height: 1.28; }
.class-board-note span { overflow: hidden; color: rgba(59, 47, 18, .72); font-size: 9px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.pinned-note::before { content: ""; position: absolute; left: 50%; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 1px 3px rgba(15, 23, 42, .22); transform: translateX(-50%); }
.class-board-note-ghost { pointer-events: none; opacity: .72; outline: 2px dashed rgba(255, 255, 255, .72); }
.board-note-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.board-note-actions button { min-height: 20px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .72); color: #3b2f12; padding: 0 6px; font-size: 9px; font-weight: 950; }
.study-classroom-set { display: grid; gap: 12px; }
.classroom-floor { overflow: auto; max-height: 540px; border: 1px solid rgba(100, 116, 139, .24); border-radius: 8px; background: repeating-linear-gradient(90deg, rgba(180, 122, 62, .16) 0 18px, rgba(145, 94, 45, .18) 18px 20px), linear-gradient(180deg, #fff7ed, #eef6ff); padding: 18px 14px 22px; box-shadow: inset 0 8px 22px rgba(15, 23, 42, .08); }
.seat-grid { display: grid; grid-template-columns: repeat(4, minmax(92px, 1fr)); gap: 14px 12px; min-width: 0; }
.study-seat { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) 30px; grid-template-rows: auto auto; gap: 5px 8px; align-items: center; min-height: 96px; border: 1px solid rgba(120, 79, 37, .32); border-radius: 8px; background: linear-gradient(180deg, rgba(255, 255, 255, .5), transparent 40%), linear-gradient(135deg, #f4c27a, #b8793c); color: #22160b; padding: 10px 9px 8px; box-shadow: 0 10px 0 #825329, 0 16px 24px rgba(15, 23, 42, .16); transform: translateZ(0); }
.study-seat::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 10px; border-radius: 0 0 8px 8px; background: rgba(77, 48, 24, .34); }
.study-seat strong, .study-seat small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.study-seat strong { font-size: 13px; }
.study-seat small { color: rgba(34, 22, 11, .72); font-size: 11px; font-weight: 900; }
.seat-rank { position: absolute; top: 6px; right: 7px; display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .7); color: #6b3f16; font-size: 10px; font-weight: 950; }
.desk-avatar { display: grid; width: 34px; height: 34px; place-items: center; overflow: hidden; grid-row: 1 / 3; border: 2px solid rgba(255, 255, 255, .85); border-radius: 50%; background: #eef6ff; color: var(--study-color); font-size: 15px; font-weight: 950; box-shadow: 0 4px 10px rgba(15, 23, 42, .16); }
.desk-avatar img, .desk-avatar span { width: 100%; height: 100%; }
.desk-avatar img { object-fit: cover; }
.desk-avatar span { display: grid; place-items: center; }
.desk-note { display: grid; width: 30px; height: 30px; place-items: center; overflow: hidden; grid-row: 1 / 3; border: 1px solid rgba(255, 255, 255, .65); border-radius: 6px; background: rgba(255, 255, 255, .55); color: #17423c; padding: 0; }
.desk-note img { width: 100%; height: 100%; object-fit: cover; }
.ghost-note { opacity: .45; }
.studying-seat { border-color: color-mix(in srgb, var(--study-color) 58%, #a16207); background: linear-gradient(180deg, rgba(255, 255, 255, .45), transparent 44%), linear-gradient(135deg, #ffd38d, color-mix(in srgb, var(--study-color) 24%, #b8793c)); }
.sleeping-seat { filter: saturate(.74); opacity: .72; background: linear-gradient(180deg, rgba(255, 255, 255, .55), transparent 42%), linear-gradient(135deg, #dec7ad, #9a7a5d); }
.my-seat { outline: 3px solid rgba(23, 105, 255, .22); outline-offset: 2px; }
.focus-spark, .sleep-mark { position: absolute; left: 10px; bottom: 7px; font-size: 10px; font-weight: 950; }
.focus-spark { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); animation: focusPulse 1.5s infinite; }
.sleep-mark { display: inline-flex; gap: 1px; color: #334155; letter-spacing: 0; }
.sleep-mark i { font-style: normal; animation: sleepFloat 2.4s ease-in-out infinite; }
.sleep-mark i:nth-child(2) { animation-delay: .22s; }
.sleep-mark i:nth-child(3) { animation-delay: .44s; }
.empty-seat { min-height: 78px; background: linear-gradient(135deg, rgba(255, 255, 255, .4), transparent), rgba(255, 255, 255, .42); border-style: dashed; box-shadow: inset 0 -6px 0 rgba(148, 163, 184, .18); color: rgba(71, 85, 105, .52); }
.empty-seat::after { display: none; }
.desk-line { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: rgba(148, 163, 184, .28); }
.desk-empty-label { grid-column: 1 / -1; min-height: 16px; font-size: 11px; font-weight: 900; text-align: center; }
.classroom-caption { display: flex; justify-content: space-between; gap: 8px; color: #475569; font-size: 12px; font-weight: 850; }
@keyframes focusPulse {
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes sleepFloat {
  0%, 100% { opacity: .35; transform: translateY(2px) scale(.88); }
  45% { opacity: 1; transform: translateY(-7px) scale(1.08); }
}
.wordmaster-page { display: grid; gap: 14px; }
.wordmaster-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: #c7d2fe; background: linear-gradient(135deg, #eef2ff 0%, #fff 58%); }
.wordmaster-notice h3 { margin: 4px 0 6px; font-size: 20px; }
.wordmaster-board { display: grid; gap: 12px; }
.wordmaster-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.wordmaster-stat { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 74px; border: 1px solid rgba(255, 255, 255, 0.76); border-radius: 8px; background: rgba(255, 255, 255, 0.68); padding: 12px 14px; color: var(--ink); text-align: left; box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.88); }
.wordmaster-stat strong { color: var(--blue-dark); font-size: 24px; font-weight: 950; }
.wordmaster-stat span { color: var(--muted); font-size: 13px; font-weight: 850; }
.wordmaster-stat.action { cursor: pointer; }
.wordmaster-stat.action .icon { color: var(--amber); }
.wordmaster-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.wordmaster-days::-webkit-scrollbar { display: none; }
.word-day-chip { min-height: 44px; }
.word-day-chip span { font-weight: 900; }
.word-day-chip b, .word-day-chip small { display: inline-grid; place-items: center; min-width: 24px; height: 22px; border-radius: 8px; background: rgba(255, 255, 255, 0.24); padding: 0 6px; font-size: 12px; font-weight: 900; }
.word-day-chip:not(.active) b, .word-day-chip:not(.active) small { background: rgba(20, 104, 255, 0.08); color: var(--blue-dark); }
.wordmaster-test { display: grid; gap: 14px; background: linear-gradient(180deg, #ffffff, #f8fbff); }
.wordmaster-test-head { display: flex; gap: 8px; flex-wrap: wrap; }
.word-question-card { display: grid; gap: 14px; }
.word-question-card h3 { margin: 0; font-size: 30px; line-height: 1.25; }
.word-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.word-options button { min-height: 58px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; padding: 10px 12px; text-align: left; font-weight: 850; }
.word-options button:hover { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.word-options button.correct { border-color: #16a34a; background: #dcfce7; color: #166534; }
.word-options button.wrong { border-color: #ef4444; background: #fee2e2; color: #991b1b; }
.word-spell-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.word-prefix { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 8px; background: #111827; color: #fff; font-size: 22px; font-weight: 950; }
.word-result { border-radius: 8px; padding: 10px 12px; font-weight: 900; }
.word-result.ok { background: #dcfce7; color: #166534; }
.word-result.bad { background: #fee2e2; color: #991b1b; }
.wordmaster-next-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.wordmaster-drill { display: grid; gap: 14px; }
.wordmaster-drill-range { display: grid; grid-template-columns: repeat(4, minmax(96px, 1fr)) auto auto; gap: 10px; align-items: end; }
.wordmaster-drill-range label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 900; }
.wordmaster-drill-direction { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.wordmaster-drill-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wordmaster-drill-metrics div { display: grid; gap: 2px; border: 1px solid rgba(95, 123, 163, 0.16); border-radius: 14px; background: rgba(248, 251, 255, 0.86); padding: 12px; }
.wordmaster-drill-metrics strong { color: var(--blue-dark); font-size: 24px; font-weight: 950; }
.wordmaster-drill-metrics span { color: var(--muted); font-size: 12px; font-weight: 900; }
.wordmaster-drill-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .34fr); gap: 14px; align-items: stretch; }
.wordmaster-drill-card { display: grid; gap: 12px; min-width: 0; border: 1px solid rgba(20, 104, 255, 0.12); border-radius: 24px; background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%); padding: 18px; box-shadow: 0 18px 46px rgba(20, 104, 255, 0.09); }
.wordmaster-drill-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; font-weight: 900; }
.wordmaster-drill-main { display: grid; gap: 10px; width: 100%; min-height: 220px; border: 1px solid rgba(20, 104, 255, 0.14); border-radius: 22px; background: #fff; color: var(--ink); padding: 24px; text-align: left; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94); }
.wordmaster-drill-prompt { pointer-events: none; }
.wordmaster-drill-main span, .wordmaster-drill-answer span { color: var(--blue); font-size: 13px; font-weight: 950; }
.wordmaster-drill-main strong { align-self: center; font-size: clamp(34px, 6vw, 68px); line-height: 1.02; letter-spacing: 0; word-break: break-word; }
.wordmaster-drill-main small { align-self: end; color: var(--muted); font-size: 13px; font-weight: 850; }
.wordmaster-drill-typing { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.wordmaster-drill-answer { display: none; gap: 6px; border: 1px solid rgba(34, 197, 94, 0.22); border-radius: 18px; background: #ecfdf5; color: #065f46; padding: 14px 16px; }
.wordmaster-drill-answer.show { display: grid; }
.wordmaster-drill-answer strong { font-size: 22px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.wordmaster-drill-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wordmaster-drill-actions button { min-height: 48px; }
.wordmaster-drill-actions button:only-child { grid-column: 1 / -1; }
.wordmaster-drill-side { display: grid; align-content: start; gap: 12px; min-width: 0; border: 1px solid rgba(95, 123, 163, 0.16); border-radius: 20px; background: rgba(255, 255, 255, 0.78); padding: 14px; }
.wordmaster-drill-side b { display: block; margin-top: 8px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.wordmaster-memory-bar { height: 10px; overflow: hidden; border-radius: 999px; background: #e5e7eb; margin-top: 8px; }
.wordmaster-memory-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #22c55e); transition: width .2s ease; }
.wordmaster-drill-rule { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 850; }
.wordmaster-drill-rule strong { color: var(--ink); font-size: 14px; }
.word-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.word-table div { display: grid; grid-template-columns: 30px minmax(90px, .7fr) minmax(0, 1fr); gap: 8px; align-items: start; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px; }
.word-table b { color: var(--muted); }
.word-table strong { color: #111827; }
.word-table span { color: #475569; font-size: 13px; line-height: 1.35; }
.titleless-input { font-weight: 850; }
.community-post-card:hover, .question-card:hover, .notice-card:hover, .answer-card:hover { transform: none; box-shadow: none; }
.bottom-ask { box-shadow: none; }
@media (max-width: 820px) {
  .topbar-inner, .container { width: min(100% - 20px, 1040px); }
  .brand img { width: 38px; height: 38px; }
  .hero h1 { font-size: 34px; }
  .minimal-compose, .community-write { padding: 14px; }
  .simple-category-grid { grid-template-columns: repeat(5, minmax(58px, 1fr)); overflow-x: auto; }
  .simple-category-grid .choice-btn { padding-inline: 8px; }
  .compose-head { align-items: flex-start; }
  .compose-head h2 { font-size: 20px; }
  .mobile-tabbar { box-shadow: none; }
}
@media (max-width: 420px) {
  .simple-category-grid { grid-template-columns: repeat(5, minmax(54px, 1fr)); }
  .compose-textarea { min-height: 116px; }
}
.community-list-row { padding: 2px 1px 4px; }
.community-hero { position: relative; display: grid; gap: 14px; min-height: 170px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--community-color, var(--blue)) 18%, var(--line)); border-radius: 18px; background: radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--community-color, var(--blue)) 12%, transparent), transparent 36%), linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--community-color, var(--blue)) 7%, #ffffff)); padding: 18px; }
.community-banner { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; background: #fff; }
.community-hero-text { display: grid; gap: 7px; align-content: end; max-width: 560px; }
.community-hero h1 { margin: 0; font-size: 28px; line-height: 1.12; letter-spacing: 0; }
.community-hero p { margin: 0; color: var(--muted); line-height: 1.5; }
.community-setting-preview { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.community-setting-preview::-webkit-scrollbar { display: none; }
.community-setting-preview img { flex: 0 0 auto; width: 92px; height: 62px; object-fit: cover; border: 1px solid rgba(148, 163, 184, .32); border-radius: 12px; background: #fff; }
.community-customize { width: min(720px, 100%); margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; background: #fff; }
.community-customize summary { gap: 6px; }
.blog-compose { gap: 10px; }
.blog-body { min-height: 150px; background: #fff; }
.blog-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.blog-toolbar .media-actions { flex: 1 1 180px; }
.compose-attachment-details { border: 1.5px solid #d7e2f2; border-radius: 14px; background: #fff; overflow: hidden; }
.compose-attachment-details > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 48px; cursor: pointer; list-style: none; padding: 0 13px; color: #27364a; font-weight: 950; }
.compose-attachment-details > summary::-webkit-details-marker { display: none; }
.compose-attachment-details > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-attachment-details > summary b { border-radius: 999px; background: #eef5ff; color: #174a8b; padding: 4px 8px; font-size: 12px; }
.compose-attachment-details[open] > summary { border-bottom: 1px solid #e1e8f3; background: #f8fbff; }
.compose-attachment-details > .insert-panel { border: 0; border-radius: 0; box-shadow: none; }
.blog-note-select { flex: 1 1 180px; min-height: 42px; }
.community-note-preview { width: 100%; margin-top: 10px; border-color: var(--line); background: #fff; text-align: left; }
.compact-note-preview { max-width: 360px; }
.community-note-preview img { width: 100%; max-height: 260px; object-fit: contain; background: #f8fafc; }
@media (max-width: 820px) {
  .community-hero { border-radius: 16px; padding: 14px; }
  .community-hero h1 { font-size: 24px; }
  .community-banner { max-height: 132px; }
  .blog-toolbar { flex-direction: column; align-items: stretch; }
}
.primary, .ghost, .small-button, .chip, .nav button, .media-button, .community-board, .choice-btn, .tabs button, .icon-button, .danger, .success { border-width: 1.5px; box-shadow: 0 1px 0 rgba(17, 24, 39, .06), 0 8px 18px rgba(17, 24, 39, .05); transform: translateY(0); }
.primary, .success, .danger { min-height: 42px; border-style: solid; border-radius: 11px; font-weight: 900; }
.primary { border-color: #0f4fc8; background: linear-gradient(180deg, #2f7bff 0%, var(--blue) 100%); color: #fff; box-shadow: 0 2px 0 #0d46b2, 0 12px 24px rgba(23, 105, 255, .22); }
.ghost, .small-button, .chip, .nav button, .media-button, .community-board, .choice-btn, .tabs button, .icon-button { border-color: #cfd9ea; background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 0 rgba(17, 24, 39, .05), 0 7px 16px rgba(17, 24, 39, .04); }
.primary:hover, .success:hover, .danger:hover, .ghost:hover, .small-button:hover, .chip:hover, .nav button:hover, .media-button:hover, .community-board:hover, .choice-btn:hover, .tabs button:hover, .icon-button:hover { transform: translateY(-1px); box-shadow: 0 2px 0 rgba(17, 24, 39, .08), 0 12px 24px rgba(17, 24, 39, .08); }
.primary:active, .success:active, .danger:active, .ghost:active, .small-button:active, .chip:active, .nav button:active, .media-button:active, .community-board:active, .choice-btn:active, .tabs button:active, .icon-button:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(17, 24, 39, .04); }
.nav button.active, .chip.active, .community-board.active, .choice-btn.active, .tabs button.active { border-color: #0f4fc8; background: linear-gradient(180deg, #2f7bff 0%, var(--blue) 100%); color: #fff; box-shadow: 0 2px 0 #0d46b2, 0 10px 20px rgba(23, 105, 255, .18); }
.danger { border-color: #dc2626; background: linear-gradient(180deg, #ff5d5d 0%, var(--red) 100%); color: #fff; box-shadow: 0 2px 0 #b91c1c, 0 12px 24px rgba(239, 68, 68, .18); }
.success { border-color: #087a39; background: linear-gradient(180deg, #10b95d 0%, var(--green) 100%); color: #fff; box-shadow: 0 2px 0 #087a39, 0 12px 24px rgba(0, 146, 65, .16); }
button:disabled, .primary:disabled, .ghost:disabled, .small-button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.form.is-submitting { cursor: progress; }
.form.is-submitting button[type="submit"] { opacity: .82; }
.submission-spinner {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: submission-spin .65s linear infinite;
}
@keyframes submission-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .submission-spinner { animation-duration: 1.4s; } }
.insert-panel { display: grid; gap: 10px; border: 1.5px solid #d7e2f2; border-radius: 16px; background: linear-gradient(180deg, #fff 0%, #f9fbff 100%); padding: 12px; }
.insert-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); font-size: 14px; }
.insert-panel-head strong { display: inline-flex; align-items: center; gap: 7px; }
.insert-panel-head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.note-insert-panel { width: 100%; grid-column: 1 / -1; }
.note-search-input { min-height: 42px; }
.selected-note-large { min-height: 180px; border: 1px solid #e0e7f2; border-radius: 14px; background: #fff; overflow: hidden; }
.selected-note-empty { display: grid; place-items: center; gap: 5px; min-height: 180px; color: var(--muted); text-align: center; padding: 18px; }
.selected-note-empty strong { color: var(--ink); }
.selected-note-content { display: grid; gap: 10px; padding: 10px; }
.selected-note-content img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 10px; background: #f8fafc; }
.selected-note-content p { min-height: 180px; margin: 0; color: #374151; line-height: 1.65; white-space: pre-wrap; }
.selected-note-content > div { display: grid; gap: 3px; }
.selected-note-content span { color: var(--muted); font-size: 13px; }
.note-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; max-height: 320px; overflow: auto; padding-right: 2px; }
.note-choice-card { display: grid; gap: 7px; align-content: start; min-height: 158px; border: 1.5px solid #d7e2f2; border-radius: 14px; background: #fff; padding: 8px; color: var(--ink); text-align: left; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 8px 16px rgba(17, 24, 39, .04); }
.note-choice-card:hover { border-color: #9dbbff; background: #f7fbff; }
.note-choice-card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 105, 255, .14), 0 10px 20px rgba(23, 105, 255, .12); }
.note-choice-card img, .note-choice-text { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: #f1f5f9; object-fit: cover; }
.note-choice-text { display: block; overflow: hidden; color: #4b5563; font-size: 12px; line-height: 1.45; padding: 10px; }
.note-choice-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.note-choice-card span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
  .level-hero { grid-template-columns: 1fr; }
  .activity-stats, .trophy-grid, .trophy-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stat-grid { grid-template-columns: repeat(3, 74px); }
  .level-up-pop { left: 12px; right: 12px; bottom: 82px; width: auto; grid-template-columns: 54px minmax(0, 1fr); }
  .level-up-pop button { grid-column: 1 / -1; }
  .note-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.primary, .ghost, .small-button, .chip, .community-board, .profile-pill { box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(17, 24, 39, .08); }
.primary:active, .ghost:active, .small-button:active, .chip:active, .community-board:active, .profile-pill:active { transform: translateY(1px); }
.profile-pill { display: inline-flex; align-items: center; gap: 8px; max-width: 230px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: #1f2937; padding: 2px 10px 2px 2px; font-weight: 850; }
.account-label { display: block; max-width: 174px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-pill:hover { border-color: #bfd3ff; background: #f8fbff; color: var(--blue); }
.author-link, .answer-author-link, .post-author-avatar { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; border: 0; border-radius: 999px; background: transparent; color: #374151; padding: 0 4px 0 0; font-weight: 850; }
.author-link:hover, .answer-author-link:hover, .post-author-avatar:hover { color: var(--blue); background: #f5f9ff; }
.mini-avatar { display: grid; width: 24px; height: 24px; place-items: center; overflow: hidden; border: 1px solid #dbe6f5; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 900; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.answer-author-link { font-size: 16px; }
.post-author-avatar { flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 54px; color: var(--muted); font-size: 12px; }
.post-author-avatar .mini-avatar { width: 36px; height: 36px; font-size: 15px; }
.profile-page { display: grid; gap: 14px; width: min(960px, 100%); margin: 0 auto; }
.profile-cover { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; border: 1px solid #d9e4f2; border-radius: 14px; background: linear-gradient(180deg, #fff, #f7fbff); padding: 20px; box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.profile-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.profile-avatar-xl { display: grid; width: 88px; height: 88px; place-items: center; flex: 0 0 auto; overflow: hidden; border: 1px solid #cfe0f5; border-radius: 28px; background: #edf4ff; color: var(--blue); font-size: 32px; font-weight: 950; }
.profile-avatar-xl img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity h1 { margin: 8px 0 6px; font-size: 30px; line-height: 1.14; }
.profile-identity p { max-width: 580px; margin: 0 0 8px; color: #4b5563; line-height: 1.55; }
.profile-stat-grid { display: grid; grid-template-columns: repeat(5, 74px); gap: 8px; align-self: end; }
.profile-stat-grid div { display: grid; gap: 3px; justify-items: center; border: 1px solid #dfe8f5; border-radius: 10px; background: #fff; padding: 10px 8px; }
.profile-stat-grid strong { color: var(--blue); font-size: 20px; }
.profile-stat-grid span { color: var(--muted); font-size: 12px; font-weight: 850; }
.profile-edit-link { position: absolute; right: 16px; top: 16px; }
.profile-tabs { border-bottom: 1px solid #dfe8f5; padding-bottom: 8px; }
.profile-activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.profile-section-card { min-width: 0; }
.profile-row-card { cursor: pointer; }
.profile-community-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.profile-community-card { display: grid; gap: 8px; border: 1px solid #dbe5f1; border-radius: 12px; background: #fff; padding: 10px; color: var(--ink); text-align: left; }
.profile-community-card:hover { border-color: var(--board-color, var(--blue)); background: #f8fbff; }
.profile-community-card img, .community-color-block { width: 100%; aspect-ratio: 16 / 7; border-radius: 9px; object-fit: cover; background: linear-gradient(135deg, var(--board-color, var(--blue)), #dbeafe); }
.profile-community-card span { color: var(--muted); font-size: 13px; }
.ai-filter-button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #111827 0%, #1769ff 58%, #22c55e 100%); color: #fff; padding: 0 16px; font-weight: 950; box-shadow: 0 14px 30px rgba(23, 105, 255, .24); }
.ai-filter-button:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(23, 105, 255, .3); }
.ai-filter-button .icon { width: 18px; height: 18px; }
.level-hero { display: grid; grid-template-columns: 136px minmax(0, 1fr) minmax(220px, 340px); gap: 16px; align-items: center; border: 1px solid #dbeafe; border-radius: 14px; background: linear-gradient(135deg, #eff6ff 0%, #fff 50%, #ecfdf5 100%); padding: 16px; box-shadow: 0 16px 36px rgba(23, 105, 255, .08); }
.level-ring { display: grid; width: 118px; aspect-ratio: 1; place-items: center; border: 10px solid #1769ff; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 6px #dbeafe, 0 14px 30px rgba(23, 105, 255, .16); text-align: center; }
.level-ring strong { color: #0f172a; font-size: 24px; line-height: 1; }
.level-ring span { color: var(--muted); font-size: 12px; font-weight: 900; }
.level-main { display: grid; gap: 10px; }
.level-main h3 { font-size: 28px; }
.level-progress { overflow: hidden; height: 14px; border-radius: 999px; background: #e2e8f0; }
.level-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1769ff, #22c55e); }
.level-trophy-preview, .trophy-mini-row { display: grid; gap: 8px; }
.activity-stats { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.level-roadmap { display: grid; gap: 8px; }
.roadmap-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 70px; gap: 10px; align-items: center; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; padding: 9px; }
.roadmap-row.done { border-color: rgba(34, 197, 94, .35); background: #f0fdf4; }
.roadmap-row > span, .roadmap-row > b { color: var(--muted); font-size: 12px; font-weight: 900; }
.trophy-grid, .trophy-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.trophy-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 420px; overflow: auto; padding-right: 2px; }
.trophy-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 104px; border: 1.5px solid #cbd5e1; border-radius: 16px; background: linear-gradient(135deg, #fff 0%, #eef4ff 100%); padding: 13px; opacity: .9; box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 8px 18px rgba(15, 23, 42, .08); }
.trophy-card.earned { border-color: rgba(245, 158, 11, .48); background: linear-gradient(135deg, #fff 0%, #fff2bf 52%, #e8f3ff 100%); opacity: 1; box-shadow: 0 18px 38px rgba(234, 179, 8, .22), inset 0 1px 0 rgba(255,255,255,.95); }
.trophy-card strong, .trophy-card p, .trophy-card span { overflow: hidden; text-overflow: ellipsis; }
.trophy-card strong { display: block; color: var(--ink); font-size: 15px; white-space: nowrap; }
.trophy-card p { display: -webkit-box; margin: 3px 0; color: #64748b; font-size: 12px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.trophy-card span { color: #64748b; font-size: 11px; font-weight: 900; }
.trophy-art { position: relative; width: 66px; height: 66px; overflow: hidden; border: 2px solid rgba(15, 23, 42, .14); border-radius: 20px; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.95) 0 8%, transparent 9%), linear-gradient(145deg, #ffffff 0%, #edf4ff 44%, #dbeafe 100%); box-shadow: inset 0 -12px 22px rgba(15, 23, 42, .14), 0 12px 24px rgba(15, 23, 42, .18); }
.trophy-svg-art { display: grid; place-items: center; color: var(--trophy-color); }
.trophy-svg-art::before, .trophy-svg-art::after, .trophy-svg-art span { display: none; }
.trophy-svg { width: 58px; height: 58px; color: var(--trophy-color); filter: drop-shadow(0 4px 4px rgba(15, 23, 42, .26)); }
.trophy-card:not(.earned) .trophy-svg { opacity: .96; filter: drop-shadow(0 3px 3px rgba(15, 23, 42, .2)); }
.trophy-art::before, .trophy-art::after { filter: drop-shadow(0 3px 3px rgba(15,23,42,.22)); }
.trophy-art::before, .trophy-art::after, .trophy-art span { left: 13px; top: 10px; width: 18px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.82); transform: rotate(-28deg); }
.trophy-cup::before { left: 15px; top: 12px; width: 36px; height: 28px; border-radius: 9px 9px 17px 17px; background: linear-gradient(135deg, #fff7c2 0%, var(--trophy-color) 42%, #9a5a05 100%); box-shadow: -7px 4px 0 -3px transparent, 7px 4px 0 -3px transparent, inset 6px 0 8px rgba(255,255,255,.28); }
.trophy-cup::after { left: 27px; bottom: 8px; width: 13px; height: 20px; border-radius: 3px; background: #334155; box-shadow: -12px 16px 0 -3px #334155, 12px 16px 0 -3px #334155, 0 -1px 0 8px rgba(255,255,255,.22); }
.trophy-star::before { inset: 9px; clip-path: polygon(50% 0,61% 34%,98% 35%,68% 56%,79% 92%,50% 70%,21% 92%,32% 56%,2% 35%,39% 34%); background: linear-gradient(135deg, #fff7a8 0%, var(--trophy-color) 52%, #854d0e 100%); filter: drop-shadow(0 4px 4px rgba(15,23,42,.22)); }
.trophy-medal::before { left: 18px; top: 6px; width: 30px; height: 30px; clip-path: polygon(0 0,42% 0,56% 42%,70% 0,100% 0,74% 58%,95% 100%,58% 100%,50% 72%,42% 100%,5% 100%,26% 58%); background: linear-gradient(180deg, #334155, #64748b); }
.trophy-medal::after { left: 15px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff 0 10%, var(--trophy-color) 11% 62%, #92400e 100%); box-shadow: inset 0 0 0 3px rgba(255,255,255,.32); }
.trophy-shield::before { inset: 8px 13px; clip-path: polygon(50% 0,100% 18%,88% 72%,50% 100%,12% 72%,0 18%); background: linear-gradient(145deg, #fff 0%, var(--trophy-color) 24%, #0f172a 120%); box-shadow: inset 0 0 0 4px rgba(255,255,255,.2); }
.trophy-shield::after { left: 31px; top: 16px; width: 5px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.48); }
.trophy-crown::before { left: 10px; top: 16px; width: 46px; height: 31px; clip-path: polygon(0 28%,22% 0,50% 34%,78% 0,100% 28%,88% 100%,12% 100%); background: linear-gradient(135deg, #fff6a4 0%, var(--trophy-color) 48%, #854d0e 100%); filter: drop-shadow(0 4px 4px rgba(15,23,42,.22)); }
.trophy-crown::after { left: 18px; bottom: 13px; width: 31px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.62); }
.trophy-spark::before { inset: 8px; clip-path: polygon(50% 0,62% 36%,100% 50%,62% 64%,50% 100%,38% 64%,0 50%,38% 36%); background: linear-gradient(135deg, #fff 0%, var(--trophy-color) 46%, #7e22ce 100%); filter: drop-shadow(0 5px 5px rgba(15,23,42,.18)); }
.trophy-spark::after { left: 26px; top: 26px; width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.62); }
.trophy-flag::before { left: 19px; top: 10px; width: 6px; height: 46px; border-radius: 3px; background: #334155; }
.trophy-flag::after { left: 25px; top: 12px; width: 32px; height: 27px; border-radius: 4px 10px 10px 4px; background: linear-gradient(135deg, #fff 0%, var(--trophy-color) 28%, #1e293b 130%); box-shadow: 0 13px 0 -7px rgba(255,255,255,.42); }
.trophy-book::before { left: 13px; top: 14px; width: 41px; height: 38px; border-radius: 4px 10px 10px 4px; background: linear-gradient(135deg, #fff 0%, var(--trophy-color) 22%, #7f1d1d 115%); box-shadow: inset 6px 0 0 rgba(255,255,255,.38), inset 12px 0 0 rgba(15,23,42,.12); }
.trophy-book::after { left: 38px; top: 19px; width: 10px; height: 25px; border-radius: 999px; background: rgba(255,255,255,.44); }
.trophy-chat::before { left: 12px; top: 15px; width: 43px; height: 32px; border-radius: 15px; background: linear-gradient(135deg, #fff 0%, var(--trophy-color) 24%, #075985 115%); }
.trophy-chat::after { left: 22px; top: 40px; width: 15px; height: 14px; clip-path: polygon(0 0,100% 0,20% 100%); background: var(--trophy-color); }
.trophy-chat span { left: 20px; top: 27px; width: 26px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.72); box-shadow: 0 7px 0 rgba(255,255,255,.52); transform: none; }
.trophy-silver { filter: saturate(.86) brightness(1.08); }
.trophy-gold { filter: saturate(1.15); }
.trophy-platinum { filter: saturate(.95) hue-rotate(18deg); }
.trophy-card:not(.earned) .trophy-art { filter: grayscale(.2) saturate(.9); }
.trophy-card:not(.earned) .trophy-art::before, .trophy-card:not(.earned) .trophy-art::after { opacity: .86; }
.level-up-pop { position: fixed; right: 18px; bottom: 92px; z-index: 260; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: min(430px, calc(100vw - 36px)); border: 1px solid rgba(250, 204, 21, .55); border-radius: 16px; background: #fff; padding: 12px; box-shadow: 0 24px 54px rgba(15, 23, 42, .22); }
.level-up-pop strong { color: #0f172a; font-size: 18px; }
.level-up-pop p { margin: 2px 0 0; color: var(--muted); font-weight: 850; }
.admin-trophy-tools { display: grid; gap: 14px; }
.cafe-layout { width: min(1120px, 100%); gap: 16px; }
.community-shell { display: grid; grid-template-columns: minmax(248px, 304px) minmax(0, 1fr); gap: 14px; align-items: start; }
.community-left-rail { position: sticky; top: 86px; min-width: 0; }
.community-main-panel { display: grid; gap: 14px; min-width: 0; }
.community-left-rail .community-control-panel { overflow: visible; }
.community-left-rail .community-search-row { grid-template-columns: 1fr; }
.community-left-rail .enhanced-board-list { display: grid; grid-template-columns: 1fr; max-height: min(52vh, 520px); overflow-y: auto; overflow-x: hidden; padding-right: 2px; }
.community-left-rail .community-board { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; width: 100%; min-height: 58px; border-radius: 12px; }
.community-control-panel { display: grid; gap: 12px; border-color: #d8e4f3; background: #fbfdff; }
.community-control-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.community-control-head h3 { margin: 0 0 4px; font-size: 17px; }
.community-control-head p { margin: 0; }
.community-create-menu { position: relative; flex: 0 0 auto; }
.community-create-menu > summary { list-style: none; }
.community-create-menu > summary::-webkit-details-marker { display: none; }
.community-create-menu[open] > form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 12; width: min(360px, calc(100vw - 32px)); border: 1px solid #d7e3f1; border-radius: 12px; background: #fff; padding: 12px; box-shadow: 0 18px 40px rgba(17, 24, 39, .14); }
.community-board-row { padding: 2px 1px; }
.community-board { border-radius: 10px; border-color: #d8e2ef; background: #fff; color: #27364a; padding: 0 13px; }
.community-board.active { border-color: var(--board-color, var(--blue)); background: color-mix(in srgb, var(--board-color, var(--blue)) 10%, #fff); color: color-mix(in srgb, var(--board-color, var(--blue)) 76%, #0f172a); }
.community-hero { border-radius: 12px; background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--community-color, var(--blue)) 7%, #fff)); }
.community-hero h1 { font-size: 30px; }
.community-hero-actions { position: absolute; right: 16px; top: 16px; display: flex; gap: 8px; }
.community-join-gate { display: grid; gap: 9px; border-color: #d8e4f3; background: #fbfdff; }
.community-join-gate strong { display: inline-flex; align-items: center; gap: 7px; }
.community-join-gate p { margin: 0; }
.community-section-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border: 1px solid #d8e4f3; border-radius: 12px; background: #f8fbff; padding: 8px; }
.community-section-tabs button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 46px; border: 1.5px solid #cfdaeb; border-radius: 10px; background: #fff; color: #344054; padding: 0 12px; font-weight: 950; }
.community-section-tabs button.active { border-color: #0f4fc8; background: linear-gradient(180deg, #2f7bff 0%, var(--blue) 100%); color: #fff; box-shadow: 0 2px 0 #0d46b2, 0 10px 20px rgba(23, 105, 255, .18); }
.community-section-tabs button span { overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.community-section-tabs button b { min-width: 20px; border-radius: 999px; background: rgba(23, 105, 255, .11); padding: 2px 7px; color: inherit; font-size: 12px; text-align: center; }
.community-section-tabs button.active b { background: rgba(255, 255, 255, .18); }
.compact-gate { padding: 14px; }
.join-request-box { display: grid; gap: 9px; border: 1px solid #dce6f3; border-radius: 12px; background: #f8fbff; padding: 12px; }
.join-request-list { display: grid; gap: 8px; }
.join-request-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; border: 1px solid #e3eaf5; border-radius: 10px; background: #fff; padding: 8px; }
.join-request-row div { display: grid; gap: 2px; min-width: 0; }
.join-request-row span { color: var(--muted); font-size: 12px; font-weight: 800; }
.community-customize, .community-write, .board-create-details { width: 100%; max-width: none; margin-inline: 0; }
.community-write { border-color: #d7e3f1; box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.community-modern .community-control-panel, .community-modern .community-hero, .community-modern .community-study-room, .community-modern .feed-tab-panel, .community-modern .community-feed { width: 100%; }
.community-modern .community-banner { aspect-ratio: 16 / 5; max-height: 220px; }
.notice-action { width: fit-content; margin-top: 4px; }
.feed-tab-panel { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #dfe8f5; padding: 4px 0 10px; }
.board-note-buttons { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 8px; }
.feed-tab-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.feed-tab-row::-webkit-scrollbar { display: none; }
.feed-tab-row .chip { border-radius: 10px; }
.feed-tab-row .chip span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; border-radius: 999px; background: rgba(15, 23, 42, .06); padding: 0 5px; font-size: 11px; }
.feed-tab-row .chip.active span { background: rgba(255, 255, 255, .2); }
.community-post-card { border-color: #d9e4f2; border-radius: 12px; box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.community-post-card:hover { border-color: #a9c3ff; background: #fbfdff; box-shadow: 0 8px 20px rgba(17, 24, 39, .07); }
@media (max-width: 820px) {
  .profile-cover { grid-template-columns: 1fr; padding: 16px; }
  .profile-identity { align-items: flex-start; }
  .profile-avatar-xl { width: 68px; height: 68px; border-radius: 22px; font-size: 26px; }
  .profile-identity h1 { font-size: 24px; }
  .profile-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .profile-edit-link { position: static; width: max-content; }
  .profile-activity-grid, .profile-community-grid { grid-template-columns: 1fr; }
  .community-control-head, .feed-tab-panel { align-items: stretch; flex-direction: column; }
  .community-hero-actions { position: static; }
  .join-request-row { grid-template-columns: auto minmax(0, 1fr); }
  .join-request-row .success, .join-request-row .danger { grid-column: span 1; }
  .community-create-menu[open] > form { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .post-author-avatar span { display: none; }
}
.auth-card .brand { justify-content: center; min-height: 92px; margin-bottom: 22px; font-size: 24px; }
.auth-card .brand img { width: 76px; height: 76px; }
.home-notice-panel { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 12px; margin: 4px 0 18px; }
.home-notice-main, .home-event-side { border: 1px solid #d8e4f3; border-radius: 14px; background: #fbfdff; padding: 16px; box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.home-notice-main { cursor: pointer; }
.notice-feature-card { display: grid; gap: 9px; }
.notice-feature-card h3 { margin: 0; font-size: 22px; line-height: 1.3; }
.notice-feature-card p { margin: 0; color: #4b5563; line-height: 1.55; }
.mini-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.notice-mini-list { display: grid; gap: 8px; }
.notice-mini { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 46px; border: 1px solid #dce6f3; border-radius: 10px; background: #fff; padding: 8px 10px; color: var(--ink); text-align: left; cursor: pointer; }
.notice-mini:hover { border-color: #adc8ff; background: #f6faff; }
.notice-mini strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-mini small { color: var(--muted); font-weight: 800; }
.notice-manage-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.notice-manage-actions.compact-actions { justify-content: flex-start; }
.notice-mini .notice-manage-actions { grid-column: 1 / -1; }
.site-event-banner { width: min(1120px, calc(100% - 32px)); margin: 10px auto 0; border: 1px solid #bfdbfe; border-radius: 12px; background: #fff; box-shadow: 0 10px 26px rgba(23, 105, 255, .12); overflow: hidden; }
.event-banner-main { display: block; width: 100%; border: 0; background: #fff; padding: 0; cursor: pointer; }
.event-banner-main img { display: block; width: 100%; max-height: 150px; object-fit: cover; }
.event-banner-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; border-top: 1px solid #dbeafe; background: #f8fbff; padding: 8px 10px; }
.event-banner-actions .event-banner-dismiss { min-height: 36px; background: #fff; color: #344054; border-color: #d0d5dd; }
.event-banner-actions .event-banner-dismiss-forever { color: #b42318; border-color: #fecaca; background: #fffafa; }
.study-start-verify { width: fit-content; margin: 2px 0 0; color: #344054; font-size: 13px; font-weight: 850; }
.crawler-home { width: min(1040px, calc(100% - 32px)); margin: 28px auto; color: #101828; font-family: var(--font, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif); }
.crawler-hero, .crawler-grid article { border: 1px solid #dbe7ff; border-radius: 16px; background: #fff; box-shadow: 0 18px 50px rgba(23, 105, 255, 0.08); }
.crawler-hero { display: grid; gap: 14px; padding: 32px; }
.crawler-hero img { width: 64px; height: 64px; }
.crawler-kicker { margin: 0; color: #1769ff; font-weight: 900; }
.crawler-hero h1 { margin: 0; font-size: clamp(34px, 7vw, 62px); letter-spacing: 0; }
.crawler-hero p { max-width: 680px; margin: 0; color: #475467; font-size: 17px; line-height: 1.7; }
.crawler-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.crawler-actions a { display: inline-flex; align-items: center; min-height: 44px; border-radius: 12px; background: #1769ff; color: #fff; padding: 0 16px; text-decoration: none; font-weight: 900; }
.crawler-actions a:not(:first-child) { background: #eef5ff; color: #175cd3; }
.crawler-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.crawler-grid article { padding: 18px; }
.crawler-grid h2 { margin: 0 0 8px; font-size: 18px; }
.crawler-grid p { margin: 0; color: #667085; line-height: 1.6; }
@media (max-width: 760px) {
  .crawler-home { width: min(100% - 24px, 520px); margin: 18px auto 110px; }
  .crawler-hero { padding: 24px; }
  .crawler-grid { grid-template-columns: 1fr; }
}
.event-grid, .reward-box-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.event-card, .inventory-card { display: grid; grid-template-columns: minmax(140px, .85fr) minmax(0, 1.15fr); gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; color: var(--ink); cursor: pointer; box-shadow: 0 8px 18px rgba(15, 23, 42, .05); }
.event-card img, .inventory-card > img, .inventory-gift { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; background: #eef5ff; }
.event-card h3, .inventory-card h3 { margin: 7px 0 5px; }
.event-card p, .inventory-card p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.event-detail-hero { display: grid; grid-template-columns: minmax(320px, 1.15fr) minmax(280px, .85fr); gap: 16px; align-items: center; border: 1px solid #bfdbfe; border-radius: 14px; background: linear-gradient(180deg, #f8fbff, #fff); padding: 14px; box-shadow: 0 12px 30px rgba(23, 105, 255, .1); }
.event-detail-hero > img { width: 100%; border-radius: 12px; object-fit: cover; }
.event-detail-copy h1 { margin: 6px 0 8px; font-size: 28px; }
.event-detail-copy p { color: var(--muted); line-height: 1.55; }
.event-actions, .event-invite-share, .admin-event-tools, .admin-reward-tools, .event-admin-list, .reward-admin-list, .event-rank-list, .reward-preview-list { display: grid; gap: 10px; }
.event-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.event-invite-share { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.event-rank, .reward-preview { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; padding: 9px; }
.event-rank.me { border-color: #60a5fa; background: #eff6ff; }
.event-rank small { grid-column: 3 / -1; color: var(--muted); font-size: 12px; }
.rank-no { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 999px; background: #1769ff; color: #fff; font-weight: 900; }
.reward-preview { grid-template-columns: auto 58px minmax(0, 1fr); }
.reward-preview img, .reward-fallback { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; background: #f1f5f9; }
.reward-fallback, .inventory-gift { display: grid; place-items: center; color: #1769ff; }
.gift-card-image { width: min(260px, 100%); margin-top: 8px; border-radius: 10px; border: 1px solid var(--line); }
.gift-code { display: grid; gap: 3px; margin-top: 8px; border: 1px dashed #93c5fd; border-radius: 10px; background: #eff6ff; padding: 9px; }
.gift-code span { color: var(--muted); font-size: 12px; font-weight: 800; }
.gift-code strong { word-break: break-all; }
.event-admin-preview img, .reward-image-previews img { width: 100%; max-height: 130px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; }
.reward-image-previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.notice-write-panel { margin-bottom: 14px; }
.notice-compose-form .split { align-items: center; }
.notice-html-uploader { display: grid; gap: 10px; padding: 12px; border: 1px dashed #b8c7dc; border-radius: 10px; background: #f8fbff; }
.notice-html-uploader strong, .notice-html-uploader small { display: block; }
.notice-html-uploader small { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.notice-html-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notice-pin { min-height: 44px; border: 1px solid #dce6f3; border-radius: 8px; background: #fff; padding: 0 12px; }
.school-notice-list { gap: 12px; }
.school-notice-card { border-left: 4px solid var(--blue); }
.school-notice-card.event-notice { border-left-color: var(--green); }
.school-notice-card.urgent-notice { border-left-color: var(--red); }
.school-notice-card h3 { margin: 6px 0 0; }
.notice-html-panel { margin-top: 14px; overflow: hidden; border: 1px solid #dbe5f2; border-radius: 10px; background: #fff; }
.notice-html-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #e5edf7; background: #f8fbff; }
.notice-html-panel-head strong { display: inline-flex; gap: 7px; align-items: center; min-width: 0; }
.notice-html-panel-head span { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.notice-html-panel iframe { display: block; width: 100%; min-height: 360px; border: 0; background: #fff; }
@media (max-width: 820px) {
  .auth-card .brand img { width: 70px; height: 70px; }
  .home-notice-panel { grid-template-columns: 1fr; }
  .notice-mini { grid-template-columns: auto minmax(0, 1fr); }
  .notice-mini small { grid-column: 2; }
  .notice-html-panel iframe { height: min(900px, 78vh); }
}
.community-search-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 10px; }
.searchbox { display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1.5px solid #d8e4f3; border-radius: 12px; background: #fff; padding: 0 12px; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset; }
.searchbox input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-weight: 800; }
.compact-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.compact-tabs::-webkit-scrollbar { display: none; }
.enhanced-board-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 9px; overflow: visible; }
.enhanced-board-list .community-board { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 70px; width: 100%; padding: 10px 12px; text-align: left; }
.board-type-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--board-color, var(--blue)) 10%, #f8fbff); color: var(--board-color, var(--blue)); }
.board-main { display: grid; gap: 3px; min-width: 0; }
.board-main strong, .board-main small, .board-stat small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-main small, .board-stat small { color: var(--muted); font-size: 12px; font-weight: 800; }
.board-stat { display: grid; justify-items: end; gap: 2px; }
.board-stat b { color: var(--ink); font-size: 16px; }
.board-pending { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border: 2px solid #fff; border-radius: 999px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.split-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-editor { width: min(1380px, calc(100vw - 20px)); height: min(940px, calc(100vh - 20px)); }
.note-editor-body { grid-template-columns: clamp(96px, 12vw, 152px) minmax(0, 1fr); }
.note-toolrail { gap: 10px; padding: 10px; }
.note-tool-group { display: grid; gap: 7px; }
.shape-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #e6edf6; border-bottom: 1px solid #e6edf6; padding: 10px 0; }
.shape-tool-grid .ghost, .action-tools .ghost { justify-content: center; min-width: 0; }
.note-size-wrap { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 900; }
.shape-fill-button.active { border-color: rgba(15, 107, 255, .18); background: #eef5ff; color: var(--blue); }
#handCanvas { max-width: none; height: auto; border: 1px solid #d6e2f0; border-radius: 10px; background: #fff; box-shadow: 0 14px 34px rgba(15, 23, 42, .13); touch-action: none; }
@media (max-width: 980px) {
  .community-search-row { grid-template-columns: 1fr; }
  .enhanced-board-list { grid-template-columns: 1fr; }
  .split-actions { align-items: stretch; flex-direction: column; }
  .note-editor { width: 100%; height: 100%; border-radius: 0; }
  .note-editor-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .note-toolrail { display: grid; grid-template-columns: auto auto minmax(150px, 1fr) auto auto; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .note-toolrail::-webkit-scrollbar { display: none; }
  .primary-tools, .shape-tool-grid, .action-tools { display: flex; flex-wrap: nowrap; border: 0; padding: 0; }
  .note-toolrail .ghost { flex: 0 0 42px; min-height: 40px; justify-content: center; padding: 0 9px; }
  .note-toolrail .ghost span, .note-size-wrap span { display: none; }
  .note-colors { display: flex; min-width: 150px; }
  .note-colors button { width: 28px; }
}
@media (max-width: 560px) {
  .note-editor-top { grid-template-columns: auto minmax(0, 1fr); }
  .note-editor-top .chips { grid-column: 1 / -1; }
  .note-toolrail { grid-template-columns: auto auto minmax(120px, 1fr) auto auto; gap: 7px; padding: 8px; }
  .note-colors { min-width: 132px; }
}
html, body { overscroll-behavior-y: none; }
.has-note-editor .bottom-ask, .has-note-editor .mobile-tabbar { display: none; }
.pen-only-button.active { border-color: rgba(15, 107, 255, .18); background: #eef5ff; color: var(--blue); }
.hand-canvas-stage { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (pointer: coarse) {
  button, .primary, .ghost, .small-button, .chip, .input, .select { min-height: 46px; }
}
@media (max-width: 760px) {
  body { background: #f7f9fd; }
  .app-shell { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .container { width: 100%; padding: 10px 10px calc(96px + env(safe-area-inset-bottom)); }
  .topbar { border-bottom-color: #e7edf6; }
  .topbar-inner { width: calc(100% - 16px); min-height: 58px; padding: 7px 0; }
  .brand { min-width: 0; gap: 7px; }
  .brand img { width: 38px; height: 38px; }
  .brand span { max-width: 90px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .account { gap: 6px; }
  .profile-pill { gap: 6px; max-width: min(44vw, 154px); min-width: 0; padding: 2px 9px 2px 2px; }
  .account-label { max-width: 92px; font-size: 12px; line-height: 1.1; }
  .account .ghost { width: 36px; min-width: 36px; padding: 0; }
  .panel, .question-card, .answer-card, .notice-card, .community-post-card { border-radius: 12px; box-shadow: 0 1px 0 rgba(17, 24, 39, .04); }
  .panel { padding: 13px; }
  .hero { border-radius: 14px; padding: 14px 0 4px; }
  .home-actions, .feed-tab-row, .blog-toolbar, .form-actions { gap: 8px; }
  .input, .textarea, .select { border-radius: 10px; font-size: 16px; }
  .community-modern { display: grid; gap: 12px; }
  .community-shell { grid-template-columns: 1fr; }
  .community-left-rail { position: static; }
  .community-left-rail .community-control-panel { max-height: none; overflow: visible; }
  .community-left-rail .enhanced-board-list { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; padding-right: 0; }
  .community-left-rail .community-board { flex: 0 0 min(320px, 86vw); }
  .compose-head { padding: 0 2px; }
  .compose-head h2 { font-size: 22px; }
  .community-control-panel { gap: 10px; }
  .community-search-row { grid-template-columns: 1fr; }
  .compact-tabs { margin-inline: -2px; padding-bottom: 2px; }
  .enhanced-board-list { grid-template-columns: 1fr; gap: 8px; }
  .enhanced-board-list .community-board { min-height: 64px; border-radius: 12px; padding: 9px 10px; }
  .board-type-icon { width: 34px; height: 34px; }
  .community-hero { min-height: 126px; border-radius: 14px; padding: 14px; }
  .community-hero h1 { font-size: 24px; }
  .community-hero p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .community-write { gap: 9px; }
  .blog-body, .compose-textarea { min-height: 118px; }
  .selected-note-large { min-height: 150px; }
  .note-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 260px; }
  .mobile-tabbar { border-top-color: #dfe7f2; box-shadow: 0 -10px 30px rgba(15, 23, 42, .08); }
  .mobile-tabbar button { min-height: 52px; border-radius: 13px; }
  .note-editor-backdrop { background: #f7f9fd; }
  .note-editor { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .note-editor-top { min-height: calc(58px + env(safe-area-inset-top)); padding: max(8px, env(safe-area-inset-top)) 9px 8px; box-shadow: 0 1px 0 rgba(17, 24, 39, .06); }
  .note-title-input { font-size: 16px; }
  .note-editor-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .hand-canvas-stage { order: 1; padding: 10px; background: radial-gradient(circle at 1px 1px, rgba(148, 163, 184, .28) 1px, transparent 0) 0 0 / 16px 16px, #eef3fa; }
  .note-toolrail { order: 2; display: grid; grid-template-columns: auto auto minmax(120px, 1fr) auto auto auto; gap: 7px; max-height: 122px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid #dfe7f2; border-right: 0; border-bottom: 0; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .98); box-shadow: 0 -12px 26px rgba(15, 23, 42, .08); scrollbar-width: none; }
  .note-toolrail::-webkit-scrollbar { display: none; }
  .primary-tools, .shape-tool-grid, .action-tools { display: flex; flex-wrap: nowrap; gap: 6px; border: 0; padding: 0; }
  .note-toolrail .ghost { flex: 0 0 42px; min-width: 42px; min-height: 42px; justify-content: center; border-radius: 12px; padding: 0; }
  .note-toolrail .ghost span, .note-size-wrap span { display: none; }
  .note-colors { display: flex; align-items: center; min-width: 148px; padding: 0; }
  .note-colors button { width: 28px; height: 28px; }
  .note-size-wrap { min-width: 112px; align-self: center; }
  .note-size { min-width: 104px; }
  #handCanvas { border-radius: 8px; box-shadow: 0 8px 22px rgba(15, 23, 42, .16); }
}
@media (max-width: 380px) {
  .brand span { max-width: 60px; }
  .profile-pill { max-width: 118px; padding-right: 7px; }
  .account-label { max-width: 66px; }
  .account .ghost { width: 34px; min-width: 34px; }
}
@media (max-width: 720px) {
  .study-room-head { display: grid; }
  .study-room-head-actions { justify-items: stretch; }
  .study-summary-pills { justify-content: stretch; }
  .study-summary-pills span { flex: 1 1 90px; text-align: left; }
  .community-invite-box { grid-template-columns: 1fr; }
  .study-room-grid { grid-template-columns: 1fr; }
  .study-rank { grid-template-columns: 24px 28px minmax(0, 1fr) auto; }
  .study-rank em { display: none; }
  .wordmaster-notice, .word-spell-form { grid-template-columns: 1fr; display: grid; }
  .wordmaster-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wordmaster-stat { min-height: 66px; padding: 10px; }
  .wordmaster-stat strong { font-size: 20px; }
  .word-options, .word-table { grid-template-columns: 1fr; }
  .word-question-card h3 { font-size: 24px; }
  .wordmaster-drill-range, .wordmaster-drill-shell, .wordmaster-drill-metrics, .wordmaster-drill-actions, .wordmaster-drill-typing { grid-template-columns: 1fr; }
  .wordmaster-drill-main { min-height: 190px; padding: 20px; }
  .wordmaster-drill-main strong { font-size: clamp(34px, 11vw, 48px); }
}
@media (max-width: 900px) {
  .visual-study-grid { grid-template-columns: 1fr; }
  .study-side-stack { grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr); }
}
@media (max-width: 760px) {
  .cafe-layout, .profile-page { width: 100%; }
  .community-modern { gap: 10px; }
  .community-modern .community-control-panel, .community-modern .community-hero, .community-modern .community-study-room, .community-modern .feed-tab-panel, .community-modern .community-feed { border-radius: 10px; }
  .community-board { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .feed-tab-panel { display: grid; gap: 8px; padding-bottom: 8px; }
  .feed-tab-row, .space-tabs, .profile-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .feed-tab-row::-webkit-scrollbar, .space-tabs::-webkit-scrollbar, .profile-tabs::-webkit-scrollbar { display: none; }
  .feed-tab-row .chip, .space-tabs .chip, .profile-tabs .chip { flex: 0 0 auto; min-height: 36px; padding: 0 10px; font-size: 12px; }
  .profile-cover { grid-template-columns: 1fr; gap: 12px; border-radius: 10px; padding: 14px; }
  .profile-identity { align-items: flex-start; gap: 10px; }
  .profile-avatar-xl { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; }
  .profile-identity h1 { margin: 5px 0 4px; font-size: 22px; }
  .profile-identity p { display: -webkit-box; overflow: hidden; margin-bottom: 6px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.42; }
  .profile-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; align-self: stretch; }
  .profile-stat-grid div { padding: 8px 4px; }
  .profile-stat-grid strong { font-size: 16px; }
  .profile-stat-grid span { font-size: 10px; }
  .profile-edit-link { position: static; width: fit-content; }
  .profile-activity-grid, .profile-community-grid, .activity-grid { grid-template-columns: 1fr; }
  .level-hero { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; border-radius: 10px; padding: 12px; }
  .level-ring { width: 72px; border-width: 6px; box-shadow: inset 0 0 0 4px #dbeafe, 0 8px 16px rgba(23, 105, 255, .14); }
  .level-ring strong { font-size: 18px; }
  .level-main h3 { font-size: 22px; }
  .level-trophy-preview { grid-column: 1 / -1; }
  .activity-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trophy-grid { grid-template-columns: 1fr; }
  .study-side-stack { grid-template-columns: 1fr; }
  .study-classroom { min-height: 360px; border-radius: 10px; padding: 8px; }
  .classroom-board { grid-template-columns: minmax(0, 1fr); gap: 6px; min-height: 54px; border-width: 4px; font-size: 15px; }
  .board-main-area { min-height: 62px; }
  .class-board-note { width: 34%; min-height: 46px; padding: 6px; }
  .class-board-note strong { font-size: 10px; }
  .class-board-note span, .board-note-actions button { font-size: 8px; }
  .classroom-floor { max-height: 58vh; padding: 12px 8px 18px; }
  .seat-grid { grid-template-columns: repeat(3, minmax(78px, 1fr)); gap: 12px 8px; }
  .study-seat { grid-template-columns: 30px minmax(0, 1fr); min-height: 86px; padding: 9px 7px 7px; box-shadow: 0 7px 0 #825329, 0 12px 18px rgba(15, 23, 42, .13); }
  .desk-avatar { width: 29px; height: 29px; }
  .desk-note { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; }
  .study-seat strong { padding-right: 20px; font-size: 12px; }
  .classroom-caption { display: grid; font-size: 11px; }
  .study-stopwatch-face { padding: 12px; }
  .study-stopwatch-face strong { font-size: 28px; }
  .board-note-form { grid-template-columns: 1fr; }
  .board-position-controls { grid-template-columns: 1fr; }
}
.community-modern.cafe-layout { width: min(1180px, 100%); gap: 12px; }
.community-modern .compose-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; border-bottom: 1px solid #dfe8f5; padding: 0 2px 12px; }
.community-modern .compose-head h2 { margin: 0; font-size: 28px; line-height: 1.1; }
.community-shell { grid-template-columns: minmax(270px, 318px) minmax(0, 1fr); gap: 16px; }
.community-main-panel { gap: 12px; }
.community-left-rail .community-control-panel { gap: 14px; border-radius: 14px; padding: 14px; }
.community-control-head { align-items: center; }
.community-control-head h3 { font-size: 16px; }
.community-control-head p { display: none; }
.community-search-row { display: grid; gap: 9px; }
.community-left-rail .compact-tabs { display: flex; gap: 6px; flex-wrap: wrap; overflow: visible; }
.community-left-rail .compact-tabs .chip { min-height: 34px; border-radius: 999px; padding-inline: 10px; font-size: 12px; }
.community-left-rail .enhanced-board-list { gap: 8px; max-height: min(58vh, 560px); scrollbar-width: thin; }
.community-left-rail .community-board { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; min-height: 62px; border-left-width: 5px; padding: 9px 10px; }
.community-left-rail .community-board.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--board-color, var(--blue)) 18%, transparent); }
.board-type-icon { width: 34px; height: 34px; }
.board-main strong { font-size: 14px; }
.board-main small { max-width: 100%; font-size: 12px; }
.board-stat { min-width: 42px; }
.community-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 0; border-radius: 14px; padding: 16px; }
.community-hero.no-banner { grid-template-columns: minmax(0, 1fr) auto; }
.community-banner { width: 92px; height: 92px; aspect-ratio: 1 / 1; max-height: none; border-radius: 12px; }
.community-hero-text { min-width: 0; gap: 6px; }
.community-hero h1 { overflow: hidden; font-size: 26px; text-overflow: ellipsis; white-space: nowrap; }
.community-hero p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.community-hero-actions { position: static; justify-content: end; }
.community-study-room, .community-write, .community-customize, .feed-tab-panel, .community-feed { border-radius: 14px; }
.community-write { padding: 14px; }
.community-write .titleless-input { min-height: 46px; font-size: 18px; font-weight: 900; }
.community-write .blog-body { min-height: 112px; }
.feed-tab-panel { border: 1px solid #d9e4f2; background: #fbfdff; padding: 9px 10px; }
.feed-tab-row .chip { min-height: 36px; border-radius: 999px; }
.community-feed { gap: 10px; }
.community-post-card { gap: 9px; border-radius: 12px; padding: 14px; }
.community-post-card h3 { margin-top: 5px; font-size: 17px; }
.community-thumb-strip img { border-radius: 10px; }
@media (max-width: 960px) {
  .event-grid, .reward-box-grid, .event-detail-hero { grid-template-columns: 1fr; }
  .event-card, .inventory-card { grid-template-columns: 1fr; }
  .event-invite-share { grid-template-columns: 1fr; }
  .event-actions { grid-template-columns: 1fr; }
  .community-section-tabs { grid-template-columns: 1fr; }
  .document-toolbar, .compact-documents { grid-template-columns: 1fr; }
  .document-attachment { grid-template-columns: auto minmax(0, 1fr); }
  .document-actions { grid-column: 1 / -1; justify-content: stretch; }
  .document-actions a, .document-actions button { flex: 1; justify-content: center; }
  .document-inline-preview { height: min(72dvh, 620px); min-height: 440px; }
  .document-viewer-head { align-items: stretch; flex-direction: column; }
  .document-viewer-actions { justify-content: space-between; }
  .admin-pdf-backdrop { padding: 6px; }
  .admin-pdf-modal { height: calc(100dvh - 12px); border-radius: 14px; padding: 8px; }
  .admin-pdf-frame { min-height: 70dvh; }
  .admin-pdf-gesture-hint { bottom: 10px; white-space: normal; justify-content: center; text-align: center; }
  .community-shell { grid-template-columns: 1fr; }
  .community-left-rail { position: static; }
  .community-left-rail .enhanced-board-list { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
  .community-left-rail .community-board { flex: 0 0 min(320px, 86vw); }
}
@media (max-width: 760px) {
  .community-modern.cafe-layout { gap: 10px; }
  .community-modern .compose-head { align-items: start; padding-bottom: 8px; }
  .community-modern .compose-head h2 { font-size: 22px; }
  .community-left-rail .community-control-panel, .community-hero, .community-study-room, .community-write, .community-customize, .feed-tab-panel { border-radius: 12px; }
  .community-hero { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .community-hero.no-banner { grid-template-columns: 1fr; }
  .community-banner { width: 64px; height: 64px; border-radius: 10px; }
  .community-hero h1 { font-size: 21px; }
  .community-hero-actions { grid-column: 1 / -1; justify-content: stretch; }
  .feed-tab-panel { display: grid; gap: 8px; }
  .community-write .titleless-input { font-size: 16px; }
}
@media (min-width: 761px) {
  .topbar-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: min(1180px, calc(100% - 40px)); min-height: 64px; padding: 8px 0; }
  .brand { min-width: 0; max-width: 158px; white-space: nowrap; }
  .brand img { flex: 0 0 auto; width: 42px; height: 42px; }
  .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav { min-width: 0; max-width: 100%; justify-content: center; gap: 4px; overflow-x: auto; flex: none; }
  .nav button { flex: 0 0 auto; min-height: 36px; padding: 0 9px; font-size: 13px; }
  .nav button span { display: block; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account { min-width: 0; justify-content: flex-end; gap: 6px; }
  .profile-pill { flex: 0 1 auto; max-width: 170px; min-width: 0; padding: 2px 9px 2px 2px; }
  .account-label { max-width: 114px; }
  .account .ghost { flex: 0 0 auto; min-width: 38px; padding: 0 10px; }
}
@media (min-width: 761px) and (max-width: 1080px) {
  .topbar-inner { gap: 8px; width: calc(100% - 24px); }
  .brand { max-width: 128px; }
  .brand img { width: 38px; height: 38px; }
  .nav { justify-content: center; }
  .nav button { padding: 0 7px; font-size: 12px; }
  .nav button span { max-width: 46px; }
  .profile-pill { max-width: 124px; }
  .account-label { max-width: 70px; }
  .account .ghost { width: 38px; min-width: 38px; padding: 0; }
  .account .ghost span { display: none; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .brand { max-width: 48px; }
  .brand span, .account-label { display: none; }
  .nav { justify-content: flex-start; }
  .profile-pill { max-width: 44px; padding: 0; }
}
.community-main-panel .visual-study-grid { grid-template-columns: 1fr; }
.study-room-grid, .study-classroom-set, .study-side-stack, .study-timer-card, .study-leaderboard { min-width: 0; }
.study-classroom-set { overflow: hidden; }
.study-side-stack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr); gap: 12px; align-items: start; }
.community-main-panel .study-timer-card, .community-main-panel .study-leaderboard { position: static; width: 100%; max-width: none; }
.community-main-panel .study-stopwatch-face { min-height: 0; }
.community-main-panel .study-stopwatch-face strong { font-size: 28px; }
.community-main-panel .quick-timer-row { flex-wrap: wrap; }
.community-main-panel .quick-timer-row .small-button { flex: 1 1 74px; }
@media (max-width: 1100px) {
  .study-side-stack { grid-template-columns: 1fr; }
}
.auth-card .brand { max-width: none; justify-content: center; }
.auth-card .brand span { display: inline; max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
:root { --blue: #1468ff; --blue-dark: #0b4fd8; --blue-soft: #eaf3ff; --ink: #102033; --muted: #617187; --line: rgba(146, 166, 194, 0.28); --line-strong: rgba(86, 112, 150, 0.28); --soft: rgba(248, 251, 255, 0.78); --bg: #f4f8ff; --card: rgba(255, 255, 255, 0.74); --glass: rgba(255, 255, 255, 0.68); --glass-strong: rgba(255, 255, 255, 0.86); --liquid-shadow: 0 22px 54px rgba(35, 62, 105, 0.12); --liquid-shadow-soft: 0 10px 26px rgba(35, 62, 105, 0.1); }
body { min-height: 100vh; background: linear-gradient(135deg, rgba(232, 244, 255, 0.98), rgba(250, 252, 255, 0.96) 34%, rgba(246, 243, 255, 0.94) 68%, rgba(255, 248, 236, 0.92)); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.22) 42%, rgba(255, 255, 255, 0.58)), repeating-linear-gradient(90deg, rgba(20, 104, 255, 0.025) 0 1px, transparent 1px 88px); }
.app-shell { background: transparent; }
.topbar { border-bottom: 1px solid rgba(255, 255, 255, 0.72); background: rgba(248, 252, 255, 0.68); backdrop-filter: saturate(175%) blur(26px); box-shadow: 0 14px 36px rgba(23, 45, 82, 0.08); }
.topbar-inner { width: min(1240px, calc(100% - 32px)); min-height: 72px; }
.brand { min-width: 132px; border: 1px solid rgba(255, 255, 255, 0.76); background: rgba(255, 255, 255, 0.58); box-shadow: 0 8px 20px rgba(28, 74, 140, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92); padding: 4px 9px; }
.brand img { filter: drop-shadow(0 7px 16px rgba(20, 104, 255, 0.18)); }
button.brand:hover, button.brand:focus-visible { border-color: rgba(20, 104, 255, 0.18); background: rgba(255, 255, 255, 0.74); box-shadow: 0 10px 24px rgba(28, 74, 140, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.94); }
.nav { align-items: center; gap: 4px; border: 1px solid rgba(255, 255, 255, 0.74); border-radius: 8px; background: rgba(255, 255, 255, 0.48); padding: 5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 26px rgba(31, 67, 121, 0.08); }
.nav button { min-height: 42px; border-color: transparent; background: transparent; color: #42556f; padding: 0 12px; }
.nav button:hover, .ghost:hover, .small-button:hover, .chip:hover { border-color: rgba(20, 104, 255, 0.28); background: rgba(255, 255, 255, 0.84); color: var(--blue); transform: translateY(-1px); }
.account, .profile-pill { min-width: 0; }
.profile-pill { border: 1px solid rgba(255, 255, 255, 0.74); border-radius: 8px; background: rgba(255, 255, 255, 0.58); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 8px 22px rgba(31, 67, 121, 0.08); }
.container { width: min(1240px, calc(100% - 32px)); padding-top: 24px; }
.panel, .question-card, .answer-card, .notice-card, .stat, .community-board, .post-card, .event-card, .inventory-card, .home-notice-main, .home-event-side, .notice-feature-card, .notice-mini, .home-guide-card { border: 1px solid rgba(255, 255, 255, 0.76); border-radius: 8px; background: var(--glass); backdrop-filter: saturate(165%) blur(22px); box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.88); }
.panel, .notice-card, .question-card, .answer-card { border-color: rgba(255, 255, 255, 0.72); }
.question-card:hover, .notice-card:hover, .event-card:hover, .home-guide-card:hover, .notice-mini:hover { transform: translateY(-2px); box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.92); }
.input, .textarea, .select { border: 1px solid rgba(95, 123, 163, 0.24); border-radius: 8px; background: rgba(255, 255, 255, 0.74); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86); color: var(--ink); }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(20, 104, 255, 0.62); box-shadow: 0 0 0 4px rgba(20, 104, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92); }
.primary, .success, .danger { min-height: 46px; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 8px; box-shadow: 0 14px 28px rgba(20, 104, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24); }
.primary { background: linear-gradient(180deg, #2b7eff, #0b55e0); }
.success { background: linear-gradient(180deg, #17b66f, #07864e); }
.danger { background: linear-gradient(180deg, #ff5b62, #dd2530); }
.ghost, .small-button, .chip { border-color: rgba(95, 123, 163, 0.22); border-radius: 8px; background: rgba(255, 255, 255, 0.68); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 8px 18px rgba(31, 67, 121, 0.06); color: #42556f; }
.liquid-home-hero { position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.78); border-radius: 8px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(237, 247, 255, 0.74) 52%, rgba(255, 248, 234, 0.66)); box-shadow: var(--liquid-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.92); padding: 28px; }
.liquid-home-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, rgba(255, 255, 255, 0.5), transparent 28%, rgba(255, 255, 255, 0.26) 54%, transparent 72%); }
.liquid-home-hero > * { position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; width: fit-content; margin-bottom: 10px; border: 1px solid rgba(20, 104, 255, 0.18); border-radius: 8px; background: rgba(255, 255, 255, 0.68); color: var(--blue-dark); padding: 7px 10px; font-size: 13px; font-weight: 900; }
.liquid-home-hero h1 { max-width: 720px; font-size: clamp(34px, 4.8vw, 58px); }
.liquid-home-hero p { max-width: 680px; color: #50627c; font-size: 18px; font-weight: 700; }
.home-primary-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.jumbo-action { justify-content: flex-start; min-height: 76px; padding: 12px 16px; text-align: left; }
.jumbo-action .icon { width: 24px; height: 24px; }
.jumbo-action span, .home-event-callout span { display: grid; gap: 3px; }
.jumbo-action strong, .home-event-callout strong, .home-guide-card strong { font-size: 16px; }
.jumbo-action small, .home-event-callout small, .home-guide-card small { color: inherit; font-size: 13px; font-weight: 800; opacity: 0.78; }
.home-event-callout { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; min-height: 58px; border: 1px solid rgba(255, 171, 64, 0.34); border-radius: 8px; background: linear-gradient(180deg, rgba(255, 252, 245, 0.86), rgba(255, 236, 210, 0.72)); color: #9a4700; padding: 10px 14px; box-shadow: 0 12px 26px rgba(230, 122, 31, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.84); text-align: left; }
.home-search-row { max-width: 780px; }
.home-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 18px; }
.home-guide-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 12px; min-height: 86px; padding: 14px; color: var(--ink); text-align: left; }
.home-guide-card small { grid-column: 2; color: var(--muted); }
.guide-step { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: linear-gradient(180deg, rgba(43, 126, 255, 0.98), rgba(10, 86, 224, 0.98)); color: #fff; font-weight: 900; box-shadow: 0 8px 18px rgba(20, 104, 255, 0.22); }
.section-title h2 { font-size: 22px; color: #16263b; }
.stats { gap: 12px; }
.stat { padding: 15px; }
.stat strong { color: var(--blue-dark); }
.badge { border-color: rgba(95, 123, 163, 0.2); background: rgba(255, 255, 255, 0.68); }
.toast, .level-up-pop, .modal-backdrop > section { border: 1px solid rgba(255, 255, 255, 0.76); background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(165%) blur(22px); box-shadow: var(--liquid-shadow); }
.mobile-tabbar { border-top: 1px solid rgba(255, 255, 255, 0.72); background: rgba(248, 252, 255, 0.72); backdrop-filter: saturate(175%) blur(24px); box-shadow: 0 -16px 34px rgba(31, 67, 121, 0.1); }
.mobile-tabbar button { border-radius: 8px; }
.mobile-tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .home-primary-actions, .home-guide-grid { grid-template-columns: 1fr; }
  .liquid-home-hero { padding: 20px; }
}
@media (max-width: 760px) {
  body { background: linear-gradient(135deg, rgba(238, 247, 255, 0.98), rgba(252, 254, 255, 0.96) 48%, rgba(255, 250, 239, 0.94)); }
  .topbar-inner { min-height: 62px; }
  .topbar .nav { display: none; }
  .brand { min-width: 0; }
  .brand span { max-width: 104px; }
  .container { width: min(100% - 20px, 1240px); padding-top: 16px; }
  .liquid-home-hero h1 { font-size: 34px; }
  .liquid-home-hero p { font-size: 15px; }
  .jumbo-action { min-height: 70px; }
  .home-event-callout { width: 100%; }
  .event-banner-actions { justify-content: stretch; }
  .event-banner-actions button { flex: 1 1 130px; }
  .home-search-row { grid-template-columns: 1fr; }
  .mobile-tabbar { display: grid; }
}
.space-panel { display: grid; gap: 16px; min-width: 0; }
.space-panel > .section-title:first-child, .activity-page > .section-title:first-child { margin-top: 10px; }
.activity-page { display: grid; gap: 16px; min-width: 0; }
.activity-page .level-hero { gap: 20px; padding: 22px; }
.activity-page .level-main { gap: 12px; min-width: 0; }
.activity-page .level-main .card-head { gap: 10px; }
.activity-page .level-trophy-preview { min-width: 0; }
.activity-page .activity-stats { gap: 10px; margin: 0; }
.activity-page .activity-stats .stat { min-width: 0; min-height: 82px; padding: 16px 12px; }
.activity-page .activity-grid { gap: 16px; }
.activity-page .panel { padding: 20px; }
.activity-page .panel > h2 { margin-bottom: 14px; }
.activity-page .level-roadmap { gap: 10px; }
.activity-page .roadmap-row { min-width: 0; padding: 12px; }
.activity-page .trophy-grid { gap: 12px; }
.activity-page .table { display: block; overflow-x: auto; width: 100%; }
@media (max-width: 900px) {
  .activity-page .level-hero { grid-template-columns: 96px minmax(0, 1fr); align-items: center; padding: 18px; }
  .activity-page .level-ring { width: 88px; }
  .activity-page .level-trophy-preview { grid-column: 1 / -1; }
  .activity-page .activity-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .space-tabs { padding: 4px 2px 10px; }
  .space-panel { gap: 12px; }
  .activity-page { gap: 12px; }
  .activity-page > .section-title:first-child { align-items: center; margin-top: 6px; margin-bottom: 0; }
  .activity-page .level-hero { grid-template-columns: 78px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .activity-page .level-ring { width: 74px; border-width: 6px; }
  .activity-page .level-ring strong { font-size: 18px; }
  .activity-page .level-ring span { font-size: 11px; }
  .activity-page .level-main h3 { font-size: 21px; }
  .activity-page .level-progress { height: 12px; }
  .activity-page .level-trophy-preview { padding-top: 2px; }
  .activity-page .activity-stats { gap: 8px; }
  .activity-page .activity-stats .stat { min-height: 74px; padding: 12px 8px; }
  .activity-page .activity-stats .stat strong { font-size: 22px; }
  .activity-page .activity-stats .stat span { font-size: 12px; }
  .activity-page .panel { padding: 14px; }
  .activity-page .roadmap-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
  .activity-page .roadmap-row .level-badge { min-width: 0; }
}
.toast { color: #111827; text-shadow: none; }
.toast strong, .toast span { color: inherit; }
.topbar .account, .topbar .account .profile-pill, .topbar .account .ghost { color: #102033; }
.topbar .account .profile-pill, .topbar .account .ghost { background: rgba(255, 255, 255, 0.8); border-color: rgba(95, 123, 163, 0.24); }
.topbar .account .profile-pill:hover, .topbar .account .ghost:hover { color: var(--blue); background: rgba(255, 255, 255, 0.94); }
.topbar .account .icon { color: currentColor; }
.topbar-inner { gap: 12px; }
.primary-nav { flex: 1 1 auto; max-width: 520px; justify-content: center; }
.topbar-actions { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.topbar-ask-cta, .topbar-mini { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 1px solid rgba(95, 123, 163, 0.22); border-radius: 8px; background: rgba(255, 255, 255, 0.68); color: #42556f; padding: 0 12px; font-weight: 900; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 8px 18px rgba(31, 67, 121, 0.06); transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.topbar-ask-cta { border-color: rgba(20, 104, 255, 0.16); background: linear-gradient(180deg, rgba(43, 126, 255, 0.98), rgba(10, 86, 224, 0.98)); color: #fff; box-shadow: 0 12px 24px rgba(20, 104, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.24); }
.topbar-mini.active { border-color: rgba(20, 104, 255, 0.18); background: rgba(232, 242, 255, 0.9); color: var(--blue-dark); }
.topbar-ask-cta:hover, .topbar-mini:hover { transform: translateY(-1px); }
.topbar-ask-cta .icon, .topbar-mini .icon { width: 16px; height: 16px; }
.home-today-panel { display: grid; grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(160px, 1fr)); gap: 12px; margin: 14px 0 18px; }
.today-card { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 82px; border: 1px solid rgba(255, 255, 255, 0.76); border-radius: 8px; background: rgba(255, 255, 255, 0.68); color: var(--ink); padding: 14px; text-align: left; box-shadow: var(--liquid-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.88); }
.today-card.primary-today { background: linear-gradient(180deg, rgba(43, 126, 255, 0.98), rgba(10, 86, 224, 0.98)); color: #fff; box-shadow: 0 14px 28px rgba(20, 104, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.26); }
.today-card .icon { width: 24px; height: 24px; }
.today-card span { display: grid; min-width: 0; gap: 3px; }
.today-card strong { overflow: hidden; color: inherit; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.today-card small { overflow: hidden; color: inherit; font-size: 13px; font-weight: 800; opacity: 0.76; text-overflow: ellipsis; white-space: nowrap; }
.liquid-home-hero h1 { font-size: 48px; }
.community-section-tabs { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); padding: 6px; }
.community-section-tabs button { min-height: 62px; padding: 10px 12px; }
.community-section-tabs button span { font-size: 14px; }
.community-section-tabs button b { min-width: 22px; height: 22px; }
.community-main-panel > .community-customize { margin-top: 0; }
@media (max-width: 1120px) {
  .primary-nav { max-width: 430px; }
  .topbar-mini span { display: none; }
  .topbar-mini { width: 42px; padding: 0; }
  .home-today-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar-actions { display: none; }
  .topbar-inner { width: min(100% - 20px, 1240px); }
  .account-label { display: inline; max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-pill { max-width: 178px; padding: 4px 8px; }
  .home-today-panel { grid-template-columns: 1fr; gap: 10px; }
  .today-card { min-height: 72px; }
  .liquid-home-hero h1 { font-size: 34px; }
  .community-section-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-section-tabs button { min-height: 56px; }
}
.note-command-panel { display: grid; grid-template-columns: repeat(4, minmax(86px, 0.7fr)) minmax(280px, 1.6fr); align-items: stretch; gap: 10px; margin-bottom: 12px; }
.note-stat { display: grid; place-items: center; min-height: 66px; border: 1px solid rgba(95, 123, 163, 0.2); border-radius: 12px; background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px rgba(31, 67, 121, 0.06); }
.note-stat strong { color: var(--blue-dark); font-size: 22px; line-height: 1; }
.note-stat span { color: var(--muted); font-size: 12px; font-weight: 900; }
.note-command-search { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 8px; min-width: 0; }
.note-command-search .input, .note-command-search .select { height: 100%; min-height: 48px; }
.chip-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; border-radius: 999px; background: rgba(17, 24, 39, 0.08); color: inherit; font-size: 11px; padding: 0 6px; }
.chip.active .chip-count { background: rgba(255, 255, 255, 0.22); }
.note-layout { align-items: start; }
.note-card { outline: none; transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
.note-card:hover, .note-card:focus-visible { border-color: rgba(20, 104, 255, 0.28); transform: translateY(-1px); }
.note-card.active-note { border-color: rgba(20, 104, 255, 0.76); background: linear-gradient(180deg, rgba(244, 248, 255, 0.98), rgba(255, 255, 255, 0.96)); box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.12), 0 14px 28px rgba(23, 105, 255, 0.1); }
.note-inspector-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-empty { display: grid; gap: 6px; }
.note-empty strong { color: var(--ink); }
.note-list[data-empty="true"]::after { content: "검색 결과가 없습니다."; display: grid; min-height: 120px; place-items: center; border: 1px dashed rgba(95, 123, 163, 0.32); border-radius: 14px; color: var(--muted); font-size: 13px; font-weight: 900; }
.note-choice-grid[data-empty="true"]::after { content: "검색 결과가 없습니다."; display: grid; min-height: 112px; place-items: center; grid-column: 1 / -1; border: 1px dashed rgba(95, 123, 163, 0.32); border-radius: 14px; color: var(--muted); font-size: 13px; font-weight: 900; }
@media (max-width: 920px) {
  .note-command-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-command-search { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .note-command-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .note-command-search { grid-template-columns: 1fr; }
  .note-stat { min-height: 58px; }
  .note-list { max-height: none; }
}
.note-editor-backdrop, .note-editor, .note-editor-body, .hand-canvas-stage, .note-toolrail, #handCanvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.note-title-input { -webkit-user-select: text; user-select: text; }
body.is-drawing-note, body.is-drawing-note * { -webkit-user-select: none; user-select: none; }
.hand-canvas-stage { touch-action: none; }
#handCanvas { cursor: crosshair; }
.shape-detail-tools { border-top: 1px solid #e6edf6; padding-top: 10px; }
.shape-dash-button.active, .shape-fill-button.active, .pen-only-button.active { border-color: rgba(15, 107, 255, 0.22); background: #eef5ff; color: var(--blue); }
.shape-radius-wrap { min-width: 0; }
.shape-radius { min-width: 88px; }
@media (max-width: 980px) {
  .shape-detail-tools { display: flex; align-items: center; flex-wrap: nowrap; border-top: 0; padding-top: 0; }
  .shape-radius-wrap { min-width: 112px; }
}
.ui-dialog-backdrop { position: fixed; inset: 0; z-index: 360; display: grid; place-items: start center; overflow: auto; background: rgba(13, 24, 45, 0.26); backdrop-filter: saturate(160%) blur(14px); padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom)); }
.ui-dialog-card { display: grid; gap: 14px; width: min(620px, 100%); margin-top: min(9vh, 72px); border: 1px solid rgba(255, 255, 255, 0.78); border-radius: 16px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 24px 70px rgba(23, 45, 86, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.94); padding: 16px; }
.small-dialog .ui-dialog-card { width: min(430px, 100%); }
.ui-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ui-dialog-head strong { color: var(--ink); font-size: 18px; }
.ui-dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ui-dialog-form { display: grid; gap: 12px; }
.dialog-field { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 900; }
.dialog-field-wide { grid-column: 1 / -1; }
.dialog-check { justify-content: flex-start; border: 1px solid rgba(95, 123, 163, 0.18); border-radius: 12px; background: rgba(248, 251, 255, 0.76); padding: 10px 12px; }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.danger-dialog { border-color: rgba(255, 215, 215, 0.9); }
.note-title-edit { display: grid; gap: 4px; width: 100%; border: 1px solid rgba(95, 123, 163, 0.22); border-radius: 12px; background: rgba(248, 251, 255, 0.82); color: var(--ink); padding: 12px; text-align: left; }
.note-title-edit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 900; }
.note-title-edit small { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-weight: 900; }
.note-title-edit .icon { width: 14px; height: 14px; }
.note-recovery-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(23, 105, 255, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  box-shadow: 0 10px 24px rgba(23, 105, 255, 0.08);
  padding: 14px;
}
.note-recovery-banner > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.note-recovery-banner strong {
  color: var(--ink);
  font-weight: 950;
}
.note-recovery-banner span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-save-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(95, 123, 163, 0.2);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.note-save-status[data-status="saving"] {
  border-color: rgba(23, 105, 255, 0.24);
  background: #eef5ff;
  color: var(--blue);
}
.note-save-status[data-status="dirty"],
.note-save-status[data-status="local"] {
  border-color: rgba(245, 158, 11, 0.3);
  background: #fff8eb;
  color: #92400e;
}
.note-save-status[data-status="backup-error"],
.note-save-status[data-status="error"] {
  border-color: rgba(239, 68, 68, 0.28);
  background: #fff1f2;
  color: #b42318;
}
@supports (height: 100dvh) {
  .note-editor-backdrop { min-height: 100dvh; }
  .note-editor { max-height: 100dvh; }
}
@media (max-width: 620px) {
  .storage-summary { grid-template-columns: 1fr; }
  .storage-user-row { grid-template-columns: 1fr; align-items: stretch; }
  .ui-dialog-card { margin-top: 8px; border-radius: 14px; padding: 14px; }
  .ui-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .note-recovery-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .note-recovery-banner .chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 761px) {
  .topbar-inner { display: grid; grid-template-columns: auto minmax(360px, 1fr) auto; align-items: center; gap: 14px; width: min(1240px, calc(100% - 40px)); min-height: 68px; padding: 8px 0; }
  .brand { grid-column: 1; width: 148px; min-width: 148px; max-width: 148px; }
  .brand img { width: 42px; height: 42px; }
  .brand span { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .primary-nav { grid-column: 2; justify-self: center; width: min(100%, 540px); max-width: 540px; min-width: 0; justify-content: center; }
  .primary-nav button { flex: 1 1 0; min-width: 0; padding: 0 10px; }
  .primary-nav button span { max-width: none; }
  .topbar-right { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
  .topbar-actions, .account { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 7px; min-width: 0; }
  .profile-pill { max-width: 190px; }
  .account-label { display: inline-block; max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .topbar-inner { grid-template-columns: auto minmax(300px, 1fr) auto; width: calc(100% - 24px); gap: 10px; }
  .brand { width: 128px; min-width: 128px; max-width: 128px; }
  .primary-nav { max-width: 460px; }
  .topbar-ask-cta span, .topbar-mini span, .account .ghost span { display: none; }
  .topbar-ask-cta, .topbar-mini, .account .ghost { width: 42px; min-width: 42px; padding: 0; }
  .profile-pill { max-width: 142px; }
  .account-label { max-width: 84px; }
}
@media (min-width: 761px) and (max-width: 920px) {
  .topbar-inner { grid-template-columns: auto minmax(240px, 1fr) auto; }
  .brand { width: 54px; min-width: 54px; max-width: 54px; padding: 4px; }
  .brand span { display: none; }
  .primary-nav { max-width: 390px; }
  .profile-pill { width: 42px; max-width: 42px; padding: 3px; }
  .profile-pill .account-label { display: none; }
}
@media (max-width: 760px) {
  .topbar-inner { display: flex; justify-content: space-between; }
  .topbar-right { display: flex; align-items: center; min-width: 0; }
}
.wordmaster-activity-panel { display: grid; gap: 14px; }
.wordmaster-activity-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wordmaster-activity-stats div { display: grid; gap: 3px; min-width: 0; border: 1px solid rgba(95, 123, 163, 0.16); border-radius: 8px; background: rgba(248, 251, 255, 0.76); padding: 12px; }
.wordmaster-activity-stats strong { color: var(--blue-dark); font-size: 24px; font-weight: 950; }
.wordmaster-activity-stats span { color: var(--muted); font-size: 12px; font-weight: 900; }
.wordmaster-activity-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wordmaster-activity-list button { display: grid; gap: 3px; min-width: 0; border: 1px solid rgba(95, 123, 163, 0.18); border-radius: 8px; background: rgba(255, 255, 255, 0.72); color: var(--ink); padding: 11px 12px; text-align: left; }
.wordmaster-activity-list button:hover { border-color: rgba(20, 104, 255, 0.3); background: rgba(239, 246, 255, 0.86); }
.wordmaster-activity-list span, .wordmaster-activity-list strong, .wordmaster-activity-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wordmaster-activity-list span { color: var(--blue); font-size: 12px; font-weight: 950; }
.wordmaster-activity-list strong { font-size: 14px; }
.wordmaster-activity-list small { color: var(--muted); font-size: 12px; font-weight: 800; }
.post-quiz-gate { display: grid; gap: 14px; margin-top: 18px; border: 1px solid rgba(20, 104, 255, 0.18); border-radius: 8px; background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.96)), var(--surface); box-shadow: 0 12px 30px rgba(24, 67, 130, 0.08); padding: 18px; }
.post-quiz-gate h3 { margin: 3px 0 5px; color: var(--blue-dark); font-size: 20px; }
.post-quiz-gate p, .post-quiz-gate small, .quiz-empty-state span { color: var(--muted); font-weight: 800; }
.post-quiz-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.post-quiz-form input, .post-quiz-question input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; color: var(--ink); font: inherit; font-weight: 850; padding: 12px 13px; }
.post-quiz-window { border-color: rgba(16, 185, 129, 0.24); background: linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(255, 255, 255, 0.96)), var(--surface); }
.quiz-empty-state, .post-quiz-question { display: grid; gap: 8px; border: 1px dashed rgba(20, 104, 255, 0.24); border-radius: 8px; background: rgba(255, 255, 255, 0.72); padding: 14px; }
.quiz-empty-state strong, .post-quiz-question strong { color: var(--ink); font-size: 15px; }
.post-quiz-question-list { display: grid; gap: 10px; }
.post-quiz-question > span { color: var(--blue); font-size: 12px; font-weight: 950; }
.quiz-passage { white-space: pre-wrap; border-left: 3px solid rgba(20, 104, 255, 0.28); color: var(--ink-soft); font-size: 14px; line-height: 1.65; padding-left: 10px; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.notice-quiz-gate { margin-top: 14px; box-shadow: none; }
.korean-quiz-app { word-break: keep-all; }
.korean-quiz-hero, .korean-question-card, .korean-answer-panel { display: grid; gap: 12px; }
.korean-quiz-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.korean-quiz-stats div { display: grid; gap: 2px; min-width: 0; border: 1px solid rgba(20, 104, 255, 0.16); border-radius: 8px; background: rgba(255, 255, 255, 0.76); padding: 12px; }
.korean-quiz-stats strong { color: var(--blue-dark); font-size: 24px; font-weight: 950; }
.korean-quiz-stats span { color: var(--muted); font-size: 12px; font-weight: 900; }
.korean-quiz-actions, .korean-quiz-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.korean-quiz-toolbar .select { flex: 1 1 190px; min-width: 0; }
.korean-work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.korean-work-card, .korean-concept-card, .korean-question-card, .korean-wrong-card { display: grid; gap: 10px; min-width: 0; border: 1px solid rgba(95, 123, 163, 0.17); border-radius: 8px; background: rgba(255, 255, 255, 0.78); padding: 14px; }
.korean-work-card h4, .korean-question-card h4 { margin: 0; color: var(--ink); font-size: 18px; }
.korean-work-card p, .korean-question-card p, .korean-concept-card p, .korean-wrong-card p { white-space: pre-wrap; line-height: 1.65; }
.korean-concept-list, .korean-result-list { display: grid; gap: 10px; }
.korean-concept-card summary { cursor: pointer; color: var(--blue-dark); font-weight: 950; }
.korean-answer-form { display: grid; gap: 10px; }
.korean-ox-buttons, .korean-grade-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.korean-ox-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.korean-answer-panel { border: 1px solid rgba(95, 123, 163, 0.18); border-radius: 8px; background: rgba(248, 251, 255, 0.84); padding: 14px; }
.answer-ok { color: #047857; }
.answer-bad { color: #b91c1c; }
.warning-button { border-color: rgba(245, 158, 11, 0.34); background: rgba(254, 243, 199, 0.86); color: #92400e; }
.secret-feature-panel details { border: 1px dashed rgba(15, 23, 42, 0.16); border-radius: 8px; background: rgba(248, 250, 252, 0.72); padding: 10px 12px; }
.secret-feature-panel summary { cursor: pointer; color: #64748b; font-size: 12px; font-weight: 900; }
.secret-feature-body { display: grid; gap: 8px; padding-top: 12px; }
.volley-page, .volley-controller-page { display: grid; gap: 16px; }
.volley-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 3px solid #111827; border-radius: 8px; background: linear-gradient(135deg, #fff7ed 0%, #dbeafe 52%, #fee2e2 100%); box-shadow: 0 12px 0 #111827; padding: 28px; }
.volley-hero h2 { margin: 0; color: #0f172a; font-size: clamp(34px, 5vw, 70px); letter-spacing: 0; }
.volley-hero p { max-width: 620px; color: #334155; font-weight: 800; }
.volley-open-button, .volley-ready-big { min-height: 54px; border: 3px solid #111827; box-shadow: 0 7px 0 #111827; font-size: 18px; font-weight: 950; }
.volley-scoreboard { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(180px, 1.4fr) minmax(110px, 1fr); gap: 10px; align-items: stretch; }
.volley-scoreboard > div { display: grid; place-items: center; border: 3px solid #111827; border-radius: 8px; background: #fff; box-shadow: 0 7px 0 #111827; padding: 10px; }
.volley-scoreboard > div:first-child { background: #fee2e2; color: #991b1b; }
.volley-scoreboard > div:last-child { background: #dbeafe; color: #1d4ed8; }
.volley-scoreboard strong { font-size: clamp(36px, 6vw, 76px); line-height: 1; }
.volley-title b { color: #0f172a; font-size: 24px; font-weight: 950; }
.volley-title small { color: #475569; font-weight: 900; }
.volley-host-grid { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.volley-lobby-card, .volley-stage-card, .volley-controller-card { border: 3px solid #111827; border-radius: 8px; background: #ffffff; box-shadow: 0 8px 0 #111827; }
.volley-lobby-card { display: grid; gap: 12px; padding: 14px; }
.volley-room-code { display: grid; place-items: center; border-radius: 8px; background: #111827; color: #fff; padding: 10px; }
.volley-room-code span { color: #bfdbfe; font-size: 12px; font-weight: 900; }
.volley-room-code strong { font-size: 48px; line-height: 1; }
.volley-qr { width: min(100%, 300px); justify-self: center; border: 2px solid #111827; border-radius: 8px; background: #fff; padding: 8px; }
.volley-join-link { color: #2563eb; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.volley-host-actions, .volley-controller-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.volley-team-card { border: 2px solid #e2e8f0; border-radius: 8px; padding: 10px; }
.volley-team-card.red { background: #fff1f2; }
.volley-team-card.blue { background: #eff6ff; }
.volley-team-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 950; }
.volley-team-slots { display: grid; gap: 8px; }
.volley-player-chip { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: center; border: 2px solid #cbd5e1; border-radius: 8px; background: #fff; padding: 7px; }
.volley-player-chip.ready { border-color: #22c55e; box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.18); }
.volley-player-face { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; background: #e2e8f0; color: #0f172a; font-weight: 950; }
.volley-player-face img { width: 100%; height: 100%; object-fit: cover; }
.volley-player-chip strong, .volley-player-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.volley-player-chip small { color: #64748b; font-size: 11px; font-weight: 800; }
.volley-stage-card { position: relative; min-height: 420px; overflow: hidden; background: #bfdbfe; }
#volleyCanvas { display: block; width: 100%; height: min(62vh, 620px); min-height: 420px; touch-action: none; }
.volley-broadcast { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); min-width: 240px; border: 3px solid #111827; border-radius: 999px; background: #fff; color: #111827; box-shadow: 0 6px 0 #111827; padding: 10px 18px; text-align: center; font-size: 18px; font-weight: 950; }
.volley-controller-page { min-height: 72vh; place-items: center; }
.volley-controller-page.live { background: linear-gradient(180deg, #eff6ff, #fff7ed); margin: -18px; padding: 18px; }
.volley-controller-card { display: grid; gap: 14px; width: min(100%, 520px); padding: 18px; }
.volley-controller-card h2 { margin: 0; font-size: 34px; letter-spacing: 0; }
.volley-team-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.volley-team-picker button { min-height: 50px; border: 3px solid #111827; border-radius: 8px; background: #fff; color: #111827; font-weight: 950; }
.volley-team-picker button:first-child.active { background: #ef4444; color: #fff; }
.volley-team-picker button:last-child.active { background: #2563eb; color: #fff; }
.volley-avatar-picker { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; border: 2px solid #cbd5e1; border-radius: 8px; background: #f8fafc; padding: 0 12px; font-weight: 900; }
.volley-avatar-preview { width: 86px; height: 86px; border: 3px solid #111827; border-radius: 50%; object-fit: cover; }
.volley-phone-status { display: grid; gap: 4px; border: 3px solid #111827; border-radius: 8px; background: #fee2e2; color: #111827; padding: 14px; }
.volley-phone-status.ready { background: #dcfce7; }
.volley-phone-status strong { font-size: 34px; line-height: 1; }
.volley-phone-status span { font-size: 13px; font-weight: 900; }
.volley-action-pad { min-height: 118px; border: 4px solid #111827; border-radius: 8px; background: #f97316; color: #fff; box-shadow: 0 9px 0 #111827; font-size: 24px; font-weight: 950; touch-action: none; }
.volley-action-pad:active { transform: translateY(5px); box-shadow: 0 4px 0 #111827; }
.volley-gamepad { display: grid; grid-template-columns: minmax(118px, .85fr) minmax(92px, .68fr) 1fr; gap: 14px; align-items: center; }
.volley-joystick { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-height: 132px; border: 4px solid #111827; border-radius: 50%; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.95) 0 19%, transparent 20%), linear-gradient(145deg, #dbeafe, #93c5fd 48%, #60a5fa); box-shadow: inset 0 -10px 0 rgba(15,23,42,.16), 0 8px 0 #111827; color: #0f172a; font-size: 13px; font-weight: 950; touch-action: none; user-select: none; }
.volley-joystick span { position: absolute; width: 58px; height: 58px; border: 4px solid #111827; border-radius: 50%; background: linear-gradient(145deg, #ffffff, #fef3c7); box-shadow: 0 5px 0 rgba(17,24,39,.9); transition: transform .05s linear; }
.volley-joystick b { position: relative; z-index: 1; transform: translateY(46px); }
.volley-center-hit { display: grid; place-items: center; min-height: 120px; border: 5px solid #111827; border-radius: 999px; background: radial-gradient(circle at 35% 26%, #ffffff 0 16%, #f97316 17% 72%, #c2410c 73%); color: #fff; box-shadow: 0 10px 0 #111827; font-size: 20px; font-weight: 950; line-height: 1.08; touch-action: none; user-select: none; }
.volley-center-hit:active { transform: translateY(5px); box-shadow: 0 5px 0 #111827; }
.volley-mega-swing { display: grid; place-items: center; min-height: clamp(180px, 34vh, 300px); border: 7px solid #111827; border-radius: 28px; background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.95) 0 11%, transparent 12%), linear-gradient(145deg, #ffedd5 0%, #fb923c 33%, #f97316 62%, #c2410c 100%); color: #ffffff; box-shadow: 0 14px 0 #111827, inset 0 -16px 0 rgba(127,29,29,.2); font-size: clamp(44px, 14vw, 88px); font-weight: 1000; letter-spacing: 0; touch-action: none; user-select: none; }
.volley-mega-swing:active { transform: translateY(7px) scale(.985); box-shadow: 0 7px 0 #111827, inset 0 -10px 0 rgba(127,29,29,.22); }
.volley-pad-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.volley-pad-button { min-height: 64px; border: 4px solid #111827; border-radius: 12px; color: #fff; box-shadow: 0 7px 0 #111827; font-size: 18px; font-weight: 950; touch-action: none; user-select: none; }
.volley-pad-button:active { transform: translateY(4px); box-shadow: 0 3px 0 #111827; }
.volley-pad-button.jump { background: #22c55e; }
.volley-pad-button.block { background: #2563eb; }
.volley-pad-button.swing { grid-column: 1 / -1; min-height: 82px; background: #f97316; font-size: 23px; }
.volley-dive-button { min-height: 58px; border: 3px solid #111827; border-radius: 8px; background: #0f172a; color: #fff; font-size: 18px; font-weight: 950; }
.volley-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.volley-help-grid span { border-radius: 8px; background: #f1f5f9; color: #334155; padding: 9px; font-size: 12px; font-weight: 900; }
.korean-wrong-card > div { display: flex; justify-content: space-between; gap: 10px; }
.korean-wrong-card span { color: var(--blue); font-size: 12px; font-weight: 950; }
@media (max-width: 760px) {
  .volley-hero, .volley-host-grid { grid-template-columns: 1fr; }
  .volley-hero { display: grid; padding: 20px; }
  .volley-scoreboard { grid-template-columns: 1fr 1.2fr 1fr; }
  .volley-host-grid { display: grid; }
  #volleyCanvas { height: 52vh; min-height: 340px; }
  .volley-lobby-card { order: 2; }
  .volley-stage-card { min-height: 340px; }
  .volley-controller-page.live { margin: -10px; padding: 10px; }
  .volley-gamepad { grid-template-columns: 1fr; }
  .volley-joystick { width: min(58vw, 220px); min-height: 150px; justify-self: center; }
  .volley-center-hit { width: min(54vw, 210px); min-height: 112px; justify-self: center; }
  .volley-mega-swing { min-height: min(42vh, 300px); border-radius: 22px; }
  .volley-pad-button { min-height: 60px; }
  .volley-help-grid { grid-template-columns: 1fr; }
  .wordmaster-activity-stats, .wordmaster-activity-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-quiz-form, .quiz-options { grid-template-columns: 1fr; }
  .korean-work-grid, .korean-quiz-stats, .korean-grade-buttons { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .wordmaster-activity-stats, .wordmaster-activity-list { grid-template-columns: 1fr; }
}
.quiz-hero, .quiz-start, .quiz-play, .quiz-result { --quiz-a: #1769ff; --quiz-b: #ffb000; --quiz-c: #0f172a; position: relative; overflow: hidden; border-radius: 22px; padding: 28px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--quiz-a) 92%, #111827), color-mix(in srgb, var(--quiz-b) 78%, #111827)); box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18); }
.quiz-theme-neon { --quiz-a: #7c3aed; --quiz-b: #06b6d4; }
.quiz-theme-fire { --quiz-a: #ef4444; --quiz-b: #f59e0b; }
.quiz-theme-ocean { --quiz-a: #0ea5e9; --quiz-b: #22c55e; }
.quiz-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.8fr); gap: 24px; align-items: center; }
.quiz-hero h1, .quiz-start h1, .quiz-play h1, .quiz-result h1 { margin: 8px 0; color: #fff; }
.quiz-hero p, .quiz-start p, .quiz-result p, .quiz-help { color: rgba(255, 255, 255, 0.86); }
.quiz-hero-actions, .quiz-start-actions, .quiz-result-actions, .quiz-card-actions, .quiz-editor-actions, .quiz-toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.quiz-stage-preview { display: grid; gap: 14px; padding: 18px; border: 1px solid rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(10px); border-radius: 18px; }
.quiz-stage-code, .quiz-code { width: fit-content; padding: 7px 11px; border-radius: 999px; color: #0f172a; background: #fff; font-weight: 900; letter-spacing: 0.02em; }
.quiz-stage-question { min-height: 110px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: rgba(15, 23, 42, 0.32); font-size: 34px; font-weight: 900; }
.quiz-stage-answers, .quiz-answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quiz-stage-answers span { min-height: 52px; border-radius: 14px; }
.quiz-stage-answers span:nth-child(1), .answer-0 { background: #e21b3c; }
.quiz-stage-answers span:nth-child(2), .answer-1 { background: #1368ce; }
.quiz-stage-answers span:nth-child(3), .answer-2 { background: #d89e00; }
.quiz-stage-answers span:nth-child(4), .answer-3 { background: #26890c; }
.quiz-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 18px; }
.quiz-section-tabs { display: flex; gap: 10px; margin-top: 16px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.quiz-section-tabs button { flex: 1; min-height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 900; cursor: pointer; }
.quiz-section-tabs button.active { color: #fff; background: var(--primary); }
.quiz-toolbar .search-field { flex: 1; min-width: 240px; }
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 18px; }
.quiz-card { display: grid; gap: 9px; min-height: 190px; padding: 14px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--quiz-a), var(--quiz-b)); box-shadow: 0 14px 36px rgba(15, 23, 42, 0.13); }
.quiz-cover-image { width: 100%; height: 86px; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.18); }
.quiz-card h3 { margin: 0; color: #fff; font-size: 18px; line-height: 1.25; }
.quiz-card p { margin: 0; color: rgba(255, 255, 255, 0.86); font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quiz-card-head, .quiz-card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quiz-card-meta span { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, 0.9); font-size: 12px; }
.quiz-mini-rank { padding: 8px 10px; border-radius: 10px; color: #0f172a; background: rgba(255, 255, 255, 0.92); font-size: 12px; }
.quiz-card-actions button { min-height: 34px; padding: 0 10px; font-size: 12px; }
.quiz-editor { display: grid; gap: 16px; margin-top: 18px; }
.quiz-maker-help { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-top: 18px; }
.quiz-maker-presets, .quiz-add-row, .quiz-live-actions, .quiz-live-control-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.quiz-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 12px; }
.quiz-editor-wide { grid-column: 1 / -1; }
.quiz-question-editor-list { display: grid; gap: 14px; }
.quiz-question-editor { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); }
.quiz-question-editor-head, .quiz-option-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.quiz-question-editor-head > div { display: flex; gap: 8px; align-items: center; }
.quiz-option-editor { display: grid; gap: 8px; }
.quiz-option-row .input { flex: 1; }
.mini-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mini-input { width: 74px; }
.mini-select { width: 110px; min-height: 36px; }
.quiz-start, .quiz-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 20px; }
.quiz-start-card, .quiz-result-card { position: relative; display: grid; align-content: center; gap: 16px; min-height: 420px; }
.quiz-start-card { padding: 24px; border: 1px solid rgba(255, 255, 255, 0.36); border-radius: 20px; background: rgba(15, 23, 42, 0.24); backdrop-filter: blur(10px); }
.quiz-back-button { width: fit-content; justify-self: start; background: rgba(255, 255, 255, 0.94); color: #111827; }
.quiz-result-stack { display: grid; gap: 14px; }
.quiz-start-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-start-meta span { padding: 7px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #111827; font-weight: 800; }
.quiz-start label, .quiz-start-card label { color: rgba(255, 255, 255, 0.94); font-weight: 800; }
.quiz-start .ghost, .quiz-play .ghost, .quiz-result .ghost, .quiz-live-head .ghost { background: rgba(255, 255, 255, 0.94); color: #111827; }
.quiz-start .ghost .icon, .quiz-play .ghost .icon, .quiz-result .ghost .icon, .quiz-live-head .ghost .icon { color: currentColor; }
.quiz-start .badge, .quiz-play .badge, .quiz-result .badge { background: rgba(255, 255, 255, 0.92); color: #111827; }
.quiz-name-input { max-width: 360px; }
.quiz-start-image, .quiz-question-image { width: min(520px, 100%); max-height: 280px; object-fit: contain; border-radius: 16px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.24); }
.quiz-start-button { min-width: 170px; min-height: 52px; font-size: 18px; }
.quiz-play { display: grid; gap: 18px; min-height: calc(100vh - 190px); }
.quiz-play-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.quiz-question-stage { display: grid; gap: 14px; place-items: center; text-align: center; padding: 22px; border-radius: 18px; background: rgba(15, 23, 42, 0.24); }
.quiz-question-stage h1 { max-width: 940px; font-size: 38px; line-height: 1.18; }
.quiz-progress, .quiz-timer { width: min(760px, 100%); height: 10px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }
.quiz-progress span, .quiz-timer span { display: block; height: 100%; border-radius: inherit; background: #fff; }
.quiz-timer span { animation: quiz-timer var(--quiz-seconds, 20s) linear forwards; }
.quiz-timer.static span { animation: none; transition: width 0.18s linear; }
.quiz-stage-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.quiz-countdown.danger { color: #fff; background: #dc2626; animation: quiz-pulse 0.8s ease-in-out infinite alternate; }
@keyframes quiz-timer {
  from { width: 100%; }
  to { width: 0; }
}
@keyframes quiz-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
.quiz-answer { min-height: 118px; display: flex; gap: 14px; align-items: center; justify-content: flex-start; padding: 20px; border: 0; border-radius: 18px; color: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16); cursor: pointer; transition: transform 0.12s ease, opacity 0.12s ease, filter 0.12s ease; }
.quiz-answer:hover { transform: translateY(-2px); }
.quiz-answer:disabled { cursor: default; }
.quiz-answer span { font-size: 28px; }
.quiz-answer strong { font-size: 20px; text-align: left; }
.quiz-answer.correct { outline: 5px solid #fff; filter: saturate(1.15); }
.quiz-answer.wrong { opacity: 0.46; filter: grayscale(0.3); }
.quiz-feedback { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding: 16px; border-radius: 16px; color: #0f172a; background: #fff; }
.quiz-effect-pop { position: absolute; inset: 0; pointer-events: none; }
.quiz-effect-pop span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #facc15; animation: quiz-pop 720ms ease-out forwards; }
.quiz-effect-pop span:nth-child(1) { left: 18%; top: 45%; }
.quiz-effect-pop span:nth-child(2) { left: 40%; top: 30%; animation-delay: 80ms; background: #38bdf8; }
.quiz-effect-pop span:nth-child(3) { left: 64%; top: 42%; animation-delay: 120ms; background: #22c55e; }
.quiz-effect-pop span:nth-child(4) { left: 78%; top: 58%; animation-delay: 40ms; background: #fb7185; }
@keyframes quiz-pop {
  from { transform: scale(0.4) translateY(0); opacity: 1; }
  to { transform: scale(2.5) translateY(-26px); opacity: 0; }
}
.quiz-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.quiz-confetti span { position: absolute; top: -16px; width: 9px; height: 18px; border-radius: 3px; background: #fff; animation: quiz-fall 1.6s ease-in infinite; }
.quiz-confetti span:nth-child(1) { left: 10%; background: #facc15; animation-delay: 0ms; }
.quiz-confetti span:nth-child(2) { left: 28%; background: #38bdf8; animation-delay: 180ms; }
.quiz-confetti span:nth-child(3) { left: 45%; background: #22c55e; animation-delay: 80ms; }
.quiz-confetti span:nth-child(4) { left: 62%; background: #fb7185; animation-delay: 260ms; }
.quiz-confetti span:nth-child(5) { left: 78%; background: #a78bfa; animation-delay: 120ms; }
.quiz-confetti span:nth-child(6) { left: 90%; background: #f97316; animation-delay: 320ms; }
@keyframes quiz-fall {
  from { transform: translateY(0) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  to { transform: translateY(280px) rotate(220deg); opacity: 0; }
}
.quiz-feedback strong { font-size: 22px; }
.quiz-feedback p { flex-basis: 100%; margin: 0; text-align: center; color: #334155; }
.quiz-feedback.correct strong { color: #15803d; }
.quiz-feedback.wrong strong { color: #dc2626; }
.quiz-leaderboard { color: var(--text); }
.quiz-review { color: var(--text); }
.quiz-review-list { display: grid; gap: 10px; max-height: 460px; overflow: auto; padding-right: 4px; }
.quiz-review-item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-left: 5px solid #dc2626; border-radius: 12px; background: var(--surface); }
.quiz-review-item.correct { border-left-color: #16a34a; }
.quiz-review-head, .quiz-review-answers { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.quiz-review-head strong { line-height: 1.35; }
.quiz-review-answers { flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.quiz-review-item p { margin: 0; color: var(--text); font-size: 13px; }
.quiz-rank-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.quiz-rank-row:last-child { border-bottom: 0; }
.quiz-rank-row strong { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); }
.quiz-live-host { display: grid; gap: 18px; }
.quiz-live-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #111827, #1769ff); }
.quiz-live-head h1 { margin: 10px 0 4px; color: #fff; }
.quiz-live-head p { margin: 0; color: rgba(255, 255, 255, 0.78); word-break: break-all; }
.quiz-live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.quiz-live-stage { display: grid; gap: 16px; }
@media (max-width: 760px) {
  .quiz-hero, .quiz-start, .quiz-result, .quiz-editor-grid { grid-template-columns: 1fr; }
  .quiz-hero, .quiz-start, .quiz-play, .quiz-result { padding: 18px; border-radius: 18px; }
  .quiz-toolbar { align-items: stretch; flex-direction: column; }
  .quiz-section-tabs, .quiz-maker-help, .quiz-live-head { flex-direction: column; align-items: stretch; }
  .quiz-live-grid { grid-template-columns: 1fr; }
  .quiz-answer-grid, .quiz-stage-answers { grid-template-columns: 1fr; }
  .quiz-question-stage h1 { font-size: 27px; }
  .quiz-answer { min-height: 82px; padding: 16px; }
  .quiz-start-card, .quiz-result-card { min-height: auto; }
  .quiz-review-head { flex-direction: column; }
}
.brand, .nav button, .topbar-mini, .topbar-ask-cta, .profile-pill, .mobile-tabbar button, .primary, .ghost, .small-button, .quiz-answer { position: relative; isolation: isolate; overflow: hidden; background-clip: padding-box; }
.brand::before, .nav button::before, .topbar-mini::before, .topbar-ask-cta::before, .profile-pill::before, .mobile-tabbar button::before, .primary::before, .ghost::before, .small-button::before, .quiz-answer::before { content: ""; position: absolute; inset: -1px; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.72), transparent 34%); transition: opacity 0.16s ease; }
.brand:hover::before, .nav button:hover::before, .topbar-mini:hover::before, .topbar-ask-cta:hover::before, .profile-pill:hover::before, .mobile-tabbar button:hover::before, .primary:hover::before, .ghost:hover::before, .small-button:hover::before, .quiz-answer:hover::before { opacity: 1; }
.brand .icon, .nav button .icon, .topbar-mini .icon, .topbar-ask-cta .icon, .profile-pill .icon, .mobile-tabbar button .icon, .primary .icon, .ghost .icon, .small-button .icon { position: relative; z-index: 1; }
.brand span, .nav button span, .topbar-mini span, .topbar-ask-cta span, .profile-pill span, .mobile-tabbar button span, .primary span, .ghost span, .small-button span, .quiz-answer strong { position: relative; z-index: 1; background: transparent; color: inherit; text-shadow: none; }
.brand { gap: 9px; width: 196px; min-width: 196px; max-width: 196px; padding: 5px 10px; }
.brand-icons { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; min-width: 48px; height: 44px; }
.brand-logo { display: block; object-fit: contain; grid-area: 1 / 1; transform-origin: center; }
.brand .brand-logo.tutor-logo { width: 42px; height: 42px; opacity: 0; animation: brand-tutor-phase 8s ease-in-out infinite; }
.brand .brand-logo.school-logo { width: 40px; height: 40px; border-radius: 10px; filter: drop-shadow(0 8px 16px rgba(0, 146, 65, 0.22)); animation: brand-school-main-phase 8s ease-in-out infinite; }
.brand-title { position: relative; z-index: 1; display: grid; align-items: center; min-width: 0; width: 108px; height: 20px; overflow: hidden; color: var(--ink); text-overflow: clip; white-space: nowrap; font-size: 15px; line-height: 1; }
.brand-title-main, .brand-title-school { grid-area: 1 / 1; display: block; white-space: nowrap; }
.brand-title-main { color: var(--ink); opacity: 0; animation: brand-tutor-phase 8s ease-in-out infinite; }
.brand-title-school { color: #009241; font-weight: 950; animation: brand-school-main-phase 8s ease-in-out infinite; }
@keyframes brand-school-main-phase {
  0%, 57%, 92%, 100% { opacity: 1; transform: translateY(0) scale(1); }
  63%, 86% { opacity: 0; transform: translateY(-5px) scale(0.96); }
}
@keyframes brand-tutor-phase {
  0%, 57%, 92%, 100% { opacity: 0; transform: translateY(5px) scale(0.96); }
  63%, 86% { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-card .brand, .auth-card .auth-brand { width: fit-content; min-width: 210px; max-width: none; margin: 0 auto 18px; justify-content: center; }
.auth-card .brand-title { display: grid; max-width: none; overflow: visible; }
.nav button, .topbar-mini, .topbar-ask-cta { line-height: 1; }
.nav button span, .topbar-mini span, .topbar-ask-cta span, .mobile-tabbar button span { display: inline-flex; align-items: center; min-height: 1em; }
@media (min-width: 761px) {
  .topbar .brand { width: 196px; min-width: 196px; max-width: 196px; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .topbar .brand { width: 174px; min-width: 174px; max-width: 174px; }
  .topbar .brand-icons { width: 44px; min-width: 44px; }
  .topbar .brand-title { width: 96px; font-size: 14px; }
}
@media (min-width: 761px) and (max-width: 920px) {
  .topbar .brand { width: 70px; min-width: 70px; max-width: 70px; padding: 4px 6px; }
  .topbar .brand-icons { display: inline-grid; }
  .topbar .brand-title { display: none; }
}
@media (max-width: 760px) {
  .brand { width: auto; min-width: 0; max-width: none; }
  .brand-icons { width: 46px; min-width: 46px; height: 38px; }
  .brand .brand-logo.tutor-logo { width: 36px; height: 36px; }
  .brand .brand-logo.school-logo { width: 34px; height: 34px; }
}
:root { --bg: #f3f7fb; --ink: #101826; --muted: #5b6b80; --line: rgba(127, 146, 171, 0.24); --line-strong: rgba(78, 101, 133, 0.24); --card: rgba(255, 255, 255, 0.82); --surface: rgba(255, 255, 255, 0.86); --surface-muted: rgba(244, 248, 252, 0.9); --primary: #1769ff; --primary-dark: #0f4fc8; --school-green: #009241; --shadow: 0 18px 46px rgba(33, 55, 86, 0.12); --shadow-soft: 0 10px 28px rgba(33, 55, 86, 0.08); }
body { color: var(--ink); background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.14) 36%, rgba(255, 255, 255, 0.5)), linear-gradient(135deg, #eef7ff 0%, #f8fbff 42%, #f5fff8 100%); }
body::before { background: linear-gradient(90deg, rgba(23, 105, 255, 0.035) 1px, transparent 1px), linear-gradient(180deg, rgba(0, 146, 65, 0.03) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(180deg, #000 0%, transparent 78%); }
.app-shell, .auth-wrap { opacity: 0; transform: translateY(8px); }
.app-shell.is-mounted, .auth-wrap.is-mounted { opacity: 1; transform: translateY(0); transition: opacity 0.22s ease, transform 0.22s ease; }
.topbar { border-bottom: 1px solid rgba(255, 255, 255, 0.72); background: rgba(248, 251, 255, 0.76); backdrop-filter: saturate(180%) blur(22px); box-shadow: 0 14px 34px rgba(31, 58, 94, 0.08); }
.topbar-inner { min-height: 70px; }
.container { width: min(1240px, calc(100% - 32px)); padding-top: 22px; }
.panel, .question-card, .answer-card, .notice-card, .post-card, .community-card, .profile-card, .inventory-card, .quiz-card, .word-card, .study-timer-card, .study-leaderboard { border: 1px solid rgba(255, 255, 255, 0.82); background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 252, 255, 0.78)); box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.95); }
.panel, .question-card, .notice-card, .post-card, .community-card, .profile-card { border-radius: 12px; }
.question-card, .notice-card, .post-card, .community-card, .quiz-card { transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; }
.question-card:hover, .notice-card:hover, .post-card:hover, .community-card:hover, .quiz-card:hover { transform: translateY(-2px); border-color: rgba(23, 105, 255, 0.24); box-shadow: 0 18px 42px rgba(30, 63, 112, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.95); }
.section-title { align-items: center; gap: 12px; margin: 18px 0 12px; }
.section-title h1, .section-title h2, .section-title h3, .panel h2, .panel h3 { color: #122033; letter-spacing: 0; }
.muted, .meta, .mini { color: var(--muted); }
.input, .textarea, .select { min-height: 42px; border: 1px solid rgba(88, 111, 142, 0.22); border-radius: 10px; background: rgba(255, 255, 255, 0.86); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86); transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease; }
.input:focus, .textarea:focus, .select:focus, .input:focus-visible, .textarea:focus-visible, .select:focus-visible { border-color: rgba(23, 105, 255, 0.48); outline: none; background: #fff; box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.primary, .ghost, .small-button, .chip, .nav button, .topbar-mini, .topbar-ask-cta, .profile-pill { border-radius: 10px; }
.primary { border: 1px solid rgba(23, 105, 255, 0.2); background: linear-gradient(180deg, #2d7dff, #0f5fe8); box-shadow: 0 12px 26px rgba(23, 105, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.26); }
.primary:hover { background: linear-gradient(180deg, #438cff, #1158d7); }
.ghost, .small-button, .chip { background: rgba(255, 255, 255, 0.74); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86); }
.badge { border: 1px solid rgba(89, 112, 146, 0.16); background: rgba(255, 255, 255, 0.76); color: #405067; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82); }
.badge.selected, .chip.active { border-color: rgba(23, 105, 255, 0.22); background: rgba(232, 242, 255, 0.92); color: var(--primary-dark); }
.nav { border-radius: 12px; background: rgba(255, 255, 255, 0.58); }
.nav button.active { color: #fff; background: linear-gradient(180deg, #2e7fff, #1059d8); }
.topbar-ask-cta { background: linear-gradient(180deg, #16a34a, #087a36); border-color: rgba(0, 146, 65, 0.24); box-shadow: 0 12px 26px rgba(0, 146, 65, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.auth-card { border: 1px solid rgba(255, 255, 255, 0.86); border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 255, 0.84)); box-shadow: 0 24px 70px rgba(30, 55, 90, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.98); }
.tabs { border-radius: 12px; background: rgba(238, 245, 252, 0.88); padding: 5px; }
.tabs button { border-radius: 9px; }
.tabs button.active { background: #fff; box-shadow: 0 8px 18px rgba(30, 55, 90, 0.1); }
.mobile-tabbar { border: 1px solid rgba(255, 255, 255, 0.82); background: rgba(250, 252, 255, 0.86); backdrop-filter: blur(20px); box-shadow: 0 -14px 34px rgba(31, 58, 94, 0.1); }
.mobile-tabbar button.active { background: linear-gradient(180deg, #2d7dff, #0f5fe8); }
.toast { border: 1px solid rgba(255, 255, 255, 0.72); background: rgba(16, 24, 38, 0.92); box-shadow: 0 16px 40px rgba(16, 24, 38, 0.2); }
@media (max-width: 760px) {
  .container { width: min(100% - 20px, 1240px); padding-top: 14px; }
  .panel, .question-card, .notice-card, .post-card, .community-card { border-radius: 12px; }
  .section-title { margin: 14px 0 10px; }
}
.community-study-room .visual-study-grid { gap: 14px; }
.study-priority-stack { order: -1; }
.study-priority-stack .study-timer-card { position: relative; overflow: hidden; border-color: rgba(0, 146, 65, 0.28); background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 255, 247, 0.88)), radial-gradient(circle at 15% 0%, rgba(0, 146, 65, 0.12), transparent 34%); box-shadow: 0 22px 56px rgba(0, 91, 42, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.96); }
.study-priority-stack .study-timer-card::after { content: ""; position: absolute; inset: auto 18px 0; height: 4px; border-radius: 999px 999px 0 0; background: linear-gradient(90deg, var(--study-color), #009241); opacity: 0.95; }
.study-stopwatch-face { min-height: 150px; border-color: rgba(0, 146, 65, 0.28); background: radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.24), transparent 38%), linear-gradient(180deg, #071525, #122238); }
.study-stopwatch-face span { color: #86efac; font-size: 12px; }
.study-stopwatch-face strong { font-size: clamp(38px, 6vw, 58px); text-shadow: 0 0 24px rgba(134, 239, 172, 0.24); }
.study-stopwatch-face small { color: rgba(219, 234, 254, 0.84); font-size: 12px; }
.study-start-form { gap: 12px; }
.study-start-copy { display: grid; gap: 5px; padding: 12px; border: 1px solid rgba(0, 146, 65, 0.18); border-radius: 12px; background: rgba(236, 253, 245, 0.72); }
.study-start-copy strong { color: #075f2b; font-size: 18px; }
.study-start-copy span { color: #315440; font-size: 13px; line-height: 1.45; }
.study-goal-select { grid-template-columns: minmax(0, 1fr); }
.study-start-main-button { width: 100%; min-height: 62px; border-radius: 14px; background: linear-gradient(180deg, #19b85a, #087a36); color: #fff; font-size: 18px; font-weight: 950; box-shadow: 0 18px 34px rgba(0, 146, 65, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.study-start-main-button:hover { background: linear-gradient(180deg, #20c765, #087a36); }
.study-tools-toggle { width: 100%; min-height: 44px; border-style: dashed; color: #25603b; background: rgba(255, 255, 255, 0.72); }
.study-advanced-panel, .study-advanced-start-fields { display: grid; gap: 10px; }
.study-advanced-panel { padding: 12px; border: 1px solid rgba(89, 112, 146, 0.16); border-radius: 14px; background: rgba(255, 255, 255, 0.72); }
.study-advanced-panel .study-extra-timers { border-top: 0; padding-top: 0; }
.study-advanced-panel .board-note-form { margin-top: 4px; border: 1px solid rgba(89, 112, 146, 0.16); border-radius: 12px; background: rgba(248, 251, 255, 0.86); padding: 12px; }
.study-leaderboard { border-color: rgba(23, 105, 255, 0.14); }
@media (min-width: 900px) {
  .study-priority-stack { grid-template-columns: minmax(360px, 0.92fr) minmax(280px, 0.55fr); }
}
@media (max-width: 760px) {
  .study-stopwatch-face { min-height: 128px; }
  .study-start-main-button { min-height: 58px; font-size: 16px; }
}
.topbar .brand { display: inline-flex; align-items: center; justify-content: flex-start; gap: 9px; overflow: hidden; }
.topbar .brand-icons { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; overflow: visible; }
.topbar .brand-logo { grid-area: 1 / 1; max-width: 100%; max-height: 100%; object-fit: contain; }
.topbar .brand-title { display: grid; align-items: center; flex: 1 1 auto; min-width: 0; width: auto; max-width: 116px; height: 20px; overflow: hidden; }
.topbar .brand-title-main, .topbar .brand-title-school { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; }
@media (min-width: 1181px) {
  .topbar .brand { width: 188px; min-width: 188px; max-width: 188px; padding: 5px 10px; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .topbar .brand { width: 56px; min-width: 56px; max-width: 56px; padding: 4px 6px; justify-content: center; }
  .topbar .brand-title { display: none; }
  .topbar .brand-icons { flex-basis: 42px; width: 42px; min-width: 42px; height: 42px; }
}
@media (max-width: 760px) {
  .topbar .brand { width: 54px; min-width: 54px; max-width: 54px; padding: 4px; justify-content: center; }
  .topbar .brand-title { display: none; }
  .topbar .brand-icons { flex-basis: 42px; width: 42px; min-width: 42px; height: 42px; }
  .bottom-ask { display: none; }
  .mobile-tabbar { position: fixed; right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); left: max(10px, env(safe-area-inset-left)); z-index: 80; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; min-height: 64px; border-radius: 18px; padding: 7px; }
  .mobile-tabbar button { display: grid; place-items: center; gap: 3px; min-width: 0; min-height: 50px; }
  .mobile-tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
}
@media (min-width: 761px) {
  .mobile-tabbar { display: none; }
}
.auth-wrap { min-height: 100dvh; place-items: center; padding: clamp(20px, 4vw, 42px); background: radial-gradient(circle at 18% 12%, rgba(0, 146, 65, 0.16), transparent 34%), radial-gradient(circle at 86% 18%, rgba(23, 105, 255, 0.18), transparent 32%), linear-gradient(135deg, #eef7ff 0%, #f7fbff 46%, #eefbf3 100%); }
.auth-card { width: min(460px, 100%); border: 1px solid rgba(86, 112, 150, 0.2); border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 255, 0.92)); color: #102033; padding: 24px; box-shadow: 0 28px 80px rgba(30, 55, 90, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.96); }
.auth-card .brand, .auth-card .auth-brand { display: inline-flex; width: fit-content; min-width: 214px; max-width: none; min-height: 70px; margin: 0 auto 20px; padding: 6px 10px; justify-content: center; overflow: visible; }
.auth-card .brand-icons { display: grid; flex: 0 0 54px; width: 54px; min-width: 54px; height: 54px; overflow: visible; }
.auth-card .brand-logo.tutor-logo { width: 50px; height: 50px; }
.auth-card .brand-logo.school-logo { width: 48px; height: 48px; }
.auth-card .brand-title { display: grid; width: 128px; max-width: 128px; height: 24px; overflow: hidden; font-size: 17px; }
.auth-card .form { display: grid; gap: 13px; }
.auth-card label { display: grid; gap: 7px; color: #25344d; font-size: 13px; font-weight: 900; }
.auth-card .input { min-height: 46px; border: 1px solid rgba(67, 90, 123, 0.26); border-radius: 12px; background: #fff; color: #101826; padding: 0 13px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95); }
.auth-card .input:focus, .auth-card .input:focus-visible { border-color: rgba(23, 105, 255, 0.52); outline: none; box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.96); }
.auth-card .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-bottom: 16px; border: 1px solid rgba(86, 112, 150, 0.18); border-radius: 14px; background: #eaf2ff; padding: 5px; }
.auth-card .tabs button { min-height: 42px; border-radius: 10px; color: #36516e; font-weight: 950; }
.auth-card .tabs button.active { background: linear-gradient(180deg, #2378ff, #0f5fe8); color: #fff; box-shadow: 0 10px 22px rgba(23, 105, 255, 0.24); }
.auth-card .primary { min-height: 48px; color: #fff; font-weight: 950; }
.signup-quiz-box { display: grid; gap: 11px; padding: 14px; border: 1px solid rgba(23, 105, 255, 0.18); border-radius: 16px; background: linear-gradient(180deg, rgba(237, 246, 255, 0.96), rgba(255, 255, 255, 0.96)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95); }
.signup-quiz-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.signup-quiz-head strong { color: #0f4fc8; font-size: 14px; }
.signup-quiz-head span { padding: 5px 8px; border-radius: 999px; background: rgba(23, 105, 255, 0.12); color: #0f4fc8; font-size: 11px; font-weight: 950; }
.signup-quiz-box p { margin: 0; color: #64748b; font-size: 12px; line-height: 1.4; }
.signup-quiz-box h3 { margin: 0; color: #111827; font-size: 15px; line-height: 1.42; }
.signup-quiz-options, .signup-quiz-admin-options { display: grid; gap: 8px; }
.signup-quiz-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center; padding: 10px 11px; border: 1px solid rgba(67, 90, 123, 0.18); border-radius: 12px; background: #fff; color: #25344d; }
.signup-quiz-option span { min-width: 0; overflow-wrap: anywhere; }
.signup-quiz-short-input { min-height: 48px; }
.signup-quiz-settings-form { gap: 11px; }
.teacher-signup-details {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.96));
  padding: 12px;
}
.teacher-signup-details summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #047857;
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  list-style: none;
}
.teacher-signup-details summary::-webkit-details-marker { display: none; }
.teacher-signup-details .textarea {
  min-height: 86px;
  background: #fff;
}
@media (max-width: 760px) {
  .auth-wrap { align-items: start; padding: 44px 18px 24px; }
  .auth-card { padding: 20px; }
}
.app-shell, .auth-wrap, .app-shell.is-mounted, .auth-wrap.is-mounted { opacity: 1; transform: none; transition: none; }
.auth-wrap { display: grid; }
.study-advanced-panel { max-height: min(460px, 48dvh); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; }
.study-advanced-panel .board-note-form { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) {
  .mobile-tabbar { position: fixed; right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); left: max(10px, env(safe-area-inset-left)); z-index: 220; display: grid; visibility: visible; opacity: 1; pointer-events: auto; }
  .container { padding-bottom: calc(124px + env(safe-area-inset-bottom)); }
  .study-priority-stack, .study-side-stack { min-height: 0; }
  .study-advanced-panel { max-height: min(390px, 44dvh); padding-right: 10px; }
  .study-advanced-panel .quick-timer-row, .study-advanced-panel .quick-timer-custom { flex-wrap: wrap; }
  .study-advanced-panel .quick-timer-row .small-button { flex: 1 1 72px; }
}
.topbar-ask-cta span, .topbar-mini span, .account-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 761px) {
  .topbar-right { max-width: min(470px, 42vw); overflow: hidden; }
  .topbar-actions { flex: 0 1 auto; gap: 6px; overflow: hidden; }
  .topbar-ask-cta, .topbar-mini, .topbar .account .ghost { flex: 0 0 auto; min-width: 42px; height: 42px; min-height: 42px; padding: 0 10px; }
  .topbar-action-ask { width: 92px; }
  .topbar-action-tutor { width: 74px; }
  .topbar-action-apply { width: 72px; }
  .topbar-action-admin { width: 74px; }
  .topbar-action-hidden { width: 82px; }
  .topbar .profile-pill { flex: 1 1 132px; min-width: 44px; max-width: 158px; }
}
@media (min-width: 761px) and (max-width: 1280px) {
  .topbar-inner { grid-template-columns: auto minmax(330px, 1fr) minmax(210px, auto); gap: 8px; width: calc(100% - 20px); }
  .topbar-right { max-width: 360px; gap: 6px; }
  .topbar-actions { gap: 5px; }
  .topbar-ask-cta span, .topbar-mini span, .topbar .account .ghost span { display: none; }
  .topbar-action-ask, .topbar-action-tutor, .topbar-action-apply, .topbar-action-admin, .topbar-action-hidden, .topbar .account .ghost { width: 42px; min-width: 42px; padding: 0; }
  .topbar .profile-pill { width: 118px; max-width: 118px; padding-right: 8px; }
  .topbar .account-label { max-width: 72px; }
}
@media (min-width: 761px) and (max-width: 980px) {
  .topbar-inner { grid-template-columns: auto minmax(260px, 1fr) auto; }
  .topbar-right { max-width: 250px; }
  .topbar .profile-pill { width: 42px; max-width: 42px; padding: 3px; }
  .topbar .profile-pill .account-label { display: none; }
}
@media (max-width: 760px) {
  .topbar-actions { display: none; }
}
.notification-read-button, .section-title .notification-read-button { border-color: rgba(95, 123, 163, 0.24); background: #fff; color: #111827; box-shadow: 0 8px 18px rgba(31, 67, 121, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92); }
.notification-read-button .icon { color: #111827; }
.notification-read-button:hover { border-color: rgba(23, 105, 255, 0.28); background: #f8fbff; color: #0f5fe8; }
.toast { border: 1px solid rgba(95, 123, 163, 0.22); background: rgba(255, 255, 255, 0.96); color: #111827; text-shadow: none; box-shadow: 0 16px 38px rgba(31, 67, 121, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.94); backdrop-filter: saturate(170%) blur(18px); }
.toast strong, .toast span { color: inherit; }
.admin-analytics-panel { display: grid; gap: 16px; margin-top: 12px; }
.analytics-export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tiny-btn { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.analytics-live-stats { margin: 0; }
.analytics-insights { display: grid; gap: 8px; }
.analytics-insight { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(89, 112, 146, 0.16); background: rgba(255, 255, 255, 0.72); }
.analytics-insight strong { flex: 0 0 auto; color: #0f766e; }
.analytics-insight.warning strong { color: #b45309; }
.analytics-insight.danger strong { color: #dc2626; }
.analytics-insight span { color: #334155; font-size: 13px; line-height: 1.35; }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.analytics-grid h3, .analytics-days h3, .analytics-breakdown-card h3, .analytics-hourly h3, .analytics-errors h3 { margin: 0 0 10px; color: #122033; font-size: 16px; }
.compact-head { margin-bottom: 10px; }
.analytics-trend, .analytics-hourly, .analytics-errors, .analytics-breakdown-card { padding: 12px; border: 1px solid rgba(89, 112, 146, 0.14); border-radius: 14px; background: rgba(255, 255, 255, 0.7); }
.analytics-trend-bars, .analytics-hour-grid { display: grid; align-items: end; gap: 7px; min-height: 126px; }
.analytics-trend-bars { grid-template-columns: repeat(14, minmax(18px, 1fr)); }
.analytics-hour-grid { grid-template-columns: repeat(24, minmax(10px, 1fr)); }
.analytics-trend-item, .analytics-hour-item { display: grid; grid-template-rows: minmax(80px, 1fr) auto; gap: 6px; align-items: end; min-width: 0; text-align: center; }
.analytics-trend-item span, .analytics-hour-item span { display: block; width: 100%; min-height: 4px; border-radius: 999px 999px 4px 4px; background: linear-gradient(180deg, #2563eb, #22c55e); box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18); }
.analytics-hour-item span { background: linear-gradient(180deg, #0ea5e9, #6366f1); }
.analytics-trend-item small, .analytics-hour-item small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-breakdown-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.analytics-bar-row { display: grid; gap: 5px; margin-top: 9px; }
.analytics-bar-meta { display: flex; justify-content: space-between; gap: 8px; color: #334155; font-size: 12px; font-weight: 800; }
.analytics-bar-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-bar-meta b { flex: 0 0 auto; color: #122033; }
.analytics-bar-track { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, 0.18); }
.analytics-bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #22c55e); }
.analytics-today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.analytics-today div { padding: 10px; border-radius: 10px; background: rgba(244, 248, 252, 0.86); }
.analytics-today strong { display: block; color: #122033; font-size: 18px; }
.analytics-today span, .analytics-path-row small, .analytics-day-row { color: var(--muted); font-size: 12px; }
.analytics-path-list { display: grid; gap: 7px; }
.analytics-path-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 9px 10px; border-radius: 10px; background: rgba(244, 248, 252, 0.86); }
.analytics-path-row span { overflow: hidden; color: #122033; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.analytics-path-row b { color: var(--primary); }
.analytics-path-row small { grid-column: 1 / -1; }
.analytics-day-table { display: grid; gap: 6px; }
.analytics-day-row { display: grid; grid-template-columns: 1.25fr repeat(7, minmax(54px, 0.7fr)); gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; background: rgba(244, 248, 252, 0.72); }
.analytics-day-row.head { background: transparent; color: #334155; font-weight: 900; }
.analytics-error-list { display: grid; gap: 8px; }
.analytics-error-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 9px 10px; border-radius: 10px; background: rgba(254, 242, 242, 0.78); color: #7f1d1d; }
.analytics-error-row b { color: #dc2626; }
.analytics-error-row code { overflow: hidden; color: #122033; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-error-row small { grid-column: 1 / -1; color: #64748b; }
@media (max-width: 760px) {
  .analytics-export-actions { justify-content: flex-start; }
  .analytics-grid, .analytics-today, .analytics-breakdown-grid { grid-template-columns: 1fr; }
  .analytics-trend-bars, .analytics-hour-grid { overflow-x: auto; padding-bottom: 4px; }
  .analytics-trend-bars { grid-template-columns: repeat(14, 28px); }
  .analytics-hour-grid { grid-template-columns: repeat(24, 18px); }
  .analytics-day-table { overflow-x: auto; }
  .analytics-day-row { min-width: 720px; }
}
.quiz-live-qr-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; min-width: min(100%, 290px); padding: 10px; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 16px; background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.quiz-live-qr { width: 92px; height: 92px; border-radius: 12px; border: 6px solid #fff; background: #fff; }
.quiz-live-qr-card span, .quiz-live-qr-card small { display: block; color: rgba(255, 255, 255, 0.76); }
.quiz-live-qr-card strong { display: block; color: #fff; font-size: 34px; line-height: 1; letter-spacing: 0; }
.quiz-live-qr-card small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-feedback.pending strong { color: #1769ff; }
.quiz-winner-stage { background: radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.26), transparent 32%), radial-gradient(circle at 78% 24%, rgba(56, 189, 248, 0.24), transparent 30%), rgba(255, 255, 255, 0.18); }
.quiz-card, .quiz-card h3, .quiz-card p, .quiz-card-meta span { text-shadow: 0 1px 2px rgba(15, 23, 42, 0.26); }
.quiz-grid .quiz-card { border: 1px solid rgba(255, 255, 255, 0.34); color: #fff; background: linear-gradient(135deg, var(--quiz-a, #1769ff), var(--quiz-b, #22c55e)); box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.26); }
.quiz-grid .quiz-card h3, .quiz-grid .quiz-card p, .quiz-grid .quiz-card-meta span { color: #fff; }
.quiz-grid .quiz-card p, .quiz-grid .quiz-card-meta span { color: rgba(255, 255, 255, 0.9); }
.quiz-grid .quiz-card .quiz-code { border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; background: rgba(15, 23, 42, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.quiz-grid .quiz-card .badge, .quiz-grid .quiz-card .quiz-mini-rank { color: #0f172a; background: rgba(255, 255, 255, 0.9); text-shadow: none; }
.quiz-section-tabs { background: rgba(246, 250, 255, 0.88); }
.quiz-section-tabs button { color: #334155; }
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .app-shell, .app-shell.is-mounted { transform: none; }
  .mobile-tabbar { position: fixed; inset: auto max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); transform: translateZ(0); will-change: transform; z-index: 1000; contain: layout paint; }
  .quiz-live-qr-card { grid-template-columns: 76px minmax(0, 1fr); min-width: 0; }
  .quiz-live-qr { width: 76px; height: 76px; }
  .quiz-live-qr-card strong { font-size: 28px; }
}
@media (max-width: 760px) {
  .admin-analytics-panel, .admin-storage-tools, .storage-panel { gap: 10px; min-width: 0; }
  .admin-analytics-panel .card-head, .admin-storage-tools .card-head { align-items: stretch; gap: 10px; }
  .analytics-export-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .analytics-export-actions .tiny-btn, .analytics-export-actions .badge { width: 100%; justify-content: center; }
  .analytics-live-stats.compact-stats, .admin-analytics-panel .compact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-analytics-panel .stat { min-height: 72px; padding: 10px; }
  .admin-analytics-panel .stat strong { font-size: 20px; }
  .analytics-insight { align-items: flex-start; padding: 10px; }
  .analytics-insight strong, .analytics-insight span { min-width: 0; overflow-wrap: anywhere; }
  .analytics-grid, .analytics-breakdown-grid, .storage-summary { grid-template-columns: 1fr; }
  .analytics-today { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-trend, .analytics-hourly, .analytics-errors, .analytics-breakdown-card { padding: 10px; border-radius: 12px; }
  .analytics-bar-meta { align-items: flex-start; }
  .analytics-bar-meta span { white-space: normal; overflow-wrap: anywhere; }
  .analytics-path-row { grid-template-columns: 1fr auto; padding: 10px; }
  .analytics-path-row span { white-space: normal; overflow-wrap: anywhere; }
  .analytics-error-row { grid-template-columns: auto 1fr; gap: 6px 8px; }
  .analytics-error-row code, .analytics-error-row small { grid-column: 1 / -1; white-space: normal; overflow-wrap: anywhere; }
  .analytics-day-table { margin-inline: -2px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .analytics-day-row { min-width: 620px; grid-template-columns: 1.1fr repeat(7, minmax(46px, 0.7fr)); }
  .storage-user-list { max-height: 360px; }
  .storage-user-row { grid-template-columns: 1fr; align-items: stretch; }
  .storage-user-row .meta, .storage-user-row .actions { justify-content: flex-start; }
  .log-row { grid-template-columns: 1fr; gap: 4px; align-items: start; }
}
@media (max-width: 420px) {
  .analytics-export-actions { grid-template-columns: 1fr; }
  .analytics-live-stats.compact-stats, .admin-analytics-panel .compact-stats, .analytics-today { grid-template-columns: 1fr; }
}
:root { --primary: #1769ff; --primary-strong: #0f4fc8; --primary-soft: #edf5ff; --surface-bg: #f7f9fc; --surface-card: #ffffff; --surface-line: #e8edf5; --surface-line-strong: #d8e1ee; --text-main: #111827; --text-subtle: #667085; --radius-lg: 22px; --radius-md: 16px; --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.06); --shadow-focus: 0 0 0 4px rgba(23, 105, 255, 0.12); }
body { background: linear-gradient(180deg, #ffffff 0, var(--surface-bg) 260px), var(--surface-bg); color: var(--text-main); }
.container { width: min(1060px, calc(100% - 32px)); padding-top: 18px; }
.panel, .question-card, .answer-card, .notice-card, .note-command-panel, .home-today-panel, .home-guide-card, .stat, .today-card { border: 1px solid var(--surface-line); border-radius: var(--radius-lg); background: var(--surface-card); box-shadow: var(--shadow-card); }
.panel { padding: 18px; }
.section-title { align-items: end; margin: 4px 0 14px; }
.section-title h2, .compose-head h2, .detail-title h1 { color: #101828; letter-spacing: 0; }
.section-title h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.muted, .mini, .meta, .section-title p { color: var(--text-subtle); }
.primary, button.primary, .success, .submit-wide { border: 0; border-radius: 16px; background: linear-gradient(180deg, #2f7dff, var(--primary)); color: #fff; box-shadow: 0 12px 24px rgba(23, 105, 255, 0.22); font-weight: 950; }
.ghost, .small-button, .chip, .nav button { border-color: var(--surface-line-strong); border-radius: 14px; background: #fff; color: #344054; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); }
.ghost:hover, .small-button:hover, .chip:hover, .nav button:hover { border-color: rgba(23, 105, 255, 0.26); background: var(--primary-soft); color: var(--primary); }
.nav button.active, .chip.active, .choice-btn.active { border-color: rgba(23, 105, 255, 0.3); background: var(--primary-soft); color: var(--primary); }
.input, .select, .textarea { border: 1px solid var(--surface-line-strong); border-radius: 16px; background: #fff; color: var(--text-main); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.input:focus, .select:focus, .textarea:focus, .input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: rgba(23, 105, 255, 0.55); outline: none; box-shadow: var(--shadow-focus); }
.topbar { border-bottom: 1px solid rgba(232, 237, 245, 0.9); background: rgba(255, 255, 255, 0.88); box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04); }
.topbar-inner { width: min(1120px, calc(100% - 28px)); padding: 10px 0; }
.brand { min-width: 128px; border-radius: 16px; }
.brand img { width: 42px; height: 42px; }
.topbar-ask-cta { border: 0; border-radius: 16px; background: linear-gradient(180deg, #20bf6b, #079455); color: #fff; box-shadow: 0 12px 22px rgba(7, 148, 85, 0.22); }
.profile-pill { min-height: 42px; border: 1px solid var(--surface-line); border-radius: 999px; background: #fff; color: #1d2939; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06); }
.hero.simple-hero, .liquid-home-hero { display: grid; gap: 18px; padding: clamp(22px, 4vw, 38px); border: 1px solid rgba(23, 105, 255, 0.1); border-radius: 28px; background: radial-gradient(circle at 90% 12%, rgba(23, 105, 255, 0.12), transparent 32%), linear-gradient(180deg, #ffffff, #f4f8ff); box-shadow: 0 16px 44px rgba(23, 105, 255, 0.08); }
.hero-kicker, .eyebrow { color: var(--primary); font-weight: 950; }
.hero-copy h1 { max-width: 760px; margin: 8px 0; color: #101828; font-size: clamp(32px, 5.4vw, 56px); line-height: 1.05; }
.hero-copy p { max-width: 620px; margin: 0; color: #475467; font-size: clamp(15px, 2vw, 18px); line-height: 1.55; }
.home-primary-actions { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 12px; }
.jumbo-action { justify-content: flex-start; min-height: 88px; padding: 18px; border-radius: 22px; text-align: left; }
.jumbo-action strong, .today-card strong, .home-guide-card strong { color: inherit; font-size: 16px; }
.jumbo-action small, .today-card small, .home-guide-card small { display: block; margin-top: 3px; color: inherit; opacity: 0.72; line-height: 1.35; }
.home-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 2px; }
.home-today-panel, .home-guide-grid, .stats.compact-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.home-guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.today-card, .home-guide-card { justify-content: flex-start; min-height: 96px; padding: 16px; text-align: left; }
.primary-today { border-color: rgba(23, 105, 255, 0.24); background: var(--primary-soft); }
.guide-step { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 950; }
.question-index-title .primary { min-height: 46px; padding: 0 18px; }
.question-list, .answer-list, .notice-list { display: grid; gap: 12px; }
.question-card { display: grid; gap: 12px; padding: 18px; cursor: pointer; transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease; }
.question-card:hover { transform: translateY(-2px); border-color: rgba(23, 105, 255, 0.28); box-shadow: 0 18px 38px rgba(15, 23, 42, 0.09); }
.card-head { align-items: start; gap: 12px; }
.question-card h3, .answer-card h3, .notice-card strong { color: #101828; font-size: 17px; line-height: 1.35; }
.badge { border: 1px solid rgba(23, 105, 255, 0.1); border-radius: 999px; background: #f2f6ff; color: #175cd3; font-weight: 900; }
.badge.waiting, .badge.unsolved { background: #fff7ed; color: #c2410c; }
.badge.answered, .badge.reserved { background: #eff6ff; color: #1d4ed8; }
.badge.selected, .badge.resolved { background: #ecfdf3; color: #047857; }
.badges { gap: 6px; }
.meta { gap: 10px; font-size: 12px; }
.minimal-compose { max-width: 760px; margin: 0 auto; padding: clamp(18px, 3.5vw, 28px); }
.compose-head { display: grid; gap: 4px; }
.compose-head h2 { margin: 0; font-size: clamp(26px, 4vw, 36px); }
.compose-head span { color: var(--text-subtle); font-weight: 800; }
.choice-grid { gap: 8px; }
.choice-btn { min-height: 44px; border: 1px solid var(--surface-line-strong); border-radius: 14px; background: #fff; color: #344054; font-weight: 900; }
.course-choice { justify-content: flex-start; min-height: 66px; text-align: left; }
.ask-advanced-fields { border: 1px solid var(--surface-line); border-radius: 18px; background: #fbfdff; padding: 4px 12px 12px; }
.ask-advanced-fields summary { min-height: 50px; color: #344054; font-weight: 950; }
.compose-submit { min-height: 54px; font-size: 16px; }
.detail { display: grid; gap: 16px; max-width: 860px; margin: 0 auto; }
.detail > .ghost { justify-self: start; }
.detail-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.detail-title h1 { margin: 12px 0 8px; font-size: clamp(26px, 4vw, 40px); line-height: 1.16; }
.content-box { border: 1px solid var(--surface-line); border-radius: 18px; background: #fbfdff; color: #1f2937; line-height: 1.65; }
.answer-card { display: grid; gap: 12px; padding: 18px; border-left: 4px solid rgba(23, 105, 255, 0.38); }
.answer-card:has(.professional-badge), .answer-card:has(.badge.selected) { border-color: rgba(4, 120, 87, 0.42); background: linear-gradient(180deg, #ffffff, #f8fffb); }
.professional-badge { background: #ecfdf3; color: #047857; }
.answer-author-link { color: #101828; }
.note-command-panel { display: grid; grid-template-columns: repeat(4, minmax(86px, 0.45fr)) minmax(220px, 1fr); gap: 10px; align-items: center; padding: 14px; margin-bottom: 12px; }
.note-stat { border-radius: 16px; background: #f8fbff; }
.note-layout { grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr); }
.note-card { padding: 16px; border-color: var(--surface-line); transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease; }
.note-card.active-note { border-color: rgba(23, 105, 255, 0.45); background: linear-gradient(180deg, #ffffff, #f5f9ff); box-shadow: 0 14px 30px rgba(23, 105, 255, 0.1); }
.note-inspector { position: sticky; top: 86px; }
.note-title-edit { border: 1px solid var(--surface-line); border-radius: 18px; background: #fff; color: #101828; }
.tutor-dashboard .stat, .wordmaster-activity-panel, .rank-guide, .leaderboard-panel { border-radius: var(--radius-lg); }
.auth-wrap { background: radial-gradient(circle at 18% 10%, rgba(23, 105, 255, 0.08), transparent 30%), linear-gradient(180deg, #ffffff, #f7f9fc); }
.auth-card { border: 1px solid var(--surface-line); border-radius: 28px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1); }
.auth-card .tabs { border-radius: 18px; background: #f1f5fb; }
@media (max-width: 920px) {
  .home-primary-actions { grid-template-columns: 1fr 1fr; }
  .home-today-panel, .stats.compact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-command-panel, .note-layout, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .note-inspector { position: static; }
}
@media (max-width: 760px) {
  .app-shell { padding-bottom: 92px; }
  .container { width: min(100% - 28px, 520px); padding-top: 14px; }
  .topbar-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; }
  .brand { min-width: 0; }
  .brand img { width: 38px; height: 38px; }
  .primary-nav { grid-column: 1 / -1; order: 3; padding-bottom: 2px; }
  .primary-nav button { min-height: 40px; padding: 0 12px; }
  .topbar-right { justify-content: end; min-width: 0; }
  .topbar-actions .topbar-mini span, .account .hide-mobile, .account-label { display: none; }
  .profile-pill { width: 44px; min-width: 44px; padding: 0; }
  .hero.simple-hero, .liquid-home-hero { padding: 22px; border-radius: 26px; }
  .hero-copy h1 { font-size: 34px; }
  .home-primary-actions, .home-guide-grid, .home-search-row { grid-template-columns: 1fr; }
  .jumbo-action { min-height: 74px; }
  .home-today-panel { grid-template-columns: 1fr; }
  .section-title { align-items: start; gap: 10px; }
  .section-title > .primary, .question-index-title .primary { width: 100%; }
  .question-card, .answer-card, .panel { padding: 16px; }
  .question-card .card-head, .detail-title { grid-template-columns: 1fr; }
  .question-card h3 { font-size: 16px; }
  .badges { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .badges::-webkit-scrollbar { display: none; }
  .minimal-compose { padding: 18px; }
  .simple-category-grid, .grade-grid, .answer-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-grid, .unit-grid { grid-template-columns: 1fr; }
  .note-command-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-command-search { grid-column: 1 / -1; }
  .auth-card { border-radius: 24px; }
}
:root { --app-bg-clean: #f8fafc; --app-blue: #1b64da; --app-blue-soft: #eef5ff; --app-text: #191f28; --app-subtext: #6b7684; --app-border: #edf1f5; --app-card-shadow: 0 8px 22px rgba(25, 31, 40, 0.045); }
body { background: var(--app-bg-clean); }
.container { width: min(1040px, calc(100% - 40px)); }
.topbar { border-bottom: 1px solid rgba(237, 241, 245, 0.92); background: rgba(255, 255, 255, 0.94); box-shadow: none; }
.topbar-inner { min-height: 68px; }
.brand { gap: 9px; min-height: 48px; color: var(--app-text); }
.brand-title { font-size: 16px; font-weight: 950; }
.primary-nav { padding: 4px; border-radius: 18px; background: #f3f6fa; }
.primary-nav button { min-height: 42px; border: 0; border-radius: 14px; background: transparent; box-shadow: none; color: #4e5968; }
.primary-nav button.active { background: #fff; color: var(--app-text); box-shadow: 0 4px 14px rgba(25, 31, 40, 0.08); }
.topbar-ask-cta { min-height: 44px; padding: 0 16px; border-radius: 14px; background: var(--app-blue); box-shadow: 0 8px 18px rgba(27, 100, 218, 0.22); }
.topbar-mini { min-height: 40px; border: 0; background: #f3f6fa; box-shadow: none; }
.profile-pill { border: 0; background: #f3f6fa; box-shadow: none; }
.hero.simple-hero, .liquid-home-hero { position: relative; gap: 22px; padding: clamp(28px, 6vw, 58px) 0 18px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.hero-kicker { display: inline-flex; width: fit-content; align-items: center; padding: 7px 11px; border-radius: 999px; background: var(--app-blue-soft); color: var(--app-blue); font-size: 13px; }
.hero-copy h1 { max-width: 680px; margin: 12px 0 10px; color: var(--app-text); font-size: clamp(38px, 6vw, 68px); font-weight: 950; line-height: 1.02; word-break: keep-all; }
.hero-copy p { max-width: 520px; color: var(--app-subtext); font-size: 18px; line-height: 1.55; word-break: keep-all; }
.home-primary-actions { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.85fr)); gap: 10px; max-width: 980px; }
.home-primary-actions .jumbo-action { min-height: 76px; border: 0; border-radius: 22px; background: #fff; color: var(--app-text); box-shadow: var(--app-card-shadow); }
.home-primary-actions .jumbo-action:first-child { min-height: 112px; padding: 24px; background: var(--app-blue); color: #fff; box-shadow: 0 18px 36px rgba(27, 100, 218, 0.25); }
.home-primary-actions .jumbo-action:first-child .icon { width: 28px; height: 28px; }
.home-primary-actions .jumbo-action:not(:first-child) { align-content: start; }
.home-primary-actions .jumbo-action:not(:first-child) .icon { width: 18px; height: 18px; color: var(--app-blue); }
.jumbo-action strong { font-size: 17px; letter-spacing: 0; }
.jumbo-action small { font-size: 12px; }
.home-search-row { max-width: 680px; padding: 8px; border: 1px solid var(--app-border); border-radius: 20px; background: #fff; box-shadow: var(--app-card-shadow); }
.home-search-row .input { border: 0; box-shadow: none; }
.home-search-row .primary { min-width: 96px; border-radius: 14px; background: var(--app-blue); box-shadow: none; }
.home-guide-grid { display: none; }
.home-today-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 10px 0 18px; }
.today-card { min-height: 74px; border: 0; border-radius: 20px; box-shadow: none; background: #fff; }
.today-card.primary-today { background: var(--app-blue-soft); color: var(--app-blue); }
.stats.compact-stats { gap: 10px; }
.stats.compact-stats .stat { min-height: 76px; border: 0; box-shadow: none; background: #fff; }
.section-title { margin-top: 24px; }
.section-title h2 { color: var(--app-text); font-size: clamp(24px, 3.4vw, 34px); font-weight: 950; }
.panel.form { border: 0; box-shadow: none; background: transparent; padding: 0; }
.panel.form > .input, .panel.form > .split, .panel.form > .chips { margin-bottom: 10px; }
.question-card { position: relative; gap: 10px; padding: 20px; border: 0; border-radius: 22px; background: #fff; box-shadow: var(--app-card-shadow); }
.question-card::after { content: ""; position: absolute; inset: auto 20px 0; height: 1px; background: transparent; }
.question-card h3 { color: var(--app-text); font-size: 18px; font-weight: 900; word-break: keep-all; }
.question-card .badge { font-size: 11px; font-weight: 900; }
.question-card .badges .badge:nth-child(n+3) { background: #f7f8fa; color: #6b7684; }
.question-card .meta { padding-top: 2px; color: #8b95a1; }
.minimal-compose { max-width: 720px; border: 0; background: transparent; box-shadow: none; }
.minimal-compose .field-block, .minimal-compose .compose-textarea, .minimal-compose .ask-advanced-fields { margin-top: 12px; }
.compose-head { margin-bottom: 10px; }
.compose-head h2 { color: var(--app-text); font-size: clamp(34px, 6vw, 48px); font-weight: 950; }
.compose-head span { color: var(--app-subtext); }
.choice-btn { border: 0; border-radius: 16px; background: #fff; box-shadow: none; }
.choice-btn.active { background: var(--app-blue-soft); color: var(--app-blue); box-shadow: inset 0 0 0 1px rgba(27, 100, 218, 0.16); }
.compose-textarea { min-height: 180px; padding: 18px; border: 0; border-radius: 22px; box-shadow: var(--app-card-shadow); font-size: 16px; }
.ask-advanced-fields { border: 0; background: #fff; box-shadow: var(--app-card-shadow); }
.compose-submit { min-height: 58px; border-radius: 18px; background: var(--app-blue); box-shadow: 0 14px 28px rgba(27, 100, 218, 0.24); }
.detail { max-width: 820px; }
.detail > .panel, .answer-card { border: 0; background: #fff; box-shadow: var(--app-card-shadow); }
.detail-title h1 { color: var(--app-text); font-weight: 950; word-break: keep-all; }
.content-box { border: 0; background: #f8fafc; }
.answer-card { border-left: 0; }
.answer-card .card-head { padding-bottom: 8px; border-bottom: 1px solid var(--app-border); }
.answer-card:has(.professional-badge), .answer-card:has(.badge.selected) { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 180, 120, 0.14), var(--app-card-shadow); }
.note-command-panel, .note-card, .note-inspector { border: 0; background: #fff; box-shadow: var(--app-card-shadow); }
.note-command-panel { border-radius: 24px; }
.note-stat { background: #f8fafc; }
.note-card.active-note { background: var(--app-blue-soft); box-shadow: inset 0 0 0 1px rgba(27, 100, 218, 0.18); }
.auth-card { border: 0; box-shadow: 0 24px 80px rgba(25, 31, 40, 0.12); }
@media (max-width: 760px) {
  .container { width: min(100% - 32px, 480px); }
  .topbar-inner { display: flex; min-height: 60px; }
  .topbar .primary-nav { display: none; }
  .topbar-actions .topbar-mini, .topbar .account .ghost { display: none; }
  .topbar-ask-cta { min-width: 44px; padding: 0 12px; }
  .topbar-ask-cta span { display: none; }
  .hero.simple-hero, .liquid-home-hero { padding: 18px 0 8px; }
  .hero-copy h1 { max-width: 320px; font-size: 38px; line-height: 1.04; }
  .hero-copy p { max-width: 330px; font-size: 15px; }
  .home-primary-actions { grid-template-columns: 1fr; gap: 8px; }
  .home-primary-actions .jumbo-action:first-child { min-height: 96px; }
  .home-primary-actions .jumbo-action:not(:first-child) { min-height: 54px; padding: 14px 16px; }
  .home-primary-actions .jumbo-action:not(:first-child) small { display: none; }
  .home-search-row { grid-template-columns: 1fr; padding: 10px; }
  .home-search-row .primary { width: 100%; }
  .home-today-panel, .stats.compact-stats { grid-template-columns: 1fr 1fr; }
  .today-card, .stats.compact-stats .stat { min-height: 64px; padding: 13px; }
  .question-index-title { gap: 12px; }
  .question-index-title .primary { width: auto; min-width: 132px; }
  .question-card { padding: 18px; }
  .question-card .badges .badge:nth-child(n+4) { display: none; }
  .question-card .meta span:nth-child(n+4) { display: none; }
  .compose-head h2 { font-size: 38px; }
  .compose-textarea { min-height: 170px; }
  .note-command-panel { grid-template-columns: 1fr 1fr; }
  .mobile-tabbar { border: 1px solid rgba(237, 241, 245, 0.92); border-radius: 24px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 18px 40px rgba(25, 31, 40, 0.14); backdrop-filter: blur(18px); }
  .mobile-tabbar button { border-radius: 18px; background: transparent; box-shadow: none; color: #8b95a1; }
  .mobile-tabbar button.active { background: var(--app-blue-soft); color: var(--app-blue); }
}
.icon { display: block; flex: 0 0 auto; width: 18px; height: 18px; box-shadow: none; vertical-align: middle; }
button, .primary, .ghost, .small-button, .chip, .badge, .topbar-mini, .topbar-ask-cta, .profile-pill, .quiz-card-actions button, .quiz-live-control-row button, .quiz-section-tabs button, .notification-read-button { align-items: center; line-height: 1.05; }
.primary, button.primary, .ghost, .small-button, .chip, .topbar-mini, .topbar-ask-cta, .profile-pill, .notification-read-button { display: inline-flex; justify-content: center; gap: 7px; }
.badge .icon, .chip .icon, .primary .icon, .ghost .icon, .small-button .icon, .topbar-mini .icon, .topbar-ask-cta .icon, .profile-pill .icon, .notification-read-button .icon, .quiz-card-meta .icon { width: 16px; height: 16px; }
.icon-ghost { width: 40px; min-width: 40px; padding: 0; }
.quiz-section-tabs button { display: inline-flex; justify-content: center; min-width: 0; gap: 7px; }
.quiz-code-entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 460px); gap: 18px; align-items: center; margin-top: 16px; border: 1px solid rgba(23, 105, 255, 0.1); background: linear-gradient(135deg, #ffffff, #f4f8ff); }
.quiz-code-entry h2, .quiz-code-entry p, .quiz-code-entry .hero-kicker { color: #101828; }
.quiz-code-form { display: flex; gap: 10px; align-items: center; }
.quiz-code-input { min-height: 52px; font-size: 17px; font-weight: 900; text-transform: uppercase; }
.quiz-grid .quiz-card, .quiz-card { border: 1px solid rgba(255, 255, 255, 0.36); color: #fff; background: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.28), transparent 34%), linear-gradient(135deg, var(--quiz-a, #1769ff), var(--quiz-b, #22c55e)); box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.26); }
.quiz-grid .quiz-card h3, .quiz-grid .quiz-card p, .quiz-grid .quiz-card-meta span, .quiz-card h3, .quiz-card p, .quiz-card-meta span { color: #fff; }
.quiz-grid .quiz-card p, .quiz-card p, .quiz-card-meta span { color: rgba(255, 255, 255, 0.9); }
.quiz-card .quiz-code { border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; background: rgba(15, 23, 42, 0.22); text-shadow: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.quiz-card .badge, .quiz-grid .quiz-card .badge { border: 1px solid rgba(255, 255, 255, 0.72); color: #0f172a; background: rgba(255, 255, 255, 0.92); text-shadow: none; }
.quiz-mini-rank { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 40px; border: 1px solid rgba(255, 255, 255, 0.7); color: #101828; background: rgba(255, 255, 255, 0.94); text-shadow: none; }
.quiz-mini-rank strong, .quiz-mini-rank span { color: #101828; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-leaderboard.panel, .quiz-review.panel, .quiz-live-stage.panel { border: 1px solid rgba(208, 213, 221, 0.92); color: #101828; background: #fff; box-shadow: 0 14px 34px rgba(16, 24, 40, 0.08); }
.quiz-leaderboard .section-title { align-items: center; margin-bottom: 12px; }
.quiz-leaderboard .section-title h2, .quiz-review .section-title h2, .quiz-live-stage .section-title h2 { color: #101828; font-size: 22px; }
.quiz-leaderboard .muted, .quiz-review .muted, .quiz-live-stage .muted { color: #667085; }
.quiz-rank-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; min-height: 48px; margin-top: 8px; padding: 9px 10px; border: 1px solid #eef2f7; border-radius: 14px; background: #f8fafc; }
.quiz-rank-row strong { color: #fff; background: #1769ff; box-shadow: 0 6px 14px rgba(23, 105, 255, 0.18); }
.quiz-rank-row span { min-width: 0; overflow: hidden; color: #101828; text-overflow: ellipsis; white-space: nowrap; font-weight: 850; }
.quiz-rank-row b { color: #175cd3; white-space: nowrap; }
.quiz-leaderboard .empty, .quiz-grid .empty { border-color: #d0d5dd; color: #475467; background: #f8fafc; }
.quiz-review-item { background: #fff; }
.quiz-review-head strong, .quiz-review-item p { color: #101828; }
.quiz-review-answers span { color: #475467; }
.quiz-answer { align-items: center; line-height: 1.2; }
.quiz-answer span { flex: 0 0 auto; }
.quiz-feedback { border: 1px solid rgba(208, 213, 221, 0.88); color: #101828; box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1); }
.quiz-feedback span, .quiz-feedback p { color: #344054; }
.toast { border: 1px solid rgba(208, 213, 221, 0.92); color: #101828; background: rgba(255, 255, 255, 0.98); }
@media (max-width: 760px) {
  .quiz-code-entry { grid-template-columns: 1fr; }
  .quiz-code-form { flex-direction: column; align-items: stretch; }
  .quiz-section-tabs { display: grid; grid-template-columns: 1fr; }
  .quiz-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-card-actions button { width: 100%; min-width: 0; }
  .quiz-rank-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .mobile-tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 6px; }
  .mobile-tabbar button { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 54px; padding: 6px 2px; gap: 3px; line-height: 1.05; }
  .mobile-tabbar button .icon { width: 19px; height: 19px; }
  .mobile-tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
}
.topbar .brand { overflow: visible; }
.topbar .brand-icons { flex: 0 0 46px; }
.topbar .brand-title { width: clamp(96px, 9vw, 128px); min-width: 0; line-height: 1.05; }
.topbar .brand-title-main, .topbar .brand-title-school { overflow: hidden; text-overflow: ellipsis; }
.primary-nav button, .topbar-mini, .topbar-ask-cta, .profile-pill { min-width: 0; height: 42px; }
.primary-nav button { padding: 0 13px; }
.primary-nav button .icon, .topbar-mini .icon, .topbar-ask-cta .icon, .profile-pill .icon { width: 17px; height: 17px; }
.primary-nav button span, .topbar-mini span, .topbar-ask-cta span, .profile-pill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list, .rank-guide, .study-leaderboard, .event-rank-list { border-radius: 18px; }
.ranking-row, .rank-row, .study-rank, .event-rank, .reward-preview { border: 1px solid #edf2f7; border-radius: 14px; background: #fff; box-shadow: 0 6px 16px rgba(16, 24, 40, 0.04); }
.ranking-row, .rank-row { padding: 10px 12px; }
.ranking-row > strong, .rank-no { width: 30px; height: 30px; border-radius: 11px; color: #175cd3; background: #eff6ff; box-shadow: inset 0 0 0 1px rgba(23, 105, 255, 0.12); }
.ranking-name, .study-rank strong, .event-rank strong { min-width: 0; overflow: hidden; color: #101828; text-overflow: ellipsis; white-space: nowrap; }
.ranking-row .badges, .study-rank .badges { min-width: 0; }
.ranking-row:nth-child(1), .event-rank-list .event-rank:nth-child(1), .study-leaderboard .study-rank:nth-child(2), .quiz-leaderboard .quiz-rank-row:nth-of-type(2) { border-color: rgba(245, 158, 11, 0.34); background: linear-gradient(135deg, #fff7db, #ffffff 60%); box-shadow: 0 12px 24px rgba(245, 158, 11, 0.1); }
.ranking-row:nth-child(1) > strong, .event-rank-list .event-rank:nth-child(1) .rank-no, .study-leaderboard .study-rank:nth-child(2) .rank-no, .quiz-leaderboard .quiz-rank-row:nth-of-type(2) strong { color: #78350f; background: linear-gradient(180deg, #fde68a, #f59e0b); box-shadow: 0 8px 16px rgba(245, 158, 11, 0.22); }
.quiz-leaderboard .quiz-rank-row:nth-of-type(3), .event-rank-list .event-rank:nth-child(2), .study-leaderboard .study-rank:nth-child(3) { border-color: rgba(148, 163, 184, 0.34); background: linear-gradient(135deg, #f8fafc, #ffffff 62%); }
.quiz-leaderboard .quiz-rank-row:nth-of-type(4), .event-rank-list .event-rank:nth-child(3), .study-leaderboard .study-rank:nth-child(4) { border-color: rgba(180, 83, 9, 0.22); background: linear-gradient(135deg, #fff7ed, #ffffff 62%); }
.quiz-leaderboard .quiz-rank-row { transition: transform 0.14s ease, box-shadow 0.14s ease; }
.quiz-leaderboard .quiz-rank-row:hover, .ranking-row:hover, .study-rank:hover, .event-rank:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08); }
.quiz-card-actions .primary, .quiz-card-actions .ghost, .quiz-card-actions .danger { min-height: 38px; border-radius: 12px; padding: 0 11px; font-size: 12px; }
.quiz-card-actions .ghost { border-color: rgba(255, 255, 255, 0.42); color: #101828; background: rgba(255, 255, 255, 0.9); box-shadow: none; }
.quiz-card-actions .danger { color: #fff; background: #ef4444; }
.quiz-live-head { align-items: center; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 18px 44px rgba(23, 105, 255, 0.18); }
.quiz-live-actions { justify-content: flex-end; }
.quiz-live-actions .ghost { color: #101828; background: rgba(255, 255, 255, 0.94); }
.quiz-live-qr-card { border-color: rgba(255, 255, 255, 0.42); background: rgba(255, 255, 255, 0.2); }
.quiz-live-stage .quiz-question-stage { border: 1px solid #edf2f7; color: #101828; background: linear-gradient(180deg, #f8fbff, #ffffff); }
.quiz-live-stage .quiz-question-stage h1, .quiz-live-stage .quiz-help { color: #101828; }
.quiz-live-stage .quiz-progress, .quiz-live-stage .quiz-timer { background: #e9eef7; }
.quiz-live-stage .quiz-progress span, .quiz-live-stage .quiz-timer span { background: #1769ff; }
.quiz-start .quiz-leaderboard, .quiz-result .quiz-leaderboard { align-self: stretch; }
.quiz-start-card, .quiz-result-card { border-color: rgba(255, 255, 255, 0.42); }
.quiz-code, .quiz-stage-code { display: inline-flex; align-items: center; min-height: 30px; line-height: 1; }
.empty { min-height: 52px; display: grid; place-items: center; color: #667085; text-align: center; }
@media (max-width: 1180px) and (min-width: 761px) {
  .primary-nav button { padding: 0 10px; }
  .topbar .brand-title { width: 100px; }
}
@media (max-width: 920px) and (min-width: 761px) {
  .topbar .brand { width: 74px; min-width: 74px; max-width: 74px; }
  .topbar .brand-title { display: none; }
  .topbar .brand-icons { flex-basis: 44px; }
}
@media (max-width: 760px) {
  .quiz-live-head { align-items: stretch; }
  .quiz-live-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ranking-row, .rank-row, .study-rank, .event-rank { min-width: 0; }
}
@media (max-width: 760px) {
  .topbar .account .mobile-logout-button { display: inline-flex; width: auto; min-width: 86px; height: 42px; min-height: 42px; padding: 0 12px; gap: 6px; border-radius: 14px; background: #fff; color: #1d2939; border: 1px solid #d0d5dd; }
  .topbar .account .mobile-logout-button span { display: inline; font-size: 13px; font-weight: 900; }
  .topbar .account .mobile-logout-button .icon { width: 17px; height: 17px; }
}

/* WT compact design stabilization layer: based on WCAG target/focus guidance and 8px spacing rhythm. */
:root { --focus-ring: 0 0 0 4px rgba(23, 105, 255, 0.18); --radius-xs: 8px; --radius-sm: 12px; --radius-md: 16px; --radius-lg: 22px; --radius-xl: 28px; --safe-bottom: env(safe-area-inset-bottom, 0px); }
html, body { width: 100%; min-height: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { line-height: 1.5; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,248,251,.98) 360px), var(--bg); }
button { touch-action: manipulation; }
img, svg, canvas, video, iframe { max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; box-shadow: var(--focus-ring); }
.primary, button.primary, .ghost, .small-button, .danger, .success, .chip, .media-button, .notification-read-button, .profile-pill, .topbar-mini, .topbar-ask-cta { min-height: 44px; border-radius: 14px; }
.primary:active, .ghost:active, .small-button:active, .danger:active, .success:active, .chip:active, .profile-pill:active, .mobile-tabbar button:active { transform: translateY(1px); }
.input, .select, .textarea, .searchbox, .search-field, .titleless-input, .blog-body, .big-input, .mini-input, .compact-select, .note-title-input { min-width: 0; max-width: 100%; min-height: 46px; border-radius: 14px; }
.input:focus, .select:focus, .textarea:focus, .searchbox:focus-within, .search-field:focus-within, .titleless-input:focus, .blog-body:focus { border-color: var(--blue); box-shadow: var(--focus-ring); }
.panel, .question-card, .answer-card, .notice-card, .community-post-card, .quiz-card, .study-timer-card, .community-study-room, .profile-cover, .auth-card { max-width: 100%; min-width: 0; border-radius: var(--radius-lg); }
.panel > *, .question-card > *, .answer-card > *, .notice-card > *, .community-post-card > *, .quiz-card > *, .study-timer-card > *, .community-study-room > *, .profile-cover > * { min-width: 0; }
.section-title h1, .section-title h2, .card-head h2, .detail-title h1, .question-card h3, .community-post-card h3, .notice-card strong, .quiz-card h3, .hero h1, .quiz-hero h1, .quiz-question-stage h1 { word-break: keep-all; overflow-wrap: break-word; letter-spacing: 0; }
.content-box { overflow-wrap: anywhere; white-space: pre-wrap; }
.topbar { z-index: 80; background: rgba(255,255,255,.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.topbar-inner { display: grid; grid-template-columns: minmax(170px, 210px) minmax(340px, 1fr) minmax(154px, auto); align-items: center; gap: 12px; width: min(1180px, calc(100% - 28px)); }
.topbar .brand { min-width: 0; width: auto; border-radius: var(--radius-md); overflow: hidden; }
.brand-icons { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; }
.brand-logo { grid-area: 1 / 1; width: 42px; height: 42px; object-fit: contain; }
.brand-title { min-width: 0; max-width: 138px; overflow: hidden; }
.nav, .primary-nav, .space-tabs, .feed-tab-row, .community-section-tabs, .quiz-section-tabs { min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.nav::-webkit-scrollbar, .primary-nav::-webkit-scrollbar, .space-tabs::-webkit-scrollbar, .feed-tab-row::-webkit-scrollbar, .mobile-tabbar::-webkit-scrollbar { display: none; }
.nav button, .primary-nav button { min-height: 40px; border-radius: 14px; }
.topbar-right, .topbar-actions, .account { min-width: 0; }
.profile-pill { max-width: min(214px, 24vw); border-radius: 999px; }
.profile-pill .account-label, .primary-nav button span, .topbar-mini span, .topbar-ask-cta span, .mobile-tabbar button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero, .simple-hero, .liquid-home-hero, .quiz-hero { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(300px, 420px); gap: 18px; align-items: center; overflow: hidden; border-radius: var(--radius-xl); }
.hero-copy, .quiz-hero-copy { min-width: 0; }
.home-actions, .home-primary-actions, .quiz-hero-actions { display: grid; gap: 10px; width: 100%; min-width: 0; }
.jumbo-action { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: flex-start; }
.jumbo-action > span, .today-card > span { display: grid; gap: 2px; min-width: 0; }
.jumbo-action strong, .jumbo-action small, .today-card strong, .today-card small { min-width: 0; white-space: normal; word-break: keep-all; overflow-wrap: break-word; }
.community-shell { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 18px; align-items: start; }
.community-left-rail { min-width: 0; max-width: 100%; position: sticky; top: 88px; overflow: hidden; }
.community-main-panel, .community-control-panel, .community-create-menu, .community-customize, .join-request-box { min-width: 0; }
.community-control-panel { overflow: hidden; }
.community-control-head, .community-search-row { display: grid; grid-template-columns: 1fr; gap: 12px; min-width: 0; }
.community-search-row .searchbox, .community-search-row .compact-tabs { min-width: 0; max-width: 100%; }
.community-board { min-width: 0; border-radius: var(--radius-md); }
.community-create-menu > summary { width: 100%; min-width: 0; }
.profile-page { width: min(1080px, 100%); margin-inline: auto; }
.profile-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 18px; align-items: center; }
.profile-identity { min-width: 0; }
.profile-identity p { word-break: keep-all; overflow-wrap: break-word; }
.profile-cover-actions { display: flex; grid-column: 1 / -1; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.profile-shortcut-grid { display: none; }
.mobile-tabbar { position: fixed; right: max(10px, env(safe-area-inset-right)); bottom: max(10px, var(--safe-bottom)); left: max(10px, env(safe-area-inset-left)); z-index: 90; grid-auto-columns: minmax(0, 1fr); border-radius: 24px; overflow: hidden; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.mobile-tabbar button { min-width: 0; min-height: 50px; border-radius: 18px; }
.wordmaster-jump { display: grid; grid-template-columns: minmax(160px, 240px) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.wordmaster-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(106px, 1fr)); max-height: 280px; overflow: auto; padding: 4px; }
@media (max-width: 1280px) { .community-shell { grid-template-columns: 1fr; } .community-left-rail { position: static; } .community-board-row, .enhanced-board-list, .community-list-row { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 1180px) { .topbar-inner { grid-template-columns: 58px minmax(0, 1fr) minmax(120px, auto); } .topbar .brand { justify-content: center; width: 54px; padding-inline: 5px; } .brand-title { display: none; } .primary-nav { justify-content: flex-start; } }
@media (max-width: 860px) { .topbar-inner { grid-template-columns: 54px minmax(0, 1fr) auto; width: min(100% - 18px, 100%); gap: 8px; } .primary-nav { grid-column: 1 / -1; order: 3; } .topbar-right { max-width: 48vw; } .topbar-actions { max-width: 30vw; } .topbar-mini span, .topbar-ask-cta span, .mobile-logout-button span { display: none; } .topbar-mini, .topbar-ask-cta, .mobile-logout-button { width: 40px; padding-inline: 0; } .grid.two, .grid.three, .home-notice-panel, .study-room-grid, .visual-study-grid, .quiz-live-grid, .quiz-start, .quiz-result, .volley-host-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { body { padding-bottom: calc(92px + var(--safe-bottom)); } .app-shell { padding-bottom: calc(112px + var(--safe-bottom)); } .topbar-inner { grid-template-columns: 54px minmax(0, 1fr); padding: 8px 0 7px; } .primary-nav { display: none; } .topbar-right { grid-column: 2; justify-self: end; max-width: none; } .container { width: min(100% - 20px, 100%); padding-top: 12px; } .profile-pill { width: 42px; max-width: 42px; padding: 4px; } .profile-pill .account-label { display: none; } .panel, .question-card, .answer-card, .notice-card, .community-post-card, .quiz-card, .study-timer-card, .community-study-room { border-radius: 18px; padding: 15px; } .section-title, .card-head, .detail-title, .study-room-head, .quiz-live-head { align-items: stretch; flex-direction: column; } .section-title > button, .section-title > .primary, .section-title > .ghost, .card-head > button, .study-room-head-actions > *, .community-hero-actions > *, .quiz-toolbar-actions > * { width: 100%; } .hero, .simple-hero, .liquid-home-hero, .quiz-hero, .community-hero, .site-event-banner, .profile-cover, .quiz-code-entry, .quiz-editor-grid, .split, .inline-fields, .note-command-panel, .note-command-search { grid-template-columns: 1fr; } .hero h1, .quiz-hero h1 { font-size: clamp(34px, 9vw, 44px); line-height: 1.12; } .hero-copy p, .quiz-hero-copy p { font-size: 16px; } .search-row, .home-search-row, .quiz-code-form, .wordmaster-jump { grid-template-columns: 1fr; align-items: stretch; } .profile-identity { align-items: flex-start; } .profile-avatar-xl { width: 66px; height: 66px; flex-basis: 66px; border-radius: 21px; } .profile-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .profile-stat-grid div { padding: 8px 4px; } .profile-stat-grid strong { font-size: 17px; } .profile-stat-grid span { font-size: 10.5px; } .profile-cover-actions { justify-content: stretch; } .profile-cover-actions > * { flex: 1 1 140px; } .quiz-answer-grid, .quiz-card-actions { grid-template-columns: 1fr; } .seat-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } }
@media (max-width: 460px) { .topbar-actions { max-width: 40px; } .topbar-ask-cta:not(.active) { display: none; } .profile-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mobile-tabbar { right: max(8px, env(safe-area-inset-right)); left: max(8px, env(safe-area-inset-left)); padding: 6px; } }

/* Requested detail fixes: equal mobile tab width and cleaner desktop profile surface. */
body::before { content: none; }
.profile-cover { border: 0; outline: 0; background: linear-gradient(180deg, #fff, #f8fbff); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06); }
.profile-cover .meta { gap: 8px; }
.profile-cover .meta span::before, .profile-cover .meta span::after { content: none; display: none; }
.profile-identity p:empty { display: none; }
@media (min-width: 761px) {
  .profile-cover { border-radius: 24px; }
}
@media (max-width: 760px) {
  .mobile-tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .mobile-tabbar button { width: 100%; }
}

/* Detail pass: remove duplicated profile actions and keep CTA/cards from clipping or stretching. */
.hero,
.simple-hero,
.liquid-home-hero,
.quiz-hero { overflow: visible; }

.topbar-ask-cta {
  min-width: 124px;
  padding-inline: 18px;
  overflow: visible;
}

.topbar-ask-cta span {
  display: inline-block;
  max-width: none;
}

.topbar-right,
.topbar-actions,
.account,
.home-primary-actions,
.profile-tabs,
.profile-activity-grid,
.profile-section-card { overflow: visible; }

.home-primary-actions {
  align-self: center;
  grid-template-columns: 1fr;
  max-width: 420px;
}

.home-primary-actions .jumbo-action,
.home-primary-actions .jumbo-action:first-child,
.home-primary-actions .jumbo-action:not(:first-child) {
  min-height: 64px;
  align-content: center;
  padding: 16px 18px;
}

.home-primary-actions .jumbo-action:first-child { min-height: 92px; }
.jumbo-action strong { white-space: nowrap; }
.jumbo-action small { line-height: 1.35; }

.profile-cover {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  align-items: center;
}

.profile-activity-grid .trophy-mini-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-activity-grid .trophy-card {
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 76px;
  padding: 10px;
  border-radius: 14px;
}

.profile-activity-grid .trophy-art {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.profile-activity-grid .trophy-svg {
  width: 42px;
  height: 42px;
}

.profile-activity-grid .trophy-card p {
  margin-block: 2px;
  -webkit-line-clamp: 1;
}

.primary,
.ghost,
.small-button,
.chip,
.topbar-ask-cta,
.topbar-mini,
.profile-pill,
.jumbo-action {
  flex-shrink: 0;
  line-height: 1.2;
}

@media (min-width: 761px) and (max-width: 1180px) {
  .topbar-ask-cta {
    width: auto;
    min-width: 112px;
    padding-inline: 14px;
  }

  .topbar-ask-cta span { display: inline-block; }
}

@media (max-width: 920px) {
  .hero,
  .simple-hero,
  .liquid-home-hero,
  .quiz-hero { grid-template-columns: 1fr; }

  .home-primary-actions { max-width: none; }
}

@media (max-width: 760px) {
  .jumbo-action strong { white-space: normal; }
  .profile-cover { grid-template-columns: 1fr; }
  .profile-activity-grid .trophy-mini-row { grid-template-columns: 1fr; }
}

/* Community usability pass: clearer split layout, simpler post meta, tighter controls. */
.community-modern.cafe-layout {
  width: min(1160px, 100%);
}

.community-modern .compose-head {
  align-items: center;
  border-bottom: 0;
  padding-bottom: 4px;
}

.community-modern .compose-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.community-shell {
  gap: 18px;
  align-items: start;
}

.community-left-rail .community-control-panel {
  border: 1px solid var(--surface-line, #e8edf5);
  border-radius: 22px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.community-control-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.community-control-head h3 {
  margin: 0;
  font-size: 16px;
}

.community-control-head p {
  display: none;
}

.community-create-menu > summary {
  min-height: 40px;
  border-radius: 14px;
  padding-inline: 14px;
}

.community-search-row {
  gap: 10px;
}

.community-left-rail .compact-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
}

.community-left-rail .compact-tabs .chip {
  min-width: 0;
  min-height: 34px;
  justify-content: center;
  padding-inline: 8px;
  font-size: 12px;
}

.community-left-rail .enhanced-board-list {
  gap: 8px;
  padding: 2px 2px 4px;
}

.community-left-rail .community-board {
  min-height: 60px;
  border-left-width: 0;
  border-radius: 18px;
  padding: 10px;
}

.community-left-rail .community-board.active {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--board-color, var(--blue)) 24%, transparent);
}

.board-type-icon {
  border-radius: 14px;
}

.board-stat {
  min-width: 44px;
  padding-left: 4px;
}

.community-main-panel {
  gap: 14px;
}

.community-hero {
  min-height: 118px;
  border: 1px solid color-mix(in srgb, var(--community-color, var(--blue)) 16%, #e8edf5);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, color-mix(in srgb, var(--community-color, var(--blue)) 6%, #fff) 100%);
  padding: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.community-hero h1 {
  font-size: clamp(24px, 3vw, 32px);
}

.community-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.community-section-tabs {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
  border: 0;
  border-radius: 20px;
  background: #f3f6fa;
  padding: 6px;
}

.community-section-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  box-shadow: none;
}

.community-section-tabs button.active {
  background: #fff;
  color: var(--app-text, #191f28);
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08);
}

.feed-tab-panel {
  border: 0;
  border-radius: 18px;
  background: #fff;
  padding: 8px 10px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.community-feed {
  display: grid;
  gap: 10px;
}

.community-post-card {
  border: 1px solid var(--surface-line, #e8edf5);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.community-post-card .card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.community-post-card .post-author-avatar {
  align-self: start;
}

.community-post-meta {
  justify-content: flex-start;
}

.community-post-meta .author-link,
.community-post-meta .mini-avatar {
  display: none;
}

@media (min-width: 1024px) {
  .community-shell {
    grid-template-columns: minmax(258px, 304px) minmax(0, 1fr);
  }

  .community-left-rail {
    position: sticky;
    top: 88px;
    overflow: visible;
  }

  .community-left-rail .enhanced-board-list {
    display: grid;
    grid-template-columns: 1fr;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media (max-width: 1023px) {
  .community-shell {
    grid-template-columns: 1fr;
  }

  .community-left-rail {
    position: static;
  }

  .community-left-rail .enhanced-board-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .community-left-rail .community-board {
    flex: 0 0 min(310px, 86vw);
  }
}

@media (max-width: 760px) {
  .community-modern .compose-head {
    align-items: flex-start;
  }

  .community-control-head {
    grid-template-columns: 1fr;
  }

  .community-left-rail .compact-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .community-hero {
    border-radius: 20px;
    padding: 16px;
  }

  .community-hero-actions > * {
    flex: 1 1 120px;
  }
}

/* Screenshot fix: solid surfaces and unclipped community/profile controls. */
body {
  background: #f7f9fc;
}

.app-shell {
  background: #f7f9fc;
}

.topbar {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.primary-nav,
.profile-cover,
.profile-tabs,
.profile-stat-grid div,
.panel,
.stat,
.community-left-rail .community-control-panel,
.community-main-panel > *,
.feed-tab-panel,
.community-post-card,
.community-section-tabs,
.community-board,
.searchbox {
  background-color: #fff;
}

.primary-nav {
  border: 1px solid #edf1f5;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.profile-cover {
  border: 1px solid #edf1f5;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.profile-stat-grid {
  width: 100%;
  max-width: 430px;
  justify-self: end;
}

.profile-stat-grid div {
  min-width: 0;
  overflow: visible;
}

.profile-stat-grid strong,
.profile-stat-grid span {
  max-width: 100%;
}

.topbar .profile-pill {
  width: auto;
  min-width: 168px;
  max-width: 240px;
  overflow: visible;
  padding: 4px 12px 4px 4px;
}

.topbar .profile-pill .account-label {
  display: inline-block;
  max-width: 176px;
}

.community-modern,
.community-shell,
.community-main-panel,
.community-left-rail,
.community-left-rail .community-control-panel,
.community-search-row,
.community-left-rail .compact-tabs,
.community-section-tabs,
.feed-tab-row,
.community-board-row,
.enhanced-board-list {
  overflow: visible;
}

.community-left-rail .compact-tabs .chip,
.community-section-tabs button,
.feed-tab-row .chip,
.community-board,
.community-create-menu > summary {
  overflow: visible;
  white-space: nowrap;
  min-width: max-content;
}

.community-left-rail .compact-tabs {
  grid-template-columns: repeat(2, minmax(max-content, 1fr));
}

.community-section-tabs {
  overflow-x: auto;
  scrollbar-width: none;
}

.community-section-tabs::-webkit-scrollbar {
  display: none;
}

.community-section-tabs button {
  padding-inline: 14px;
}

.feed-tab-row {
  padding: 2px 1px 4px;
}

.community-board {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.community-left-rail .community-board {
  min-width: 0;
  width: 100%;
}

.community-left-rail .community-board .board-main,
.community-left-rail .community-board .board-stat {
  min-width: 0;
}

.community-left-rail .community-board .board-main strong,
.community-left-rail .community-board .board-main small {
  white-space: normal;
}

@media (min-width: 761px) and (max-width: 1180px) {
  .topbar .profile-pill {
    min-width: 150px;
    max-width: 210px;
  }

  .topbar .profile-pill .account-label {
    display: inline-block;
    max-width: 148px;
  }
}

@media (max-width: 760px) {
  .topbar .profile-pill {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    overflow: hidden;
    padding: 0;
  }

  .topbar .profile-pill .account-label {
    display: none;
  }

  .community-left-rail .compact-tabs {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 1px 4px;
  }

  .community-left-rail .compact-tabs .chip {
    flex: 0 0 auto;
  }

  .profile-stat-grid {
    max-width: none;
    justify-self: stretch;
  }
}

/* Quiz submit stability: reserve feedback space so checking an answer does not resize the page. */
.quiz-play {
  grid-template-rows: auto auto auto minmax(96px, auto);
}

.quiz-feedback-slot {
  display: grid;
  min-height: 96px;
  align-items: center;
  overflow: hidden;
}

.quiz-feedback-slot > .quiz-help {
  margin: 0;
  text-align: center;
}

.quiz-feedback-slot .quiz-feedback {
  min-height: 86px;
  max-height: min(148px, 24vh);
  overflow: auto;
  overscroll-behavior: contain;
}

.quiz-feedback-slot .quiz-feedback p {
  max-height: 46px;
  overflow: auto;
}

.korean-answer-panel-slot {
  display: grid;
  min-height: 156px;
  align-items: start;
  overflow: hidden;
}

.korean-answer-panel-slot.idle {
  place-items: center;
  border: 1px dashed rgba(95, 123, 163, 0.2);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.72);
}

.korean-answer-placeholder {
  margin: 0;
  text-align: center;
}

.korean-answer-panel {
  max-height: min(220px, 32vh);
  overflow: auto;
  overscroll-behavior: contain;
}

@media (max-width: 760px) {
  .quiz-play {
    grid-template-rows: auto auto auto minmax(86px, auto);
  }

  .quiz-feedback-slot {
    min-height: 86px;
  }

  .quiz-feedback-slot .quiz-feedback {
    min-height: 76px;
    max-height: 132px;
  }

  .korean-answer-panel-slot {
    min-height: 136px;
  }

  .korean-answer-panel {
    max-height: 190px;
  }
}

/* Modern boot screen and scalable profile stat cards. */
.boot-home {
  display: grid;
  width: min(760px, calc(100% - 32px));
  min-height: 100dvh;
  align-content: center;
  gap: 14px;
  margin: 0 auto;
  color: #191f28;
}

.boot-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #edf1f5;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 14%, rgba(23, 105, 255, 0.13), transparent 30%),
    linear-gradient(180deg, #fff, #f7fbff);
  padding: clamp(24px, 5vw, 44px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.09);
}

.boot-brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.boot-brand-row img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.boot-card .crawler-kicker {
  margin: 0 0 6px;
  color: #1769ff;
  font-size: 13px;
  font-weight: 950;
}

.boot-card h1 {
  margin: 0;
  color: #191f28;
  font-size: clamp(32px, 8vw, 54px);
  line-height: 1.02;
}

.boot-card > p {
  margin: 18px 0 0;
  color: #4e5968;
  font-size: 16px;
  font-weight: 800;
}

.boot-progress {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0fb;
  margin-top: 8px;
}

.boot-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 44%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1769ff, #009241);
  animation: boot-slide 1.1s ease-in-out infinite;
}

@keyframes boot-slide {
  0% { transform: translateX(-105%); }
  55% { transform: translateX(80%); }
  100% { transform: translateX(235%); }
}

.boot-actions {
  margin-top: 6px;
}

.boot-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.boot-preview-grid article {
  border: 1px solid #edf1f5;
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.profile-cover {
  grid-template-columns: minmax(0, 1fr) minmax(0, clamp(300px, 38vw, 430px));
}

.profile-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 0.7vw, 8px);
  width: min(100%, 430px);
  max-width: 100%;
  min-width: 0;
}

.profile-stat-grid div {
  min-width: 0;
  padding: clamp(7px, 1vw, 10px) clamp(3px, 0.7vw, 8px);
}

.profile-stat-grid strong {
  font-size: clamp(15px, 1.65vw, 20px);
  line-height: 1;
}

.profile-stat-grid span {
  overflow: hidden;
  width: 100%;
  font-size: clamp(9px, 0.95vw, 12px);
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .profile-cover {
    grid-template-columns: 1fr;
  }

  .profile-stat-grid {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .boot-home {
    width: min(100% - 24px, 480px);
  }

  .boot-brand-row {
    align-items: flex-start;
  }

  .boot-brand-row img {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .boot-preview-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep community author profile visible on mobile post cards. */
.community-post-card .card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.community-post-card .post-author-avatar {
  display: inline-flex;
  visibility: visible;
  opacity: 1;
}

@media (max-width: 760px) {
  .community-post-card .card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .community-post-card .post-author-avatar {
    min-width: 38px;
    padding: 0;
  }

  .community-post-card .post-author-avatar .mini-avatar {
    display: grid;
    width: 36px;
    height: 36px;
  }

  .community-post-card .post-author-avatar span:not(.mini-avatar) {
    display: none;
  }
}

/* Auth screen repair: keep login isolated from animated topbar brand styles. */
.auth-wrap {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
  background:
    radial-gradient(circle at 18% 12%, rgba(23, 105, 255, 0.1), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(0, 146, 65, 0.1), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  color: #191f28;
}

.auth-card {
  width: min(460px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #e8edf5;
  border-radius: 28px;
  background: #ffffff;
  padding: clamp(20px, 4vw, 30px);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
  color: #191f28;
  -webkit-overflow-scrolling: touch;
}

.auth-card .brand.auth-brand,
.auth-card .brand {
  display: inline-flex;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 22px;
  padding: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.auth-card .brand::before {
  display: none;
}

.auth-card .brand-icons {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: 58px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: visible;
}

.auth-card .brand-logo {
  position: static;
  grid-area: auto;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 1;
  transform: none;
  animation: none;
}

.auth-card .brand-logo.tutor-logo {
  width: 52px;
  height: 52px;
}

.auth-card .brand-logo.school-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  filter: none;
}

.auth-card .brand-title {
  position: static;
  display: flex;
  width: auto;
  max-width: none;
  height: auto;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  overflow: visible;
  line-height: 1.1;
  white-space: normal;
}

.auth-card .brand-title-main,
.auth-card .brand-title-school {
  position: static;
  grid-area: auto;
  display: block;
  max-width: 100%;
  overflow: visible;
  opacity: 1;
  transform: none;
  animation: none;
  text-overflow: clip;
  white-space: nowrap;
}

.auth-card .brand-title-school {
  order: -1;
  color: #009241;
  font-size: 12px;
  font-weight: 950;
}

.auth-card .brand-title-main {
  color: #191f28;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
}

.auth-card .tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 18px;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  background: #f3f6fa;
  padding: 5px;
}

.auth-card .tabs button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #4e5968;
  font-size: 14px;
  font-weight: 950;
  box-shadow: none;
}

.auth-card .tabs button.active {
  background: #ffffff;
  color: #1769ff;
  box-shadow: 0 6px 16px rgba(25, 31, 40, 0.08);
}

.auth-card .form {
  display: grid;
  gap: 13px;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: #333d4b;
  font-size: 13px;
  font-weight: 900;
}

.auth-card .input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #dce5f0;
  border-radius: 16px;
  background: #ffffff;
  color: #191f28;
  padding: 0 14px;
  box-shadow: none;
}

.auth-card .input:focus,
.auth-card .input:focus-visible {
  border-color: rgba(23, 105, 255, 0.55);
  outline: none;
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.12);
}

.auth-card .primary {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  background: #1769ff;
  color: #ffffff;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(23, 105, 255, 0.22);
}

.auth-card .split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-hidden-button {
  width: 100%;
  min-height: 42px;
  margin: 0 0 12px;
  border-radius: 14px;
}

.auth-invite-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  border: 1px solid #d8e7ff;
  border-radius: 16px;
  background: #eef5ff;
  color: #174ea6;
  padding: 12px;
  font-size: 13px;
  font-weight: 850;
}

.auth-card .legal-box,
.auth-card .signup-quiz-box {
  border-radius: 18px;
}

@media (max-width: 560px) {
  .auth-wrap {
    align-items: start;
    padding: 22px 14px;
  }

  .auth-card {
    max-height: none;
    border-radius: 24px;
  }

  .auth-card .brand.auth-brand,
  .auth-card .brand {
    justify-content: flex-start;
  }

  .auth-card .brand-icons {
    height: 52px;
    gap: 4px;
  }

  .auth-card .brand-logo.tutor-logo {
    width: 46px;
    height: 46px;
  }

  .auth-card .brand-logo.school-logo {
    width: 40px;
    height: 40px;
  }

  .auth-card .brand-title-main {
    font-size: 20px;
  }

  .auth-card .split {
    grid-template-columns: 1fr;
  }
}

/* Auth final fix: hidden forms must stay hidden, and brand animation uses one stable logo slot. */
.auth-card form[hidden],
.auth-card #loginForm[hidden],
.auth-card #signupForm[hidden] {
  display: none;
}

.auth-card .brand.auth-brand {
  display: inline-flex;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 22px;
  overflow: visible;
}

.auth-card .brand-icons {
  display: grid;
  flex: 0 0 60px;
  width: 60px;
  min-width: 60px;
  height: 60px;
  place-items: center;
  overflow: visible;
}

.auth-card .brand-logo {
  grid-area: 1 / 1;
  position: relative;
  display: block;
  flex: none;
  object-fit: contain;
  transform-origin: center;
}

.auth-card .brand-logo.tutor-logo {
  width: 50px;
  height: 50px;
  opacity: 0;
  animation: brand-tutor-phase 8s ease-in-out infinite;
}

.auth-card .brand-logo.school-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  opacity: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 146, 65, 0.14));
  animation: brand-school-main-phase 8s ease-in-out infinite;
}

.auth-card .brand-title {
  display: grid;
  width: 142px;
  max-width: 142px;
  height: 30px;
  align-items: center;
  overflow: hidden;
  line-height: 1;
  white-space: nowrap;
}

.auth-card .brand-title-main,
.auth-card .brand-title-school {
  grid-area: 1 / 1;
  position: relative;
  display: block;
  max-width: 100%;
  overflow: hidden;
  transform-origin: center;
  text-overflow: clip;
  white-space: nowrap;
}

.auth-card .brand-title-main {
  color: #191f28;
  font-size: 22px;
  font-weight: 950;
  opacity: 0;
  animation: brand-tutor-phase 8s ease-in-out infinite;
}

.auth-card .brand-title-school {
  color: #009241;
  font-size: 18px;
  font-weight: 950;
  opacity: 1;
  animation: brand-school-main-phase 8s ease-in-out infinite;
}

.auth-card .tabs {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-card .tabs button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

@media (max-width: 560px) {
  .auth-card .brand-icons {
    flex-basis: 54px;
    width: 54px;
    min-width: 54px;
    height: 54px;
  }

  .auth-card .brand-logo.tutor-logo {
    width: 46px;
    height: 46px;
  }

  .auth-card .brand-logo.school-logo {
    width: 44px;
    height: 44px;
  }

  .auth-card .brand-title {
    width: 132px;
    max-width: 132px;
  }

  .auth-card .brand-title-main {
    font-size: 20px;
  }

  .auth-card .brand-title-school {
    font-size: 16px;
  }
}

/* Auth brand alignment: both logos share one fixed centered slot. */
.auth-card .brand.auth-brand {
  display: grid;
  grid-template-columns: 56px minmax(0, 142px);
  width: min(214px, 100%);
  min-width: 0;
  max-width: 100%;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
  margin: 0 auto 22px;
  padding: 0;
  overflow: visible;
  transform: none;
}

.auth-card .brand.auth-brand .brand-icons {
  position: relative;
  display: block;
  width: 56px;
  min-width: 56px;
  height: 56px;
  overflow: visible;
  place-self: center;
}

.auth-card .brand.auth-brand .brand-logo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
  transform-origin: 50% 50%;
}

.auth-card .brand.auth-brand .brand-logo.tutor-logo {
  width: 56px;
  height: 56px;
  opacity: 0;
  animation: auth-brand-tutor-phase 8s ease-in-out infinite;
}

.auth-card .brand.auth-brand .brand-logo.school-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  opacity: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 146, 65, 0.14));
  animation: auth-brand-school-phase 8s ease-in-out infinite;
}

.auth-card .brand.auth-brand .brand-title {
  position: relative;
  display: block;
  width: 142px;
  max-width: 142px;
  height: 30px;
  overflow: hidden;
  align-self: center;
}

.auth-card .brand.auth-brand .brand-title-main,
.auth-card .brand.auth-brand .brand-title-school {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
  transform-origin: 50% 50%;
}

.auth-card .brand.auth-brand .brand-title-main {
  color: #191f28;
  font-size: 22px;
  font-weight: 950;
  opacity: 0;
  animation: auth-brand-tutor-phase 8s ease-in-out infinite;
}

.auth-card .brand.auth-brand .brand-title-school {
  color: #009241;
  font-size: 18px;
  font-weight: 950;
  opacity: 1;
  animation: auth-brand-school-phase 8s ease-in-out infinite;
}

@keyframes auth-brand-school-phase {
  0%, 57%, 92%, 100% { opacity: 1; transform: scale(1); }
  63%, 86% { opacity: 0; transform: scale(0.98); }
}

@keyframes auth-brand-tutor-phase {
  0%, 57%, 92%, 100% { opacity: 0; transform: scale(0.98); }
  63%, 86% { opacity: 1; transform: scale(1); }
}

@media (max-width: 560px) {
  .auth-card .brand.auth-brand {
    grid-template-columns: 52px minmax(0, 132px);
    width: min(196px, 100%);
    min-height: 56px;
    justify-content: center;
    column-gap: 10px;
  }

  .auth-card .brand.auth-brand .brand-icons {
    width: 52px;
    min-width: 52px;
    height: 52px;
  }

  .auth-card .brand.auth-brand .brand-logo.tutor-logo {
    width: 52px;
    height: 52px;
  }

  .auth-card .brand.auth-brand .brand-logo.school-logo {
    width: 48px;
    height: 48px;
  }

  .auth-card .brand.auth-brand .brand-title {
    width: 132px;
    max-width: 132px;
  }

  .auth-card .brand.auth-brand .brand-title-main {
    font-size: 20px;
  }

  .auth-card .brand.auth-brand .brand-title-school {
    font-size: 16px;
  }
}

/* Mobile clipping and tap-state cleanup pass. */
.brand.is-pressing::before,
.nav button.is-pressing::before,
.topbar-mini.is-pressing::before,
.topbar-ask-cta.is-pressing::before,
.profile-pill.is-pressing::before,
.mobile-tabbar button.is-pressing::before,
.primary.is-pressing::before,
.ghost.is-pressing::before,
.small-button.is-pressing::before,
.quiz-answer.is-pressing::before {
  opacity: 1;
}

@media (hover: none) and (pointer: coarse) {
  .brand:hover::before,
  .nav button:hover::before,
  .topbar-mini:hover::before,
  .topbar-ask-cta:hover::before,
  .profile-pill:hover::before,
  .mobile-tabbar button:hover::before,
  .primary:hover::before,
  .ghost:hover::before,
  .small-button:hover::before,
  .quiz-answer:hover::before {
    opacity: 0;
  }

  .brand.is-pressing::before,
  .nav button.is-pressing::before,
  .topbar-mini.is-pressing::before,
  .topbar-ask-cta.is-pressing::before,
  .profile-pill.is-pressing::before,
  .mobile-tabbar button.is-pressing::before,
  .primary.is-pressing::before,
  .ghost.is-pressing::before,
  .small-button.is-pressing::before,
  .quiz-answer.is-pressing::before {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .container,
  .profile-page,
  .profile-cover,
  .profile-activity-grid,
  .profile-community-grid,
  .question-list,
  .notice-list,
  .community-feed {
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .profile-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding: 0;
    border-bottom: 0;
  }

  .profile-tabs .chip {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 42px;
    justify-content: center;
    padding-inline: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    flex: 1 1 auto;
  }

  .profile-activity-grid,
  .profile-community-grid {
    grid-template-columns: 1fr;
  }

  .profile-section-card,
  .profile-section-card .section-title,
  .profile-section-card .card-head {
    min-width: 0;
    max-width: 100%;
  }

  .profile-section-card .section-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .profile-section-card .section-title > button {
    width: auto;
    min-width: 58px;
  }

  .community-section-tabs,
  .feed-tab-row,
  .community-left-rail .compact-tabs,
  .blog-toolbar,
  .quiz-hero-actions,
  .quiz-toolbar-actions,
  .quiz-card-actions,
  .badges {
    flex-wrap: wrap;
    overflow: visible;
    max-width: 100%;
  }

  .community-left-rail .compact-tabs .chip,
  .community-section-tabs button,
  .feed-tab-row .chip,
  .community-board,
  .community-create-menu > summary,
  .blog-toolbar .chip,
  .quiz-card-actions button,
  .badges .badge {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    flex: 1 1 auto;
  }

  .primary,
  .ghost,
  .small-button,
  .chip,
  .topbar-mini,
  .topbar-ask-cta,
  .profile-pill,
  .jumbo-action {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .profile-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-section-card .section-title {
    grid-template-columns: 1fr;
  }

  .profile-section-card .section-title > button {
    width: 100%;
  }
}

/* Quiz question image upload controls. */
.quiz-image-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: stretch;
}

.quiz-image-editor .media-button,
.quiz-image-editor .ghost {
  min-height: 44px;
}

.quiz-question-image-preview {
  display: grid;
  width: min(420px, 100%);
  overflow: hidden;
  border: 1px solid rgba(23, 105, 255, 0.12);
  border-radius: 16px;
  background: #f8fbff;
}

.quiz-question-image-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 760px) {
  .quiz-image-editor {
    grid-template-columns: 1fr;
  }

  .quiz-question-image-preview {
    width: 100%;
  }
}

/* Tutor motivation and layer-animated profile banner shop. */
.profile-cover.has-profile-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  background: #eef5ff;
}

.profile-cover.has-profile-banner > :not(.profile-banner-design) {
  position: relative;
  z-index: 1;
}

.profile-cover.has-profile-banner .profile-identity,
.profile-cover.has-profile-banner .profile-stat-grid {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.profile-cover.has-profile-banner .profile-identity {
  padding: 18px;
}

.profile-cover.has-profile-banner .profile-stat-grid {
  padding: 12px;
}

.profile-banner-design {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #1349a9, #2c7dff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 16px 34px rgba(15, 23, 42, 0.16);
  transform: translateZ(0);
}

.profile-cover > .profile-banner-design {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: inherit;
  box-shadow: none;
  z-index: 0;
}

.profile-cover > .profile-banner-design strong {
  display: none;
}

.profile-banner-design strong {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 5;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(2, 6, 23, 0.28);
}

.profile-banner-design .banner-layer {
  position: absolute;
  inset: -18%;
  pointer-events: none;
}

.profile-banner-design .custom-banner-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  pointer-events: none;
  mix-blend-mode: normal;
}

.profile-banner-design.has-design-image .custom-banner-image {
  opacity: 1;
  object-position: center;
}

.profile-banner-design.has-design-image > .banner-layer {
  display: none;
}

.profile-banner-design.has-design-image > strong {
  display: none;
}

.profile-banner-design .custom-banner-image + .banner-layer {
  opacity: 0.42;
}

.profile-banner-design .layer-base {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 24%, rgba(255, 255, 255, 0.12) 54%, transparent 72%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 22px);
  animation: bannerDrift 8s linear infinite;
}

.profile-banner-design .layer-grid {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px 28px);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  opacity: 0.44;
  animation: bannerGrid 11s linear infinite;
}

.profile-banner-design .layer-orbit {
  inset: 0;
  background:
    linear-gradient(100deg, transparent 0 22%, rgba(255, 255, 255, 0.24) 23% 25%, transparent 26% 100%),
    linear-gradient(76deg, transparent 0 64%, rgba(255, 255, 255, 0.20) 65% 68%, transparent 69% 100%);
  opacity: 0.8;
  animation: bannerSweep 5.6s ease-in-out infinite;
}

.profile-banner-design .layer-particles {
  background:
    repeating-linear-gradient(120deg, transparent 0 18px, rgba(255, 255, 255, 0.22) 18px 21px, transparent 21px 46px),
    repeating-linear-gradient(25deg, transparent 0 34px, rgba(255, 255, 255, 0.14) 34px 36px, transparent 36px 78px);
  opacity: 0.52;
  animation: bannerPulse 4.8s ease-in-out infinite;
}

.profile-banner-design.banner-green {
  background: linear-gradient(135deg, #006a42, #17b67f 52%, #bfd83d);
}

.profile-banner-design.banner-midnight {
  background: linear-gradient(135deg, #07152d, #174c88 52%, #5368c9);
}

.profile-banner-design.banner-ginkgo {
  background: linear-gradient(135deg, #3f4a12, #b47f12 50%, #f4c94d);
}

.profile-banner-design.banner-field {
  background: linear-gradient(135deg, #075985, #0284c7 48%, #16a34a);
}

.profile-banner-design.banner-starlight {
  background: linear-gradient(135deg, #150b38, #3c299c 50%, #9b4de0);
}

.profile-banner-design.banner-neon {
  background: linear-gradient(135deg, #111827, #1944c5 46%, #9d2cff);
}

.profile-banner-design.banner-gold {
  background: linear-gradient(135deg, #68430b, #d18b10 48%, #ffe08a);
}

.profile-banner-design.banner-custom {
  background: linear-gradient(135deg, var(--banner-a, #1769ff), var(--banner-b, #22c55e) 54%, var(--banner-c, #fff));
}

.profile-banner-design.banner-custom.pattern-grid .layer-base {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.22) 0 2px, transparent 2px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 2px, transparent 2px 22px);
}

.profile-banner-design.banner-custom.pattern-wave .layer-orbit {
  background:
    repeating-radial-gradient(ellipse at 20% 50%, rgba(255,255,255,.24) 0 2px, transparent 2px 18px),
    linear-gradient(100deg, transparent, rgba(255,255,255,.24), transparent);
}

.profile-banner-design.banner-custom.pattern-shine .layer-particles {
  background:
    linear-gradient(110deg, transparent 0 20%, rgba(255,255,255,.34) 21% 25%, transparent 26% 100%),
    repeating-linear-gradient(25deg, transparent 0 38px, rgba(255,255,255,.2) 38px 41px, transparent 41px 84px);
}

.profile-banner-design.banner-gold .layer-grid,
.profile-banner-design.banner-gold .layer-particles {
  opacity: 0.68;
}

@keyframes bannerDrift {
  from { transform: translateX(-5%) translateY(0); }
  to { transform: translateX(5%) translateY(-3%); }
}

@keyframes bannerGrid {
  from { transform: translate3d(-18px, -10px, 0); }
  to { transform: translate3d(24px, 18px, 0); }
}

@keyframes bannerSweep {
  0%, 100% { transform: translateX(-18%) skewX(-8deg); opacity: 0.44; }
  50% { transform: translateX(18%) skewX(-8deg); opacity: 0.88; }
}

@keyframes bannerPulse {
  0%, 100% { transform: scale(1); opacity: 0.36; }
  50% { transform: scale(1.03); opacity: 0.72; }
}

.profile-banner-shop {
  display: grid;
  gap: 16px;
}

.point-shop-page {
  display: grid;
  gap: 18px;
}

.shop-overview-grid,
.shop-sales-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.shop-overview-grid > div,
.shop-sales-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.shop-overview-grid strong,
.shop-sales-summary strong {
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.shop-overview-grid span,
.shop-sales-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.point-shop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: center;
}

.point-shop-hero h2 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: 0;
}

.banner-wallet {
  display: grid;
  gap: 3px;
  padding: 16px;
  border: 1px solid rgba(23, 105, 255, 0.14);
  border-radius: 20px;
  background: linear-gradient(135deg, #f6faff, #fff);
}

.banner-wallet strong {
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
}

.banner-wallet span {
  font-weight: 900;
}

.banner-wallet small {
  color: var(--muted);
}

.compact-wallet {
  min-width: 0;
}

.profile-banner-shop-grid {
  display: grid;
  gap: 12px;
}

.shop-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.shop-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.shop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  background: #fff;
}

.shop-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.profile-banner-item {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.profile-banner-item .profile-banner-design {
  min-height: 86px;
  border-radius: 18px;
}

.profile-banner-item .profile-banner-design strong {
  font-size: 15px;
  bottom: 12px;
}

.profile-banner-item > button {
  min-width: 86px;
}

.shop-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.shop-card-actions button {
  min-width: 86px;
}

.shop-status-badge.status-paused {
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.22);
  background: #fffbeb;
}

.shop-status-badge.status-hidden {
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.22);
  background: #fef2f2;
}

.shop-status-badge.status-archived {
  color: #475569;
  border-color: rgba(100, 116, 139, 0.22);
  background: #f1f5f9;
}

.profile-banner-item.status-paused,
.profile-banner-item.status-archived {
  background: #f8fafc;
}

.profile-banner-item.status-hidden {
  border-color: rgba(239, 68, 68, 0.18);
  background: #fffafa;
}

.shop-lock-note,
.shop-policy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 11px 12px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.shop-policy-note {
  background: #fef2f2;
  color: #991b1b;
}

.shop-lock-note svg,
.shop-policy-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.shop-manage-box {
  grid-column: 1 / -1;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #f8fafc;
  overflow: hidden;
}

.shop-manage-box summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 900;
  list-style: none;
}

.shop-manage-box summary::-webkit-details-marker {
  display: none;
}

.shop-manage-form {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.custom-banner-controls.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shop-sales-panel {
  display: grid;
  gap: 14px;
}

.shop-admin-sales {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 12px;
}

.shop-admin-sales > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.shop-admin-sales > summary::-webkit-details-marker {
  display: none;
}

.shop-admin-sales .shop-sales-list {
  margin-top: 12px;
}

.shop-sales-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shop-sales-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.shop-sale-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
}

.shop-sale-row span,
.shop-sale-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-sale-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-shop-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-shop-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
}

.profile-shop-summary strong {
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
}

.profile-shop-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.event-metrics-panel {
  display: grid;
  gap: 14px;
}

.event-metric-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.event-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-metric-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.event-metric-card h3 {
  margin: 0;
  font-size: 15px;
}

.event-metric-bar-row {
  display: grid;
  gap: 6px;
}

.event-metric-bar-row > div,
.event-metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
}

.event-metric-bar-row span,
.event-metric-row span,
.event-metric-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-metric-bar-row b,
.event-metric-row b {
  color: var(--primary);
}

.event-metric-bar-row i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.event-metric-bar-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #1769ff);
}

.event-daily-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24px, 1fr));
  min-height: 120px;
  gap: 8px;
  align-items: end;
}

.event-daily-bars > div {
  display: grid;
  grid-template-rows: minmax(80px, 1fr) auto;
  gap: 6px;
  align-items: end;
  text-align: center;
}

.event-daily-bars span {
  display: block;
  width: 100%;
  min-height: 6px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #fb923c, #2563eb);
}

.event-daily-bars small,
.event-metric-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.event-metric-list {
  display: grid;
  gap: 8px;
}

.event-metric-row {
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(244, 248, 252, 0.86);
}

.event-metric-row small {
  grid-column: 1 / -1;
}

.event-admin-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.event-admin-metrics span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.event-admin-metrics b {
  min-width: 0;
  overflow: hidden;
  color: var(--primary);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-banner-form {
  gap: 14px;
}

.shop-banner-designer {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(23, 105, 255, 0.13);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(23, 105, 255, 0.06), rgba(34, 197, 94, 0.05)),
    #fff;
}

.shop-banner-designer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.shop-banner-designer-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.shop-banner-designer-head strong {
  color: var(--ink);
  font-weight: 950;
}

.shop-banner-designer-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shop-banner-tool-actions,
.shop-banner-design-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.shop-banner-canvas-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(135deg, var(--banner-a, #1769ff), var(--banner-b, #22c55e) 58%, var(--banner-c, #ffffff)),
    #1769ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.shop-banner-canvas-wrap canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  height: auto;
  cursor: crosshair;
  touch-action: none;
}

.shop-banner-colors {
  flex: 1 1 210px;
}

.shop-banner-design-controls .note-size-wrap {
  flex: 1 1 150px;
  min-width: 150px;
}

.shop-creator-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.shop-creator-preview {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(23, 105, 255, 0.12);
  border-radius: 20px;
  background: #f8fbff;
}

.shop-creator-preview .profile-banner-design {
  min-height: 132px;
}

.shop-creator-preview > strong {
  font-size: 15px;
}

.shop-creator-preview > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shop-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-creator-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-creator-submit p {
  margin: 0;
}

.custom-banner-controls input[type="color"] {
  min-height: 48px;
  padding: 6px;
  cursor: pointer;
}

.custom-banner-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.inventory-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.inventory-summary > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
}

.inventory-summary strong {
  color: var(--primary);
  font-size: 26px;
  line-height: 1;
}

.inventory-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inventory-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.banner-inventory-card .profile-banner-design {
  min-height: 116px;
  width: 100%;
}

.banner-inventory-card .profile-banner-design strong {
  font-size: 16px;
}

.tutor-motivation-hub {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(23, 105, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(23, 105, 255, 0.08), transparent 44%),
    #fff;
}

.tutor-loop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tutor-loop-grid article,
.tutor-growth-grid > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.tutor-loop-grid strong {
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}

.tutor-loop-grid span,
.tutor-growth-grid h3 {
  font-weight: 950;
}

.tutor-loop-grid small,
.tutor-growth-grid small {
  color: var(--muted);
  line-height: 1.45;
}

.tutor-growth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tutor-growth-grid h3,
.tutor-growth-grid p {
  margin: 0;
}

@media (max-width: 980px) {
  .profile-banner-item {
    grid-template-columns: 1fr;
  }

  .shop-toolbar,
  .shop-sales-grid,
  .point-shop-hero,
  .shop-creator-layout,
  .custom-banner-controls {
    grid-template-columns: 1fr;
  }

  .shop-overview-grid,
  .shop-sales-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-creator-preview {
    position: static;
  }

  .profile-banner-item > button,
  .shop-card-actions button {
    width: 100%;
  }

  .shop-card-actions {
    justify-content: stretch;
  }

  .custom-banner-controls.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tutor-loop-grid,
  .tutor-growth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-metric-stats,
  .event-metric-grid,
  .event-admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-cover.has-profile-banner .profile-identity,
  .profile-cover.has-profile-banner .profile-stat-grid {
    border-radius: 18px;
  }

  .profile-cover.has-profile-banner .profile-identity {
    padding: 14px;
  }

  .profile-banner-design {
    min-height: 96px;
    border-radius: 18px;
  }

  .profile-banner-item .profile-banner-design {
    min-height: 92px;
  }

  .tutor-loop-grid,
  .tutor-growth-grid {
    grid-template-columns: 1fr;
  }

  .inventory-summary {
    grid-template-columns: 1fr;
  }

  .profile-shop-summary,
  .custom-banner-controls.compact {
    grid-template-columns: 1fr;
  }

  .shop-creator-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-creator-submit button {
    width: 100%;
  }

  .shop-banner-designer-head,
  .shop-banner-design-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-banner-tool-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shop-banner-tool-actions button,
  .shop-banner-design-controls > button {
    width: 100%;
  }

  .event-metric-stats,
  .event-metric-grid,
  .event-admin-metrics {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-banner-design .banner-layer {
    animation: none !important;
  }
}

/* Final scroll stability pass.
   Older bundled rules define overflow behavior in several places; keep page-level
   scrolling on the document and limit inner scroll only to intentional panels. */
html {
  min-height: 100%;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
  scroll-padding-top: 86px;
}

body {
  min-height: 100%;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
}

#app,
.app-shell,
.container,
.profile-page,
.space-panel,
.community-main,
.question-list,
.notice-list,
.community-feed,
.point-shop-page {
  min-height: 0;
  max-width: 100%;
}

.app-shell {
  overflow: visible;
}

.topbar,
.mobile-tabbar,
.bottom-ask,
.toast {
  transform: translateZ(0);
}

.modal-backdrop,
.note-editor-backdrop,
.document-viewer-backdrop,
.admin-pdf-backdrop {
  overscroll-behavior: contain;
}

.tutorial-modal,
.dialog-modal,
.document-viewer-modal,
.admin-pdf-modal,
.note-editor {
  max-height: calc(100dvh - 28px);
}

.tutorial-modal,
.dialog-modal {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.document-viewer-body,
.document-preview-shell,
.note-list,
.storage-user-list,
.community-left-rail,
.classroom-floor,
.wordmaster-days,
.community-board-row,
.space-tabs,
.profile-tabs {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .app-shell {
    min-height: 100dvh;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .container {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  .mobile-tabbar {
    max-height: calc(72px + env(safe-area-inset-bottom));
  }

  .bottom-ask {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

/* Question auto-answer: quiet trust cues and compact admin controls. */
.answer-card.ai-answer-card {
  box-shadow: inset 3px 0 0 #1769ff, var(--app-card-shadow, 0 8px 24px rgba(15, 23, 42, 0.08));
}

.ai-answer-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid #b9d1ff;
  border-radius: 999px;
  background: #edf4ff;
  color: #1457c9;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.ai-answer-badge .icon {
  width: 14px;
  height: 14px;
}

.ai-answer-notice {
  border-left: 3px solid #1769ff;
  background: #f2f7ff;
  color: #35516f;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.auto-answer-panel {
  overflow: hidden;
}

.auto-answer-admin {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.auto-answer-status-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.auto-answer-status-line .muted {
  overflow-wrap: anywhere;
}

.auto-answer-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #98a2b3;
  box-shadow: 0 0 0 4px #f2f4f7;
}

.auto-answer-status-dot.active {
  background: #12b76a;
  box-shadow: 0 0 0 4px #e8f8f0;
}

.auto-answer-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin: 0;
  border-top: 1px solid #e4eaf2;
}

.auto-answer-metrics > div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e4eaf2;
  padding: 10px 0;
}

.auto-answer-metrics dt {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.auto-answer-metrics dd {
  margin: 0;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.auto-answer-budget {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.auto-answer-budget > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1769ff;
  transition: width 180ms ease;
}

.auto-answer-budget-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #667085;
  font-size: 11px;
  font-weight: 750;
}

.auto-answer-form {
  border-top: 1px solid #e4eaf2;
  padding-top: 14px;
}

.auto-answer-key-locked {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #344054;
}

.auto-answer-key-locked > .icon {
  width: 19px;
  height: 19px;
  color: #1769ff;
}

.auto-answer-key-locked span {
  display: grid;
  gap: 2px;
}

.auto-answer-key-locked small {
  color: #667085;
  font-weight: 700;
}

.auto-answer-limits label {
  display: grid;
  gap: 7px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.auto-answer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.auto-answer-actions > button {
  flex: 1 1 150px;
}

.auto-answer-actions button:disabled,
.auto-answer-form button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

@media (max-width: 760px) {
  .answer-card.ai-answer-card {
    box-shadow: inset 0 3px 0 #1769ff, var(--app-card-shadow, 0 8px 24px rgba(15, 23, 42, 0.08));
  }

  .auto-answer-metrics,
  .auto-answer-limits {
    grid-template-columns: 1fr;
  }

  .auto-answer-budget-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* Unified profile, shop, and administration workspaces. */
.workspace-page {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
  color: #172033;
}

.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  border-bottom: 1px solid #dfe5ee;
  padding: 4px 2px 16px;
}

.workspace-title-block {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.workspace-title-block h2,
.workspace-section-head h2 {
  margin: 0;
  color: #101828;
  letter-spacing: 0;
}

.workspace-title-block h2 {
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.2;
}

.workspace-title-block p,
.workspace-section-head p {
  margin: 0;
  color: #667085;
  line-height: 1.5;
}

.workspace-title-block p {
  font-size: 14px;
}

.workspace-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #1769ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #f4f6f9;
  padding: 4px;
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar {
  display: none;
}

.workspace-tabs > button {
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #475467;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.workspace-tabs > button:hover {
  background: #fff;
  color: #175cd3;
}

.workspace-tabs > button.active {
  border-color: #d3deef;
  background: #fff;
  color: #175cd3;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

.workspace-tabs .icon {
  width: 17px;
  height: 17px;
}

.workspace-metrics {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
}

.workspace-metrics > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 0;
  border-right: 1px solid #e7ebf1;
  border-radius: 0;
  background: #fff;
  padding: 14px 16px;
  box-shadow: none;
}

.workspace-metrics > div:last-child {
  border-right: 0;
}

.workspace-metrics strong {
  overflow: hidden;
  color: #101828;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-metrics span {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-section.panel,
.admin-workspace .panel,
.point-shop-page .panel,
.profile-page .profile-section-card {
  min-width: 0;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.workspace-section-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.workspace-section-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workspace-section-head h2 {
  font-size: 18px;
  line-height: 1.3;
}

.workspace-section-head p {
  font-size: 13px;
}

.workspace-count {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

/* My page */
.profile-page.workspace-page {
  width: min(1120px, 100%);
  gap: 14px;
}

.profile-page .profile-cover {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: none;
}

.profile-cover-main {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-page .profile-identity {
  min-width: 0;
  align-items: center;
}

.profile-page .profile-identity > div:last-child {
  min-width: 0;
}

.profile-page .profile-identity h1 {
  margin: 5px 0 3px;
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.2;
}

.profile-page .profile-identity p {
  max-width: 620px;
  margin: 0 0 7px;
  color: #475467;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-edit-button {
  flex: 0 0 auto;
}

.profile-page .profile-stat-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 0;
  box-shadow: none;
}

.profile-page .profile-stat-grid > div {
  min-width: 0;
  border-right: 1px solid #e7ebf1;
  border-radius: 0;
  background: transparent;
  padding: 11px 12px;
  text-align: left;
}

.profile-page .profile-stat-grid > div:last-child {
  border-right: 0;
}

.profile-page .profile-stat-grid strong {
  display: block;
  overflow: hidden;
  color: #101828;
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-page .profile-stat-grid span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 11px;
  font-weight: 750;
}

.profile-cover.has-profile-banner {
  border-radius: 8px;
}

.profile-cover.has-profile-banner .profile-cover-main,
.profile-cover.has-profile-banner .profile-stat-grid {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.profile-cover.has-profile-banner .profile-stat-grid {
  padding: 0;
}

.profile-cover.has-profile-banner .profile-cover-main {
  padding: 14px;
}

.profile-cover.has-profile-banner .profile-identity {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.profile-cover > .profile-banner-design {
  border-radius: 8px;
}

.profile-navigation-shell {
  position: relative;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  padding: 5px;
}

.profile-primary-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.profile-primary-tabs button,
.profile-more-menu summary,
.profile-more-popover button {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #475467;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
}

.profile-primary-tabs button.active,
.profile-more-menu.active > summary,
.profile-more-popover button.active {
  border-color: #cbd9ee;
  background: #edf4ff;
  color: #175cd3;
}

.profile-primary-tabs button:hover,
.profile-more-menu summary:hover,
.profile-more-popover button:hover {
  background: #f4f7fb;
  color: #175cd3;
}

.profile-primary-tabs .icon,
.profile-more-menu .icon {
  width: 17px;
  height: 17px;
}

.profile-more-menu {
  position: relative;
  min-width: 116px;
}

.profile-more-menu summary {
  cursor: pointer;
}

.profile-more-menu summary::-webkit-details-marker {
  display: none;
}

.profile-more-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  width: 220px;
  gap: 3px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.14);
}

.profile-more-popover button {
  justify-content: flex-start;
}

.public-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  overflow: visible;
  border-bottom: 1px solid #dfe5ee;
  padding: 0 0 8px;
}

.profile-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.75fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.profile-overview-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.profile-activity-list {
  display: grid;
  min-width: 0;
}

.profile-activity-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid #e7ebf1;
  padding: 11px 2px;
  text-align: left;
}

.profile-activity-row:last-child {
  border-bottom: 0;
}

.profile-activity-row:hover {
  background: #f8fafc;
}

.profile-activity-row:disabled {
  cursor: default;
}

.profile-activity-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #edf4ff;
  color: #1769ff;
}

.profile-activity-icon .icon {
  width: 17px;
  height: 17px;
}

.profile-activity-copy,
.profile-activity-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-activity-copy strong,
.profile-activity-copy small,
.profile-activity-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-activity-copy strong {
  color: #1d2939;
  font-size: 14px;
}

.profile-activity-copy small,
.profile-activity-meta small {
  color: #667085;
  font-size: 11px;
}

.profile-activity-meta {
  justify-items: end;
  text-align: right;
}

.profile-activity-meta b {
  color: #344054;
  font-size: 11px;
}

.profile-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.profile-shortcut-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  color: #344054;
  text-align: left;
}

.profile-shortcut-card:hover {
  border-color: #b8cdf0;
  background: #f8fbff;
}

.profile-shortcut-card > .icon {
  width: 19px;
  height: 19px;
  color: #1769ff;
}

.profile-shortcut-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-shortcut-card strong,
.profile-shortcut-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-shortcut-card strong {
  font-size: 13px;
}

.profile-shortcut-card small {
  color: #667085;
  font-size: 10px;
}

.profile-achievement-card .profile-shop-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-achievement-card .profile-shop-summary > div {
  border-radius: 6px;
  padding: 10px;
}

.profile-trophy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 0 8px;
  color: #344054;
  font-size: 12px;
}

.profile-trophy-head span {
  color: #667085;
}

.profile-achievement-card .trophy-mini-row {
  grid-template-columns: 1fr;
  overflow: visible;
}

.profile-achievement-card .trophy-card {
  grid-template-columns: 44px minmax(0, 1fr);
  min-width: 0;
  min-height: 64px;
  border-width: 1px;
  border-radius: 8px;
  padding: 8px;
  box-shadow: none;
}

.profile-achievement-card .trophy-art {
  width: 40px;
  height: 40px;
  border-width: 1px;
  border-radius: 8px;
}

.profile-achievement-card .trophy-svg {
  width: 36px;
  height: 36px;
}

.profile-achievement-card .trophy-card p {
  -webkit-line-clamp: 1;
}

/* Shop */
.point-shop-page.workspace-page {
  gap: 14px;
}

.shop-workspace-head .banner-wallet {
  width: min(320px, 100%);
  border: 1px solid #d6e1f0;
  border-radius: 8px;
  background: #f7faff;
  padding: 13px 15px;
}

.shop-workspace-head .banner-wallet strong {
  color: #175cd3;
  font-size: 27px;
}

.shop-section-tabs > button {
  flex-basis: 0;
}

.shop-overview-grid.workspace-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.point-shop-page .shop-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
  gap: 10px;
  margin-bottom: 14px;
}

.point-shop-page .shop-filter-row {
  flex-wrap: wrap;
}

.point-shop-page .shop-filter-row .chip {
  min-height: 36px;
  border-radius: 6px;
  padding-inline: 11px;
}

.point-shop-page .shop-search {
  min-height: 42px;
  border-color: #d6dde8;
  border-radius: 8px;
  padding: 8px 11px;
}

.point-shop-page .profile-banner-shop-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.point-shop-page .profile-banner-item {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 11px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  padding: 11px;
  box-shadow: none;
}

.point-shop-page .profile-banner-item .profile-banner-design {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 5;
  border-radius: 7px;
}

.point-shop-page .shop-overview-grid.is-customization-paused,
.point-shop-page .shop-sales-summary.is-customization-paused {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.point-shop-page .shop-sales-summary.is-customization-paused > div {
  border-right: 0;
}

.point-shop-page .profile-banner-item > div:not(.profile-banner-design):not(.shop-card-actions) {
  min-width: 0;
}

.point-shop-page .profile-banner-item p {
  margin: 4px 0 8px;
  line-height: 1.45;
}

.point-shop-page .shop-card-actions {
  margin-top: auto;
  justify-content: stretch;
}

.point-shop-page .shop-card-actions > button {
  min-width: 0;
  flex: 1 1 120px;
}

.point-shop-page .shop-manage-box {
  width: 100%;
  border-radius: 8px;
}

.point-shop-page .shop-manage-box summary {
  padding: 10px 12px;
  font-size: 13px;
}

.shop-creator-panel .shop-creator-layout {
  grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.38fr);
  gap: 16px;
}

.point-shop-page .shop-creator-preview,
.point-shop-page .shop-banner-designer,
.point-shop-page .shop-banner-canvas-wrap,
.point-shop-page .shop-sale-row,
.point-shop-page .shop-sales-summary > div {
  border-radius: 8px;
  box-shadow: none;
}

.point-shop-page .shop-sales-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
}

.point-shop-page .shop-sales-summary > div {
  border: 0;
  border-right: 1px solid #e7ebf1;
  background: #fff;
}

.point-shop-page .shop-sales-summary > div:last-child {
  border-right: 0;
}

/* Administration */
.admin-workspace {
  gap: 14px;
}

.admin-workspace-head {
  align-items: center;
}

.admin-live-chip {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #b7e3c9;
  border-radius: 999px;
  background: #ecfdf3;
  color: #067647;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
}

.admin-live-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12b76a;
}

.admin-section-tabs > button {
  position: relative;
}

.admin-section-tabs > button b {
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 999px;
  background: #e9eef6;
  color: #475467;
  padding: 0 5px;
  font-size: 10px;
}

.admin-section-tabs > button.active b {
  background: #d9e8ff;
  color: #175cd3;
}

.admin-summary-grid.workspace-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  min-width: 0;
  align-items: start;
}

.admin-priority-list {
  display: grid;
  min-width: 0;
}

.admin-priority-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid #e7ebf1;
  padding: 11px 2px;
  color: #344054;
  text-align: left;
}

.admin-priority-item:last-child {
  border-bottom: 0;
}

.admin-priority-item:hover {
  background: #f8fafc;
}

.admin-priority-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: #175cd3;
}

.admin-priority-item.warning .admin-priority-icon {
  background: #fffaeb;
  color: #b54708;
}

.admin-priority-item.danger .admin-priority-icon {
  background: #fef3f2;
  color: #b42318;
}

.admin-priority-icon .icon {
  width: 17px;
  height: 17px;
}

.admin-priority-item > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-priority-item strong,
.admin-priority-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-priority-item strong {
  font-size: 13px;
}

.admin-priority-item small {
  color: #667085;
  font-size: 11px;
}

.admin-priority-item > b {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #f2f4f7;
  color: #344054;
  font-size: 13px;
}

.admin-health-panel .stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
}

.admin-health-panel .stat {
  min-width: 0;
  min-height: 72px;
  border: 0;
  border-right: 1px solid #e7ebf1;
  border-bottom: 1px solid #e7ebf1;
  border-radius: 0;
  padding: 11px;
  box-shadow: none;
}

.admin-health-panel .stat strong {
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  align-items: start;
}

.admin-panel-grid > * {
  min-width: 0;
}

.admin-wide-panel {
  grid-column: 1 / -1;
}

.admin-tool-panel .workspace-section-head {
  margin-bottom: 14px;
  border-bottom: 1px solid #edf0f4;
  padding-bottom: 12px;
}

.admin-inline-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  border-top: 1px solid #e7ebf1;
  padding-top: 10px;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.admin-inline-status strong {
  color: #101828;
  font-size: 18px;
}

.admin-realtime-stack,
.admin-system-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.admin-realtime-stack > .stats {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
}

.admin-realtime-stack > .stats .stat {
  min-width: 0;
  border: 0;
  border-right: 1px solid #e7ebf1;
  border-radius: 0;
  padding: 13px 10px;
  box-shadow: none;
}

.admin-realtime-stack > .stats .stat:last-child {
  border-right: 0;
}

.admin-realtime-stack > .stats .stat strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-workspace .admin-user-search {
  margin-bottom: 12px;
}

.admin-workspace .admin-user-list,
.admin-workspace .notice-list,
.admin-workspace .question-list,
.admin-workspace .log-list {
  min-width: 0;
}

.admin-workspace .notice-card,
.admin-workspace .question-card,
.admin-workspace .storage-user-row,
.admin-workspace .analytics-breakdown-card {
  min-width: 0;
  border-radius: 8px;
  box-shadow: none;
}

.admin-workspace .ai-filter-button {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
}

@media (max-width: 920px) {
  .profile-overview-layout,
  .admin-overview-grid,
  .admin-panel-grid,
  .shop-creator-panel .shop-creator-layout {
    grid-template-columns: 1fr;
  }

  .admin-wide-panel {
    grid-column: auto;
  }

  .point-shop-page .profile-banner-shop-grid {
    grid-template-columns: 1fr;
  }

  .admin-summary-grid.workspace-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-summary-grid.workspace-metrics > div:nth-child(3n) {
    border-right: 0;
  }

  .admin-summary-grid.workspace-metrics > div:nth-child(-n + 3) {
    border-bottom: 1px solid #e7ebf1;
  }

  .admin-realtime-stack > .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-realtime-stack > .stats .stat:nth-child(4n) {
    border-right: 0;
  }
}

@media (max-width: 700px) {
  .workspace-page {
    gap: 12px;
  }

  .workspace-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 13px;
  }

  .workspace-title-block h2 {
    font-size: 25px;
  }

  .workspace-tabs > button {
    min-width: 116px;
    flex: 0 0 auto;
  }

  .profile-page .profile-cover {
    padding: 12px;
  }

  .profile-cover-main {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-edit-button {
    width: 100%;
  }

  .profile-page .profile-identity {
    align-items: flex-start;
  }

  .profile-page .profile-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-page .profile-stat-grid > div:nth-child(3) {
    border-right: 0;
  }

  .profile-page .profile-stat-grid > div:nth-child(-n + 3) {
    border-bottom: 1px solid #e7ebf1;
  }

  .profile-navigation-shell {
    grid-template-columns: 1fr;
  }

  .profile-primary-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-more-menu {
    min-width: 0;
  }

  .profile-more-popover {
    position: static;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 4px;
    border: 0;
    border-top: 1px solid #e7ebf1;
    border-radius: 0;
    padding: 5px 0 0;
    box-shadow: none;
  }

  .profile-more-popover button {
    justify-content: center;
  }

  .profile-activity-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .profile-activity-meta {
    grid-column: 2;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .profile-shortcut-grid {
    grid-template-columns: 1fr;
  }

  .shop-overview-grid.workspace-metrics,
  .point-shop-page .shop-sales-summary,
  .admin-summary-grid.workspace-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-overview-grid.workspace-metrics > div,
  .point-shop-page .shop-sales-summary > div,
  .admin-summary-grid.workspace-metrics > div {
    border-right: 1px solid #e7ebf1;
    border-bottom: 1px solid #e7ebf1;
  }

  .shop-overview-grid.workspace-metrics > div:nth-child(2n),
  .point-shop-page .shop-sales-summary > div:nth-child(2n),
  .admin-summary-grid.workspace-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .shop-overview-grid.workspace-metrics > div:nth-last-child(-n + 2),
  .point-shop-page .shop-sales-summary > div:nth-last-child(-n + 2),
  .admin-summary-grid.workspace-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .point-shop-page .shop-toolbar,
  .point-shop-page .shop-sales-grid {
    grid-template-columns: 1fr;
  }

  .point-shop-page .shop-filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .point-shop-page .shop-filter-row .chip {
    width: 100%;
    min-width: 0;
  }

  .admin-live-chip {
    width: fit-content;
  }

  .admin-health-panel .stats,
  .admin-realtime-stack > .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-health-panel .stat:nth-child(2n),
  .admin-realtime-stack > .stats .stat:nth-child(2n) {
    border-right: 0;
  }

  .admin-realtime-stack > .stats .stat {
    border-bottom: 1px solid #e7ebf1;
  }

  .admin-workspace .storage-user-row,
  .admin-workspace .analytics-day-row,
  .admin-workspace .analytics-error-row {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 420px) {
  .profile-primary-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-primary-tabs button:last-child {
    grid-column: 1 / -1;
  }

  .profile-more-popover,
  .point-shop-page .shop-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-metrics > div {
    padding: 12px 10px;
  }

  .workspace-metrics strong {
    font-size: 20px;
  }
}

/* Unified application workspaces. */
:root {
  --workspace-line: #dfe5ee;
  --workspace-line-soft: #e9edf3;
  --workspace-muted: #667085;
  --workspace-subtle: #f7f9fc;
  --workspace-blue: #175cd3;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.container,
.container > *,
.workspace-page > *,
.workspace-subpage > *,
.workspace-content-section,
.workspace-section {
  min-width: 0;
}

.workspace-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.workspace-primary-cta {
  min-width: 132px;
}

.workspace-subpage {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.workspace-content-section {
  display: grid;
  gap: 12px;
  align-content: start;
}

.workspace-content-section > .workspace-section-head {
  margin: 0;
  border-bottom: 1px solid var(--workspace-line);
  padding: 0 2px 12px;
}

.workspace-section-head > :last-child:not(:first-child) {
  flex: 0 0 auto;
}

.workspace-metrics > button {
  display: grid;
  gap: 5px;
  min-width: 0;
  align-content: center;
  border-right: 1px solid #e7ebf1;
  background: #fff;
  color: #101828;
  padding: 14px 16px;
  text-align: left;
}

.workspace-metrics > button:last-child {
  border-right: 0;
}

.workspace-metrics > button:hover {
  background: #f8fbff;
}

.workspace-metrics > button > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--workspace-muted);
  font-size: 12px;
  font-weight: 800;
}

.workspace-metrics > button > span .icon {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.workspace-metrics > button strong {
  overflow: hidden;
  font-size: 23px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-metrics > button small {
  overflow: hidden;
  color: var(--workspace-muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-field {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
}

.search-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.12);
}

.search-field > .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #667085;
}

.search-field input,
.search-field .input {
  min-width: 0;
  min-height: 42px;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  outline: 0;
}

.workspace-disclosure {
  padding: 0;
  overflow: hidden;
}

.workspace-disclosure > summary {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0 16px;
  color: #344054;
  font-size: 14px;
  font-weight: 850;
  list-style: none;
}

.workspace-disclosure > summary::-webkit-details-marker {
  display: none;
}

.workspace-disclosure > summary span {
  margin-left: auto;
  color: #667085;
  font-size: 12px;
}

.workspace-disclosure[open] > summary {
  border-bottom: 1px solid var(--workspace-line-soft);
  background: var(--workspace-subtle);
}

/* Home */
.home-workspace {
  gap: 18px;
}

.home-command-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.35fr);
  gap: 10px;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.home-question-command {
  grid-row: span 2;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid #c7d7f5;
  border-radius: 8px;
  background: #edf4ff;
  color: #17345f;
  padding: 18px;
  text-align: left;
}

.home-question-command:hover {
  border-color: #8eb5f5;
  background: #e5efff;
}

.home-question-command > .icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.home-command-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
}

.home-command-icon .icon {
  width: 22px;
  height: 22px;
}

.home-question-command span:nth-child(2),
.home-quick-commands button span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-question-command strong {
  font-size: 17px;
}

.home-question-command small,
.home-quick-commands small {
  overflow-wrap: anywhere;
  color: var(--workspace-muted);
  font-size: 12px;
  line-height: 1.4;
}

.home-quick-commands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.home-quick-commands button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  color: #344054;
  text-align: left;
}

.home-quick-commands button:hover {
  border-color: #bfd3ff;
  background: #f8fbff;
  color: var(--workspace-blue);
}

.home-quick-commands button > .icon {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.home-search-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.home-event-callout {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid #f7c877;
  border-radius: 8px;
  background: #fffbeb;
  color: #7a2e0e;
  padding: 11px 14px;
  text-align: left;
}

.home-event-callout > span {
  display: grid;
  gap: 2px;
}

.home-event-callout small {
  color: #9a4d19;
}

.home-overview-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr);
  gap: 20px;
  min-width: 0;
  align-items: start;
}

.home-side-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.home-notice-panel,
.home-community-section {
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.notice-feature-card {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 6px;
  border: 1px solid #dbe7f8;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
  color: #344054;
  text-align: left;
}

.notice-feature-card:hover strong {
  color: var(--workspace-blue);
}

.notice-feature-label {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.notice-feature-card strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: normal;
}

.notice-feature-card > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: var(--workspace-muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-notice-panel .notice-mini-list {
  margin-top: 8px;
}

.home-notice-panel .notice-mini-list:empty {
  display: none;
}

.home-community-section .community-post-card,
.home-community-section .post-card {
  box-shadow: none;
}

.home-community-list {
  display: grid;
  min-width: 0;
}

.home-community-row {
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--workspace-line-soft);
  background: transparent;
  padding: 12px 2px;
  color: #344054;
  text-align: left;
}

.home-community-row:first-child {
  padding-top: 2px;
}

.home-community-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.home-community-row:hover strong {
  color: var(--workspace-blue);
}

.home-community-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.home-community-main > .mini-avatar {
  width: 34px;
  height: 34px;
}

.home-community-main > .icon {
  width: 16px;
  height: 16px;
  color: #98a2b3;
}

.home-community-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.home-community-copy strong,
.home-community-board {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-community-copy strong {
  color: #1d2939;
  font-size: 14px;
}

.home-community-board {
  color: var(--workspace-blue);
  font-size: 11px;
  font-weight: 850;
}

.home-community-meta {
  padding-left: 43px;
  gap: 5px 9px;
  font-size: 11px;
}

.home-waiting-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Questions and answer detail */
.question-filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  gap: 12px 16px;
  padding: 14px;
}

.question-filter-subjects {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.question-filter-subjects::-webkit-scrollbar {
  display: none;
}

.question-filter-subjects .chips {
  flex-wrap: nowrap;
}

.question-filter-selects {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(126px, 1fr));
  gap: 8px;
}

.question-search-field {
  grid-column: 1 / -1;
}

/* Question composer */
.ask-form.minimal-compose {
  display: grid;
  width: min(880px, 100%);
  max-width: 880px;
  gap: 14px;
  margin: 0 auto;
  padding: 0;
}

.ask-step-card {
  display: grid;
  min-width: 0;
  gap: 14px;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.ask-step-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.ask-step-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--workspace-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.ask-step-head h2,
.ask-step-head p {
  margin: 0;
}

.ask-step-head h2 {
  color: #101828;
  font-size: 18px;
  line-height: 1.25;
}

.ask-step-head p {
  margin-top: 2px;
  color: var(--workspace-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ask-form .field-block,
.ask-form .compose-textarea,
.ask-form .ask-advanced-fields {
  margin-top: 0;
}

.ask-form .simple-category-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ask-question-entry .compose-textarea {
  min-height: 150px;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 14px;
  box-shadow: none;
}

.ask-media-field {
  border-top: 1px solid var(--workspace-line-soft);
  padding-top: 12px;
}

.ask-media-field .media-actions {
  grid-template-columns: repeat(2, minmax(140px, 200px));
  justify-content: start;
}

.ask-media-field .media-actions.single {
  grid-template-columns: minmax(160px, 220px);
}

.ask-media-field .media-button {
  min-height: 44px;
  border-radius: 8px;
}

.ask-form .ask-advanced-fields {
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
  padding: 4px 14px 14px;
  box-shadow: none;
}

.ask-form .ask-advanced-fields > summary {
  min-height: 50px;
  padding: 0 2px;
  color: #344054;
}

.ask-optional-copy {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--workspace-line-soft);
  padding-top: 14px;
}

.ask-optional-copy label {
  display: grid;
  gap: 7px;
}

.ask-optional-copy label > span {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.ask-optional-copy .compact-textarea {
  min-height: 90px;
}

.ask-form .compose-submit {
  min-height: 54px;
  border-radius: 8px;
}

.question-filter-selects label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--workspace-muted);
  font-size: 12px;
  font-weight: 800;
}

.question-filter-selects .select {
  min-height: 42px;
}

.question-results-section .question-card,
.home-question-section .question-card,
.home-waiting-section .question-card {
  box-shadow: none;
}

.question-card {
  min-width: 0;
}

.question-card .card-head h3,
.question-card .muted,
.question-card .meta {
  overflow-wrap: anywhere;
}

.question-detail-toolbar {
  display: flex;
}

.question-detail-card {
  display: grid;
  gap: 16px;
}

.question-detail-card .detail-title h1 {
  margin: 9px 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.question-body,
.answer-content {
  color: #344054;
  font-size: 15px;
  line-height: 1.75;
}

.question-attempt-box {
  display: grid;
  gap: 8px;
  border-left: 3px solid #a8c7fa;
  background: #f7faff;
  padding: 12px 14px;
}

.question-attempt-box h3 {
  margin: 0;
  font-size: 14px;
}

[data-math-render] {
  min-width: 0;
}

[data-math-render] .katex-display {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 14px 0;
  padding: 5px 2px;
  -webkit-overflow-scrolling: touch;
}

[data-math-render] .katex-display > .katex {
  min-width: max-content;
}

[data-math-render] .katex {
  font-size: 1.06em;
}

[data-math-render] .katex-error {
  color: inherit !important;
  font-family: inherit;
  overflow-wrap: anywhere;
}

.ai-answer-card .answer-content {
  border-top: 1px solid #dce8fb;
  padding-top: 14px;
}

/* Quiz hub */
.quiz-workspace {
  gap: 16px;
}

.quiz-section-tabs.workspace-tabs {
  width: min(520px, 100%);
}

.quiz-toolbar.workspace-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
  min-width: 0;
}

.quiz-card {
  min-width: 0;
  border-radius: 8px;
  box-shadow: none;
}

.quiz-card h3,
.quiz-card p {
  overflow-wrap: anywhere;
}

.quiz-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 7px;
  align-items: stretch;
}

.quiz-card-actions > button {
  min-width: 0;
}

.quiz-card-more {
  position: relative;
  min-width: 0;
}

.quiz-card-more > summary {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #475467;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.quiz-card-more > summary::-webkit-details-marker {
  display: none;
}

.quiz-card-more > summary .icon {
  width: 17px;
  height: 17px;
}

.quiz-card-more > div {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 8;
  display: grid;
  width: 150px;
  gap: 6px;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
  padding: 7px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
}

.quiz-card-more > div > button {
  width: 100%;
  min-width: 0;
}

.quiz-code-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 18px;
  align-items: end;
}

.quiz-code-copy {
  display: grid;
  gap: 6px;
}

.quiz-code-copy h2,
.quiz-code-copy p {
  margin: 0;
}

.quiz-code-form {
  min-width: 0;
}

.quiz-maker-help.workspace-section,
.quiz-editor {
  box-shadow: none;
}

/* Community */
.community-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  align-items: start;
}

.community-left-rail,
.community-main-panel {
  min-width: 0;
}

.community-left-rail {
  position: sticky;
  top: 92px;
}

.community-control-panel {
  padding: 14px;
  box-shadow: none;
}

.community-control-head,
.community-search-row {
  min-width: 0;
}

.community-search-row {
  display: grid;
  gap: 9px;
}

.community-search-row .searchbox {
  min-width: 0;
}

.community-search-row .compact-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.community-search-row .compact-tabs .chip {
  min-width: 0;
  padding: 0 7px;
}

.community-access-filter {
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
}

.community-access-filter > summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 0 10px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.community-access-filter > summary::-webkit-details-marker {
  display: none;
}

.community-access-filter > summary .icon {
  width: 15px;
  height: 15px;
}

.community-access-filter > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--workspace-line-soft);
  padding: 7px;
}

.community-access-filter .chip {
  min-width: 0;
}

.enhanced-board-list {
  display: grid;
  max-height: min(58vh, 620px);
  overflow-y: auto;
  padding-right: 2px;
}

.community-board {
  min-width: 0;
}

.community-board .board-main,
.community-board .board-main strong,
.community-board .board-main small {
  min-width: 0;
}

.community-hero {
  min-height: 0;
  border-radius: 8px;
  box-shadow: none;
}

.community-hero-text h2 {
  margin: 7px 0 4px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.community-section-tabs {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.community-section-tabs::-webkit-scrollbar {
  display: none;
}

.community-section-tabs button {
  min-width: 112px;
  flex: 1 0 auto;
}

.community-main-panel > .panel,
.community-main-panel .community-study-room,
.community-main-panel .community-post-form {
  box-shadow: none;
}

/* Notes and notices */
.note-workspace-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.note-toolbar.workspace-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 10px;
  padding: 12px;
}

.notes-workspace .note-tabs {
  width: 100%;
  margin: 0;
  padding: 4px;
}

.notes-workspace .note-tabs > button {
  border-color: transparent;
  background: transparent;
}

.notes-workspace .note-tabs > button.active {
  border-color: #d3deef;
  background: #fff;
  color: var(--workspace-blue);
}

.notes-workspace .note-layout {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
}

.notes-workspace .note-inspector {
  box-shadow: none;
}

.notice-compose-body {
  padding: 14px;
}

.notification-card.is-read {
  background: #fafbfc;
  color: #475467;
}

.notification-card.is-unread {
  border-left: 3px solid var(--blue);
}

/* Wordmaster */
.wordmaster-overview.workspace-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.wordmaster-overview.workspace-metrics .wordmaster-stat {
  min-width: 0;
  border: 0;
  border-right: 1px solid #e7ebf1;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  padding: 14px 16px;
}

.wordmaster-overview.workspace-metrics .wordmaster-stat:last-child {
  border-right: 0;
}

.wordmaster-overview .wordmaster-stat.action:hover {
  background: #f8fbff;
}

.wordmaster-board,
.wordmaster-test,
.wordmaster-list {
  box-shadow: none;
}

.wordmaster-board > .workspace-section-head,
.wordmaster-list > .workspace-section-head {
  border-bottom: 1px solid var(--workspace-line-soft);
  padding-bottom: 12px;
}

.wordmaster-days {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: thin;
}

.word-day-chip {
  min-width: 92px;
  flex: 0 0 auto;
}

.word-table > div {
  min-width: 0;
}

@media (max-width: 980px) {
  .home-dashboard-grid,
  .community-shell {
    grid-template-columns: 1fr;
  }

  .community-left-rail {
    position: static;
  }

  .enhanced-board-list {
    max-height: 330px;
  }

  .home-command-panel {
    grid-template-columns: 1fr;
  }

  .home-question-command {
    grid-row: auto;
  }

  .wordmaster-overview.workspace-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wordmaster-overview.workspace-metrics .wordmaster-stat:nth-child(3) {
    border-right: 0;
  }

  .wordmaster-overview.workspace-metrics .wordmaster-stat:nth-child(-n + 3) {
    border-bottom: 1px solid #e7ebf1;
  }
}

@media (max-width: 700px) {
  .workspace-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 13px;
  }

  .workspace-title-block h2 {
    font-size: 25px;
  }

  .workspace-head-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    width: 100%;
  }

  .workspace-head-actions > button,
  .workspace-primary-cta {
    width: 100%;
    min-width: 0;
  }

  .workspace-section-head {
    align-items: flex-start;
  }

  .home-quick-commands {
    grid-template-columns: 1fr;
  }

  .home-search-row,
  .question-filter-panel,
  .quiz-toolbar.workspace-section,
  .quiz-code-entry,
  .note-toolbar.workspace-section,
  .notes-workspace .note-layout {
    grid-template-columns: 1fr;
  }

  .home-overview-metrics,
  .note-workspace-metrics,
  .wordmaster-overview.workspace-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-metrics > button,
  .workspace-metrics > div,
  .wordmaster-overview.workspace-metrics .wordmaster-stat {
    border-right: 1px solid #e7ebf1;
    border-bottom: 1px solid #e7ebf1;
  }

  .workspace-metrics > button:nth-child(2n),
  .workspace-metrics > div:nth-child(2n),
  .wordmaster-overview.workspace-metrics .wordmaster-stat:nth-child(2n) {
    border-right: 0;
  }

  .home-overview-metrics > button:nth-last-child(-n + 2),
  .note-workspace-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .wordmaster-overview.workspace-metrics .wordmaster-stat:nth-child(3) {
    border-right: 1px solid #e7ebf1;
  }

  .wordmaster-overview.workspace-metrics .wordmaster-stat:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .home-waiting-list {
    grid-template-columns: 1fr;
  }

  .question-filter-panel {
    gap: 10px;
  }

  .question-filter-subjects,
  .question-filter-selects {
    grid-column: auto;
    grid-row: auto;
  }

  .question-filter-selects {
    grid-template-columns: 1fr;
  }

  .question-filter-selects label {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .ask-form .simple-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ask-form .simple-category-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .ask-step-card {
    padding: 14px;
  }

  .ask-media-field .media-actions.single {
    grid-template-columns: minmax(0, 1fr);
  }

  .ask-form .ask-advanced-fields > summary small {
    max-width: 58%;
    line-height: 1.3;
    text-align: right;
    white-space: normal;
  }

  .quiz-section-tabs.workspace-tabs {
    width: 100%;
  }

  .quiz-section-tabs.workspace-tabs > button {
    min-width: 112px;
  }

  .quiz-card-more > summary span {
    display: none;
  }

  .quiz-card-more > div {
    right: 0;
  }

  .notes-workspace .note-list {
    max-height: none;
    overflow: visible;
  }

  .notes-workspace .note-inspector {
    position: static;
  }

  .community-hero {
    grid-template-columns: 1fr;
  }

  .community-hero-actions {
    justify-content: flex-start;
  }

  .detail-title {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .container {
    width: calc(100% - 20px);
    padding-top: 16px;
  }

  .home-command-panel,
  .question-filter-panel,
  .quiz-toolbar.workspace-section,
  .note-toolbar.workspace-section {
    padding: 10px;
  }

  .home-question-command {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 14px 12px;
  }

  .home-question-command > .icon:last-child {
    display: none;
  }

  .home-command-icon {
    width: 38px;
    height: 38px;
  }

  .workspace-section-head {
    flex-wrap: wrap;
  }

  .workspace-section-head > :last-child:not(:first-child) {
    max-width: 100%;
  }

  .quiz-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-card-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  }

  .community-search-row .compact-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .community-section-tabs button {
    min-width: 100px;
  }

  .wordmaster-jump {
    grid-template-columns: 1fr;
  }
}

/* Profile subpages */
.account-settings-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: start;
}

.account-settings-grid > .workspace-section,
.account-settings-grid > .panel {
  min-width: 0;
  box-shadow: none;
}

.account-profile-panel {
  grid-row: span 3;
}

.account-settings-grid .workspace-section-head {
  border-bottom: 1px solid var(--workspace-line-soft);
  padding-bottom: 12px;
}

.tutor-summary-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tutor-workspace .tutor-motivation-hub,
.tutor-workspace .panel,
.activity-page .panel,
.activity-page .level-hero {
  box-shadow: none;
}

.tutor-queue-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tutor-queue-grid .question-card {
  padding: 12px;
}

.activity-stats.workspace-metrics {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.activity-page .level-hero {
  border-radius: 8px;
}

.activity-page .trophy-grid {
  min-width: 0;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.table-scroll .table {
  min-width: 760px;
}

@media (max-width: 1040px) {
  .tutor-summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tutor-summary-metrics > div:nth-child(3n) {
    border-right: 0;
  }

  .tutor-summary-metrics > div:nth-child(-n + 3) {
    border-bottom: 1px solid #e7ebf1;
  }

  .activity-stats.workspace-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .activity-stats.workspace-metrics > div:nth-child(4n) {
    border-right: 0;
  }

  .activity-stats.workspace-metrics > div:nth-child(-n + 4) {
    border-bottom: 1px solid #e7ebf1;
  }

  .activity-stats.workspace-metrics > div:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .account-settings-grid,
  .tutor-queue-grid {
    grid-template-columns: 1fr;
  }

  .account-profile-panel {
    grid-row: auto;
  }

  .tutor-summary-metrics,
  .activity-stats.workspace-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tutor-summary-metrics > div,
  .activity-stats.workspace-metrics > div {
    border-right: 1px solid #e7ebf1;
    border-bottom: 1px solid #e7ebf1;
  }

  .tutor-summary-metrics > div:nth-child(2n),
  .activity-stats.workspace-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .tutor-summary-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .activity-stats.workspace-metrics > div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }
}

/* Events, rewards, posts, and support */
.events-workspace .event-grid {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.events-workspace .event-card,
.event-detail-page .panel,
.rewards-workspace .inventory-card,
.community-post-detail .panel,
.support-workspace .panel {
  min-width: 0;
  border-radius: 8px;
  box-shadow: none;
}

.event-detail-page .event-detail-hero {
  min-width: 0;
  border-radius: 8px;
}

.event-detail-grid {
  align-items: start;
}

.inventory-summary.workspace-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rewards-workspace .reward-box-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.community-post-detail-card {
  display: grid;
  gap: 16px;
}

.community-post-detail-card .detail-title h1 {
  margin: 9px 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.community-comment-form .workspace-section-head,
.support-workspace .workspace-section > .workspace-section-head {
  border-bottom: 1px solid var(--workspace-line-soft);
  padding-bottom: 12px;
}

.support-message-panel {
  max-height: min(62vh, 680px);
  overflow-y: auto;
}

@media (max-width: 700px) {
  .inventory-summary.workspace-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-summary.workspace-metrics > div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .event-detail-grid,
  .support-admin-grid {
    grid-template-columns: 1fr;
  }
}


/* Source: /tutor-redesign.css?v=24 */
/*
 * Wooshin Tutor — unified interface redesign
 * Loaded after the functional core stylesheet and owns all product visuals.
 * Visual direction: calm, modern student workspace / mobile-first.
 */

:root {
  --ui-brand: #5b5bd6;
  --ui-brand-strong: #4747bd;
  --ui-brand-soft: #eeeeff;
  --ui-mint: #14a894;
  --ui-mint-soft: #e9faf7;
  --ui-coral: #f47458;
  --ui-amber: #f5ad36;
  --ui-danger: #e5484d;
  --ui-success: #16a36a;
  --ui-ink: #182230;
  --ui-text: #344054;
  --ui-muted: #667085;
  --ui-subtle: #98a2b3;
  --ui-line: #e4e7ec;
  --ui-line-strong: #d0d5dd;
  --ui-canvas: #f6f7fb;
  --ui-canvas-blue: #f2f4ff;
  --ui-surface: #ffffff;
  --ui-surface-soft: #fafbff;
  --ui-radius-xs: 8px;
  --ui-radius-sm: 12px;
  --ui-radius-md: 16px;
  --ui-radius-lg: 22px;
  --ui-radius-xl: 28px;
  --ui-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --ui-shadow-sm: 0 7px 20px rgba(16, 24, 40, 0.06);
  --ui-shadow-md: 0 18px 42px rgba(16, 24, 40, 0.10);
  --ui-shadow-brand: 0 12px 28px rgba(91, 91, 214, 0.22);
  --ui-content: 1180px;
  --ui-header-h: 76px;

  --blue: var(--ui-brand);
  --blue-dark: var(--ui-brand-strong);
  --blue-soft: var(--ui-brand-soft);
  --green: var(--ui-success);
  --red: var(--ui-danger);
  --amber: var(--ui-amber);
  --ink: var(--ui-ink);
  --muted: var(--ui-muted);
  --line: var(--ui-line);
  --line-strong: var(--ui-line-strong);
  --bg: var(--ui-canvas);
  --card: var(--ui-surface);
  --shadow: var(--ui-shadow-md);
  --shadow-soft: var(--ui-shadow-sm);
  --campus-green: var(--ui-brand);
  --campus-green-deep: var(--ui-brand-strong);
  --campus-green-soft: var(--ui-brand-soft);
  --campus-blue: var(--ui-brand);
  --campus-blue-deep: var(--ui-brand-strong);
  --campus-blue-soft: var(--ui-brand-soft);
  --campus-ink: var(--ui-ink);
  --campus-text: var(--ui-text);
  --campus-muted: var(--ui-muted);
  --campus-paper: var(--ui-surface);
  --campus-bg: var(--ui-canvas);
  --campus-line: var(--ui-line);
  --campus-line-strong: var(--ui-line-strong);
  --campus-shadow: var(--ui-shadow-sm);
  --campus-shadow-raised: var(--ui-shadow-md);
  --workspace-blue: var(--ui-brand);
  --workspace-blue-dark: var(--ui-brand-strong);
  --workspace-blue-soft: var(--ui-brand-soft);
  --workspace-ink: var(--ui-ink);
  --workspace-muted: var(--ui-muted);
  --workspace-line: var(--ui-line);
  --workspace-line-soft: #eef0f5;
  --content-width: var(--ui-content);
}

html {
  min-width: 320px;
  background: var(--ui-canvas);
  color-scheme: light;
  scroll-padding-top: calc(var(--ui-header-h) + 20px);
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 7% -8%, rgba(91, 91, 214, 0.10), transparent 29rem),
    radial-gradient(circle at 95% 18%, rgba(20, 168, 148, 0.08), transparent 28rem),
    var(--ui-canvas);
  color: var(--ui-text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.012em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(91, 91, 214, 0.18);
  color: var(--ui-ink);
}

button,
input,
select,
textarea,
summary {
  font: inherit;
}

button,
a,
summary,
[role="button"],
[role="link"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[role="link"][tabindex="0"]:focus-visible,
[role="button"][tabindex="0"]:focus-visible {
  outline: 3px solid rgba(91, 91, 214, 0.22);
  outline-offset: 2px;
}

/* App frame */
.app-shell {
  min-height: 100dvh;
  padding-bottom: 72px;
  background: transparent;
}

.container {
  width: min(var(--ui-content), calc(100% - 40px));
  margin-inline: auto;
  padding: 34px 0 72px;
}

.app-shell:not(.is-mounted),
.auth-wrap:not(.is-mounted) {
  opacity: 0;
}

.app-shell.is-mounted,
.auth-wrap.is-mounted {
  opacity: 1;
  transition: opacity 180ms ease;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: auto;
  border: 0;
  border-bottom: 1px solid rgba(228, 231, 236, 0.88);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--ui-brand), var(--ui-mint));
}

.topbar-inner {
  display: grid;
  grid-template-columns: minmax(175px, auto) minmax(360px, 1fr) minmax(250px, auto);
  align-items: center;
  width: min(calc(var(--ui-content) + 40px), calc(100% - 40px));
  min-height: var(--ui-header-h);
  margin-inline: auto;
  gap: 24px;
  padding: 10px 0;
}

.brand,
.topbar .brand,
.topbar .brand:hover,
.topbar .brand:focus-visible {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  gap: 11px;
  border: 0;
  border-radius: var(--ui-radius-sm);
  background: transparent;
  color: var(--ui-ink);
  padding: 4px 8px 4px 2px;
  box-shadow: none;
  text-align: left;
}

.topbar .brand:hover {
  background: var(--ui-surface-soft);
}

.brand::after {
  display: none;
}

.brand-icons {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.brand img,
.brand-logo,
.topbar .brand .brand-logo.tutor-logo,
.topbar .brand .brand-logo.school-logo {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  margin: auto;
  object-fit: contain;
}

.brand-title {
  position: relative;
  display: block;
  min-width: 102px;
  height: 42px;
  overflow: hidden;
}

.brand-title-main,
.brand-title-school {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  width: 100%;
  height: 42px;
  color: var(--ui-ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand-title-school {
  color: var(--ui-brand);
  font-size: 16px;
}

.primary-nav,
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav button,
.primary-nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 42px;
  gap: 7px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ui-muted);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nav button:hover,
.primary-nav button:hover {
  background: #f4f4fb;
  color: var(--ui-brand);
}

.nav button.active,
.nav button.active:hover,
.primary-nav button.active,
.primary-nav button.active:hover {
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.nav button.active::after,
.primary-nav button.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -11px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--ui-brand);
}

.nav .icon,
.primary-nav .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.15;
}

.topbar-right,
.topbar-actions,
.account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 8px;
}

.topbar-ask-cta,
.topbar-mini,
.topbar-notice-button,
.profile-pill,
.mobile-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 7px;
  border-radius: 12px;
  font-weight: 780;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.topbar-ask-cta {
  border: 1px solid var(--ui-brand);
  background: var(--ui-brand);
  color: #fff;
  padding: 0 14px;
  box-shadow: 0 7px 18px rgba(91, 91, 214, 0.20);
}

.topbar-ask-cta:hover {
  background: var(--ui-brand-strong);
  box-shadow: var(--ui-shadow-brand);
  transform: translateY(-1px);
}

.topbar-mini {
  border: 1px solid var(--ui-line);
  background: #fff;
  color: var(--ui-text);
  padding: 0 12px;
}

.topbar-mini:hover {
  border-color: #b9b9ef;
  color: var(--ui-brand);
}

.topbar-notice-button {
  position: relative;
  width: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--ui-line);
  background: #fff;
  color: var(--ui-muted);
}

.topbar-notice-button:hover {
  border-color: #c8c8f4;
  background: var(--ui-brand-soft);
  color: var(--ui-brand);
}

.topbar-notice-button > span {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--ui-coral);
  color: #fff;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 900;
}

.profile-pill,
.guest-login-pill {
  max-width: 190px;
  border: 1px solid var(--ui-line);
  background: #fff;
  color: var(--ui-text);
  padding: 4px 10px 4px 5px;
}

.profile-pill:hover,
.guest-login-pill:hover {
  border-color: #c8c8f4;
  background: var(--ui-surface-soft);
  color: var(--ui-brand);
}

.profile-pill .avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.account-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.mobile-logout-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.mobile-logout-button span {
  display: none;
}

/* Page title system */
.workspace-page,
.workspace-subpage,
.detail,
.quiz-editor-wide,
.profile-page,
.admin-workspace,
.notes-workspace,
.community-workspace,
.questions-workspace,
.ask-workspace {
  display: grid;
  gap: 24px;
}

.workspace-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 126px;
  gap: 24px;
  overflow: hidden;
  border: 1px solid rgba(91, 91, 214, 0.12);
  border-radius: var(--ui-radius-xl);
  background:
    radial-gradient(circle at 82% 22%, rgba(20, 168, 148, 0.16), transparent 17rem),
    linear-gradient(135deg, #ffffff 0%, #f6f5ff 58%, #f2fbfa 100%);
  padding: 28px 30px;
  box-shadow: var(--ui-shadow-sm);
}

.workspace-head::after {
  content: "";
  position: absolute;
  right: 34px;
  top: 22px;
  width: 74px;
  height: 74px;
  border: 14px solid rgba(91, 91, 214, 0.07);
  border-radius: 26px;
  transform: rotate(15deg);
  pointer-events: none;
}

.workspace-title-block {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 720px;
  gap: 7px;
}

.workspace-kicker,
.eyebrow,
.crawler-kicker,
.home-task-label {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  color: var(--ui-brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.workspace-title-block h1,
.workspace-title-block h2,
.workspace-head h1,
.workspace-head h2 {
  margin: 0;
  color: var(--ui-ink);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.workspace-title-block p,
.workspace-head p {
  max-width: 700px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 15px;
  line-height: 1.65;
}

.workspace-head-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-section-head,
.section-title,
.compact-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  gap: 14px;
  margin: 0;
}

.workspace-section-head > div,
.section-title > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.workspace-section-head h2,
.section-title h2,
.panel h2 {
  margin: 0;
  color: var(--ui-ink);
  font-size: 19px;
  font-weight: 860;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.workspace-section-head p,
.section-title p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Universal surfaces */
.panel,
.workspace-content-section,
.question-card,
.answer-card,
.notice-card,
.auth-card,
.tutorial-modal,
.document-viewer-modal,
.admin-pdf-modal,
.event-metric-card,
.inventory-card,
.profile-section-card,
.quiz-start-card,
.post-quiz-gate,
.community-join-gate,
.ask-step-card,
.insert-panel,
.login-required-panel {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--ui-shadow-xs);
}

.panel,
.workspace-content-section,
.profile-section-card,
.login-required-panel {
  padding: 22px;
}

.panel:hover,
.question-card:hover,
.notice-card:hover,
.workspace-content-section:hover {
  border-color: #d8d9ef;
}

.workspace-content-section {
  display: grid;
  min-width: 0;
  gap: 17px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two,
.split {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-head,
.detail-title,
.public-hidden-head,
.study-room-head,
.insert-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
}

.meta,
.badges,
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.meta {
  color: var(--ui-muted);
  font-size: 12px;
}

.muted {
  color: var(--ui-muted) !important;
}

.mini {
  font-size: 13px;
}

.tiny {
  font-size: 11px;
}

.badge,
.chip,
.question-status-label,
.shop-status-badge,
.document-type,
.level-badge,
.professional-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  gap: 5px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: #f8f9fc;
  color: var(--ui-muted);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
}

.badge.waiting,
.badge.status-waiting,
.question-status-label.waiting {
  border-color: #f5d69d;
  background: #fff8e8;
  color: #a76600;
}

.badge.done,
.badge.status-done,
.badge.selected,
.question-status-label.done {
  border-color: #afe5d3;
  background: var(--ui-mint-soft);
  color: #087665;
}

.badge.reserved,
.badge.status-reserved {
  border-color: #c9c8f6;
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.empty {
  display: grid;
  gap: 6px;
  border: 1px dashed #cfd4df;
  border-radius: var(--ui-radius-md);
  background: #fbfcfe;
  color: var(--ui-muted);
  padding: 24px;
  text-align: center;
}

.empty strong {
  color: var(--ui-text);
}

.compact-empty {
  padding: 16px;
  text-align: left;
}

/* Buttons */
.primary,
.success,
.danger,
.ghost,
.small-button,
.chip,
.choice-btn,
.media-button,
.icon-ghost,
.square-control,
.icon-only,
.document-button,
.quiz-start-button,
.compose-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  gap: 7px;
  border-radius: 12px;
  padding: 0 15px;
  font-weight: 790;
  line-height: 1.1;
  text-align: center;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.primary,
.compose-submit,
.quiz-start-button {
  border: 1px solid var(--ui-brand);
  background: var(--ui-brand);
  color: #fff;
  box-shadow: 0 7px 17px rgba(91, 91, 214, 0.17);
}

.primary:hover,
.compose-submit:hover,
.quiz-start-button:hover {
  border-color: var(--ui-brand-strong);
  background: var(--ui-brand-strong);
  color: #fff;
  box-shadow: var(--ui-shadow-brand);
  transform: translateY(-1px);
}

.success {
  border: 1px solid var(--ui-success);
  background: var(--ui-success);
  color: #fff;
}

.danger {
  border: 1px solid var(--ui-danger);
  background: var(--ui-danger);
  color: #fff;
}

.ghost,
.small-button,
.chip,
.choice-btn,
.icon-ghost,
.square-control,
.icon-only,
.document-button {
  border: 1px solid var(--ui-line-strong);
  background: #fff;
  color: var(--ui-text);
  box-shadow: none;
}

.ghost:hover,
.small-button:hover,
.chip:hover,
.choice-btn:hover,
.icon-ghost:hover,
.square-control:hover,
.icon-only:hover,
.document-button:hover {
  border-color: #bfc0ee;
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.chip.active,
.choice-btn.active,
.tabs button.active,
.workspace-tabs button.active,
.feed-tab-row button.active,
.note-tabs button.active,
.admin-section-tabs button.active,
.community-section-tabs button.active {
  border-color: var(--ui-brand);
  background: var(--ui-brand);
  color: #fff;
}

.icon-only,
.square-control,
.icon-ghost {
  width: 43px;
  min-width: 43px;
  padding: 0;
}

.primary .icon,
.ghost .icon,
.small-button .icon,
.chip .icon,
.icon-ghost .icon,
.square-control .icon,
.icon-only .icon {
  width: 16px;
  height: 16px;
}

button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none !important;
}

/* Forms */
.form,
.compact-form,
.field-block,
.dialog-field,
.admin-user-search,
.user-edit-form {
  display: grid;
  gap: 10px;
}

.field-block > label,
.dialog-field > label,
.form > label,
.compact-form > label,
.community-mobile-picker label {
  color: var(--ui-text);
  font-size: 12px;
  font-weight: 820;
}

.input,
.textarea,
.select,
.search-field,
.home-search-form,
.compose-textarea,
.big-input,
.compact-textarea {
  width: 100%;
  border: 1px solid var(--ui-line-strong);
  border-radius: 13px;
  background: #fff;
  color: var(--ui-ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.input,
.select {
  min-height: 46px;
  padding: 11px 13px;
}

.textarea,
.compose-textarea,
.big-input,
.compact-textarea {
  min-height: 118px;
  padding: 13px 14px;
  resize: vertical;
}

.input:hover,
.textarea:hover,
.select:hover,
.compose-textarea:hover,
.search-field:hover {
  border-color: #b9bfca;
}

.input:focus,
.textarea:focus,
.select:focus,
.compose-textarea:focus,
.search-field:focus-within,
.home-search-form:focus-within {
  border-color: var(--ui-brand);
  box-shadow: 0 0 0 4px rgba(91, 91, 214, 0.11);
}

.input::placeholder,
.textarea::placeholder,
.compose-textarea::placeholder {
  color: var(--ui-subtle);
}

.search-field,
.home-search-form {
  display: flex;
  align-items: center;
  min-height: 46px;
  gap: 9px;
  padding: 0 12px;
}

.search-field input,
.home-search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ui-ink);
  outline: 0;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.form-actions,
.media-actions,
.home-actions,
.home-primary-actions,
.question-followup-actions,
.auto-answer-dataset-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.tabs,
.workspace-tabs,
.note-tabs,
.feed-tab-row,
.community-section-tabs,
.admin-section-tabs,
.profile-navigation-shell {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: #f6f7fa;
  padding: 5px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar,
.workspace-tabs::-webkit-scrollbar,
.note-tabs::-webkit-scrollbar,
.feed-tab-row::-webkit-scrollbar,
.community-section-tabs::-webkit-scrollbar,
.admin-section-tabs::-webkit-scrollbar,
.profile-navigation-shell::-webkit-scrollbar {
  display: none;
}

.tabs button,
.workspace-tabs button,
.note-tabs button,
.feed-tab-row button,
.community-section-tabs button,
.admin-section-tabs button,
.profile-primary-tabs button,
.profile-more-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ui-muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

.tabs button:hover,
.workspace-tabs button:hover,
.note-tabs button:hover,
.feed-tab-row button:hover,
.community-section-tabs button:hover,
.admin-section-tabs button:hover,
.profile-primary-tabs button:hover,
.profile-more-menu summary:hover {
  background: #fff;
  color: var(--ui-brand);
}

/* Responsive event banner */
.site-event-banner {
  width: min(var(--ui-content), calc(100% - 32px));
  margin: 16px auto 0;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--ui-shadow-md);
}

.event-banner-main {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 1;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: #f3f4fb;
  padding: 0;
}

.event-banner-main img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.event-banner-actions {
  display: flex;
  min-height: 48px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  border-top: 1px solid var(--ui-line);
  background: #fff;
  padding: 7px 10px;
}

.event-banner-actions .event-banner-dismiss {
  min-height: 34px;
  border-color: var(--ui-line);
  background: var(--ui-surface-soft);
}

/* Every admin destination stays visible without horizontal discovery. */
.admin-section-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: visible;
}

.admin-section-tabs button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

/* Home */
.home-task-board {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.home-primary-task,
.home-today-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-xl);
  background: #fff;
  padding: 27px;
  box-shadow: var(--ui-shadow-sm);
}

.home-primary-task {
  border-color: rgba(91, 91, 214, 0.16);
  background:
    radial-gradient(circle at 95% 5%, rgba(91, 91, 214, 0.13), transparent 16rem),
    linear-gradient(145deg, #fff 0%, #fafaff 100%);
}

.home-primary-task::before {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -58px;
  width: 180px;
  height: 180px;
  border: 30px solid rgba(20, 168, 148, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.home-primary-task h2 {
  position: relative;
  margin: 0;
  color: var(--ui-ink);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.045em;
}

.home-primary-task p {
  position: relative;
  max-width: 650px;
  margin: 0;
  color: var(--ui-muted);
}

.home-primary-actions,
.home-search-form {
  position: relative;
  z-index: 1;
}

.home-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 0;
  background: transparent;
  padding: 0;
}

.home-search-form .search-field,
.home-search-form > label {
  min-height: 48px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 13px;
  background: #fff;
}

.home-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.home-side-stack,
.home-context-list,
.home-community-list,
.home-question-list,
.home-today-list {
  display: grid;
  gap: 10px;
}

.home-context-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-context-item,
.home-community-row,
.home-notice-row {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: #fbfcfe;
  color: inherit;
  padding: 13px;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.home-context-item:hover,
.home-community-row:hover,
.home-notice-row:hover {
  border-color: #c9c9f1;
  background: var(--ui-brand-soft);
  transform: translateY(-1px);
}

/* Questions */
.question-list,
.answer-list,
.notice-list,
.admin-user-list,
.log-list,
.profile-activity-list {
  display: grid;
  gap: 10px;
}

.question-row,
.compact-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 16px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: #fff;
  padding: 16px 17px;
  box-shadow: var(--ui-shadow-xs);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.question-row:hover,
.compact-question-row:hover {
  border-color: #c8c8ef;
  box-shadow: var(--ui-shadow-sm);
  transform: translateY(-1px);
}

.question-row-main,
.question-row-status,
.question-row-count {
  min-width: 0;
}

.question-row-main h3,
.question-card h3,
.notice-card strong,
.answer-card strong {
  margin: 0;
  color: var(--ui-ink);
  font-weight: 830;
  line-height: 1.45;
}

.question-card,
.answer-card,
.notice-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 17px;
}

.question-card[role="link"],
.notice-card[role="link"],
.question-row[role="link"],
.profile-row-card[role="link"] {
  cursor: pointer;
}

.question-detail-heading,
.question-detail-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.question-detail-title-copy {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.question-detail-title-copy h1 {
  margin: 0;
  color: var(--ui-ink);
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.content-box {
  color: var(--ui-text);
  white-space: pre-wrap;
  line-height: 1.78;
}

.question-image,
.image-preview img,
.note-preview-card img,
.quiz-question-image {
  max-width: 100%;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: #fff;
  object-fit: cover;
}

.question-image-action {
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.question-image-action span {
  border-radius: 10px;
  background: rgba(24, 34, 48, 0.84);
  backdrop-filter: blur(6px);
}

.question-followup-form,
.ai-followup-guide,
.ai-solution-section {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: #fbfcff;
  padding: 18px;
}

.ask-step-card {
  display: grid;
  gap: 16px;
  padding: 21px;
}

.ask-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ask-step-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--ui-brand-soft);
  color: var(--ui-brand);
}

.choice-grid,
.subject-grid,
.category-grid,
.answer-type-grid,
.course-grid,
.unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.media-button {
  min-height: 64px;
  border: 1px dashed #b8b9e8;
  background: #f9f9ff;
  color: var(--ui-brand);
}

.media-button:hover {
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
}

.ask-submit-bar {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ui-shadow-md);
  backdrop-filter: blur(14px);
}

/* Question composer: optional settings stay quiet until they are needed. */
.ask-form .ask-advanced-fields {
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  padding: 0;
  box-shadow: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.ask-form .ask-advanced-fields[open] {
  display: block;
  border-color: #b9d0ff;
  background: #fbfcfe;
}

.ask-form .ask-advanced-fields > summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 12px;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 15px;
  background: #fff;
  color: #263449;
  cursor: pointer;
  list-style: none;
}

.ask-form .ask-advanced-fields > summary::-webkit-details-marker {
  display: none;
}

.ask-form .ask-advanced-fields > summary > .icon {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eef4ff;
  color: #1769ff;
  padding: 10px;
}

.ask-form .ask-advanced-fields > summary > span {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.ask-form .ask-advanced-fields > summary strong {
  color: #1d2939;
  font-size: 15px;
  line-height: 1.35;
}

.ask-form .ask-advanced-fields > summary small {
  max-width: none;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
}

.ask-form .ask-advanced-fields > summary::after,
.quiz-card-more > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 150ms ease;
}

.ask-form .ask-advanced-fields[open] > summary {
  border-bottom: 1px solid #dfe7f3;
  background: #f6f9ff;
  color: #1259c3;
}

.ask-form .ask-advanced-fields[open] > summary::after,
.quiz-card-more[open] > summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.ask-form .ask-advanced-fields > summary:focus-visible,
.quiz-card-more > summary:focus-visible {
  outline: 3px solid rgba(23, 105, 255, 0.22);
  outline-offset: -3px;
}

.ask-form .ask-advanced-fields > .field-block {
  display: grid;
  gap: 10px;
  margin: 0 16px;
  padding: 16px 0;
}

.ask-form .ask-advanced-fields > .field-block + .field-block {
  border-top: 1px solid #e7ebf1;
}

.ask-form .ask-advanced-fields > .field-block > strong {
  color: #344054;
  font-size: 13px;
  line-height: 1.4;
}

.ask-form .ask-advanced-fields .choice-grid {
  gap: 8px;
}

.ask-form .ask-advanced-fields .choice-btn {
  min-height: 44px;
  border-radius: 8px;
}

.ask-form .ask-advanced-fields .ask-optional-copy {
  margin: 0 16px 16px;
  border-top: 1px solid #e7ebf1;
  padding: 16px 0 0;
}

/* Quiz */
.quiz-code-entry,
.quiz-help,
.quiz-start,
.quiz-play,
.quiz-result,
.quiz-review,
.quiz-live-stage,
.korean-quiz-app,
.wordmaster-shell {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-xl);
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

.quiz-code-entry,
.quiz-help,
.quiz-start,
.quiz-result,
.quiz-review,
.korean-quiz-app,
.wordmaster-shell {
  padding: 24px;
}

.quiz-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: #fff;
  padding: 18px;
  box-shadow: var(--ui-shadow-xs);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.quiz-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--ui-brand), var(--ui-mint));
}

.quiz-card:hover {
  border-color: #c7c7ed;
  box-shadow: var(--ui-shadow-sm);
  transform: translateY(-2px);
}

/* Quiz card actions expand in place, so controls never cover card content. */
.quiz-card-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.quiz-card-actions > .quiz-card-more {
  grid-column: 1 / -1;
}

.quiz-card-more {
  position: static;
  display: block;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #f8fafc;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.quiz-card-more[open] {
  border-color: #b9d0ff;
  background: #f6f9ff;
}

.quiz-card-more > summary {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 10px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #475467;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.quiz-card-more > summary .icon {
  width: 17px;
  height: 17px;
}

.quiz-card-more > summary span {
  display: block;
}

.quiz-card-more[open] > summary {
  color: #1259c3;
}

.quiz-card-more > div {
  position: static;
  inset: auto;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  border: 0;
  border-top: 1px solid #dfe7f3;
  border-radius: 0;
  background: #fff;
  padding: 8px;
  box-shadow: none;
  animation: compact-details-in 150ms ease both;
}

.quiz-card-more > div > button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  justify-content: center;
  border-radius: 7px;
}

.quiz-card-more > div > button:only-child,
.quiz-card-more > div > button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@keyframes compact-details-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-answer {
  min-height: 62px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 15px;
  background: #fff;
  color: var(--ui-text);
  padding: 12px 14px;
  font-weight: 760;
  text-align: left;
}

.quiz-answer:hover {
  border-color: #bfc0ef;
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.quiz-answer.selected,
.quiz-answer.correct {
  border-color: var(--ui-mint);
  background: var(--ui-mint-soft);
  color: #087665;
}

.quiz-play-top,
.quiz-progress,
.quiz-stage-meta,
.quiz-live-control-row,
.korean-quiz-toolbar,
.korean-quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quiz-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceef4;
}

.quiz-progress > span,
.quiz-progress > i {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ui-brand), var(--ui-mint));
}

.quiz-timer,
.quiz-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7d7f6;
  border-radius: 12px;
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
  padding: 8px 11px;
  font-weight: 900;
}

/* Community */
.community-hero,
.community-board-browser,
.community-feed,
.community-study-room,
.post-detail-card,
.minimal-compose {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
}

.community-board-browser:not(.is-open) {
  display: none;
}

.community-board-browser.is-open {
  display: block;
}

.community-mobile-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.community-mobile-picker label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.community-mobile-picker .icon-only {
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
}

.community-hero,
.community-board-browser,
.community-study-room,
.minimal-compose {
  padding: 20px;
}

.community-board-card,
.enhanced-board-row,
.community-post-card,
.study-seat,
.study-rank,
.desk-note {
  border: 1px solid var(--ui-line);
  border-radius: 15px;
  background: #fff;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.community-board-card:hover,
.enhanced-board-row:hover,
.community-post-card:hover {
  border-color: #c8c8ef;
  background: #fcfcff;
  transform: translateY(-1px);
}

.community-post-card,
.enhanced-board-row,
.study-seat,
.study-rank,
.desk-note {
  padding: 15px;
}

.community-board-browser.is-open {
  box-shadow: var(--ui-shadow-sm);
}

.class-board-note {
  border-radius: 3px 3px 12px 3px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.14);
}

/* Profile */
.profile-page .profile-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-xl);
  background: #fff;
  padding: 0;
  box-shadow: var(--ui-shadow-sm);
}

.profile-cover-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: normal;
  gap: 18px;
  overflow: hidden;
  border-right: 1px solid var(--ui-line);
  background: #f8faff;
  padding: 24px;
}

.profile-cover-main::after {
  display: none;
}

.profile-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 17px;
}

.profile-edit-button {
  position: relative;
  z-index: 1;
  justify-self: end;
}

.profile-identity .avatar,
.profile-cover .avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border: 4px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

.profile-stat-grid,
.stats,
.compact-stats,
.workspace-metrics,
.activity-stats,
.tutor-summary-metrics,
.korean-quiz-stats,
.wordmaster-stat-grid,
.profile-shop-summary,
.event-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-page .profile-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: auto;
  max-width: none;
  align-self: center;
  justify-self: stretch;
  margin: 20px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: #fff;
}

.profile-page .profile-stat-grid > div {
  justify-items: start;
  border: 0;
  border-right: 1px solid var(--ui-line);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.profile-page .profile-stat-grid > div:last-child {
  border-right: 0;
}

.profile-stat-grid > div,
.stat,
.workspace-metrics > div,
.activity-stats > div,
.tutor-summary-metrics > div,
.korean-quiz-stats > div,
.profile-shop-summary > div,
.event-metric-card {
  display: grid;
  min-width: 0;
  gap: 3px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 13px;
}

.profile-stat-grid strong,
.stat strong,
.workspace-metrics strong,
.activity-stats strong,
.tutor-summary-metrics strong,
.profile-shop-summary strong {
  color: var(--ui-ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.1;
}

.profile-stat-grid span,
.stat span,
.workspace-metrics span,
.activity-stats span,
.tutor-summary-metrics span,
.profile-shop-summary span {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 760;
}

.profile-page .profile-stat-grid span {
  overflow: visible;
  width: auto;
  text-align: left;
  text-overflow: clip;
  white-space: normal;
}

.profile-page .profile-cover.has-profile-banner {
  gap: 12px;
  padding: 16px;
}

.profile-page .profile-cover.has-profile-banner .profile-cover-main {
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
}

.profile-page .profile-cover.has-profile-banner .profile-stat-grid {
  margin: 0;
}

.profile-navigation-shell {
  position: relative;
  z-index: 5;
  align-items: center;
  margin-top: -1px;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--ui-line);
  border-radius: 0;
  background: #fff;
  padding: 8px 12px;
}

.profile-primary-tabs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
}

.profile-primary-tabs button.active,
.profile-more-menu summary.active {
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.profile-more-menu {
  position: relative;
  flex: 0 0 auto;
}

.profile-more-menu > summary {
  cursor: pointer;
  list-style: none;
}

.profile-more-menu > summary::-webkit-details-marker {
  display: none;
}

.profile-more-menu[open] {
  z-index: 40;
}

.profile-more-menu[open] > summary {
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.profile-more-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  display: grid;
  width: 320px;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  gap: 10px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  box-shadow: var(--ui-shadow-md);
}

.profile-more-group {
  display: grid;
  gap: 4px;
}

.profile-more-group + .profile-more-group {
  border-top: 1px solid var(--ui-line);
  padding-top: 9px;
}

.profile-more-group > strong {
  color: var(--ui-subtle);
  padding: 2px 8px;
  font-size: 11px;
}

.profile-more-group > div {
  display: grid;
  gap: 2px;
}

.profile-more-group button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 16px;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ui-text);
  padding: 8px 10px;
  text-align: left;
}

.profile-more-group button:hover,
.profile-more-group button.active {
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.profile-more-group button > .icon:last-child {
  width: 15px;
  height: 15px;
  color: var(--ui-subtle);
}

.profile-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-shortcut-card,
.profile-community-card,
.trophy-card,
.inventory-card {
  display: grid;
  min-width: 0;
  gap: 9px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: #fff;
  color: inherit;
  padding: 15px;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.profile-shortcut-card:hover,
.profile-community-card:hover,
.trophy-card:hover,
.inventory-card:hover {
  border-color: #c8c8ef;
  box-shadow: var(--ui-shadow-sm);
  transform: translateY(-1px);
}

.profile-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
}

/* Notes, shop, tutor, admin */
.note-card,
.note-preview-card,
.shop-item,
.shop-banner-card,
.admin-user-card,
.admin-priority-item,
.tutor-motivation-card,
.reward-box,
.auto-answer-dataset,
.server-status,
.storage-meter,
.log-row {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
}

.note-card,
.note-preview-card,
.shop-item,
.shop-banner-card,
.admin-user-card,
.admin-priority-item,
.tutor-motivation-card,
.reward-box,
.auto-answer-dataset,
.server-status,
.storage-meter {
  padding: 16px;
}

.note-card:hover,
.shop-item:hover,
.shop-banner-card:hover,
.admin-user-card:hover,
.admin-priority-item:hover {
  border-color: #c8c8ef;
}

.note-workspace-layout,
.shop-layout,
.admin-workspace-layout,
.tutor-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.admin-panel-grid,
.reward-box-grid,
.inventory-grid,
.shop-grid,
.trophy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-priority-item {
  position: relative;
  overflow: hidden;
}

.admin-priority-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--ui-brand);
}

.table {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.table th,
.table td {
  border: 0;
  border-bottom: 1px solid var(--ui-line);
  padding: 12px 13px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.table th {
  background: #f7f8fb;
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* Auth / dialogs / viewer */
.auth-wrap {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(91, 91, 214, 0.16), transparent 26rem),
    radial-gradient(circle at 88% 82%, rgba(20, 168, 148, 0.13), transparent 26rem),
    var(--ui-canvas);
  padding: 24px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
  box-shadow: var(--ui-shadow-md);
}

.auth-card .brand {
  margin-bottom: 18px;
}

.auth-invite-notice {
  border: 1px solid #c9c8f5;
  border-radius: 13px;
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
  padding: 12px 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  background: rgba(16, 24, 40, 0.46);
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tutorial-modal,
.document-viewer-modal,
.admin-pdf-modal {
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.24);
}

.tutorial-modal {
  width: min(440px, 100%);
  padding: 23px;
}

.document-viewer-modal {
  width: min(1160px, 100%);
  height: min(860px, calc(100dvh - 40px));
  padding: 14px;
}

.document-viewer-frame {
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: #f5f6fa;
}

.admin-pdf-modal {
  border-radius: var(--ui-radius-lg);
  background: #f7f8fb;
}

.admin-pdf-stage {
  border-radius: var(--ui-radius-md);
}

.toast {
  position: fixed;
  top: calc(var(--ui-header-h) + 12px);
  right: 18px;
  z-index: 300;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(24, 34, 48, 0.94);
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--ui-shadow-md);
  backdrop-filter: blur(14px);
}

.level-up-pop {
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-md);
}

.welcome-moment {
  position: fixed;
  z-index: 460;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 20, 35, 0.28);
  animation: welcome-backdrop-in 180ms ease both;
}

.welcome-moment.is-leaving {
  animation: welcome-backdrop-out 180ms ease both;
}

.welcome-moment-panel {
  position: relative;
  width: min(360px, 100%);
  overflow: hidden;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #fff;
  padding: 30px 24px 24px;
  box-shadow: 0 20px 54px rgba(18, 34, 56, 0.2);
  color: #152236;
  text-align: center;
  animation: welcome-panel-in 420ms cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}

.welcome-moment-check {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #1769ff;
  color: #fff;
  animation: welcome-check-in 520ms cubic-bezier(0.16, 1.2, 0.3, 1) both;
}

.welcome-moment-check svg {
  width: 29px;
  height: 29px;
  stroke-width: 3;
}

.welcome-moment-panel > strong {
  display: block;
  font-size: 23px;
  line-height: 1.3;
}

.welcome-moment-panel > p {
  margin: 8px 0 20px;
  color: #59687c;
  font-size: 14px;
  line-height: 1.55;
}

.welcome-moment-panel > button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: #1769ff;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.welcome-moment-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  transform-origin: left;
  background: #75e6a4;
  animation: welcome-progress 3.2s linear both;
}

@keyframes welcome-backdrop-in { from { opacity: 0; } }
@keyframes welcome-backdrop-out { to { opacity: 0; } }
@keyframes welcome-panel-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes welcome-check-in {
  0% { opacity: 0; transform: scale(0.55) rotate(-12deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes welcome-progress { to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .welcome-moment,
  .welcome-moment.is-leaving,
  .welcome-moment-panel,
  .welcome-moment-check,
  .welcome-moment-progress,
  .quiz-card-more > div,
  .student-card-scanline {
    animation: none;
  }
}

/* Floating / bottom navigation */
.bottom-ask {
  right: max(18px, calc((100vw - var(--ui-content)) / 2));
  bottom: 20px;
  border-radius: 15px;
  box-shadow: var(--ui-shadow-brand);
}

.mobile-tabbar {
  display: none;
}

/* Boot screen */
.crawler-home.boot-home {
  display: grid;
  width: min(760px, calc(100% - 32px));
  min-height: 100dvh;
  align-content: center;
  gap: 16px;
  margin-inline: auto;
  padding: 30px 0;
}

.boot-card,
.crawler-grid article {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: #fff;
  padding: 22px;
  box-shadow: var(--ui-shadow-sm);
}

.boot-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceef4;
}

.boot-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ui-brand), var(--ui-mint));
  animation: tutor-loading 1.2s ease-in-out infinite alternate;
}

@keyframes tutor-loading {
  from { transform: translateX(-18%); }
  to { transform: translateX(155%); }
}

/* Tablet */
@media (max-width: 1100px) {
  .topbar-inner {
    grid-template-columns: minmax(160px, auto) minmax(300px, 1fr) auto;
    width: calc(100% - 30px);
    gap: 12px;
  }

  .nav button,
  .primary-nav button {
    min-width: 68px;
    padding-inline: 10px;
  }

  .account-label,
  .mobile-logout-button {
    display: none;
  }

  .profile-pill {
    width: 42px;
    min-width: 42px;
    padding: 4px;
  }

  .home-task-board,
  .home-dashboard-grid,
  .profile-overview-layout,
  .note-workspace-layout,
  .shop-layout,
  .admin-workspace-layout,
  .tutor-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panel-grid,
  .reward-box-grid,
  .inventory-grid,
  .shop-grid,
  .trophy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-section-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile / small tablet */
@media (max-width: 820px) {
  :root {
    --ui-header-h: 66px;
  }

  html {
    background: #f8f9fc;
  }

  body {
    background:
      radial-gradient(circle at 4% -6%, rgba(91, 91, 214, 0.10), transparent 18rem),
      #f8f9fc;
    font-size: 14px;
  }

  .app-shell {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .container {
    width: min(100% - 24px, var(--ui-content));
    padding: 18px 0 34px;
  }

  .topbar::before {
    width: 3px;
  }

  .topbar {
    padding-top: env(safe-area-inset-top);
  }

  .topbar-inner {
    display: flex;
    width: calc(100% - 24px);
    min-height: var(--ui-header-h);
    gap: 8px;
    padding: 8px 0;
  }

  .brand,
  .topbar .brand,
  .topbar .brand:hover,
  .topbar .brand:focus-visible {
    box-sizing: border-box;
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    flex: 0 0 46px;
    min-height: 48px;
    contain: none;
    overflow: hidden;
    padding: 2px;
    transform: none;
  }

  .brand-icons,
  .brand img,
  .brand-logo,
  .topbar .brand .brand-logo.tutor-logo,
  .topbar .brand .brand-logo.school-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .topbar .brand-icons {
    min-width: 40px;
    max-width: 40px;
    margin: 0 auto;
    transform: none;
  }

  .brand-title {
    min-width: 96px;
    height: 38px;
  }

  .brand-title-main,
  .brand-title-school {
    height: 38px;
    font-size: 16px;
  }

  .brand-title-school {
    font-size: 14px;
  }

  .primary-nav,
  .nav {
    display: none;
  }

  .topbar-right {
    margin-left: auto;
  }

  .topbar-actions {
    display: none;
  }

  .topbar-notice-button,
  .profile-pill,
  .guest-login-pill {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 12px;
  }

  .profile-pill {
    padding: 3px;
  }

  .profile-pill .avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .mobile-tabbar {
    position: fixed;
    left: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 160;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(calc(100% - 22px), 560px);
    min-height: 66px;
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid rgba(216, 219, 229, 0.94);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    padding: 5px;
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.17);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
  }

  .mobile-tabbar button {
    position: relative;
    display: grid;
    grid-template-rows: 23px 13px;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    border-radius: 15px;
    background: transparent;
    color: var(--ui-muted);
    padding: 4px 2px;
    font-size: 10px;
    font-weight: 780;
    line-height: 1;
  }

  .mobile-tabbar button .icon {
    display: block;
    width: 22px;
    min-width: 22px;
    max-width: 22px;
    height: 22px;
    min-height: 22px;
    max-height: 22px;
    margin: 0;
    aspect-ratio: 1;
  }

  .mobile-tabbar button > span {
    display: block;
    width: 100%;
    min-height: 13px;
    overflow: hidden;
    line-height: 13px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-tabbar button.active {
    background: var(--ui-brand-soft);
    color: var(--ui-brand-strong);
  }

  .mobile-tabbar button.active::before {
    content: "";
    position: absolute;
    top: 5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ui-brand);
  }

  .workspace-page,
  .workspace-subpage,
  .detail,
  .quiz-editor-wide,
  .profile-page,
  .admin-workspace,
  .notes-workspace,
  .community-workspace,
  .questions-workspace,
  .ask-workspace {
    gap: 16px;
  }

  .workspace-head {
    min-height: 0;
    align-items: flex-start;
    border-radius: 20px;
    padding: 21px 19px;
  }

  .workspace-head::after {
    right: -8px;
    top: 4px;
    width: 62px;
    height: 62px;
    border-width: 11px;
    opacity: 0.8;
  }

  .workspace-title-block {
    gap: 6px;
  }

  .workspace-title-block h1,
  .workspace-title-block h2,
  .workspace-head h1,
  .workspace-head h2 {
    max-width: calc(100% - 34px);
    font-size: 25px;
  }

  .workspace-title-block p,
  .workspace-head p {
    font-size: 13px;
    line-height: 1.55;
  }

  .workspace-head-actions {
    align-self: stretch;
  }

  .workspace-head-actions .primary,
  .workspace-head-actions .ghost {
    flex: 1 1 auto;
  }

  .panel,
  .workspace-content-section,
  .profile-section-card,
  .login-required-panel {
    border-radius: 18px;
    padding: 17px;
  }

  .grid.two,
  .grid.three,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-primary-task,
  .home-today-panel {
    border-radius: 20px;
    padding: 20px;
  }

  .home-primary-task h2 {
    font-size: 26px;
  }

  .home-task-board,
  .home-dashboard-grid {
    gap: 14px;
  }

  .home-side-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-search-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-search-form > button {
    width: 100%;
  }

  .home-context-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-row,
  .compact-question-row {
    border-radius: 15px;
    padding: 14px;
  }

  .question-card,
  .answer-card,
  .notice-card {
    border-radius: 15px;
    padding: 14px;
  }

  .question-detail-heading,
  .question-detail-toolbar,
  .card-head,
  .detail-title {
    align-items: flex-start;
  }

  .question-detail-title-copy h1 {
    font-size: 24px;
  }

  .choice-grid,
  .subject-grid,
  .category-grid,
  .answer-type-grid,
  .course-grid,
  .unit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-answer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-code-entry,
  .quiz-help,
  .quiz-start,
  .quiz-result,
  .quiz-review,
  .korean-quiz-app,
  .wordmaster-shell {
    border-radius: 20px;
    padding: 18px;
  }

  .profile-page .profile-cover {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 20px;
  }

  .profile-cover-main {
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
    padding: 20px 17px;
  }

  .profile-page .profile-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 12px 16px 16px;
  }

  .profile-page .profile-cover.has-profile-banner {
    gap: 10px;
    padding: 12px;
  }

  .profile-page .profile-cover.has-profile-banner .profile-cover-main {
    border-bottom: 0;
  }

  .profile-identity .avatar,
  .profile-cover .avatar {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  .profile-stat-grid,
  .stats,
  .compact-stats,
  .workspace-metrics,
  .activity-stats,
  .tutor-summary-metrics,
  .korean-quiz-stats,
  .profile-shop-summary,
  .event-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-navigation-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 4px;
    padding: 6px;
  }

  .profile-primary-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
  }

  .profile-primary-tabs button,
  .profile-more-menu summary {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    font-size: 11px;
  }

  .profile-primary-tabs button:last-child {
    grid-column: auto;
  }

  .profile-primary-tabs button,
  .profile-more-menu summary {
    display: grid;
    grid-template-rows: 20px 14px;
    place-items: center;
    align-content: center;
    gap: 3px;
  }

  .profile-primary-tabs button .icon,
  .profile-more-menu summary .icon {
    width: 19px;
    height: 19px;
  }

  .profile-primary-tabs button span,
  .profile-more-menu summary span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-more-menu {
    position: static;
    width: 100%;
  }

  .profile-more-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-height: min(480px, calc(100dvh - 190px));
  }

  .profile-more-group > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-shortcut-grid,
  .admin-panel-grid,
  .reward-box-grid,
  .inventory-grid,
  .shop-grid,
  .trophy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-event-banner {
    width: calc(100% - 20px);
    margin-top: 10px;
    border-radius: 16px;
  }

  .event-banner-actions {
    justify-content: stretch;
  }

  .event-banner-actions > button {
    flex: 1 1 132px;
  }

  .document-viewer-backdrop,
  .admin-pdf-backdrop {
    padding: 8px;
  }

  .document-viewer-modal,
  .admin-pdf-modal {
    width: 100%;
    height: calc(100dvh - 16px);
    border-radius: 18px;
    padding: 9px;
  }

  .toast {
    top: 76px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .bottom-ask {
    display: none;
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .profile-cover-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-edit-button {
    width: 100%;
    justify-self: stretch;
  }

  .container {
    width: min(100% - 20px, var(--ui-content));
  }

  .workspace-head {
    display: grid;
    gap: 15px;
  }

  .workspace-head-actions {
    justify-content: stretch;
  }

  .workspace-section-head,
  .section-title,
  .compact-title {
    align-items: flex-start;
  }

  .workspace-section-head > .ghost,
  .workspace-section-head > button,
  .section-title > button {
    flex: 0 0 auto;
  }

  .home-context-list,
  .profile-shortcut-grid,
  .admin-panel-grid,
  .reward-box-grid,
  .inventory-grid,
  .shop-grid,
  .trophy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-section-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-primary-actions,
  .form-actions,
  .question-followup-actions,
  .media-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .home-primary-actions > button,
  .form-actions > button,
  .question-followup-actions > button,
  .media-actions > * {
    width: 100%;
  }

  .question-row,
  .compact-question-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  .question-row-status {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .question-detail-heading,
  .detail-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .question-detail-toolbar {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .profile-identity {
    align-items: flex-start;
  }

  .profile-stat-grid > div,
  .stat,
  .workspace-metrics > div,
  .activity-stats > div,
  .tutor-summary-metrics > div,
  .profile-shop-summary > div {
    padding: 11px;
  }

  .profile-stat-grid strong,
  .stat strong,
  .workspace-metrics strong,
  .activity-stats strong,
  .tutor-summary-metrics strong,
  .profile-shop-summary strong {
    font-size: 18px;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .auth-wrap {
    padding: 12px;
  }

  .auth-card {
    padding: 22px 18px;
  }
}

@media (max-width: 390px) {
  .brand-title {
    min-width: 82px;
  }

  .brand-title-main {
    font-size: 15px;
  }

  .brand-title-school {
    font-size: 12px;
  }

  .topbar-notice-button {
    display: none;
  }

  .workspace-title-block h1,
  .workspace-title-block h2,
  .workspace-head h1,
  .workspace-head h2 {
    font-size: 23px;
  }

  .choice-grid,
  .subject-grid,
  .category-grid,
  .answer-type-grid,
  .course-grid,
  .unit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-tabbar {
    width: calc(100% - 16px);
    border-radius: 18px;
  }

  .mobile-tabbar button {
    min-height: 52px;
    font-size: 9px;
  }
}

@media (hover: none), (pointer: coarse) {
  .primary,
  .ghost,
  .small-button,
  .chip,
  .choice-btn,
  .media-button,
  .topbar-ask-cta,
  .profile-pill,
  .topbar-notice-button {
    min-height: 44px;
  }

  .question-row:hover,
  .compact-question-row:hover,
  .quiz-card:hover,
  .profile-shortcut-card:hover,
  .community-board-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* AI answers are an explicit, student-controlled request. */
.ask-ai-request-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  margin-top: 16px;
  border-top: 1px solid var(--campus-line, #e4e9f0);
  padding-top: 16px;
  color: var(--campus-ink, #152033);
  cursor: pointer;
}

.ask-ai-request-option > input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.ask-ai-request-control {
  grid-row: 1;
  grid-column: 1;
  width: 22px;
  height: 22px;
  border: 1.5px solid #aeb8c7;
  border-radius: 6px;
  background: #fff;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.ask-ai-request-option > input:checked + .ask-ai-request-control {
  border-color: #1769ff;
  background: #1769ff;
  box-shadow: inset 0 0 0 5px #1769ff;
}

.ask-ai-request-option > input:checked + .ask-ai-request-control::after {
  content: "";
  display: block;
  width: 6px;
  height: 11px;
  margin: 3px 0 0 7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.ask-ai-request-option > input:focus-visible + .ask-ai-request-control {
  outline: 3px solid rgba(23, 105, 255, 0.2);
  outline-offset: 2px;
}

.ask-ai-request-option.is-disabled {
  color: #7b8492;
  cursor: not-allowed;
}

.ask-ai-request-option.is-disabled .ask-ai-request-control {
  border-color: #d4dae2;
  background: #eef1f4;
}

.ask-ai-request-option.is-disabled .ask-ai-request-copy strong {
  color: #66707e;
}

.ask-ai-request-copy {
  grid-column: 2;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ask-ai-request-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.ask-ai-request-copy strong svg {
  width: 17px;
  height: 17px;
  color: #1769ff;
}

.ask-ai-request-copy small {
  color: var(--campus-muted, #667085);
  font-size: 12px;
  line-height: 1.45;
}

.ai-answer-request-button {
  color: #1557c0;
  border-color: #b8cef2;
  background: #f5f8ff;
}

.ai-answer-request-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #1557c0;
  font-size: 13px;
  font-weight: 750;
}

.ai-answer-request-state.error {
  color: #b42318;
}

.ai-answer-request-state svg {
  width: 17px;
  height: 17px;
}

/* Managed accounts and live student-card activation */
.auth-signup-closed {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0 18px;
  color: #344054;
  border-bottom: 1px solid #e4e9f0;
}

.auth-signup-closed svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: #1769ff;
}

.auth-signup-closed span {
  display: grid;
  gap: 3px;
  font-size: 13px;
  line-height: 1.45;
}

.student-card-auth-wrap {
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background: #07111f;
  color: #f8fafc;
}

.student-card-activation-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.student-card-activation-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 8px 0 18px;
}

.student-card-activation-head > div {
  min-width: 0;
}

.student-card-activation-head h1 {
  margin: 5px 0 4px;
  color: #fff;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: 0;
}

.student-card-activation-head p {
  margin: 0;
  color: #aebbd0;
  font-size: 14px;
  line-height: 1.55;
}

.activation-step-label,
.managed-account-eyebrow {
  color: #72a7ff;
  font-size: 12px;
  font-weight: 800;
}

.student-card-activation-head .icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid #344258;
  border-radius: 50%;
  background: #101d2e;
  color: #fff;
}

.student-card-activation-head .icon-button svg {
  width: 20px;
  height: 20px;
}

.student-card-camera {
  position: relative;
  min-height: min(72svh, 760px);
  overflow: hidden;
  border: 1px solid #27364c;
  border-radius: 8px;
  background: #02070e;
}

.student-card-camera video,
.student-card-camera-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.student-card-camera video {
  object-fit: cover;
  opacity: 0;
  transition: opacity 180ms ease;
}

.student-card-camera.is-live video {
  opacity: 1;
}

.student-card-camera-idle {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 45%;
  display: grid;
  width: min(88%, 360px);
  justify-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.student-card-camera-idle svg {
  width: 34px;
  height: 34px;
  color: #75e6a4;
}

.student-card-camera-idle strong {
  font-size: 18px;
}

.student-card-camera-idle span {
  color: #b7c4d6;
  font-size: 13px;
  line-height: 1.5;
}

.student-card-camera.is-live .student-card-camera-idle {
  display: none;
}

.student-card-camera-shade {
  pointer-events: none;
  background: rgba(2, 7, 14, 0.46);
}

.student-card-hud {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(42vw, 330px);
  aspect-ratio: 0.63;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow: 0 0 0 120vmax rgba(2, 7, 14, 0.43);
}

.student-card-hud .corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: #75e6a4;
  border-style: solid;
}

.student-card-hud .top-left { left: -2px; top: -2px; border-width: 3px 0 0 3px; }
.student-card-hud .top-right { right: -2px; top: -2px; border-width: 3px 3px 0 0; }
.student-card-hud .bottom-left { left: -2px; bottom: -2px; border-width: 0 0 3px 3px; }
.student-card-hud .bottom-right { right: -2px; bottom: -2px; border-width: 0 3px 3px 0; }

.student-card-scanline {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 10%;
  height: 2px;
  background: #75e6a4;
  box-shadow: 0 0 10px rgba(117, 230, 164, 0.8);
  animation: student-card-scan 2.4s ease-in-out infinite alternate;
}

@keyframes student-card-scan {
  to { top: 89%; }
}

.student-card-hud-copy {
  position: absolute;
  left: 50%;
  bottom: -66px;
  width: min(88vw, 420px);
  transform: translateX(-50%);
  text-align: center;
}

.student-card-hud-copy strong,
.student-card-hud-copy small {
  display: block;
}

.student-card-hud-copy strong {
  color: #fff;
  font-size: 14px;
}

.student-card-hud-copy small {
  margin-top: 4px;
  color: #aebbd0;
  font-size: 12px;
}

.student-card-camera-actions {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 18px;
  display: grid;
  grid-template-columns: 1fr 74px 1fr;
  align-items: center;
  padding: 0 20px;
}

.camera-start-button {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #1769ff;
  border-radius: 8px;
  background: #1769ff;
  color: #fff;
  padding: 10px 18px;
  box-shadow: 0 8px 22px rgba(23, 105, 255, 0.28);
}

.camera-start-button > span,
.camera-start-button strong,
.camera-start-button small {
  display: block;
}

.camera-start-button > span {
  text-align: left;
}

.camera-start-button strong {
  font-size: 15px;
}

.camera-start-button small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 650;
}

.camera-start-button svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
}

.student-card-camera:not(.is-live) .student-card-camera-actions {
  grid-template-columns: minmax(0, 1fr);
}

.student-card-camera:not(.is-live) .camera-start-button {
  grid-column: 1;
  width: min(100%, 330px);
  justify-self: center;
}

.student-card-camera:not(.is-live) .student-card-shutter,
.student-card-camera.is-live .camera-start-button {
  display: none;
}

.student-card-shutter {
  grid-column: 2;
  width: 68px;
  height: 68px;
  padding: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
}

.student-card-shutter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  transition: transform 100ms ease, background-color 100ms ease;
}

.student-card-shutter:active span {
  transform: scale(0.88);
  background: #75e6a4;
}

.student-card-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px 0;
  color: #aebbd0;
  font-size: 12px;
}

.student-card-security-note svg {
  width: 16px;
  height: 16px;
  color: #75e6a4;
}

.student-card-activation-shell.review-step {
  width: min(100%, 760px);
}

.student-card-capture-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.student-card-capture-review figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #314158;
  border-radius: 8px;
  background: #101d2e;
}

.student-card-capture-review img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.student-card-capture-review figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  color: #dbe4f1;
  font-size: 13px;
}

.student-card-capture-review figcaption button {
  border: 0;
  background: transparent;
  color: #7eb0ff;
  font: inherit;
  font-weight: 750;
}

.student-card-activation-form {
  padding: 20px;
  border: 1px solid #314158;
  border-radius: 8px;
  background: #fff;
  color: #152033;
}

.student-current-class-box,
.student-card-legacy-claim {
  padding: 14px;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  background: #f7f9fc;
}

.student-current-class-box > p {
  margin: 4px 0 12px;
  color: #667085;
  font-size: 12px;
}

.student-card-legacy-claim summary {
  cursor: pointer;
  font-weight: 780;
}

.student-card-legacy-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
}

.student-card-legacy-fields[hidden] {
  display: none;
}

.compact-legal-box {
  margin: 0;
}

.required-password-card {
  width: min(100%, 480px);
}

.archived-account-notice,
.archived-readonly-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #d5dce7;
  border-radius: 8px;
  background: #f5f7fa;
  color: #344054;
}

.archived-account-notice svg,
.archived-readonly-panel svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: #667085;
}

.archived-readonly-panel h2,
.archived-readonly-panel p {
  margin: 0;
}

.archived-readonly-panel p {
  margin-top: 4px;
  color: #667085;
}

.managed-account-console {
  display: grid;
  gap: 14px;
}

.managed-account-overview,
.managed-account-section {
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
}

.managed-account-overview {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(340px, 1fr);
}

.managed-account-policy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: center;
  padding: 18px;
  border-right: 1px solid #dfe5ee;
}

.managed-account-policy .managed-account-eyebrow {
  grid-column: 1 / -1;
}

.managed-account-policy strong,
.managed-account-section h3 {
  color: #162033;
}

.managed-account-policy p,
.managed-account-section p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.managed-account-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.managed-account-counts > div {
  display: grid;
  place-content: center;
  min-height: 94px;
  text-align: center;
}

.managed-account-counts strong {
  color: #1769ff;
  font-size: 22px;
}

.managed-account-counts span {
  color: #667085;
  font-size: 11px;
}

.managed-account-section {
  padding: 18px;
}

.managed-account-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.managed-account-section-head span {
  color: #1769ff;
  font-size: 11px;
  font-weight: 800;
}

.managed-account-section h3 {
  margin: 3px 0 0;
  font-size: 17px;
}

.roster-cohort-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.roster-cohort-strip > div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-left: 3px solid #1769ff;
  background: #f5f8ff;
}

.roster-cohort-strip span,
.roster-cohort-strip small {
  color: #667085;
  font-size: 11px;
}

.managed-account-footnote {
  padding-top: 12px;
}

.managed-account-details > summary {
  cursor: pointer;
  font-weight: 800;
}

.managed-account-details[open] > summary {
  margin-bottom: 16px;
}

.managed-account-field-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.managed-account-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inline-managed-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 14px;
}

.danger-zone-soft {
  border-color: #f0d0cc;
  background: #fffafa;
}

.danger-zone-soft > .danger {
  margin-top: 14px;
}

.teacher-account-lines {
  min-height: 126px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 760px) {
  .ask-form .ask-advanced-fields > summary {
    grid-template-columns: 36px minmax(0, 1fr) 10px;
    min-height: 64px;
    gap: 10px;
    padding: 9px 11px;
  }

  .ask-form .ask-advanced-fields > summary > .icon {
    width: 36px;
    height: 36px;
    padding: 9px;
  }

  .ask-form .ask-advanced-fields > summary small {
    max-width: none;
    text-align: left;
  }

  .ask-form .ask-advanced-fields > .field-block {
    margin-inline: 12px;
    padding-block: 14px;
  }

  .ask-form .ask-advanced-fields .ask-optional-copy {
    margin: 0 12px 14px;
    padding-top: 14px;
  }

  .quiz-card .quiz-card-more > summary span {
    display: block;
  }

  .student-card-auth-wrap {
    padding-inline: 10px;
  }

  .student-card-camera {
    min-height: calc(100svh - 142px);
  }

  .student-card-hud {
    top: 43%;
    width: min(62vw, 280px);
  }

  .student-card-camera-actions {
    grid-template-columns: 1fr 70px 1fr;
    padding-inline: 12px;
  }

  .student-card-camera:not(.is-live) .camera-start-button {
    width: 100%;
    min-width: 0;
    min-height: 62px;
  }

  .student-card-capture-review,
  .student-card-legacy-fields,
  .managed-account-overview,
  .managed-account-two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-card-activation-form {
    padding: 14px;
  }

  .managed-account-policy {
    border-right: 0;
    border-bottom: 1px solid #dfe5ee;
  }

  .managed-account-counts > div {
    min-height: 76px;
  }

  .managed-account-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roster-cohort-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .managed-account-section-head {
    display: grid;
  }

  .inline-managed-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Teacher learning network and guided setup */
:root {
  --teacher-green: #176b4a;
  --teacher-green-dark: #0f5037;
  --teacher-green-soft: #edf7f2;
  --teacher-line: #cfe2d8;
  --teacher-warm: #a85d16;
  --teacher-warm-soft: #fff6e9;
}

.guided-shell {
  display: grid;
  min-height: calc(100dvh - var(--ui-header-h) - 140px);
  place-items: start center;
  padding-top: clamp(12px, 5vh, 56px);
}

.guided-panel,
.guided-complete-panel {
  width: min(720px, 100%);
  border: 1px solid var(--ui-line);
  border-top: 4px solid var(--ui-brand);
  border-radius: 8px;
  background: #fff;
  padding: clamp(22px, 5vw, 44px);
  box-shadow: var(--ui-shadow-sm);
}

.teacher-guided-shell .guided-panel {
  border-top-color: var(--teacher-green);
}

.guided-progress {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(30px, 6vw, 52px);
  color: var(--ui-muted);
  font-size: 13px;
  font-weight: 750;
}

.guided-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf0f4;
}

.guided-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ui-brand);
  transition: width 220ms ease;
}

.teacher-guided-shell .guided-progress-track i {
  background: var(--teacher-green);
}

.guided-content {
  display: grid;
  gap: 12px;
}

.guided-content h1,
.guided-complete-panel h1 {
  max-width: 620px;
  margin: 0;
  color: var(--ui-ink);
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.25;
  letter-spacing: 0;
}

.guided-lead,
.guided-complete-panel > p {
  max-width: 600px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 17px;
  line-height: 1.7;
}

.guided-form {
  display: grid;
  gap: 26px;
  margin-top: 18px;
}

.guided-choice-stack,
.guided-choice-grid,
.guided-time-grid,
.teacher-setup-summary,
.account-setting-links {
  display: grid;
  gap: 10px;
}

.guided-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guided-radio-choice,
.guided-check-choice {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.guided-radio-choice > input,
.guided-check-choice > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.guided-radio-choice > span,
.guided-check-choice > span {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ui-text);
  padding: 14px 16px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.guided-check-choice > span {
  min-height: 54px;
  justify-content: center;
  padding: 10px 12px;
}

.guided-radio-choice > span > .icon,
.guided-check-choice > span > .icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  color: var(--ui-muted);
}

.guided-radio-choice span span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.guided-radio-choice strong,
.guided-check-choice strong {
  color: var(--ui-ink);
  font-size: 16px;
  line-height: 1.4;
}

.guided-radio-choice small {
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.5;
}

.guided-radio-choice > input:checked + span,
.guided-check-choice > input:checked + span {
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
  box-shadow: inset 0 0 0 1px var(--ui-brand);
}

.teacher-guided-shell .guided-radio-choice > input:checked + span,
.teacher-guided-shell .guided-check-choice > input:checked + span {
  border-color: var(--teacher-green);
  background: var(--teacher-green-soft);
  box-shadow: inset 0 0 0 1px var(--teacher-green);
}

.guided-radio-choice > input:focus-visible + span,
.guided-check-choice > input:focus-visible + span {
  outline: 3px solid rgba(91, 91, 214, 0.22);
  outline-offset: 2px;
}

.guided-choice-fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.guided-choice-fieldset legend {
  margin-bottom: 10px;
  color: var(--ui-ink);
  font-size: 14px;
  font-weight: 780;
}

.guided-time-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guided-time-grid label,
.guided-text-field {
  display: grid;
  gap: 7px;
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 720;
}

.guided-actions {
  display: grid;
  justify-items: stretch;
  gap: 10px;
  margin-top: 4px;
}

.guided-actions-row {
  grid-template-columns: minmax(110px, auto) minmax(180px, 1fr);
  align-items: center;
}

.guided-actions .guided-next,
.guided-actions > .ghost,
.guided-actions > .text-button {
  min-height: 54px;
}

.guided-actions .guided-next {
  justify-content: center;
}

.guided-actions .text-button {
  color: var(--ui-muted);
}

.teacher-guided-shell .primary,
.teacher-hub .primary,
.teacher-room-page .primary,
.teacher-thread-page .primary {
  border-color: var(--teacher-green);
  background: var(--teacher-green);
  color: #fff;
  box-shadow: none;
}

.teacher-guided-shell .primary:hover,
.teacher-hub .primary:hover,
.teacher-room-page .primary:hover,
.teacher-thread-page .primary:hover {
  border-color: var(--teacher-green-dark);
  background: var(--teacher-green-dark);
}

.teacher-setup-summary {
  border-top: 1px solid var(--teacher-line);
  border-bottom: 1px solid var(--teacher-line);
  padding: 8px 0;
}

.teacher-setup-profile-preview {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--teacher-line);
  border-radius: 10px;
  background: #f8fcfa;
  padding: 14px;
}

.teacher-setup-profile-preview > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.teacher-setup-profile-preview > div > span,
.teacher-setup-profile-preview small {
  color: var(--ui-muted);
  font-size: 12px;
}

.teacher-setup-profile-preview strong {
  overflow: hidden;
  color: var(--ui-ink);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-setup-profile-preview > button {
  min-height: 42px;
  white-space: nowrap;
}

.teacher-setup-summary > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 4px;
}

.teacher-setup-summary span {
  color: var(--ui-muted);
}

.teacher-setup-summary strong {
  color: var(--ui-ink);
}

.teacher-room-toggle {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--teacher-line);
  border-radius: 8px;
  background: var(--teacher-green-soft);
  padding: 14px 16px;
}

.teacher-room-toggle input {
  width: 22px;
  height: 22px;
  accent-color: var(--teacher-green);
}

.teacher-room-toggle span {
  display: grid;
  gap: 2px;
}

.teacher-room-toggle small {
  color: var(--ui-muted);
}

.guided-complete-panel {
  display: grid;
  justify-items: start;
  gap: 13px;
}

.guided-complete-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--ui-mint-soft);
  color: var(--ui-success);
}

.teacher-hub,
.teacher-room-page,
.teacher-thread-page {
  --teacher-accent: var(--teacher-green);
}

.teacher-hub > *,
.teacher-room-page > *,
.teacher-thread-page > *,
.teacher-guided-shell > * {
  min-width: 0;
}

.teacher-hub,
.teacher-room-page {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.teacher-room-page > .back-link,
.teacher-thread-page > .back-link {
  display: inline-flex;
  width: max-content;
  min-height: 40px;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  gap: 7px;
  color: var(--ui-muted);
  padding: 0 4px;
  text-align: left;
}

.teacher-room-page > .back-link:hover,
.teacher-thread-page > .back-link:hover {
  color: var(--teacher-green-dark);
}

.teacher-room-page .visually-hidden,
.teacher-thread-page .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  margin: -1px !important;
  border: 0 !important;
  padding: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.teacher-hub > .workspace-head {
  min-height: 102px;
  border-color: var(--teacher-line);
  border-left-color: var(--teacher-green);
}

.teacher-hub .workspace-kicker,
.teacher-room-page .workspace-kicker,
.teacher-thread-page .workspace-kicker {
  color: var(--teacher-green);
}

.teacher-setup-callout {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--teacher-line);
  border-left: 4px solid var(--teacher-green);
  border-radius: 8px;
  background: var(--teacher-green-soft);
  padding: 16px;
}

.teacher-setup-callout > .icon {
  width: 28px;
  height: 28px;
  color: var(--teacher-green);
}

.teacher-setup-callout p {
  margin: 2px 0 0;
  color: var(--ui-muted);
}

.teacher-priority-section {
  display: grid;
  gap: 10px;
  border: 1px solid #efd5b3;
  border-left: 4px solid var(--teacher-warm);
  border-radius: 10px;
  background: var(--teacher-warm-soft);
  padding: 16px 18px;
}

.teacher-priority-section .workspace-section-head p {
  color: #80512a;
}

.teacher-priority-count {
  color: var(--teacher-warm);
  font-size: 13px;
  font-weight: 800;
}

.teacher-priority-list {
  gap: 8px;
  border-top: 0;
}

.teacher-priority-list .teacher-question-row {
  border: 1px solid #efdcc3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px 14px;
}

.teacher-directory-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.3fr);
  gap: 8px;
  border: 1px solid #e2eae6;
  border-radius: 10px;
  background: #f7faf8;
  padding: 9px;
}

.teacher-search-field,
.teacher-subject-filter {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
}

.teacher-search-field:focus-within,
.teacher-subject-filter:focus-within {
  border-color: var(--teacher-green);
  box-shadow: 0 0 0 3px rgba(23, 107, 74, 0.12);
}

.teacher-search-field > .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--ui-muted);
}

.teacher-search-field input,
.teacher-subject-filter select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ui-ink);
  outline: 0;
}

.teacher-search-field button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ui-muted);
  padding: 0;
}

.teacher-search-field input:placeholder-shown + button {
  visibility: hidden;
}

.teacher-search-field button:hover {
  background: #f1f3f5;
}

.teacher-search-field button .icon {
  width: 16px;
  height: 16px;
}

.teacher-subject-filter > span {
  color: var(--ui-subtle);
  font-size: 12px;
  font-weight: 800;
}

.teacher-empty {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 96px;
  align-content: center;
  text-align: left;
}

.teacher-empty strong {
  color: var(--ui-text);
}

.teacher-empty span {
  color: var(--ui-muted);
}

.teacher-directory-section,
.teacher-latest-section,
.teacher-room-questions,
.teacher-thread-messages {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--ui-line);
  padding-top: 20px;
}

.teacher-directory-list,
.teacher-question-list,
.teacher-thread-messages {
  display: grid;
  gap: 8px;
}

.teacher-directory-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teacher-directory-list > .teacher-empty {
  grid-column: 1 / -1;
}

.teacher-room-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 58px 18px;
  align-items: center;
  min-height: 104px;
  min-width: 0;
  gap: 12px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  padding: 14px;
  text-align: left;
  box-shadow: none;
}

.teacher-room-row:hover {
  border-color: var(--teacher-line);
  background: #fbfdfc;
}

.teacher-room-row:focus-visible,
.teacher-question-row:focus-visible {
  outline: 3px solid rgba(23, 107, 74, 0.2);
  outline-offset: 2px;
}

.teacher-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--teacher-line);
  border-radius: 50%;
  background: var(--teacher-green-soft);
  color: var(--teacher-green);
  object-fit: cover;
}

.teacher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-avatar:not(.image-avatar) {
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.teacher-avatar.large:not(.image-avatar) {
  font-size: 21px;
}

.teacher-avatar.large {
  width: 68px;
  height: 68px;
}

.teacher-room-main,
.teacher-room-name,
.teacher-question-copy {
  display: flex;
  min-width: 0;
}

.teacher-room-main,
.teacher-question-copy {
  flex-direction: column;
  gap: 5px;
}

.teacher-room-name {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.teacher-room-main strong,
.teacher-question-copy strong {
  overflow: hidden;
  color: var(--ui-ink);
  font-size: 16px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-room-main > span:not(.teacher-room-name):not(.teacher-room-meta),
.teacher-question-copy > span {
  overflow: hidden;
  color: var(--ui-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-room-subject {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-weight: 720;
}

.teacher-room-subject > small {
  flex: 0 0 auto;
  color: var(--teacher-green);
  font-size: 11px;
  font-weight: 780;
}

.teacher-room-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.teacher-room-meta > small,
.teacher-room-identity p > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.teacher-room-meta .icon,
.teacher-room-identity p .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--teacher-green);
}

.teacher-room-main small,
.teacher-question-copy small {
  color: var(--ui-muted);
}

.teacher-room-state,
.teacher-question-status {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border: 1px solid var(--teacher-line);
  border-radius: 5px;
  background: var(--teacher-green-soft);
  color: var(--teacher-green-dark);
  padding: 3px 7px;
  font-size: 12px;
  font-style: normal;
  font-weight: 780;
  line-height: 1.4;
}

.teacher-room-state.paused,
.teacher-question-status.status-resolved {
  border-color: var(--ui-line);
  background: #f4f5f7;
  color: var(--ui-muted);
}

.teacher-question-status.status-waiting,
.teacher-question-status.status-followUp {
  border-color: #efd5b3;
  background: var(--teacher-warm-soft);
  color: var(--teacher-warm);
}

.teacher-room-count {
  display: grid;
  min-height: 52px;
  align-content: center;
  justify-items: center;
  border-left: 1px solid var(--ui-line);
  color: var(--ui-muted);
  padding-left: 10px;
}

.teacher-room-count strong {
  color: var(--teacher-green);
  font-size: 19px;
}

.teacher-room-count small {
  font-size: 11px;
}

.teacher-question-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto 18px;
  align-items: center;
  min-width: 0;
  min-height: 74px;
  gap: 13px;
  border-bottom: 1px solid var(--ui-line);
  color: inherit;
  padding: 14px 3px;
  cursor: pointer;
}

.teacher-question-row:last-child {
  border-bottom: 0;
}

.teacher-question-row:hover .teacher-question-copy strong {
  color: var(--teacher-green);
}

.teacher-question-stats {
  color: var(--ui-muted);
  font-size: 12px;
  white-space: nowrap;
}

.teacher-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--teacher-line);
  padding: 8px 0 18px;
}

.teacher-room-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.teacher-room-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.teacher-room-identity > div {
  min-width: 0;
}

.teacher-room-identity h1 {
  margin: 3px 0;
  color: var(--ui-ink);
  font-size: clamp(25px, 4vw, 34px);
  letter-spacing: 0;
}

.teacher-room-identity p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  color: var(--ui-muted);
}

.teacher-owner-tools {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--teacher-line);
  border-radius: 8px;
  background: #f8fcfa;
  padding: 0;
}

.teacher-owner-tools > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.teacher-owner-tools > summary::-webkit-details-marker {
  display: none;
}

.teacher-owner-tools > summary > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.teacher-owner-tools > summary > span > .icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--teacher-green);
}

.teacher-owner-tools > summary > span > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.teacher-owner-tools > summary > .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--ui-muted);
  transition: transform 150ms ease;
}

.teacher-owner-tools[open] > summary > .icon {
  transform: rotate(90deg);
}

.teacher-owner-tools strong {
  color: var(--teacher-green-dark);
  font-size: 13px;
}

.teacher-owner-tools small {
  color: var(--ui-muted);
  font-size: 12px;
}

.teacher-owner-tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--teacher-line);
  padding: 11px 14px 13px;
}

.teacher-owner-tool-actions > button {
  min-height: 40px;
  white-space: nowrap;
}

.teacher-room-settings-link {
  color: var(--teacher-green-dark);
}

.teacher-room-context {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.teacher-room-notice,
.teacher-room-closed,
.teacher-waiting-answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--teacher-line);
  border-radius: 8px;
  background: var(--teacher-green-soft);
  padding: 14px 16px;
}

.teacher-room-notice .icon,
.teacher-room-closed .icon,
.teacher-waiting-answer .icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  color: var(--teacher-green);
}

.teacher-room-notice p,
.teacher-room-closed p,
.teacher-waiting-answer p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.teacher-room-notice p strong,
.teacher-room-closed p strong {
  color: var(--teacher-green-dark);
  font-size: 13px;
}

.teacher-room-notice p span,
.teacher-room-closed p span {
  color: var(--ui-text);
  font-size: 13px;
  line-height: 1.5;
}

.teacher-question-composer {
  border: 1px solid var(--teacher-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.teacher-question-composer > summary {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 14px;
  color: var(--teacher-green-dark);
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
}

.teacher-question-composer > summary::-webkit-details-marker {
  display: none;
}

.teacher-question-composer > summary > .icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  background: var(--teacher-green-soft);
  padding: 9px;
}

.teacher-question-composer > summary > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.teacher-question-composer > summary strong,
.teacher-question-composer > summary small {
  overflow-wrap: anywhere;
}

.teacher-question-composer > summary small {
  color: var(--ui-muted);
}

.teacher-question-composer[open] > summary {
  border-bottom: 1px solid var(--teacher-line);
  background: var(--teacher-green-soft);
}

.teacher-question-composer > form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.teacher-question-composer > form > label:not(.inline-check) {
  display: grid;
  gap: 6px;
  color: var(--ui-text);
  font-weight: 720;
}

.teacher-list-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.teacher-list-toolbar h2,
.teacher-list-toolbar p {
  margin: 0;
}

.teacher-list-toolbar p {
  color: var(--ui-muted);
}

.teacher-status-filter {
  flex: 0 0 auto;
}

.teacher-status-filter button {
  min-height: 42px;
  gap: 6px;
}

.teacher-status-filter button b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  background: rgba(16, 24, 40, 0.07);
  font-size: 11px;
}

.teacher-status-filter button.active b {
  background: rgba(23, 107, 74, 0.13);
  color: var(--teacher-green-dark);
}

.teacher-thread-page {
  width: min(850px, 100%);
  margin-inline: auto;
}

.teacher-thread-question {
  border: 1px solid var(--ui-line);
  border-top: 4px solid var(--teacher-green);
  border-radius: 10px;
  background: #fff;
  padding: 24px;
}

.teacher-thread-head,
.teacher-thread-actions,
.teacher-thread-section-title,
.teacher-message-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.teacher-thread-head {
  justify-content: space-between;
  color: var(--ui-muted);
}

.teacher-thread-question h1 {
  margin: 18px 0 5px;
  color: var(--ui-ink);
  font-size: clamp(25px, 4vw, 34px);
  letter-spacing: 0;
}

.teacher-thread-author {
  margin: 0 0 20px;
  color: var(--ui-muted);
}

.teacher-thread-body {
  color: var(--ui-text);
  font-size: 16px;
  line-height: 1.85;
}

.teacher-thread-actions {
  flex-wrap: wrap;
  margin-top: 20px;
}

.teacher-same-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teacher-green);
  font-weight: 750;
}

.teacher-thread-section-title {
  justify-content: space-between;
}

.teacher-thread-section-title h2 {
  margin: 0;
  color: var(--ui-ink);
  font-size: 21px;
}

.teacher-thread-section-title span {
  color: var(--ui-muted);
}

.teacher-thread-message {
  position: relative;
  border: 1px solid var(--ui-line);
  border-left: 4px solid var(--ui-line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.teacher-thread-message.from-teacher {
  border-color: var(--teacher-line);
  border-left-color: var(--teacher-green);
  background: #fbfdfc;
}

.teacher-message-author {
  margin-bottom: 14px;
}

.teacher-message-author > div {
  display: grid;
  margin-right: auto;
}

.teacher-message-author small {
  color: var(--ui-muted);
}

.teacher-message-author em {
  border-radius: 4px;
  background: var(--teacher-green-soft);
  color: var(--teacher-green-dark);
  padding: 3px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
}

.teacher-message-role {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #f0f2f5;
  color: var(--ui-muted);
}

.from-teacher .teacher-message-role {
  background: var(--teacher-green-soft);
  color: var(--teacher-green);
}

.teacher-message-report {
  margin-top: 12px;
  color: var(--ui-muted);
  font-size: 12px;
}

.teacher-message-form {
  display: grid;
  gap: 13px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
}

.teacher-message-form > div:first-child strong,
.teacher-message-form > div:first-child p {
  display: block;
  margin: 0;
}

.teacher-message-form > div:first-child p {
  color: var(--ui-muted);
}

.teacher-thread-images {
  margin-top: 14px;
}

.teacher-thread-images .question-image {
  max-height: 520px;
  object-fit: contain;
}

.account-setting-links {
  margin-top: 4px;
}

.account-workspace {
  width: min(920px, 100%);
  margin-inline: auto;
}

.account-settings-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}

.account-settings-index button {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ui-muted);
  font-size: 13px;
  font-weight: 760;
}

.account-settings-index button:hover,
.account-settings-index button:focus-visible {
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.account-settings-index .icon {
  width: 19px;
  height: 19px;
}

.account-settings-stack {
  display: grid;
  gap: 14px;
}

.account-settings-stack > *,
.account-settings-stack [id] {
  scroll-margin-top: calc(var(--ui-header-h) + 18px);
}

.account-profile-panel,
.account-guidance-panel,
.account-storage-panel {
  padding: 22px;
}

.account-profile-form {
  gap: 16px;
}

.account-avatar-editor {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--ui-line);
  padding-bottom: 18px;
}

.account-avatar-editor > div:last-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.account-avatar-editor small {
  color: var(--ui-muted);
}

.account-avatar-editor .chips {
  margin-top: 6px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
}

.account-form-grid > label,
.account-disclosure-body > label,
.account-password-fields > label {
  display: grid;
  gap: 6px;
  color: var(--ui-text);
  font-weight: 720;
}

.account-bio-field {
  min-width: 0;
}

.account-disclosure {
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: #fff;
}

.account-disclosure > summary,
.account-disclosure-panel > summary {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ui-text);
  padding: 12px 15px;
  cursor: pointer;
  list-style: none;
}

.account-disclosure > summary::-webkit-details-marker,
.account-disclosure-panel > summary::-webkit-details-marker {
  display: none;
}

.account-disclosure > summary > span,
.account-disclosure-panel > summary > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.account-disclosure > summary > span > span,
.account-disclosure-panel > summary > span > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-disclosure summary .icon,
.account-disclosure-panel summary .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--ui-brand);
}

.account-disclosure summary > .icon:last-child,
.account-disclosure-panel summary > .icon:last-child {
  width: 16px;
  height: 16px;
  color: var(--ui-subtle);
  transition: transform 140ms ease;
}

.account-disclosure[open] summary > .icon:last-child,
.account-disclosure-panel[open] summary > .icon:last-child {
  transform: rotate(90deg);
}

.account-disclosure summary small,
.account-disclosure-panel summary small {
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-disclosure-body,
.account-disclosure-panel-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--ui-line);
  background: #fafbfc;
  padding: 15px;
}

.account-password-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--ui-line);
  padding-top: 16px;
}

.account-save-row > span {
  color: var(--ui-muted);
  font-size: 12px;
}

.account-secondary-settings {
  display: grid;
  gap: 8px;
}

.account-disclosure-panel {
  overflow: hidden;
  padding: 0;
}

.account-disclosure-panel > summary > em {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: #f1f3f6;
  color: var(--ui-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.account-storage-panel .card-head {
  gap: 12px;
}

.account-setting-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--ui-line);
  border-radius: 0;
  background: transparent;
  color: var(--ui-text);
  padding: 14px 2px;
  text-align: left;
}

.account-setting-link:last-child {
  border-bottom: 0;
}

.account-setting-link > .icon:first-child {
  width: 23px;
  height: 23px;
  color: var(--ui-brand);
}

.account-setting-link > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-setting-link strong {
  color: var(--ui-ink);
}

.account-setting-link small {
  color: var(--ui-muted);
  line-height: 1.45;
}

.home-context-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .guided-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-directory-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-context-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .guided-shell {
    min-height: auto;
    padding-top: 0;
  }

  .guided-panel,
  .guided-complete-panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 22px 16px 26px;
    box-shadow: none;
  }

  .guided-progress {
    margin-bottom: 30px;
  }

  .guided-content h1,
  .guided-complete-panel h1 {
    font-size: 27px;
  }

  .guided-lead,
  .guided-complete-panel > p {
    font-size: 16px;
  }

  .guided-choice-grid,
  .guided-time-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .guided-radio-choice > span {
    min-height: 72px;
  }

  .guided-actions-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  }

  .teacher-setup-summary > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .teacher-setup-profile-preview {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 13px;
  }

  .teacher-setup-profile-preview > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .teacher-setup-callout {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .teacher-setup-callout > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .teacher-priority-section {
    overflow: hidden;
    padding: 14px;
  }

  .teacher-priority-list {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 1px 26px 4px 1px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }

  .teacher-priority-list::-webkit-scrollbar {
    display: none;
  }

  .teacher-priority-list .teacher-question-row {
    flex: 0 0 calc(100% - 28px);
    scroll-snap-align: start;
  }

  .teacher-directory-tools {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  .teacher-search-field,
  .teacher-subject-filter {
    min-height: 50px;
  }

  .teacher-room-row {
    grid-template-columns: 44px minmax(0, 1fr) 44px 16px;
    min-height: 104px;
    gap: 11px;
    padding: 13px 12px;
  }

  .teacher-room-row > .teacher-avatar {
    width: 44px;
    height: 44px;
  }

  .teacher-room-count {
    display: grid;
    width: 42px;
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    background: var(--teacher-green-soft);
    padding: 0;
  }

  .teacher-room-count strong {
    font-size: 14px;
    line-height: 1;
  }

  .teacher-room-count small {
    display: block;
    font-size: 0;
    line-height: 1;
  }

  .teacher-room-count small::after {
    content: "대기";
    font-size: 9px;
  }

  .teacher-room-main {
    gap: 4px;
  }

  .teacher-room-subject > small {
    display: none;
  }

  .teacher-room-meta {
    gap: 3px 8px;
  }

  .teacher-question-row {
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 8px;
    padding: 14px 2px;
  }

  .teacher-priority-list .teacher-question-row {
    padding: 12px;
  }

  .teacher-question-row .teacher-question-status {
    grid-column: 1;
    margin-bottom: 1px;
  }

  .teacher-question-row .teacher-question-copy {
    grid-column: 1;
  }

  .teacher-question-row .teacher-question-stats {
    grid-column: 1;
  }

  .teacher-question-row > .icon {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .teacher-room-page {
    gap: 13px;
  }

  .teacher-room-page > .back-link {
    min-height: 34px;
  }

  .teacher-room-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 2px 0 13px;
  }

  .teacher-room-header-actions {
    width: auto;
    justify-content: flex-start;
    margin-left: 60px;
  }

  .teacher-room-header-actions .teacher-room-state {
    margin-right: auto;
  }

  .teacher-owner-tools {
    padding: 0;
  }

  .teacher-owner-tool-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding: 10px;
  }

  .teacher-owner-tool-actions > button {
    width: 100%;
    min-width: 0;
    padding-inline: 9px;
  }

  .teacher-room-identity {
    align-items: center;
    gap: 12px;
  }

  .teacher-avatar.large {
    width: 48px;
    height: 48px;
  }

  .teacher-room-identity h1 {
    margin: 1px 0 3px;
    font-size: 22px;
    line-height: 1.32;
  }

  .teacher-room-identity .workspace-kicker {
    font-size: 11px;
  }

  .teacher-room-identity p {
    gap: 4px 10px;
    font-size: 12px;
  }

  .teacher-room-context {
    grid-template-columns: minmax(0, 1fr);
  }

  .teacher-room-notice,
  .teacher-room-closed {
    gap: 10px;
    padding: 11px 12px;
  }

  .teacher-room-notice .icon,
  .teacher-room-closed .icon {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }

  .teacher-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .teacher-status-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .teacher-status-filter button {
    min-width: 0;
    padding-inline: 6px;
  }

  .teacher-thread-question {
    padding: 20px 16px;
  }

  .teacher-thread-actions > button {
    min-height: 44px;
  }

  .teacher-thread-message {
    padding: 15px 13px;
  }

  .teacher-message-form {
    padding: 15px;
  }

  .teacher-message-author {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .teacher-message-author em {
    margin-left: 44px;
  }

  .account-settings-index {
    gap: 2px;
    padding: 5px;
  }

  .account-settings-index button {
    display: grid;
    grid-template-rows: 21px 14px;
    min-height: 52px;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 3px 2px;
    font-size: 11px;
  }

  .account-settings-index .icon {
    width: 20px;
    height: 20px;
  }

  .account-profile-panel,
  .account-guidance-panel,
  .account-storage-panel {
    padding: 17px;
  }

  .account-avatar-editor {
    align-items: flex-start;
    gap: 13px;
  }

  .account-form-grid,
  .account-password-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-disclosure > summary,
  .account-disclosure-panel > summary {
    min-height: 64px;
    padding: 12px;
  }

  .account-disclosure summary small,
  .account-disclosure-panel summary small {
    white-space: normal;
  }

  .account-disclosure-body,
  .account-disclosure-panel-body {
    padding: 13px;
  }

  .account-save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .account-save-row .primary {
    width: 100%;
  }

  .account-setting-link {
    grid-template-columns: 25px minmax(0, 1fr) 16px;
    min-height: 66px;
    gap: 10px;
    padding: 12px 0;
  }

  .home-context-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-tabbar {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Focused login mode: no empty signup rail when self-signup is disabled. */
.auth-wrap.auth-login-only {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  background: #f5f7fa;
}

.auth-card.auth-card-login-only {
  width: min(100%, 420px);
  margin: 0;
  padding: 30px;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.09);
}

.auth-card-login-only .auth-brand,
.auth-card-login-only .auth-heading {
  justify-content: center;
  text-align: center;
}

.auth-card-login-only .auth-heading {
  margin: 18px 0 24px;
}

.auth-card-login-only .auth-heading h1 {
  margin-bottom: 7px;
  font-size: 28px;
  line-height: 1.25;
}

.auth-card-login-only .form,
.auth-card-login-only .form > button {
  width: 100%;
}

/* The handwriting editor is its own application surface. */
.app-shell.has-note-editor {
  width: 100%;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  background: #e9edf3;
}

.has-note-editor .note-editor-backdrop {
  position: fixed;
  z-index: 400;
  inset: 0;
  display: block;
  min-height: 100dvh;
  padding: 0;
  background: #e9edf3;
}

.has-note-editor .note-editor {
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #eef1f5;
  box-shadow: none;
}

.has-note-editor .note-editor-top {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 68px;
  padding: 9px 16px;
  border: 0;
  border-bottom: 1px solid #dfe4eb;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}

.has-note-editor .note-editor-leading,
.has-note-editor .note-editor-actions,
.has-note-editor .note-header-history {
  display: flex;
  align-items: center;
}

.has-note-editor .note-editor-leading {
  min-width: 0;
  gap: 10px;
}

.has-note-editor .note-document-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.has-note-editor .note-document-copy > span {
  color: #7a8596;
  font-size: 11px;
  font-weight: 700;
}

.has-note-editor .note-title-input {
  width: min(34vw, 360px);
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172033;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.has-note-editor .note-editor-back-button,
.has-note-editor .note-header-history .icon-ghost {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 6px;
}

.has-note-editor .note-save-status {
  justify-self: center;
  min-width: 76px;
  color: #687386;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.has-note-editor .note-save-status[data-status="saving"] {
  color: #1664d9;
}

.has-note-editor .note-save-status[data-status="saved"] {
  color: #16834a;
}

.has-note-editor .note-editor-actions {
  justify-self: end;
  min-width: 0;
  gap: 8px;
}

.has-note-editor .note-header-history {
  gap: 3px;
  padding-right: 8px;
  border-right: 1px solid #e4e8ef;
}

.has-note-editor .note-save-button,
.has-note-editor .note-share-button,
.has-note-editor .note-copy-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 6px;
}

.has-note-editor .note-editor-body {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.has-note-editor .note-toolrail {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 10px 8px;
  overflow: hidden auto;
  border: 0;
  border-right: 1px solid #dfe4eb;
  background: #fff;
  scrollbar-width: thin;
}

.has-note-editor .note-tool-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.has-note-editor .note-toolrail .note-tool-group {
  width: 100%;
  flex-direction: column;
}

.has-note-editor .note-toolrail .note-tool-group + .note-tool-group {
  padding-top: 11px;
  border-top: 1px solid #edf0f4;
}

.has-note-editor .note-toolrail button {
  position: relative;
  display: grid;
  width: 56px;
  min-width: 56px;
  height: 48px;
  min-height: 48px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4f5d70;
  box-shadow: none;
}

.has-note-editor .note-toolrail button:hover {
  background: #f0f4f9;
}

.has-note-editor .note-toolrail button.active,
.has-note-editor .note-toolrail button[aria-pressed="true"] {
  background: #e8f1ff;
  color: #1769dc;
  box-shadow: inset 3px 0 #1769dc;
}

.has-note-editor .note-toolrail button svg {
  width: 22px;
  height: 22px;
}

.has-note-editor .note-rail-actions {
  margin-top: auto;
}

.has-note-editor .note-workbench {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.has-note-editor .note-tool-inspector {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 64px;
  padding: 9px 16px;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid #dfe4eb;
  background: rgba(255, 255, 255, 0.98);
  scrollbar-width: thin;
}

.has-note-editor .note-active-tool-state {
  display: grid;
  flex: 0 0 auto;
  min-width: 74px;
  gap: 1px;
}

.has-note-editor .note-active-tool-state span,
.has-note-editor .note-size-wrap > span {
  color: #7a8596;
  font-size: 11px;
  font-weight: 700;
}

.has-note-editor .note-active-tool-state strong {
  color: #172033;
  font-size: 14px;
}

.has-note-editor .note-colors {
  flex: 0 0 auto;
  padding: 0 12px;
  border-inline: 1px solid #e4e8ef;
}

.has-note-editor .note-colors button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px #cfd6e1;
}

.has-note-editor .note-colors button.active {
  box-shadow: 0 0 0 2px #1769dc;
}

.has-note-editor .note-size-wrap {
  display: grid;
  grid-template-columns: auto minmax(90px, 150px) 38px;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
}

.has-note-editor .note-size-wrap output {
  color: #536074;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.has-note-editor .shape-detail-tools {
  flex: 0 0 auto;
}

.has-note-editor .shape-detail-tools > button,
.has-note-editor .pen-only-button {
  width: auto;
  min-width: 42px;
  height: 40px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #dfe4eb;
  border-radius: 6px;
  background: #fff;
  color: #4f5d70;
  box-shadow: none;
}

.has-note-editor .shape-detail-tools > button.active,
.has-note-editor .pen-only-button.active {
  border-color: #9ec4fb;
  background: #eaf3ff;
  color: #1769dc;
}

.has-note-editor .note-editor:not([data-active-tool="line"]):not([data-active-tool="arrow"]):not([data-active-tool="rect"]):not([data-active-tool="ellipse"]):not([data-active-tool="triangle"]):not([data-active-tool="diamond"]) .shape-detail-tools {
  display: none;
}

.has-note-editor .note-editor[data-active-tool="eraser"] .note-colors,
.has-note-editor .note-editor[data-active-tool="eraser"] .pen-only-button {
  display: none;
}

.has-note-editor .hand-canvas-stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: clamp(18px, 3vw, 42px);
  background-color: #e9edf3;
  background-image: radial-gradient(#cbd2dd 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  overscroll-behavior: contain;
}

.has-note-editor #handCanvas {
  display: block;
  max-width: none;
  margin: auto;
  border: 1px solid #d7dce4;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.12);
}

/* Student verification keeps the whole 30-second flow in three clear scenes. */
.student-card-photo-consent,
.student-activation-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid #314158;
  border-radius: 8px;
  background: #152338;
  color: #f7f9fc;
}

.student-card-photo-consent input,
.student-activation-consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #2b78ed;
}

.student-card-photo-consent span {
  display: grid;
  gap: 3px;
}

.student-card-photo-consent small {
  color: #b8c4d5;
  line-height: 1.45;
}

.student-card-inline-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #ffb4ac;
  border-radius: 7px;
  background: #fff1ef;
  color: #a3312a;
  font-size: 13px;
  line-height: 1.5;
}

.student-card-inline-error svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.student-card-processing {
  display: grid;
  width: min(100%, 520px);
  min-height: 330px;
  place-items: center;
  align-content: center;
  gap: 13px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid #314158;
  border-radius: 8px;
  background: #101b2c;
  color: #f7f9fc;
  text-align: center;
}

.student-card-processing-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  background: #173e72;
  color: #83b8ff;
}

.student-card-processing-mark svg {
  width: 32px;
  height: 32px;
}

.student-card-processing > span:not(.student-card-processing-mark) {
  color: #aebbd0;
  font-size: 13px;
}

.student-card-processing > i {
  width: min(100%, 280px);
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 3px;
  background: #26364d;
}

.student-card-processing > i b {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: #5ba0ff;
  animation: student-card-progress 1.2s ease-in-out infinite alternate;
}

@keyframes student-card-progress {
  from { transform: translateX(-10%); }
  to { transform: translateX(145%); }
}

.student-card-activation-shell.details-step {
  width: min(100%, 560px);
}

.student-card-verified-summary,
.student-card-retention-result {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 8px;
}

.student-card-verified-summary {
  margin-bottom: 12px;
  border: 1px solid #aee7c4;
  background: #ecfbf2;
  color: #17653c;
}

.student-card-verified-summary > span {
  display: grid;
  gap: 2px;
}

.student-card-verified-summary small {
  color: #4f7a61;
}

.student-card-verified-summary svg,
.student-card-retention-result svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.student-card-retention-result {
  border: 1px solid #dce3ed;
  background: #f5f7fa;
  color: #536074;
  font-size: 12px;
  line-height: 1.5;
}

.student-activation-consent {
  margin: 0;
  border-color: #dce3ed;
  background: #fff;
  color: #344054;
}

.student-current-id-input {
  min-height: 56px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.student-password-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.student-activation-submit {
  width: 100%;
  min-height: 54px;
  font-size: 16px;
}

@media (max-width: 760px) {
  .auth-card.auth-card-login-only {
    padding: 24px 20px;
  }

  .has-note-editor .note-editor {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .has-note-editor .note-editor-top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: calc(62px + env(safe-area-inset-top));
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }

  .has-note-editor .note-save-status {
    position: absolute;
    left: 60px;
    bottom: 7px;
    justify-self: auto;
    min-width: 0;
    font-size: 10px;
  }

  .has-note-editor .note-document-copy > span {
    display: none;
  }

  .has-note-editor .note-title-input {
    width: min(46vw, 260px);
    padding-bottom: 13px;
    font-size: 15px;
  }

  .has-note-editor .note-header-history {
    display: none;
  }

  .has-note-editor .note-editor-actions {
    gap: 5px;
  }

  .has-note-editor .note-save-button,
  .has-note-editor .note-share-button,
  .has-note-editor .note-copy-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .has-note-editor .note-save-button span,
  .has-note-editor .note-share-button span,
  .has-note-editor .note-copy-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .has-note-editor .note-editor-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 64px;
  }

  .has-note-editor .note-toolrail {
    grid-row: 2;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 7px max(10px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    overflow: auto hidden;
    border-right: 0;
    border-top: 1px solid #dfe4eb;
  }

  .has-note-editor .note-toolrail .note-tool-group {
    width: auto;
    flex-direction: row;
    flex: 0 0 auto;
  }

  .has-note-editor .note-toolrail .note-tool-group + .note-tool-group {
    padding: 0 0 0 8px;
    border-top: 0;
    border-left: 1px solid #e4e8ef;
  }

  .has-note-editor .note-toolrail button {
    width: 48px;
    min-width: 48px;
    height: 46px;
    min-height: 46px;
  }

  .has-note-editor .note-toolrail button.active,
  .has-note-editor .note-toolrail button[aria-pressed="true"] {
    box-shadow: inset 0 -3px #1769dc;
  }

  .has-note-editor .note-rail-actions {
    margin-top: 0;
  }

  .has-note-editor .note-workbench {
    grid-row: 1;
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .has-note-editor .note-tool-inspector {
    min-height: 58px;
    gap: 10px;
    padding: 7px 10px;
  }

  .has-note-editor .note-active-tool-state {
    min-width: 62px;
  }

  .has-note-editor .note-colors {
    padding: 0 9px;
  }

  .has-note-editor .note-size-wrap {
    grid-template-columns: auto 88px 34px;
  }

  .has-note-editor .hand-canvas-stage {
    padding: 14px;
  }

  .student-card-auth-wrap {
    align-items: start;
    padding: max(14px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom));
  }

  .student-card-activation-head h1 {
    font-size: 24px;
  }

  .student-card-camera {
    min-height: min(62dvh, 560px);
  }

  .student-card-hud {
    width: min(58vw, 280px);
  }

  .student-card-processing {
    min-height: min(54dvh, 400px);
    padding: 24px 18px;
  }

  .student-password-fields,
  .student-card-legacy-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 440px) {
  .has-note-editor .note-active-tool-state,
  .has-note-editor .shape-detail-tools > button span,
  .has-note-editor .pen-only-button span {
    display: none;
  }

  .has-note-editor .note-colors button {
    width: 25px;
    min-width: 25px;
    height: 25px;
  }

  .has-note-editor .note-title-input {
    width: min(42vw, 170px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-card-processing > i b {
    animation: none;
    transform: none;
    width: 70%;
  }
}

/* Product refinement layer: this file is the sole visual authority. */
body,
h1,
h2,
h3,
h4,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

.workspace-head {
  min-height: 106px;
  border-left: 4px solid var(--ui-brand);
  background: var(--ui-surface);
  padding: 22px 24px;
  box-shadow: var(--ui-shadow-xs);
}

.workspace-head::after {
  display: none;
}

.workspace-title-block h1,
.workspace-title-block h2,
.workspace-head h1,
.workspace-head h2 {
  font-size: clamp(27px, 2.6vw, 34px);
  letter-spacing: 0;
}

.community-section-tabs > button {
  width: auto;
  min-width: 0;
  flex: 1 1 0;
}

.community-section-tabs b:empty {
  display: none;
}

.home-task-board {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.home-quick-search {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  padding: 15px 17px;
  box-shadow: var(--ui-shadow-xs);
}

.home-quick-search-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.home-quick-search-copy strong {
  overflow: hidden;
  color: var(--ui-ink);
  font-size: 15px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-quick-search .search-field {
  min-width: 0;
  min-height: 46px;
}

.home-quick-search > button {
  min-width: 72px;
}

.home-context-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-context-item {
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  min-height: 82px;
  gap: 10px;
}

.home-context-item.attention {
  box-shadow: inset 3px 0 0 var(--ui-amber);
}

.home-context-item.live {
  box-shadow: inset 3px 0 0 var(--ui-mint);
}

.home-context-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #d8d9ef;
  border-radius: 10px;
  background: #fff;
  color: var(--ui-brand);
}

.home-context-copy,
.home-context-copy small,
.home-context-copy strong,
.home-context-copy span {
  display: block;
  min-width: 0;
}

.home-context-copy small {
  color: var(--ui-muted);
  font-size: 10px;
  font-weight: 760;
}

.home-context-copy strong,
.home-context-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-context-copy strong {
  margin-top: 1px;
  color: var(--ui-ink);
  font-size: 13px;
  font-weight: 850;
}

.home-context-copy span {
  margin-top: 1px;
  color: var(--ui-muted);
  font-size: 10px;
}

.question-filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 11px;
  padding: 16px 18px;
}

.question-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: 8px;
}

.question-search-field {
  min-width: 0;
  min-height: 46px;
}

.question-search-row > .question-search-field {
  grid-column: 1;
  grid-row: 1;
}

.question-search-row > .question-sort-menu {
  grid-column: 2;
  grid-row: 1;
  width: auto;
  min-width: 0;
  justify-self: end;
}

.question-sort-menu {
  position: relative;
}

.question-sort-menu > summary {
  display: inline-flex;
  min-width: 84px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ui-text);
  padding: 0 11px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.question-sort-menu > summary::-webkit-details-marker {
  display: none;
}

.question-sort-menu > label {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: min(240px, calc(100vw - 32px));
  gap: 7px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--ui-shadow-md);
}

.question-sort-menu > label > span {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 780;
}

.question-filter-subjects,
.question-filter-subjects .chips {
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}

.question-filter-subjects::-webkit-scrollbar,
.question-filter-subjects .chips::-webkit-scrollbar {
  display: none;
}

.question-filter-subjects .chip {
  flex: 0 0 auto;
}

.question-status-tabs {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  border-top: 1px solid var(--ui-line);
  padding-top: 10px;
  scrollbar-width: none;
}

.question-status-tabs::-webkit-scrollbar {
  display: none;
}

.question-status-tabs button {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ui-muted);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
}

.question-status-tabs button:hover {
  background: var(--ui-surface-soft);
  color: var(--ui-ink);
}

.question-status-tabs button.active {
  border-color: #d7d7f1;
  background: var(--ui-brand-soft);
  color: var(--ui-brand-strong);
}

.ai-answer-card {
  gap: 14px;
  border-color: #d7d7f1;
  border-left: 4px solid var(--ui-brand);
  background: #fff;
}

.ai-answer-card .answer-content {
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: #fff;
  padding: 0;
}

.ai-solution-column {
  display: grid;
  gap: 0;
}

.ai-solution-section {
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 18px;
}

.ai-solution-final {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  background: var(--ui-brand-soft);
}

.ai-solution-work {
  border-top: 1px solid var(--ui-line);
}

.ai-solution-label {
  color: var(--ui-brand-strong);
  font-size: 12px;
  font-weight: 900;
}

.ai-solution-copy {
  min-width: 0;
  color: var(--ui-ink);
  line-height: 1.75;
}

.ai-followup-guide {
  background: var(--ui-surface-soft);
  padding: 14px 16px;
}

@media (max-width: 760px) {
  .workspace-head {
    min-height: 0;
    border-left-width: 3px;
    padding: 17px;
  }

  .workspace-title-block h1,
  .workspace-title-block h2,
  .workspace-head h1,
  .workspace-head h2 {
    max-width: none;
    font-size: 23px;
  }

  .home-quick-search {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 13px;
  }

  .home-quick-search-copy {
    grid-column: 1 / -1;
  }

  .home-quick-search-copy strong {
    white-space: normal;
  }

  .home-context-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .home-context-item {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    min-height: 104px;
    gap: 6px;
    padding: 10px;
  }

  .home-context-item > .icon:last-child,
  .home-context-copy span {
    display: none;
  }

  .home-context-copy strong {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .question-filter-panel {
    gap: 9px;
    padding: 12px;
  }

  .question-status-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .question-status-tabs button {
    min-width: 0;
    padding: 0 4px;
    white-space: nowrap;
  }

  .questions-workspace .workspace-head p {
    max-width: 34rem;
  }

  .community-section-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .community-section-tabs > button {
    width: 100%;
  }

  .community-control-head {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .community-control-head p {
    display: none;
  }

  .community-create-menu,
  .community-create-menu > summary.primary {
    width: auto;
    min-width: 86px;
  }

  .community-create-menu > summary.primary {
    min-height: 42px;
    padding-inline: 12px;
  }

  .ai-answer-card {
    border-left-width: 3px;
    padding: 13px;
  }

  .ai-solution-section {
    padding: 15px;
  }

  .ai-solution-final {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
}

@media (max-width: 380px) {
  .question-status-tabs button {
    font-size: 11px;
  }

  .question-status-tabs .status-dot {
    display: none;
  }
}

/* Quiz app restoration
 * Restores the focused quiz skin from the retired campus stylesheet without
 * loading that stylesheet's page-wide legacy overrides.
 */
.quiz-workspace .quiz-toolbar,
.quiz-workspace .quiz-section-tabs {
  border-top: 3px solid var(--campus-green);
}

.quiz-workspace .quiz-section-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(520px, 100%);
}

.quiz-grid .quiz-card {
  --quiz-accent: var(--campus-blue);
  min-height: 216px;
  border: 1px solid var(--campus-line);
  border-top: 4px solid var(--quiz-accent);
  border-radius: 8px;
  background: #fff;
  color: var(--campus-ink);
  box-shadow: none;
  text-shadow: none;
}

.quiz-grid .quiz-card::before {
  height: 3px;
  background: var(--quiz-accent);
}

.quiz-grid .quiz-theme-neon {
  --quiz-accent: #7c3aed;
}

.quiz-grid .quiz-theme-fire {
  --quiz-accent: #d85b2d;
}

.quiz-grid .quiz-theme-ocean {
  --quiz-accent: #0f7b8f;
}

.quiz-grid .quiz-card h3,
.quiz-grid .quiz-card p,
.quiz-grid .quiz-card .quiz-card-meta span {
  color: var(--campus-ink);
  text-shadow: none;
}

.quiz-grid .quiz-card p,
.quiz-grid .quiz-card .quiz-card-meta span {
  color: var(--campus-muted);
}

.quiz-grid .quiz-card .quiz-code {
  border: 1px solid color-mix(in srgb, var(--quiz-accent) 28%, var(--campus-line));
  background: color-mix(in srgb, var(--quiz-accent) 9%, #fff);
  color: color-mix(in srgb, var(--quiz-accent) 82%, #111);
  box-shadow: none;
  text-shadow: none;
}

.quiz-grid .quiz-card .badge {
  border-color: var(--campus-line);
  background: #f5f7f6;
  color: var(--campus-text);
}

.quiz-grid .quiz-card .quiz-mini-rank {
  border: 1px solid var(--campus-line);
  border-radius: 6px;
  background: #f7f9f8;
  color: var(--campus-text);
  text-shadow: none;
}

.quiz-grid .quiz-card .quiz-mini-rank strong,
.quiz-grid .quiz-card .quiz-mini-rank span {
  color: var(--campus-text);
}

.quiz-grid .quiz-card .ghost,
.quiz-grid .quiz-card .quiz-card-more > summary {
  border-color: var(--campus-line-strong);
  background: #fff;
  color: var(--campus-text);
}

.quiz-grid .quiz-card:hover {
  border-color: #aec6b6;
  box-shadow: none;
  transform: none;
}

.quiz-answer,
.quiz-option,
.signup-quiz-option {
  border-radius: 7px;
}

.quiz-answer:hover,
.quiz-option:hover {
  transform: none;
}

@media (max-width: 760px) {
  .quiz-workspace .quiz-section-tabs {
    width: 100%;
  }

  .quiz-workspace .quiz-toolbar.workspace-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

