/* ============================================================
   作业拍照 · 现代化设计系统（手机/iPad 自适应，全屏铺满）
   ============================================================ */

:root {
  color-scheme: light dark;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --brand-soft: rgba(99, 102, 241, .12);
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;

  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f2f4fa;
  --surface-3: #e9edf6;
  --text: #181a26;
  --text-2: #5c6382;
  --line: rgba(24, 26, 38, .07);

  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 22px;
  --radius-xl: 28px;

  --shadow-s: 0 1px 2px rgba(23, 26, 43, .05), 0 2px 8px rgba(23, 26, 43, .05);
  --shadow-m: 0 4px 14px rgba(23, 26, 43, .08), 0 12px 32px rgba(23, 26, 43, .07);
  --shadow-brand: 0 8px 22px -8px rgba(99, 102, 241, .55);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1017;
    --surface: #171a24;
    --surface-2: #1e2230;
    --surface-3: #262b3c;
    --text: #edeff8;
    --text-2: #9ba3c2;
    --line: rgba(237, 239, 248, .07);
    --brand-soft: rgba(99, 102, 241, .2);
    --shadow-s: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 10px rgba(0, 0, 0, .25);
    --shadow-m: 0 6px 18px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  min-height: 100vh; min-height: 100dvh;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--text); }
