/* ==========================================================================
   0. 全域與校網 CMS 容器破框（填滿頁首藍色、頁尾橘色，並置中主要內容）
   ========================================================================== */

/* 確保最外層基礎容器不被限制寬度，並防止 100vw 產生水平捲軸 */
html, body, .wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* 頁首通欄填滿視窗 (天藍底色 #81B8F0) */
#Dyn_head,
.header {
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  background-color: #81B8F0 !important;
}

/* 頁首內容保持在中央 1200px 範圍內 */
.header .minner,
.header .minner.container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  background: transparent !important;
}

/* 頁尾通欄填滿視窗 (橘黃底色 #FFCC99) */
#Dyn_footer,
.footer {
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  background-color: #FFCC99 !important;
}

/* 頁尾內容保持在中央 1200px 範圍內 */
.footer .minner,
.footer .minner.container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  background: transparent !important;
}

/* 中間內容區（單欄 100% 展開並居中） */
.row_0 .col_02 {
  width: 100% !important;
}

.row_0 .col_03 {
  display: none !important;
  width: 0% !important;
}

.main .minner,
.main .mrow,
.row_0 .container {
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* ==========================================================================
   1. 新高國小校徽標準色與全域設定
   天藍 #0094DE ／ 活力橘 #E87A11 ／ 樹綠 #00933F ／ 愛心紅 #DB2016 ／ 校名灰 #858384
   ========================================================================== */
:root {
  --blue: #0094DE;
  --blue-dark: #007ab8;
  --blue-soft: #e6f5fd;
  --orange: #E87A11;
  --green: #00933F;
  --red: #DB2016;
  --grey: #858384;

  --ink: #23313c;
  --ground: #f2f7fa;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --line: #dde7ee;
  --line-strong: #c4d3de;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", -apple-system, system-ui, sans-serif;
  background: var(--ground);
  color: var(--ink);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   2. 導覽、品牌標題與校徽色帶
   ========================================================================== */
.login-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  padding: 8px 4px;
  color: var(--grey);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.login-back:hover {
  color: var(--blue);
  border-bottom-color: var(--orange);
}

.login-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-body {
  display: flex;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand img {
  height: 40px;
  width: auto;
  flex: none;
}

.brand .name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
  color: var(--ink);
}

.logout {
  flex: none;
  color: var(--grey);
  text-decoration: none;
  font-size: 2rem;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.logout:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.stripe {
  height: 4px;
  display: flex;
  flex: none;
}

.stripe span {
  flex: 1;
}

.stripe .s1 { background: var(--orange); }
.stripe .s2 { background: var(--red); }
.stripe .s3 { background: var(--blue); }
.stripe .s4 { background: var(--green); }

/* ==========================================================================
   3. 分頁與主要佈局 (置中與寬度升級)
   ========================================================================== */
.tabbar {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tabbar .tab {
  flex: 1;
  text-align: center;
  padding: 13px 8px;
  color: var(--grey);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.tabbar .tab:hover {
  color: var(--blue);
}

.tabbar .tab.active {
  color: var(--blue);
  border-bottom-color: var(--orange);
  font-weight: 700;
}

/* 主容器：擴充至 1040px 並強制居中 */
main {
  width: 100%;
  max-width: 1040px;
  margin: 20px auto;
  padding: 0 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 0 auto;
}

main.wide {
  max-width: 1180px;
}

.card-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.card-panel h2 {
  margin: 0 0 16px;
  font-size: 2rem;
  font-weight: 700;
  padding-left: 10px;
  border-left: 4px solid var(--blue);
}

/* ==========================================================================
   4. 表單與元件操作
   ========================================================================== */
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upload-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--grey);
  font-weight: 600;
}

.upload-form label strong {
  color: var(--blue);
}

.field-group {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group legend {
  padding: 0;
  font-size: 0.88rem;
  color: var(--grey);
  font-weight: 600;
}

.field-row {
  display: flex;
  gap: 10px;
}

.field-row select {
  flex: 1;
  min-width: 0;
}

.upload-form input,
.upload-form select {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.upload-form select:disabled {
  background: var(--surface-2);
  color: var(--grey);
  cursor: not-allowed;
}

.upload-form button,
.search-bar button {
  min-height: 48px;
  padding: 13px 18px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 700;
}

.upload-form button:hover,
.search-bar button:hover {
  background: var(--blue-dark);
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.upload-form .pick-btn {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--surface);
  border: 1.5px solid var(--blue);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}

.upload-form .pick-btn:hover {
  background: var(--blue-soft);
}

.upload-form .pick-btn:focus-within {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.pick-btn svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pick-btn input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.picked-name {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--grey);
  word-break: break-all;
}

/* ==========================================================================
   5. 圖片品質檢查與狀態提示
   ========================================================================== */
.quality {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.quality-shot {
  flex: none;
  width: 116px;
}

.quality-preview {
  width: 116px;
  height: 86px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  background: var(--blue-soft);
  border: 1px solid var(--line);
}

.rot-bar {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
}

.upload-form .rot-btn {
  flex: none;
  width: 46px;
  min-height: 34px;
  padding: 5px 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.upload-form .rot-btn:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue);
}

.upload-form .rot-btn:disabled {
  opacity: .45;
  cursor: progress;
  background: var(--surface);
}

.quality-info {
  min-width: 0;
  flex: 1;
}

.quality-verdict {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--grey);
}

.quality-verdict.is-ok { color: var(--green); }
.quality-verdict.is-warn { color: var(--orange); }
.quality-verdict.is-block { color: var(--red); }
.quality-verdict.is-unknown { color: var(--grey); }
.quality-score.is-warn { color: var(--orange); }

.quality-reasons {
  margin: 0 0 4px;
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--ink);
}

.quality-score {
  margin: 0;
  font-size: 0.76rem;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}

.upload-form .quality-override {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--ink);
  font-weight: 400;
  cursor: pointer;
}

.upload-form .quality-override input {
  width: auto;
  min-height: 0;
  margin: 0;
  flex: none;
  accent-color: var(--blue);
  transform: scale(1.25);
}

.upload-form button:disabled {
  background: var(--line-strong);
  color: #fff;
  cursor: not-allowed;
}

.success {
  color: var(--green);
  font-weight: 700;
  background: #eaf7ef;
  border-left: 4px solid var(--green);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 0 0 14px;
}

.error {
  color: var(--red);
  font-weight: 700;
  background: #fdeceb;
  border-left: 4px solid var(--red);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 0 0 14px;
}

/* ==========================================================================
   6. 搜尋頁與結果網格
   ========================================================================== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  max-width: 620px;
}

.search-bar input {
  flex: 1 1 140px;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.search-bar button {
  flex: 0 0 auto;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}

.results-grid .empty {
  grid-column: 1 / -1;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
}

.thumb-wrap {
  position: relative;
}

.result-card .thumb-link {
  display: block;
}

.result-card .thumb {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--blue-soft);
  display: block;
}

.result-card .meta {
  padding: 11px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.result-card .label {
  color: var(--grey);
}

.download-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 8px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.download-btn svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-btn:hover {
  background: #fff;
  color: var(--blue);
  border-color: #fff;
}

.empty {
  color: var(--grey);
  text-align: center;
  padding: 36px 12px;
  margin: 0;
}

.badge.unknown {
  background: var(--grey);
}

/* ==========================================================================
   7. 登入區塊
   ========================================================================== */
.login-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
  background: var(--ground);
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  width: 100%;
  max-width: 340px;
}

.login-box .inner {
  padding: 28px 24px;
}

.login-box .crest {
  width: 108px;
  height: auto;
  margin: 0 auto 14px;
  display: block;
}

.login-box h1 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.45;
  text-wrap: balance;
}

