/* Shared visual language for the account chooser and the two workspaces. */
:root {
  --blue: #1262d7;
  --ink: #202f46;
  --muted: #637389;
  --bg: #f4f7fc;
  --line: #dfe6ef;
  --pale: #edf4ff;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #438bdf; outline-offset: 3px; }
.entry-page { min-height: 100svh; padding: 0 clamp(18px, 5vw, 80px) 36px; background: radial-gradient(ellipse at 88% 16%, #e5efff, transparent 51%), #f5f8fc; }
.entry-header { display: flex; align-items: center; gap: 16px; min-height: 88px; max-width: 1240px; margin: auto; }
.entry-brand { display: inline-flex; align-items: center; gap: 11px; color: #182e50; }
.entry-brand strong { font-size: 23px; letter-spacing: .02em; line-height: 1.2; }
.folio-mark { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; background: #1466dd; position: relative; box-shadow: 0 3px 9px #145fc828; }
.folio-mark::before, .folio-mark::after { content: ""; position: absolute; width: 10px; height: 15px; top: 11px; background: white; }
.folio-mark::before { left: 7px; transform: skewY(12deg); border-radius: 2px 4px 1px 2px; }
.folio-mark::after { right: 7px; transform: skewY(-17deg); border-radius: 4px 2px 2px 1px; background: #c8e2ff; }
.entry-context { border-left: 1px solid #cbd6e5; padding-left: 15px; color: #56667c; font-size: 13px; }
.entry-lang { margin-left: auto; color: #536881; padding: 7px 13px; border: 1px solid #d5deeb; border-radius: 18px; background: #ffffffcc; }
.entry-frame { margin: clamp(12px, 5vh, 62px) auto 0; width: min(100%, 1000px); display: grid; grid-template-columns: .89fr 1fr; background: white; border: 1px solid #dce4ee; border-radius: 24px; overflow: hidden; box-shadow: 0 22px 68px -32px #274c804d; }
.entry-cover { position: relative; min-height: 548px; color: white; isolation: isolate; background: #0c50d4 url("./paper-studio.webp") center / cover no-repeat; }
.entry-cover-title { position: relative; padding: clamp(34px,4vw,60px) clamp(26px,3.3vw,48px); }
.entry-cover h2 { color: #fff; font-size: clamp(33px,3.3vw,48px); font-weight: 700; line-height: 1.22; letter-spacing: -.035em; }
.entry-cover p { color: #e0edff; font-size: 14px; margin-top: 11px; }
.entry-content { min-width: 0; align-self: center; padding: 38px clamp(26px,4.2vw,59px); }
.entry-content h1 { color: #182b46; font-size: clamp(26px,2.3vw,34px); letter-spacing: -.04em; font-weight: 700; line-height: 1.4; }
.entry-instruction { color: #687991; margin: 6px 0 25px; font-size: 14px; }
.entry-accounts { display: grid; gap: 10px; }
.entry-account { display: flex; width: 100%; align-items: center; text-align: left; gap: 13px; padding: 13px 15px; min-height: 66px; background: white; border: 1px solid #dbe3ef; border-radius: 12px; transition: border-color .15s, background .15s; }
.entry-account:hover, .entry-account:focus-visible { background: #f5f9ff; border-color: #92b6ef; }
.entry-account.chosen { background: #f0f6ff; border-color: #6c9ce8; box-shadow: inset 0 0 0 1px #a3c1ef; }
.entry-avatar { display: inline-grid; place-items: center; flex: 0 0 39px; height: 39px; border-radius: 12px; font-size: 17px; font-weight: 650; }
.entry-avatar.teacher { background: #dceaff; color: #235cb0; }
.entry-avatar.student { background: #dbf1e9; color: #207357; }
.entry-avatar.admin { background: #eee6fa; color: #725396; }
.entry-person { display: grid; gap: 3px; }
.entry-person b { font-size: 15px; line-height: 1.3; }
.entry-person small { font-size: 12px; color: #61748b; }
.entry-role { margin-left: auto; font-size: 12px; color: #53667d; }
.entry-indicator { width: 18px; line-height: 18px; text-align: center; font-size: 21px; color: #69809d; }
.chosen .entry-indicator { border-radius: 50%; color: white; font-weight: 700; font-size: 12px; background: var(--blue); }
.entry-form { display: grid; gap: 12px; margin-top: 19px; }
.entry-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.entry-field input { width: 100%; font-size: 14px; border-radius: 9px; border-color: #d7dfeb; height: 42px; }
.entry-submit.btn { width: 100%; justify-content: center; gap: 12px; min-height: 43px; }
.entry-other, .entry-options { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: #50667e; }
.entry-other button, .entry-other a, .entry-options button { padding: 4px 0; color: #295fa8; }
.entry-options { margin: 0; }
.entry-content [role="alert"] { margin: 12px 0; padding: 8px 12px; border-radius: 8px; background: #fff0ec; color: #9c352b; }
.sidebar { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
.studio-side .brand { padding-bottom: 22px; }
.navlabel { color: #697b91; font-weight: 600; }
.sidebar nav + .navlabel { margin-top: 21px; }
.navitem { transition: background .15s; border-radius: 9px; }
.navitem.active { background: #eaf2ff; color: #155fc8; font-weight: 650; }
.navitem.active:before { display: none; }
.studio-top.service-header { justify-content: space-between; color: var(--ink); background: #ffffffef; padding: 0 clamp(16px,3vw,40px); border-bottom: 1px solid var(--line); }
.studio-location { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.studio-location span, .studio-location i { color: #6d7b90; }
.studio-location i { font-style: normal; }
.studio-top .studio-location strong { font-weight: 600; margin: 0; }
.studio-user { gap: 9px; }
.studio-user small { border-right: 1px solid var(--line); padding-right: 12px; }
.studio-menu { display: none; }
.studio-main { width: 100%; max-width: 1560px; margin: 0 auto; }
.main .page-head { margin: 0 0 25px; }
.page-head h1 { font-size: clamp(24px,2.1vw,32px); line-height: 1.35; }
.page-head p { font-size: 14px; color: #61738a; }
.btn { border-radius: 8px; font-weight: 550; }
.btn.primary { background: var(--blue); box-shadow: 0 3px 7px #2369c31b; color: #fff; }
.btn.primary:hover { background: #104da9; }
.panel, .task-card, .stat { border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 3px 12px #2e537b06; }
.panel-head, .paper-row, .question-row { border-color: #e7ecf4; }
.panel-head h2, .task-card h2 { color: #203650; }
.paper-row:hover, .question-row:hover { background: #f8faff; }
.question-row.selected { background: #eff6ff; }
.tabs button.active { color: #165ebd; font-weight: 650; }
.table-wrap th { color: #54667c; background: #f5f8fc; font-weight: 600; }
.table-wrap td { border-color: #e7ecf3; }
.filters select, .searchbox, .form-grid input, .form-grid select { border-radius: 8px; }
.workspace .hero { background: linear-gradient(105deg,#134caa,#1056cc 66%,#0f54d2); border: 0; border-radius: 16px; min-height: 196px; }
.workspace .hero > div:first-child { position: relative; z-index: 1; }
.workspace .hero h2, .workspace .hero p strong { color: white; }
.workspace .hero p { color: #e1edff; font-size: 14px; }
.workspace .hero .btn.primary { background: white; color: #164f9e; }
.workspace .hero .linkbtn { color: #fff; }
.study-art { position: absolute; inset: 0 0 0 auto; width: 34%; background: url("./paper-studio.webp") center 73% / cover no-repeat; mask-image: linear-gradient(90deg, transparent, black 27%); }
.studio-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin: -8px 0 12px; font-size: 12px; color: #53677b; }
.studio-save button { color: #295fa8; padding: 3px 6px; border-radius: 5px; }
.studio-save button:hover { background: #e7f0ff; }
@media (min-width:621px) and (max-width:950px) {
  .studio-side .entry-brand strong { display: none; }
  .studio-side .sidebar-bottom .navitem { justify-content: center; }
  .sidebar-bottom > .row { display: flex; justify-content: center; }
  .sidebar-bottom > .row > :not([data-act="logout"]) { display: none; }
}
@media (max-width:760px) {
  .entry-page { padding: 0 16px 24px; }
  .entry-header { min-height: 63px; }
  .entry-brand strong { font-size: 20px; }
  .entry-frame { margin-top: 5px; max-width: 520px; grid-template-columns: 1fr; border-radius: 17px; }
  .entry-cover { min-height: 116px; background-size: 170px auto; background-position: right 0 bottom 19%; }
  .entry-cover-title { padding: 26px 22px; max-width: calc(100% - 100px); }
  .entry-cover h2 { font-size: 27px; }
  .entry-cover p { font-size: 11px; margin-top: 4px; }
  .entry-content { padding: 24px 22px; }
  .entry-content h1 { font-size: 24px; }
  .entry-instruction { margin: 4px 0 16px; }
  .entry-account { min-height: 59px; padding: 10px 12px; }
}
@media (max-width:620px) {
  .studio-menu { display: inline-flex; }
  .studio-top.service-header { padding: 0 12px; gap: 8px; }
  .studio-user { gap: 5px; }
  .studio-user small, .studio-location > span, .studio-location > i { display:none; }
  .studio-user b { max-width: 5.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main .page-head { margin-bottom: 16px; }
  .entry-frame { margin-inline: auto; }
  .studio-side { z-index: 65; }
  .workspace .hero { padding: 20px; }
  .study-art { width: 32%; opacity: .6; mask-image:linear-gradient(90deg,transparent,#000 65%); }
}
@media (prefers-reduced-motion:reduce) { .entry-account,.navitem { transition:none; } }