a { color: var(--brand); text-decoration: none; font-weight: 600; }
img { -webkit-user-drag: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== 布局 ===== */
.page {
  width: 100%;
  padding: 14px 16px calc(28px + env(safe-area-inset-bottom));
  animation: fadeUp .3s ease both;
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .sub { font-size: .76rem; color: var(--text-2); font-weight: 500; }
.icon-btn {
  font-size: 1.1rem; padding: 8px; border-radius: var(--radius-s);
  transition: background .15s, transform .1s;
}
.icon-btn:active { background: var(--surface-2); transform: scale(.92); }
@media (hover: hover) { .icon-btn:hover { background: var(--surface-2); } }
.icon-btn svg {
  display: block; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ===== 登录 ===== */
.login-wrap {
  min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 50px) 24px 24px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(640px 420px at 12% -6%, rgba(99, 102, 241, .26), transparent 62%),
    radial-gradient(560px 460px at 106% 12%, rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(500px 420px at 50% 112%, rgba(99, 102, 241, .16), transparent 62%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-xl);
  padding: 36px 28px 28px; box-shadow: var(--shadow-m);
  animation: pop .35s cubic-bezier(.2, .9, .3, 1.2) both;
  position: relative; z-index: 1;
}
.logo-badge {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 24px;
  background: var(--brand-grad); box-shadow: var(--shadow-brand);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  transform: rotate(-6deg);
}
.login-card h2 { text-align: center; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.login-card .tagline { text-align: center; font-size: .82rem; color: var(--text-2); margin: 4px 0 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-m); background: var(--surface-2); outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 13px; border-radius: var(--radius-m); font-size: 1rem; font-weight: 700;
  letter-spacing: .02em; color: #fff; background: var(--brand-grad); box-shadow: var(--shadow-brand);
  transition: transform .12s, box-shadow .2s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
@media (hover: hover) { .btn:hover { box-shadow: 0 12px 26px -8px rgba(99, 102, 241, .65); } }
.btn.secondary { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text-2); box-shadow: none; border: 1.5px solid var(--line); }
.btn.danger { background: linear-gradient(135deg, #f43f5e, #ef4444); box-shadow: 0 8px 22px -8px rgba(239, 68, 68, .55); }
.btn.sm { width: auto; padding: 8px 16px; font-size: .86rem; border-radius: var(--radius-s); }

/* ===== 首页 Hero 摘要 ===== */
.hero {
  border-radius: var(--radius-l); padding: 18px 20px; margin-bottom: 18px;
  background: var(--brand-grad); color: #fff;
  box-shadow: var(--shadow-brand); position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -34px; top: -42px; width: 150px; height: 150px;
  background: rgba(255, 255, 255, .14); border-radius: 50%;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.hero-date { font-size: .92rem; font-weight: 700; }
.hero-count { font-size: .74rem; font-weight: 600; background: rgba(255,255,255,.2); padding: 4px 11px; border-radius: 999px; backdrop-filter: blur(4px); }
.hero-progress { display: flex; align-items: center; gap: 12px; }
.hero-progress .bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; }
.hero-progress .bar i { display: block; height: 100%; border-radius: 999px; background: #fff; transition: width .5s cubic-bezier(.2,.8,.3,1); }
.hero-progress span { font-size: .78rem; font-weight: 600; white-space: nowrap; opacity: .95; }

/* ===== 管理员学生选择器 ===== */
.stu-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin-bottom: 14px;
}
.stu-bar label { font-size: .8rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.stu-bar select {
  flex: 1; min-width: 0; padding: 10px 13px;
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); font-size: .92rem; outline: none;
}
.stu-bar select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* ===== 科目分组与作业卡片 ===== */
.subject-group { min-width: 0; }
.page-cols > .readonly-tip, .page-cols > .empty, .page-cols > .hero, .page-cols > .stu-bar { grid-column: 1 / -1; }
.detail-desc { font-size: .9rem; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.subject-header { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; }
.subject-header .dot { width: 10px; height: 10px; border-radius: 4px; background: var(--brand); flex: none; }
.subject-header h3 { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; flex: 1; }
.subject-header .cnt { font-size: .72rem; color: var(--text-2); font-weight: 600; }
.c0 .dot { background: #6366f1; } .c1 .dot { background: #10b981; } .c2 .dot { background: #f59e0b; }
.c3 .dot { background: #ec4899; } .c4 .dot { background: #06b6d4; } .c5 .dot { background: #8b5cf6; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow-s);
  padding: 15px 17px; margin-bottom: 11px;
  transition: transform .16s, box-shadow .2s;
}
@media (hover: hover) { .card.hw-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); } }
.hw-item { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.hw-item:active { transform: scale(.985); }
.hw-item .info { flex: 1; min-width: 0; }
.hw-item .title { font-weight: 700; font-size: .98rem; letter-spacing: -.01em; }
.hw-item .desc { font-size: .84rem; color: var(--text-2); margin-top: 3px; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hw-item .meta {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  font-size: .74rem; color: var(--text-2); font-weight: 600;
  background: var(--surface-2); padding: 3px 10px; border-radius: 999px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; font-size: .73rem; font-weight: 700; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { background: rgba(239, 68, 68, .12); color: #e04545; }
.badge.completed { background: rgba(16, 185, 129, .13); color: #0d9e6d; }
.badge.rejected { background: rgba(245, 158, 11, .14); color: #d07a06; }
@media (prefers-color-scheme: dark) {
  .badge.pending { color: #ff7a7a; } .badge.completed { color: #3ddba4; } .badge.rejected { color: #fbbf24; }
}
.reject-banner {
  margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-s);
  background: rgba(245, 158, 11, .12); color: #b9770a; font-size: .8rem; font-weight: 500;
  border: 1px solid rgba(245, 158, 11, .22);
}
@media (prefers-color-scheme: dark) { .reject-banner { color: #fbbf24; } }
.empty { text-align: center; color: var(--text-2); padding: 56px 0; font-size: .9rem; }
.empty .emoji { font-size: 2.6rem; display: block; margin-bottom: 10px; filter: saturate(.85); }

/* ===== 作业详情 ===== */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 14px; }
.photo-cell {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-m); overflow: hidden;
  background: var(--surface-2); animation: pop .25s ease both;
}
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (hover: hover) { .photo-cell img { transition: transform .25s; } .photo-cell:hover img { transform: scale(1.06); } }
.photo-cell .del {
  position: absolute; top: 7px; right: 7px; width: 27px; height: 27px; border-radius: 50%;
  background: rgba(12, 14, 24, .55); backdrop-filter: blur(6px); color: #fff; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
}
.upload-cell {
  aspect-ratio: 1; border: 2px dashed var(--surface-3); border-radius: var(--radius-m);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--text-2); font-size: .74rem; font-weight: 600; width: 100%;
  transition: border-color .15s, background .15s, transform .1s;
}
.upload-cell:active { transform: scale(.95); }
@media (hover: hover) { .upload-cell:hover { border-color: var(--brand); background: var(--brand-soft); } }
.upload-cell .plus {
  width: 34px; height: 34px; border-radius: 12px; background: var(--brand-grad);
  color: #fff; font-size: 1.25rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-brand);
}
.action-row { display: flex; gap: 10px; margin-top: 18px; }
.readonly-tip {
  margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-s);
  background: var(--brand-soft); color: var(--brand); font-size: .8rem; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}

/* ===== 日历 ===== */
.cal-card { padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head .month { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.cal-head button {
  background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 7px 15px;
  font-size: .8rem; font-weight: 600; transition: background .15s, color .15s;
}
@media (hover: hover) { .cal-head button:hover { background: var(--brand-soft); color: var(--brand); } }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-week span { text-align: center; font-size: .72rem; color: var(--text-2); font-weight: 600; padding: 5px 0; }
.cal-day {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-s); font-size: .9rem; font-weight: 500;
  background: var(--surface-2); transition: transform .1s, background .15s, color .15s;
}
.cal-day:disabled { background: transparent; color: var(--surface-3); }
.cal-day:not(:disabled):active { transform: scale(.9); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--brand); color: var(--brand); font-weight: 800; }
.cal-day.selected { background: var(--brand-grad); color: #fff; font-weight: 800; box-shadow: var(--shadow-brand); }
.cal-day .marks { position: absolute; bottom: 7px; left: 0; right: 0; display: flex; gap: 3px; justify-content: center; }
.cal-day .marks i { width: 5px; height: 5px; border-radius: 50%; }
.cal-day .marks .done { background: var(--green); }
.cal-day .marks .todo { background: var(--red); }
.cal-day.selected .marks .done { background: #bdffe4; }
.cal-day.selected .marks .todo { background: #ffd1d3; }
.cal-legend { display: flex; gap: 18px; justify-content: center; margin-top: 14px; font-size: .75rem; color: var(--text-2); font-weight: 500; }
.cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

/* ===== 灯箱 / Toast ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 10, 18, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeUp .2s ease both;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-m); }
.lb-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); color: #fff; font-size: 1.4rem;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); color: #fff;
  font-size: 1.6rem; line-height: 1; transition: background .15s;
}
.lb-nav.left { left: 14px; }
.lb-nav.right { right: 14px; }
.lb-nav:disabled { opacity: .25; cursor: default; }
@media (hover: hover) { .lb-nav:not(:disabled):hover { background: rgba(255, 255, 255, .25); } }
.lb-counter {
  position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  color: #fff; font-size: .82rem; font-weight: 600;
  background: rgba(22, 24, 36, .55); backdrop-filter: blur(8px);
  padding: 5px 16px; border-radius: 999px;
}
.sub-picker-bar { margin-bottom: 4px; }
.toast {
  position: fixed; left: 50%; bottom: calc(64px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 120; background: rgba(22, 24, 36, .88); backdrop-filter: blur(10px); color: #fff;
  padding: 10px 20px; border-radius: 999px; font-size: .85rem; font-weight: 500;
  max-width: 86vw; text-align: center; box-shadow: var(--shadow-m);
  animation: fadeUp .25s ease both;
}

/* ===== 管理后台 ===== */
.admin-tabs {
  display: flex; gap: 4px; margin: 12px 16px 0; padding: 4px;
  background: var(--surface-2); border-radius: var(--radius-m);
  position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 9;
}
.admin-tabs button {
  flex: 1; padding: 9px 0; border-radius: var(--radius-s); color: var(--text-2);
  font-size: .88rem; font-weight: 600; transition: all .18s;
}
.admin-tabs button.active { background: var(--brand-grad); color: #fff; font-weight: 700; box-shadow: var(--shadow-brand); }
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar input[type=date], .toolbar input[type=text] {
  padding: 9px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); font-size: .88rem; outline: none;
}
.toolbar select:focus, .toolbar input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.table-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow-s); overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { text-align: left; padding: 12px 14px; white-space: nowrap; }
th {
  color: var(--text-2); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  background: var(--surface-2); position: sticky; top: 0;
}
tbody tr { border-top: 1px solid var(--line); transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
.row-actions { display: flex; gap: 4px; }
/* 手机端操作列只显示图标 */
.icon-only .lbl { display: none; }
.icon-only .link-btn { font-size: 1rem; padding: 6px 8px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pager button {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: var(--radius-s);
  background: var(--surface); border: 1px solid var(--line); font-size: 1rem; font-weight: 700;
  transition: background .15s, opacity .15s;
}
.pager button:disabled { opacity: .35; cursor: not-allowed; }
.pager button:not(:disabled):active { background: var(--surface-2); }
@media (hover: hover) { .pager button:not(:disabled):hover { background: var(--brand-soft); } }
.pager-info { font-size: .8rem; color: var(--text-2); font-weight: 500; }
.link-btn {
  color: var(--brand); font-size: .83rem; font-weight: 600; padding: 5px 9px; border-radius: 9px;
  transition: background .12s;
}
.link-btn.warn { color: var(--red); }
@media (hover: hover) { .link-btn:hover { background: var(--brand-soft); } .link-btn.warn:hover { background: rgba(239,68,68,.1); } }
.sub-block { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 12px; }
.sub-block:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.sub-block .who { font-weight: 700; font-size: .92rem; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sub-block .who .cnt { font-size: .74rem; color: var(--text-2); font-weight: 600; }
.sub-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sub-photos img { width: 68px; height: 68px; object-fit: cover; border-radius: var(--radius-s); cursor: zoom-in; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 90; background: rgba(13, 15, 26, .45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeUp .18s ease both;
}
.modal {
  width: 100%; max-width: 560px; background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 88dvh; overflow-y: auto;
  animation: fadeUp .28s cubic-bezier(.2, .9, .3, 1) both;
}
.modal h3 {
  font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal .row2 { display: flex; gap: 10px; }
.modal .row2 .field { flex: 1; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ===== 平板适配（iPad 全屏铺满） ===== */
@media (min-width: 768px) {
  html { font-size: 17px; }
  .icon-only .lbl { display: inline; }
  .icon-only .link-btn { font-size: .83rem; }
  .page { padding: 18px 26px calc(36px + env(safe-area-inset-bottom)); }
  .topbar { padding: 12px 26px; padding-top: calc(12px + env(safe-area-inset-top)); }
  .page.page-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: start; }
  .page-cols > .subject-group:only-of-type { grid-column: 1 / -1; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
  .login-card { box-shadow: 0 20px 60px rgba(23, 26, 43, .18); }
  .login-wrap { padding-top: calc(env(safe-area-inset-top) + clamp(50px, 25vh, 150px)); }
  .modal-mask { align-items: center; padding: 28px; }
  .modal { border-radius: var(--radius-xl); animation: pop .25s cubic-bezier(.2, .9, .3, 1.1) both; }
  .cal-day { font-size: 1.05rem; }
  .cal-week, .cal-grid { gap: 7px; }
  .cal-card { padding: 24px; }
  .sub-photos img { width: 88px; height: 88px; }
  .admin-tabs { margin: 16px 26px 0; top: calc(58px + env(safe-area-inset-top)); }
}
@media (min-width: 1024px) {
  html { font-size: 18px; }
  .page { padding: 22px 34px calc(40px + env(safe-area-inset-bottom)); }
  .topbar { padding: 13px 34px; padding-top: calc(13px + env(safe-area-inset-top)); }
  .page.page-cols { gap: 0 30px; }
  .admin-tabs { margin: 18px 34px 0; }
}
@media (orientation: landscape) and (min-width: 1100px) {
  .page.page-cols { grid-template-columns: repeat(3, 1fr); gap: 0 26px; }
}