.login-box .subtitle {
  color: var(--grey);
  margin: 0 0 20px;
  font-size: 0.88rem;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-box input {
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  text-align: center;
}

.login-box button {
  min-height: 48px;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 700;
}

.login-box button:hover {
  background: var(--blue-dark);
}

.login-box .error {
  margin-bottom: 14px;
  text-align: left;
}

/* ==========================================================================
   8. 產業選擇器 Modal 與三階樹狀清單
   ========================================================================== */
.upload-form .ind-field {
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-weight: 400;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

.upload-form .ind-field:hover {
  background: var(--surface);
  border-color: var(--blue);
}

.upload-form .ind-field .val {
  flex: 1;
  min-width: 0;
}

.upload-form .ind-field .ph {
  color: var(--grey);
}

.upload-form .ind-field .chev {
  flex: none;
  color: var(--grey);
}

.upload-form .ind-field strong {
  color: var(--green);
  font-weight: 700;
}

.upload-form .ind-field .sub {
  display: block;
  margin-top: 1px;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--grey);
}

.upload-form .ind-field.on {
  background: #eaf7ef;
  border-color: var(--green);
}

.upload-form .ind-field.on:hover {
  background: #eaf7ef;
  border-color: var(--green);
}

body.no-scroll {
  overflow: hidden;
}

.sheet.tall {
  height: 80vh;
  height: 80dvh;
  max-height: calc(100vh - var(--sheet-top) - var(--sheet-gap));
  max-height: calc(100dvh - var(--sheet-top) - var(--sheet-gap));
}

.sheet.tall .sheet-top {
  flex: none;
}

.sheet.tall .sheet-scroll {
  flex: 1;
  min-height: 0;
}

.s-row.on {
  background: var(--blue-soft);
  font-weight: 700;
}

.s-row.on:hover {
  background: #d8ecfa;
}

.s-row.on .sub {
  font-weight: 400;
}

.s-row .tick {
  flex: none;
  color: var(--blue);
  font-weight: 700;
}

.sheet-empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 0.9rem;
}

