:root {
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: #172b3c;
  background: #edf2f3;
  font-size: 16px;
  line-height: 1.6;
  --ink: #172b3c;
  --muted: #49606d;
  --line: #d5e1e4;
  --paper: #fcfefe;
  --teal: #005e61;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: .18em; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #168788; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.3rem; line-height: 1.28; }
h3 { font-size: 1rem; }
.shell { width: min(1100px, calc(100% - 40px)); margin-inline: auto; }
.skip { position: fixed; z-index: 2; top: 8px; left: -500px; background: var(--paper); padding: 8px 16px; }
.skip:focus { left: 8px; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner, .row, .card-top, .member-row, .file-row, .storage { display: flex; align-items: center; gap: .75rem; }
.top-inner, .card-top, .member-row, .file-row, .storage { justify-content: space-between; }
.top-inner { min-height: 64px; }
.brand { text-decoration: none; font-weight: 760; color: #12474d; font-size: 1.22rem; display: flex; align-items: center; gap: .55rem; }
.brand span { font-size: .78rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: .55rem; font-weight: 620; }
#notice { margin: 0; }
#notice:not(:empty) { margin-top: 14px; border: 1px solid #a9cccc; padding: 8px 12px; color: #16494a; background: #e3f2f0; border-radius: 7px; }
#notice.error { border-color: #edc5af; color: #803719; background: #fff4ef; }
main { margin-top: 20px; padding-bottom: 36px; }
.hero {
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 238px;
  padding: clamp(1.55rem, 6vw, 3rem);
  border-radius: 17px;
  color: #f1fbfa;
  background: radial-gradient(ellipse at 75% 100%, #24696a 0%, transparent 57%), linear-gradient(116deg, #112e41 46%, #133f53 100%);
  isolation: isolate;
  position: relative;
}
.hero::after {
  content: "";
  z-index: -1;
  pointer-events: none;
  position: absolute;
  inset: 0 0 0 40%;
  opacity: .34;
  background:
    repeating-linear-gradient(116deg, transparent 0 23px, #89e2d486 24px 25px, transparent 26px 45px),
    repeating-linear-gradient(116deg, transparent 0 75px, #b5ebf380 76px 78px, transparent 79px 125px);
  mask-image: linear-gradient(95deg, transparent 0%, #000 79%);
}
.hero h1 { font-size: clamp(1.8rem, 5vw, 3.25rem); letter-spacing: -.045em; line-height: 1.16; margin: .55rem 0; }
.eyebrow { color: #a9e6dc; font-weight: 660; font-size: .83rem; letter-spacing: .055em; }
.hero-copy { color: #daf0ee; max-width: 44ch; }
.totals { display: flex; gap: .5rem; flex-wrap: wrap; }
.hero-tag { display: inline-block; margin-top: .85rem; background: #163d47; border: 1px solid #72adab; border-radius: 6px; padding: .2rem .65rem; color: #edfffa; font-size: .88rem; }
.card { background: var(--paper); border-radius: 12px; border: 1px solid var(--line); padding: clamp(1rem, 3vw, 1.4rem); min-width: 0; }
.login { margin: 22px 0 0; width: min(100%, 435px); display: grid; gap: .8rem; }
.login label { margin-top: .3rem; }
label { display: block; font-size: .88rem; font-weight: 650; }
input, select { max-width: 100%; width: 100%; color: var(--ink); padding: 9px 10px; min-height: 44px; border: 1px solid #a5b8c0; border-radius: 6px; background: #fff; }
input[type=file] { font-size: .86rem; padding: 5px; overflow: hidden; }
input::file-selector-button { color: #284452; font: inherit; margin-right: 9px; background: #e7eff2; padding: 6px 8px; border-radius: 4px; border: 0; }
button, .link-button { padding: .45rem .75rem; min-height: 44px; border-radius: 6px; border: 1px solid transparent; font-weight: 680; }
button:disabled { cursor: default; opacity: .55; }
.primary { color: #fff; background: var(--teal); }
.primary:hover:not(:disabled) { background: #004c51; }
.secondary { color: #214755; background: #ecf4f4; border-color: #bed0d6; }
.secondary:hover:not(:disabled) { background: #e0eded; }
.quiet, .signout { color: #374f61; background: transparent; border-color: transparent; }
.quiet:hover, .signout:hover { background: #eef4f4; }
.link-button { color: var(--teal); border-color: #bed0d6; background: #f4f9f8; display: inline-flex; align-items: center; text-decoration: none; }
.link-button:hover { background: #e2f0ef; }
.profile { max-width: 420px; margin-top: 22px; }
.profile .row { margin-top: .3rem; }
.section { margin-top: 26px; }
.section-head { margin-bottom: 1rem; }
.section-head p, .hint, .role-card > p, .storage p { color: var(--muted); font-size: .91rem; }
.section-head p { margin-top: .34rem; }
.role-grid, .slot-grid, .admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.role-card { display: flex; flex-direction: column; gap: .65rem; }
.role-card button { margin-top: auto; align-self: start; }
.letter { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #e0eeed; color: #17565e; font-weight: 780; }
.badge { inline-size: max-content; max-width: 100%; font-size: .77rem; font-weight: 650; border-radius: 6px; padding: .17rem .5rem; }
.muted { color: #465861; background: #edf1f3; }
.good { color: #14584a; background: #e2f3e9; }
summary { padding-block: .6rem; color: #235662; font-weight: 650; }
summary .badge { margin-left: .7rem; }
.script { background: #f1f6f7; border-left: 3px solid #90babb; padding: .8rem .95rem; margin: .55rem 0; white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
.tools { display: grid; gap: .6rem; margin-top: .85rem; justify-items: start; }
.tools > div { max-width: 100%; }
.tools > div:empty, .hint:empty { display: none; }
.tools progress, audio, video { display: block; max-width: 100%; }
audio { width: 100%; min-height: 44px; }
video { width: 100%; max-height: 360px; background: #172b3c; }
progress { width: min(100%, 310px); accent-color: var(--teal); }
.preview { width: 100%; overflow-wrap: anywhere; }
.storage { margin-top: 20px; flex-wrap: wrap; }
.storage h2 { margin-bottom: .22rem; }
.admin-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.admin-panel { overflow-wrap: anywhere; }
.wrap { flex-wrap: wrap; }
.wrap select { width: auto; max-width: 100%; }
.material-group, .member-admin { border-top: 1px solid var(--line); padding-block: .55rem; }
.material-group:nth-of-type(1), .member-admin:nth-of-type(1) { margin-top: .7rem; }
.material-group summary { font-size: .98rem; }
.material-group .import { margin-block: .5rem; padding-left: .65rem; border-left: 2px solid var(--line); }
.member-row, .file-row { flex-wrap: wrap; }
.assignment { margin: .35rem 0; }
.assignment .row { gap: .45rem; }
.received { border: 1px solid var(--line); border-radius: 7px; margin-block: .6rem; padding: .72rem; }
.filename { font: .83rem ui-monospace, monospace; overflow-wrap: anywhere; }
.version { font-size: .81rem; color: var(--muted); margin-bottom: .35rem; }
.review { display: grid; grid-template-columns: minmax(105px, .65fr) minmax(0, 1.35fr); gap: .55rem; margin-top: .65rem; }
.review button { justify-self: start; }
.issued-code { background: #eaf6f1; margin: .6rem 0; padding: .7rem; border: 1px solid #bdded3; border-radius: 6px; }
.issued-code code { display: block; overflow-wrap: anywhere; margin: .45rem 0; }
.sources ul { padding-left: 1.25rem; margin-top: .28rem; }
.footer { color: #58717b; border-top: 1px solid var(--line); padding: 12px 0 24px; font-size: .79rem; }
.loading { padding: 20px 0; }
@media (max-width: 880px) {
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 590px) {
  .shell { width: calc(100% - 28px); }
  .top-inner { min-height: 55px; }
  .hero { min-height: 180px; border-radius: 12px; }
  .role-grid, .slot-grid { grid-template-columns: 1fr; gap: 10px; }
  .section { margin-top: 18px; }
  .hero::after { opacity: .24; }
  .review { grid-template-columns: 1fr; }
}
.row > button { flex-shrink: 0; white-space: nowrap; }
.profile input { min-width: 0; }
