/* Small additive styles, matching the existing site's colors. */
.st38-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin:16px 0}
.st38-choice{border:1px solid var(--border,#d9dfeb);background:var(--card,#fff);border-radius:14px;padding:19px;text-align:right;cursor:pointer;color:inherit;font:inherit;display:flex;flex-direction:column;gap:7px;box-shadow:0 2px 12px rgba(0,0,0,.03)}
.st38-choice:hover,.st38-choice:focus-visible{border-color:var(--primary,#2277b9);transform:translateY(-1px)}
.st38-choice small,.st38-file small,.st38-file p{color:var(--muted,#69768b);margin:0}
.st38-file{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:14px 5px;border-bottom:1px solid var(--border,#e0e4ed)}
.st38-file div{display:flex;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere}
.st38-file .btn{flex-shrink:0}
.st38-info{color:var(--muted,#637186);padding:14px 0}
#st38Crumbs{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0}
#st38Crumbs button{cursor:pointer;background:transparent;border:0;color:var(--primary,#186faf);font:inherit;text-decoration:underline}
#st38Status{padding:10px 0;white-space:pre-wrap;overflow-wrap:anywhere}
#st38Status[data-type=error]{color:#a22236}#st38Status[data-type=success]{color:#18814d}
.st38-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:14px}
.st38-upload-note{font-size:.9rem;color:var(--muted,#64748b);margin-top:8px}
.st38-file-input{width:100%;max-width:100%;padding:10px}
@media(max-width:580px){.st38-file{align-items:flex-start;flex-direction:column}.st38-file .btn{width:100%}}
/* V52.39: subject images match the purchased-material selection cards. */
.st38-subject-card{padding:0;overflow:hidden;text-align:center;gap:0;min-height:175px}
.st38-subject-card img{height:100px;width:100%;object-fit:cover;display:block;background:rgba(148,163,184,.15)}
.st38-subject-card .st38-subject-body{padding:13px;display:flex;flex-direction:column;gap:5px}
.st38-subject-card strong{font-size:1rem}.st38-subject-card small{font-size:.78rem}
/* V52.40 paid bundle / selected-manager-scope additions. */
.st40-bundle-box{padding:16px;border:1px solid var(--border,rgba(148,163,184,.28));border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.st40-bundle-box p{max-width:850px;color:var(--muted,#9aa8ba);line-height:1.9;margin:6px 0}
.st40-owned{font-weight:650;color:var(--primary,#16a3d4)!important}
#st40OwnedFiles label{display:block;margin-bottom:8px}
#st40OwnedFiles select{min-width:min(320px,100%);margin-bottom:14px}
#st40PricePanel[hidden],#st38UploadPanel[hidden],#st40OwnedFiles[hidden]{display:none!important}

/* V77: search and sorting within the selected grade and subject. */
.st77-file-tools{display:grid;grid-template-columns:minmax(200px,1fr) minmax(200px,1fr);gap:14px;margin:16px 0 8px}
.st77-file-tools .form-group{min-width:0;margin:0}
.st77-file-tools label{display:block;margin-bottom:7px;font-weight:600}
.st77-file-tools input,.st77-file-tools select{display:block;width:100%;min-width:0;max-width:100%;padding:11px 12px;border:1px solid var(--border,#d9dfeb);border-radius:10px;background:var(--card,#fff);color:inherit;font:inherit}
.st77-file-tools input:focus-visible,.st77-file-tools select:focus-visible{outline:2px solid var(--primary,#2277b9);outline-offset:2px}
.st77-count{font-size:.88rem;color:var(--muted,#64748b);margin:8px 0 14px}
.st77-scope-note{font-size:.88rem;color:var(--muted,#64748b);margin:0 0 12px}
#st77ManagerTools[hidden]{display:none!important}
@media(max-width:580px){.st77-file-tools{grid-template-columns:1fr}}