.class-hint {
  margin: 7px 0 0;
  font-size: 0.8rem;
  color: var(--grey);
}

.class-hint.is-ok {
  color: var(--green);
  font-weight: 700;
}

.pick-bar {
  display: flex;
  gap: 9px;
  align-items: center;
}

.pick-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.pick-open:hover {
  background: var(--blue-dark);
}

.pick-open svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 5px 5px 12px;
  background: var(--blue-soft);
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.tag-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 2px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--blue);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.tag-x:hover {
  background: var(--blue);
  color: #fff;
}

.field {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.field:hover {
  border-color: var(--blue);
}

.field .ph {
  color: var(--grey);
}

.field .chev {
  flex: none;
  color: var(--grey);
}

.btn-plain {
  flex: none;
  min-height: 48px;
  padding: 12px 15px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--grey);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-plain:hover {
  border-color: var(--red);
  color: var(--red);
}

.sheet-bg {
  --sheet-top: 56px;
  --sheet-gap: 12px;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 30, 45, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--sheet-top) var(--sheet-gap) var(--sheet-gap);
}

.sheet {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 15px;
  overflow: hidden;
  max-height: calc(100vh - var(--sheet-top) - var(--sheet-gap));
  max-height: calc(100dvh - var(--sheet-top) - var(--sheet-gap));
}

@media (max-width: 619px) {
  .sheet-bg {
    --sheet-top: 24px;
  }
}

.sheet-top {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-bar strong {
  flex: 1;
  font-size: 0.97rem;
}

.ico {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--grey);
  font-family: inherit;
  cursor: pointer;
}

