:root{font-family:'Prompt',sans-serif;color:#202938;background:#fff;font-synthesis:none;text-rendering:optimizeLegibility;--ink:#202938;--muted:#87909e;--line:#e8ebef;--soft:#f7f8fa;--accent:#536dfe}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#fff}
body{min-height:100vh}
button,input,textarea{font:inherit}
.shell{width:min(1120px,calc(100% - 40px));margin:0 auto}
.home-view{min-height:100vh;display:grid;place-items:center;padding:48px 0}
.home-center{width:min(760px,100%);text-align:center;margin:auto}
.class-mark{width:52px;height:52px;border:1px solid #e5e8ed;border-radius:17px;display:grid;place-items:center;margin:0 auto 18px;font-size:17px;font-weight:600;letter-spacing:-1px;color:#303b4c;background:#fff;box-shadow:0 5px 22px rgba(30,45,70,.045)}
.class-mark span{color:#aab2bf;margin:0 1px}
.overline,.kicker{font-size:10px;letter-spacing:2px;color:#9aa2ae;font-weight:500}
.overline{margin:0 0 9px}
.home-center h1{font-size:clamp(27px,4vw,36px);font-weight:500;letter-spacing:-.5px;margin:0;color:#202938}
.home-subtitle{font-size:13px;color:#929aa6;margin:9px 0 34px;font-weight:300}
.subject-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;text-align:left}
.subject-card{position:relative;min-height:124px;padding:22px 23px;border:1px solid var(--line);border-radius:15px;background:#fff;display:flex;align-items:center;gap:17px;color:var(--ink);cursor:pointer;text-align:left;transition:border-color .18s,box-shadow .18s,transform .18s;width:100%}
.subject-card:hover{border-color:#cfd5df;box-shadow:0 9px 28px rgba(31,45,66,.065);transform:translateY(-2px)}
.subject-icon{width:47px;height:47px;flex:0 0 47px;border-radius:13px;display:grid;place-items:center;font-size:21px;background:var(--tint);color:var(--accent)}
.subject-info{min-width:0;flex:1}
.subject-card small{display:block;font-size:11px;color:#9aa2ae;margin-bottom:3px}
.subject-card b{display:block;font-size:17px;font-weight:500}
.subject-card .enter{font-size:18px;color:#b4bbc5}
.tone-violet{--accent:#7562c9;--tint:#f1effb}.tone-cyan{--accent:#328eaa;--tint:#eaf6f8}.tone-orange{--accent:#bf7a3e;--tint:#fbf2e9}.tone-green{--accent:#398c69;--tint:#eaf5ef}
.subject-view{padding:24px 0 55px}
.back-link{border:0;background:none;padding:8px 0;color:#858e9b;font-size:12px;cursor:pointer}
.back-link:hover{color:#303b4c}
.subject-hero{padding:27px 0 28px}
.subject-hero .kicker{display:block}
.subject-hero h1{font-size:30px;font-weight:500;margin:7px 0 0;color:#202938}
.subject-hero p{margin:4px 0;color:#8c95a2;font-size:12px}
.workspace{display:grid;grid-template-columns:360px minmax(0,1fr);gap:25px;align-items:start}
.card,.post-card{border:1px solid var(--line);border-radius:15px;background:#fff}
.card{padding:21px}
.card-heading,.feed-heading{display:flex;align-items:center;justify-content:space-between}
.card-heading{margin-bottom:17px}
.card-heading h2,.feed-heading h2{font-size:19px;font-weight:500;margin:4px 0 0}
.compose-icon{width:32px;height:32px;border-radius:10px;background:#f1f3ff;color:#6478ed;display:grid;place-items:center;font-size:21px}
label{display:block;font-size:12px;color:#424c5a;margin:14px 0 6px}
input:not([type=file]),textarea{width:100%;border:1px solid #e5e8ed;border-radius:9px;padding:11px 12px;color:#293344;background:#fff;outline:none;font-size:12px}
input:focus,textarea:focus{border-color:#aab5f5;box-shadow:0 0 0 3px rgba(83,109,254,.07)}
textarea{resize:vertical;min-height:112px;line-height:1.7}
.upload-area{margin-top:15px}
.file-pick{margin:0;border:1px dashed #d9dee6;border-radius:10px;padding:12px;display:flex;align-items:center;gap:9px;cursor:pointer}
.file-pick>span{width:27px;height:27px;border-radius:8px;background:#f1f3ff;color:#6478ed;display:grid;place-items:center;font-size:18px}
.file-pick b{font-size:11px;font-weight:500}.file-pick small{margin-left:auto;color:#9aa2ae;font-size:9px}
.file-list{font-size:10px;color:#818b99;padding-top:7px;overflow-wrap:anywhere}
.quota{display:flex;justify-content:space-between;gap:7px;color:#8c95a2;font-size:9px;margin:13px 0}
.quota b{color:#536dfe;font-weight:500}
.primary-btn{width:100%;border:0;border-radius:9px;background:#303b4c;color:white;padding:12px 14px;display:flex;justify-content:space-between;cursor:pointer;font-size:12px}
.primary-btn:hover{background:#202938}.primary-btn:disabled{opacity:.55;cursor:wait}
.form-note{text-align:center;font-size:9px;color:#a0a7b1;margin:9px 0 0}
.feed-heading{margin:3px 0 15px}
.post-count{font-size:10px;color:#929aa6;border:1px solid var(--line);padding:6px 9px;border-radius:20px}
.post-feed{display:grid;gap:12px}
.post-card{padding:17px 18px}
.post-top{display:flex;align-items:center;gap:10px}
.avatar{width:34px;height:34px;border-radius:11px;background:#f0f2f6;color:#697586;display:grid;place-items:center;font-weight:500}
.post-user{flex:1;min-width:0}.post-user b{display:block;font-size:12px;font-weight:500}.post-user small{display:block;color:#9aa2ae;font-size:9px}
.owner-tag{font-size:8px;color:#398c69;background:#eff8f2;border-radius:20px;padding:4px 7px}
.post-actions{display:flex;gap:5px}.post-actions button{border:1px solid #e8ebef;background:white;color:#677282;border-radius:7px;padding:5px 8px;font-size:10px;cursor:pointer}.post-actions button.delete{color:#c55d5d}
.post-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.85;color:#3c4654;margin:14px 0}
.attachments{display:grid;gap:8px}.attachments img,.attachments video{max-width:100%;max-height:360px;border-radius:9px;background:#f4f5f7}
.file-link{display:flex;align-items:center;gap:10px;text-decoration:none;color:#485a87;background:#f8f9fb;border:1px solid var(--line);padding:10px 12px;border-radius:9px;font-size:11px}.file-link small{color:#9aa2ae;margin-left:auto}
.empty{border:1px dashed #e1e5eb;border-radius:13px;text-align:center;padding:35px 15px;color:#9aa2ae;font-size:12px;line-height:1.8}
.toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,15px);opacity:0;background:#293344;color:#fff;border-radius:9px;padding:11px 16px;font-size:11px;transition:.2s;pointer-events:none;z-index:10;max-width:calc(100% - 30px);text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}
[hidden]{display:none!important}
@media(max-width:820px){.workspace{grid-template-columns:1fr}.home-center{max-width:580px}}
@media(max-width:520px){.shell{width:calc(100% - 28px)}.home-view{padding:30px 0}.class-mark{width:47px;height:47px;margin-bottom:15px}.home-subtitle{font-size:11px;margin-bottom:25px}.subject-grid{gap:10px}.subject-card{min-height:105px;padding:14px 12px;gap:10px;border-radius:12px}.subject-icon{width:37px;height:37px;flex-basis:37px;border-radius:10px;font-size:17px}.subject-card b{font-size:13px}.subject-card small{font-size:9px}.subject-card .enter{font-size:14px}.subject-hero h1{font-size:26px}.card{padding:16px}.feed-heading h2,.card-heading h2{font-size:17px}.file-pick small{display:none}.quota{font-size:8px}.post-card{padding:14px}}

/* Subject selector: centered horizontal strip with safe text wrapping */
.home-center{width:min(1040px,100%);min-width:0}
.subject-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:8px 2px 14px;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#d9dee6 transparent}
.subject-scroll::-webkit-scrollbar{height:6px}
.subject-scroll::-webkit-scrollbar-track{background:transparent}
.subject-scroll::-webkit-scrollbar-thumb{background:#d9dee6;border-radius:20px}
.subject-grid{display:flex;flex-wrap:nowrap;justify-content:center;gap:14px;width:max-content;min-width:100%;margin:0 auto;text-align:left}
.subject-card{flex:0 0 245px;min-width:0;scroll-snap-align:center;min-height:124px;white-space:normal}
.subject-info{min-width:0;flex:1;overflow-wrap:anywhere}
.subject-card small{line-height:1.5;overflow-wrap:anywhere}
.subject-card b{line-height:1.4;overflow-wrap:anywhere;word-break:normal}
.subject-card .enter{flex:0 0 auto}
@media(max-width:820px){.home-center{max-width:100%}.subject-grid{justify-content:flex-start}}
@media(max-width:520px){.subject-scroll{margin-inline:-2px;padding-inline:2px}.subject-grid{gap:11px}.subject-card{flex-basis:min(78vw,270px);min-height:112px;padding:16px;gap:12px}.subject-card b{font-size:15px}.subject-card small{font-size:10px}}

/* Refined warm-minimal subject picker */
:root{color:#343632;background:#eeede7;--ink:#343632;--muted:#777a72;--line:#d9d8d0;--soft:#e7e6df;--accent:#777e70}
html,body{background:#eeede7;color:#343632}
.shell{width:min(1120px,calc(100% - 40px))}
.home-view{min-height:100vh;padding:38px 0;background:#eeede7}
.home-center{width:min(900px,100%);text-align:center}
.class-mark{background:#e4e3dc;border-color:#d4d3cb;color:#45483f;box-shadow:none;border-radius:15px}
.class-mark span{color:#8e9188}
.overline,.kicker{color:#85877e}
.home-center h1{color:#343632;letter-spacing:0}
.home-subtitle{color:#777a72;margin:10px 0 30px}
.subject-selector{display:flex;align-items:center;gap:12px;width:100%;margin:0 auto}
.scroll-arrow{width:38px;height:38px;flex:0 0 38px;border:1px solid #d2d1c9;border-radius:50%;background:#e4e3dc;color:#55594f;font-size:25px;line-height:1;cursor:pointer;display:grid;place-items:center;transition:background .15s,border-color .15s}
.scroll-arrow:hover{background:#d9d8d0;border-color:#bdbdb4}
.subject-scroll{flex:1;min-width:0;max-width:100%;overflow-x:scroll;overflow-y:hidden;padding:8px 2px 16px;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:auto;scrollbar-color:#96998e #d9d8d0}
.subject-scroll::-webkit-scrollbar{height:10px;display:block}
.subject-scroll::-webkit-scrollbar-track{background:#d9d8d0;border-radius:20px}
.subject-scroll::-webkit-scrollbar-thumb{background:#96998e;border:2px solid #d9d8d0;border-radius:20px}
.subject-grid{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:14px;width:max-content;min-width:100%;margin:0;text-align:left}
.subject-card{flex:0 0 250px;width:250px;min-height:132px;padding:20px 18px;border:1px solid #d5d4cc;border-radius:14px;background:#e5e4dd;display:flex;align-items:center;gap:15px;color:#343632;box-shadow:none;white-space:normal;scroll-snap-align:center;transform:none}
.subject-card:hover{background:#deddd5;border-color:#bdbdb4;box-shadow:0 6px 16px rgba(48,50,43,.07);transform:translateY(-2px)}
.subject-icon{width:46px;height:46px;flex:0 0 46px;border-radius:13px;display:grid;place-items:center;font-size:20px;background:#d8d9d0;color:#596454}
.subject-info{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px;min-width:0;flex:1}
.subject-info small{display:block;font-size:11px;line-height:1.45;color:#777a72;margin:0;overflow-wrap:anywhere}
.subject-info b{display:block;font-size:17px;line-height:1.45;font-weight:500;color:#343632;overflow-wrap:anywhere;word-break:normal}
.subject-info em{display:block;font-style:normal;font-size:10px;line-height:1.4;color:#777e70;margin-top:2px}
.subject-info em span{padding-left:3px}
.tone-violet .subject-icon{background:#e1dfe8;color:#6e687f}
.tone-cyan .subject-icon{background:#dce5e4;color:#5d7775}
.tone-orange .subject-icon{background:#e9e1d7;color:#8a7058}
.tone-green .subject-icon{background:#dce4d9;color:#61765e}
.scroll-hint{display:flex;justify-content:center;align-items:center;gap:10px;margin:12px 0 0;color:#85877e;font-size:10px;letter-spacing:.2px}
.hint-track{display:inline-block;width:46px;height:1px;background:#b7b8ae}
.card,.post-card{background:#e7e6df;border-color:#d8d7cf}
.card{box-shadow:none}
input:not([type=file]),textarea{background:#f0efe9;border-color:#d8d7cf;color:#343632}
.file-pick,.file-link{background:#efeee8;border-color:#d8d7cf}
.post-card{box-shadow:none}
@media(max-width:620px){
 .shell{width:calc(100% - 24px)}
 .home-view{padding:28px 0}
 .home-center{width:100%}
 .subject-selector{gap:7px}
 .scroll-arrow{width:32px;height:32px;flex-basis:32px;font-size:22px}
 .subject-card{flex-basis:238px;width:238px;min-height:124px;padding:16px 14px;gap:12px}
 .subject-info b{font-size:16px}
 .subject-scroll::-webkit-scrollbar{height:9px}
}

/* Clean horizontal subject rail: keep touch/trackpad scrolling, hide scrollbar */
.subject-scroll{
  scrollbar-width:none !important;
  -ms-overflow-style:none;
  overflow-x:auto;
  scroll-behavior:smooth;
  scroll-snap-type:x mandatory;
  padding:8px 2px 10px;
  scroll-padding-inline:12px;
}
.subject-scroll::-webkit-scrollbar{display:none !important;width:0 !important;height:0 !important}
.subject-grid{justify-content:flex-start}
.subject-card{scroll-snap-align:start;transition:transform .28s cubic-bezier(.2,.75,.25,1),background-color .22s,border-color .22s,box-shadow .22s}
.subject-card:hover{transform:translateY(-3px)}
.subject-card:focus-visible,.scroll-arrow:focus-visible{outline:3px solid rgba(105,119,99,.28);outline-offset:3px}
.scroll-arrow{transition:transform .22s ease,background-color .22s,border-color .22s,opacity .22s}
.scroll-arrow:active{transform:scale(.92)}
.scroll-hint{display:block;margin:15px 0 0;min-height:18px;line-height:1.8;color:#85877e;font-size:11px;letter-spacing:.1px}
.hint-track{display:none !important}
@media(max-width:620px){
 .subject-scroll{padding:8px 2px 10px;scroll-padding-inline:8px}
 .scroll-hint{margin-top:12px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){
 .subject-scroll{scroll-behavior:auto}
 .subject-card,.scroll-arrow{transition:none}
}

/* Larger, properly aligned 5/3 class mark */
.class-mark{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:auto;
  height:auto;
  padding:0;
  margin:0 auto 13px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#343632;
  font-size:clamp(54px,7vw,76px);
  font-weight:600;
  letter-spacing:-4px;
  line-height:1;
}
.class-mark span{
  color:#85877e;
  margin:0;
  font-weight:300;
  font-size:.88em;
}

/* Large-file upload progress */
.upload-progress{margin:13px 0 5px;padding:12px;border:1px solid #d8d7cf;border-radius:10px;background:#efeee8}
.upload-progress-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.upload-progress-head b{font-size:11px;font-weight:500;color:#45483f}
.upload-progress-head strong{font-size:12px;font-weight:600;color:#596454;font-variant-numeric:tabular-nums}
.upload-track{height:8px;border-radius:20px;background:#d8d8cf;overflow:hidden}
.upload-bar{height:100%;width:0;border-radius:20px;background:#77836f;transition:width .18s ease}
.upload-progress small{display:block;margin-top:7px;font-size:10px;line-height:1.5;color:#777a72;overflow-wrap:anywhere}