.ico:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.sheet .txt {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.crumb {
  font-size: 0.77rem;
  color: var(--grey);
}

.sheet-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.s-row {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.s-row:last-child {
  border-bottom: 0;
}

.s-row:hover {
  background: var(--surface-2);
}

.s-row .lbl {
  flex: 1;
  min-width: 0;
}

.s-row .sub {
  display: block;
  font-size: 0.74rem;
  color: var(--grey);
  margin-top: 1px;
}

.s-row .cnt {
  flex: none;
  font-size: 0.73rem;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}

.s-row .chev {
  flex: none;
  color: var(--grey);
}

.s-row.off {
  color: var(--line-strong);
  cursor: not-allowed;
}

.s-row.off .cnt {
  color: var(--line-strong);
}

.s-row.off:hover {
  background: none;
}

.s-row.all,
.s-row.free {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.s-row.all:hover,
.s-row.free:hover {
  background: #d8ecfa;
}

.s-row.free .sub {
  color: var(--blue);
  font-weight: 400;
  opacity: .8;
}

.result-card .meta .path {
  font-size: 0.74rem;
  color: var(--grey);
  margin-top: -2px;
}

mark {
  background: #ffe6a8;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.sheet .stick {
  position: sticky;
  z-index: 6;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.sheet .stick.s1 {
  top: 0;
  background: var(--blue);
  color: #fff;
}

.sheet .stick.s2 {
  top: 42px;
  background: #fdf0e2;
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--orange);
}

.sheet .stick.s2 .lv {
  color: var(--orange);
  opacity: 1;
}

.sheet .stick .lv {
  flex: none;
  min-width: 38px;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: .9;
  font-variant-numeric: tabular-nums;
}

.sheet .stick b {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet .stick .fold {
  flex: none;
  min-height: 30px;
  padding: 4px 10px;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.sheet .stick .fold:hover {
  background: rgba(255, 255, 255, .18);
}

.sheet .lvl2 { border-left: 3px solid var(--blue); }
.sheet .lvl3 { border-left: 3px solid var(--orange); }
.sheet .lvl2 > .s-row { padding-left: 23px; }
.sheet .lvl3 > .s-row { padding-left: 38px; font-size: 0.9rem; }

.sheet .branch {
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
}

.sheet .lvl2 > .branch {
  margin-bottom: 0;
  border-bottom: 0;
}

.sheet .s-row .num {
  flex: none;
  min-width: 38px;
  font-size: 0.78rem;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}

.sheet .lvl3 > .s-row .num { min-width: 46px; }
.sheet .s-row.on .num { color: var(--blue); }
.sheet .s-row.leaf .lbl { color: var(--blue); }

/* ==========================================================================
   9. 同意書模組與上傳等待畫面
   ========================================================================== */
.upload-form .consent-row {
  width: 100%;
  min-height: 52px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  text-align: left;
  line-height: 1.6;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
}

.upload-form .consent-row:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}

.upload-form .consent-row:hover .consent-label {
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.upload-form .consent-row.agreed:hover {
  background: #eaf7ef;
}

.upload-form .consent-row.as-check {
  margin-bottom: 9px;
}

.upload-form .consent-row input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.consent-box {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line-strong);
  border-radius: 5px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.consent-label {
  flex: 1;
  min-width: 0;
}

.consent-go {
  flex: none;
  margin-top: 1px;
  font-size: 0.83rem;
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}

.upload-form .consent-row.agreed {
  border-color: var(--green);
  background: #eaf7ef;
}

.consent-row.agreed .consent-box {
  background: var(--green);
  border-color: var(--green);
}

.consent-row.agreed .consent-go {
  color: var(--grey);
  font-weight: 400;
}

.consent-text {
  padding: 4px 16px 16px;
}

.consent-text p {
  margin: 12px 0 0;
  font-size: 0.86rem;
  line-height: 1.85;
  color: var(--ink);
}

.consent-text .c-title {
  margin-top: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.7;
}

.consent-text .c-head {
  margin-top: 20px;
  font-weight: 700;
  color: var(--blue);
  border-left: 3px solid var(--blue);
  padding-left: 8px;
}

.consent-text .c-item {
  margin-top: 8px;
  padding-left: 15px;
  position: relative;
}

.consent-text .c-item::before {
  content: '・';
  position: absolute;
  left: 0;
  color: var(--orange);
}

.consent-text .c-item strong {
  color: var(--ink);
}

.consent-foot {
  flex: none;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.consent-hint {
  margin: 0 0 9px;
  font-size: 0.78rem;
  color: var(--orange);
  text-align: center;
}

.consent-hint.is-ok {
  color: var(--green);
}

.consent-agree {
  width: 100%;
  min-height: 48px;
  padding: 13px 18px;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.consent-agree:hover:not(:disabled) {
  background: var(--blue-dark);
}

.consent-agree:disabled {
  background: var(--line-strong);
  cursor: not-allowed;
}

.your-ip {
  margin: -6px 0 0;
  text-align: right;
  font-size: 0.75rem;
  color: var(--grey);
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.uploading {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(242, 247, 250, 0.97);
}

.uploading-box {
  text-align: center;
  max-width: 300px;
}

.spin-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
}

.spin-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--orange);
  border-right-color: var(--red);
  border-bottom-color: var(--blue);
  border-left-color: var(--green);
  animation: xges-spin 1.1s linear infinite;
}

.spin-logo {
  position: absolute;
  inset: 16px;
  margin: auto;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  animation: xges-breathe 1.7s ease-in-out infinite;
}

@keyframes xges-spin {
  to { transform: rotate(360deg); }
}

@keyframes xges-breathe {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50% { transform: scale(1.07); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .spin-ring, .spin-logo {
    animation: none;
  }
}

.uploading-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.uploading-sub {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--blue);
  min-height: 1.6em;
}

.uploading-warn {
  margin: 0;
  font-size: 0.78rem;
  color: var(--grey);
}

.unlock-form {
  display: inline;
}

.btn-unlock {
  border-color: var(--orange);
  color: var(--orange);
  font-family: inherit;
  cursor: pointer;
}

.btn-unlock:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* ==========================================================================
   10. 家長會資訊專區 (修正偏左、偏小核心)
   ========================================================================== */
.info-intro {
  margin: 0;
  padding: 11px 13px;
  background: var(--blue-soft);
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  font-size: 0.86rem;
  color: var(--ink);
}

.pres-sec {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.pres-bar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-left: 2px;
}

.pres-bar h2 {
  margin: 0;
  font-size: 2.4rem;
  border-left: 5px solid var(--blue);
  padding-left: 10px;
}

.pres-note {
  font-size: 0.78rem;
  color: var(--grey);
}

.pres-stage {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.pres-track {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 14px;
}

.pres-track::-webkit-scrollbar {
  display: none;
}

.pres-track:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.pres-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-width: 0;
}

.pres-figure {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}

.pres-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pres-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 46px 18px 18px;
  background: linear-gradient(to top,
    rgba(10, 22, 32, .92) 0%,
    rgba(10, 22, 32, .78) 42%,
    rgba(10, 22, 32, .35) 74%,
    rgba(10, 22, 32, 0) 100%);
  color: #fff;
}

.pres-term {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: .08em;
  opacity: .85;
}

.pres-name {
  margin: 3px 0 6px;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.pres-role {
  margin-left: 9px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .45);
  font-size: 1.6rem;
  font-weight: 700;
  vertical-align: 5px;
  text-shadow: none;
  white-space: nowrap;
}

.pres-role.is-now {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.pres-years {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  opacity: .95;
}

.pres-period {
  margin-left: 9px;
  font-weight: 400;
  opacity: .8;
  font-variant-numeric: tabular-nums;
}

.pres-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(10, 22, 32, .3);
  cursor: pointer;
  transition: opacity .15s;
}

.pres-arrow.prev { left: 10px; }
.pres-arrow.next { right: 10px; }

.pres-arrow:hover:not(:disabled) {
  background: #fff;
  color: var(--blue);
}

.pres-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.pres-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pres-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.pres-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: width .2s, background .2s;
}

.pres-dot.on {
  width: 22px;
  background: var(--green);
}

@media (min-width: 620px) {
  .pres-sec,
  .pres-stage {
    max-width: 960px;
    margin: 0 auto;
  }
  .pres-figure {
    aspect-ratio: auto;
    height: min(75vh, 620px);
  }
  .pres-figure img {
    object-position: center top;
  }
  .pres-figure figcaption {
    padding: 64px 30px 26px;
  }
  .pres-name {
    font-size: 3rem;
  }
  .pres-years {
    font-size: 2.4rem;
  }
  .pres-arrow {
    width: 48px;
    height: 48px;
  }
  .pres-arrow.prev { left: 18px; }
  .pres-arrow.next { right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .pres-dot {
    transition: none;
  }
}

/* ==========================================================================
   11. 家長會的話與下層資訊區塊 (居中統一約束)
   ========================================================================== */
.msg,
.card-panel,
.info-cols {
  width: 100%;
  max-width: 960px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.msg {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.msg-head {
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--blue) 0%, #00a6c9 100%);
}

.msg-head h2 {
  margin: 0;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1.6;
  letter-spacing: .02em;
}

.msg-body {
  padding: 22px;
}

.msg-body p {
  margin: 0 0 16px;
  font-size: 1.5rem;
  line-height: 2.05;
  text-align: justify;
}

.msg-body p:last-child {
  margin-bottom: 0;
}

.msg-highlight {
  margin: 22px 0 !important;
  padding: 16px 18px;
  background: var(--blue-soft);
  border-radius: 10px;
  text-align: center !important;
  font-size: clamp(1.25rem, 10vw, 2.2rem) !important;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.75 !important;
}

.msg-highlight span {
  display: block;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .msg-head { padding: 26px 32px; }
  .msg-head h2 { font-size: 3rem; }
  .msg-body { padding: 28px 32px; }
  .msg-body p { font-size: 2.1rem; }
  .msg-highlight { font-size: 2rem !important; }
}

.msg-cta {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg-cta-main {
  flex: 1;
  min-width: 0;
}

.msg-cta-label {
  margin: 0 0 4px !important;
  font-size: 2rem !important;
  font-weight: 700;
  text-align: left !important;
  line-height: 1.5 !important;
}

.msg-cta-note {
  margin: 0 0 12px !important;
  font-size: 2rem !important;
  color: var(--grey);
  text-align: left !important;
  line-height: 1.7 !important;
}

@media (min-width: 560px) {
  .msg-cta {
    flex-direction: row;
    align-items: flex-start;
    gap: 22px;
  }
  .msg-cta .link-qr {
    flex: none;
  }
}

.link-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-item.has-rule {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.link-main {
  min-width: 0;
  flex: 1;
}

.link-main h2 {
  margin: 0 0 5px;
  font-size: 2rem;
  line-height: 1.5;
}

.link-note {
  margin: 0 0 12px;
  font-size: 2rem;
  color: var(--grey);
}

.link-note.is-strong {
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.7;
  background: #fdf3e8;
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin: 0 0 16px;
}

.link-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 12px 20px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 2rem;
}

.link-go:hover {
  background: var(--blue-dark);
}

.link-go svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-qr {
  margin: 0;
  text-align: center;
  align-self: flex-start;
}

.link-qr svg {
  width: 108px;
  height: 108px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.link-qr figcaption {
  margin-top: 5px;
  font-size: 2rem;
  color: var(--grey);
}

@media (min-width: 560px) {
  .link-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }
  .link-qr svg {
    width: 136px;
    height: 136px;
  }
}

.info-cols {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 720px) {
  .info-cols {
    flex-direction: row;
  }
  .info-cols > .card-panel {
    flex: 1;
    min-width: 0;
  }
}

.kv {
  margin: 0;
}

.kv dt {
  font-size: 2rem;
  color: var(--grey);
  margin-top: 12px;
}

.kv dt:first-child {
  margin-top: 0;
}

.kv dd {
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.kv-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

a.kv-val {
  color: var(--blue);
  text-decoration: none;
}

a.kv-val:hover {
  text-decoration: underline;
  text-decoration-color: var(--orange);
}

.kv-copy {
  flex: none;
  min-height: 30px;
  padding: 4px 11px;
  background: var(--surface);
  color: var(--grey);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.kv-copy:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.kv-copy.is-done {
  border-color: var(--green);
  color: var(--green);
  font-weight: 700;
}

.copy-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  min-height: 40px;
  padding: 9px 16px;
  color: var(--blue);
  border-color: var(--blue);
  font-size: 1.6rem;
  font-weight: 700;
}

.copy-all:hover {
  background: var(--blue-soft);
}

.copy-all.is-done {
  background: #eaf7ef;
}

.copy-all svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-block + .info-block {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.info-block h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  border-left: 5px solid var(--blue);
  padding-left: 10px;
}

.info-block p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  line-height: 1.85;
}

.info-block p:last-child {
  margin-bottom: 0;
}

.info-block ul {
  margin: 0;
  padding-left: 20px;
  font-size: 0.9rem;
  line-height: 1.9;
}

.info-block li::marker {
  color: var(--orange);
}

/* ==========================================================================
   12. 狀態頁、頁尾、後台與 Lightbox
   ========================================================================= */
@media (max-width: 480px) {
  .brand img { height: 34px; }
  .brand .name { font-size: 0.82rem; }
  .logout { font-size: 0.8rem; padding: 7px 9px; }
  .card-panel { padding: 16px; }
}

@media (max-width: 420px) {
  .tabbar .tab { padding: 13px 4px; font-size: 0.86rem; }
}

@media (max-width: 360px) {
  .brand img { height: 30px; }
  .brand .name { font-size: 0.76rem; }
  .logout { font-size: 0.76rem; padding: 6px 8px; }
}

.err-panel {
  text-align: center;
  padding: 40px 20px;
}

.err-crest {
  width: 62px;
  height: auto;
  opacity: .55;
  margin-bottom: 14px;
}

.err-panel h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.err-panel p {
  margin: 0 0 20px;
  color: var(--grey);
  font-size: .9rem;
}

.err-home {
  display: inline-block;
  min-height: 44px;
  padding: 11px 20px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: .93rem;
}

.err-home:hover {
  background: var(--blue-dark);
}

.site-footer {
  flex: none;
  margin-top: auto;
  padding: 16px 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--grey);
}

.site-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

.login-body .site-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 0;
  background: none;
}

.admin-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-head h2 {
  flex: 1;
  min-width: 0;
}

.admin-lede {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--grey);
  line-height: 1.7;
}

.admin-lede strong {
  color: var(--ink);
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.admin-row.is-hidden {
  background: var(--surface-2);
  border-style: dashed;
}

.admin-row.is-hidden .admin-thumb img {
  opacity: .45;
  filter: grayscale(1);
}

.admin-thumb {
  flex: none;
  display: block;
}

.admin-thumb img {
  width: 104px;
  height: 78px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  background: var(--blue-soft);
  border: 1px solid var(--line);
}

.admin-meta {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
}

.admin-title {
  font-weight: 700;
}

.tag-hidden {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: 2px;
}

.admin-sub {
  font-size: 0.79rem;
  color: var(--grey);
}

.role-edit {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.role-edit label {
  font-size: 0.79rem;
  color: var(--grey);
}

.role-edit input {
  min-height: 32px;
  width: 11em;
  padding: 4px 9px;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.role-edit input:hover {
  border-color: var(--blue);
}

.role-edit input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.role-edit button {
  min-height: 32px;
  padding: 4px 11px;
  background: var(--surface);
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.role-edit button:hover {
  background: var(--blue);
  color: #fff;
}

.admin-trace {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 0.74rem;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}

.admin-ua {
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--line-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-act {
  flex: none;
}

.admin-act button {
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid;
  background: var(--surface);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-act .btn-hide {
  border-color: var(--red);
  color: var(--red);
}

.admin-act .btn-hide:hover {
  background: var(--red);
  color: #fff;
}

.admin-act .btn-show {
  border-color: var(--green);
  color: var(--green);
}

.admin-act .btn-show:hover {
  background: var(--green);
  color: #fff;
}

@media (max-width: 480px) {
  .admin-row {
    flex-wrap: wrap;
  }
  .admin-act {
    width: 100%;
  }
  .admin-act button {
    width: 100%;
  }
}

.lb {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: rgba(10, 20, 28, 0.93);
}

.lb-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.lb-title {
  flex: 1;
  min-width: 0;
  color: #fff;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-act,
.lb-close {
  flex: none;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.lb-close {
  min-width: 40px;
  padding: 8px 10px;
}

.lb-act:hover,
.lb-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lb-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  border-radius: 4px;
}

.lb-stage.zoom {
  align-items: flex-start;
  justify-content: flex-start;
}

.lb-stage.zoom img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.lb-hint {
  flex: none;
  margin: 0;
  padding: 0 12px 12px;
  text-align: center;
  color: #dceaf3;
  font-size: 0.76rem;
  opacity: 0.65;
}