/* ============================================================
   Miuix Gallery — 基于 compose-miuix-ui/miuix 设计令牌的样式
   light / dark 双主题，取自 miuix Colors.kt + TextStyles.kt
   ============================================================ */

:root {
  --primary: #3482ff;
  --on-primary: #ffffff;
  --primary-soft: rgba(52, 130, 255, 0.12);
  --error: #e94634;
  --bg: #ffffff;
  --surface: #f7f7f7;
  --card: #ffffff;
  --fill: #f0f0f0;
  --fill-2: #e8e8e8;
  --text: #000000;
  --text-2: rgba(0, 0, 0, 0.8);
  --text-3: rgba(0, 0, 0, 0.6);
  --text-4: rgba(0, 0, 0, 0.42);
  --outline: #d9d9d9;
  --divider: #e0e0e0;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --shadow-float: 0 10px 40px rgba(0, 0, 0, 0.16);
  --appbar-bg: rgba(255, 255, 255, 0.92);
  --viewer-bg: #f2f2f2;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bar-h: 56px;
  color-scheme: light;
}

html[data-theme='dark'] {
  --primary: #277af7;
  --primary-soft: rgba(39, 122, 247, 0.18);
  --error: #f12522;
  --bg: #191919;
  --surface: #212121;
  --card: #2b2b2b;
  --fill: #333333;
  --fill-2: #3d3d3d;
  --text: #f2f2f2;
  --text-2: rgba(255, 255, 255, 0.86);
  --text-3: rgba(255, 255, 255, 0.6);
  --text-4: rgba(255, 255, 255, 0.42);
  --outline: #404040;
  --divider: #393939;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 12px 44px rgba(0, 0, 0, 0.6);
  --appbar-bg: rgba(25, 25, 25, 0.94);
  --viewer-bg: #101010;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Noto Sans SC', -apple-system,
    BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

img { border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.ico { width: 22px; height: 22px; flex: none; display: block; }
.only-dark { display: none; }
html[data-theme='dark'] .only-light { display: none; }
html[data-theme='dark'] .only-dark { display: inline-flex; }

/* ---------------- top app bar ---------------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: var(--safe-top);
  background: transparent;
  transition: background 0.28s ease, box-shadow 0.28s ease;
}

.appbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--divider);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.appbar.scrolled,
.appbar.solid {
  background: var(--appbar-bg);
}
/* 模糊只在宽屏启用：移动端 WebView 的 sticky + backdrop-filter 会掉帧/留白 */
@media (min-width: 820px) {
  .appbar.scrolled,
  .appbar.solid {
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
  }
}
.appbar.scrolled::after { opacity: 1; }

.appbar-row {
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 12px;
  max-width: 1180px;
  margin: 0 auto;
}

.appbar-title {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.2, 0.9, 0.25, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appbar.scrolled .appbar-title,
.appbar-title.show { opacity: 1; transform: none; }
.appbar.solid .appbar-title { opacity: 1; transform: none; }

.appbar-actions { display: flex; align-items: center; gap: 2px; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.18s ease, transform 0.18s ease;
}
.icon-btn:hover { background: var(--fill); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .ico { width: 18px; height: 18px; }

/* ---------------- hero ---------------- */

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 20px 16px;
}
.hero-title {
  font-size: 32px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-title.sm { font-size: 28px; }
.hero-sub {
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-3);
}
.hero-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-4);
}

/* ---------------- page shell ---------------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px calc(48px + var(--safe-bottom));
}

.site-foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px calc(32px + var(--safe-bottom));
  display: flex;
  gap: 8px;
  justify-content: center;
  color: var(--text-4);
  font-size: 12.5px;
}
.site-foot .dot { opacity: 0.6; }
.site-foot a { color: var(--text-3); }

/* ---------------- search + chips ---------------- */

.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 10px 0 12px;
  background: var(--fill);
  border-radius: 14px;
  color: var(--text-3);
  margin: 4px 0 2px;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.searchbar:focus-within {
  background: var(--card);
  box-shadow: 0 0 0 2px var(--primary), 0 6px 20px rgba(52, 130, 255, 0.14);
}
.searchbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  font-size: 15px;
  color: var(--text);
}
.searchbar input::placeholder { color: var(--text-4); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar #searchClear { opacity: 0; pointer-events: none; transition: opacity 0.18s; }
.searchbar.filled #searchClear { opacity: 1; pointer-events: auto; }
.searchbar.collapsed { display: none; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 16px;
  background: var(--fill);
  color: var(--text-2);
  font-size: 14px;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.chip:active { transform: scale(0.96); }
.chip-on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.result-hint {
  margin: 14px 2px 0;
  font-size: 13px;
  color: var(--text-4);
}

/* ---------------- groups + masonry ---------------- */

.group { margin-top: 22px; }

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 10px;
}
.small-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.group-count { font-size: 12.5px; color: var(--text-4); }

.masonry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 8px;
  gap: 8px;
}
.js .masonry { visibility: hidden; }
.masonry.ready { visibility: visible; }
html:not(.js) .masonry {
  display: block;
  columns: 2;
  column-gap: 8px;
}
html:not(.js) .ph { margin-bottom: 8px; break-inside: avoid; }
html:not(.js) .ph img { height: auto; }

.ph {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--fill);
  transform: translateZ(0);
}
.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
  opacity: 0;
}
.ph img.loaded { opacity: 1; }
.ph:active { transform: scale(0.985); }
.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  pointer-events: none;
}
html[data-theme='dark'] .ph::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }

@media (hover: hover) {
  .ph:hover img { transform: scale(1.035); }
}

.ph-flag {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.ph-flag .ico { width: 14px; height: 14px; }

/* ---------------- cards / buttons / rows ---------------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card.pad { padding: 18px 16px; }
.card.pad h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.card + .card { margin-top: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.16s ease, background 0.18s ease, opacity 0.18s, filter 0.18s;
  white-space: nowrap;
}
.btn .ico { width: 20px; height: 20px; }
.btn:active { transform: scale(0.975); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-secondary:hover { background: var(--fill-2); }
.btn-ghost { color: var(--primary); padding: 0 10px; }
.btn-block { width: 100%; margin-top: 12px; }
.btn-sm { height: 38px; font-size: 14.5px; padding: 0 14px; border-radius: 12px; }
.btn-sm .ico { width: 18px; height: 18px; }
.btn.is-disabled { opacity: 0.4; pointer-events: none; }

.rows { overflow: hidden; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 10px 16px;
}
.row + .row { border-top: 1px solid var(--divider); }
.row-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text-2);
  flex: none;
}
.row-ico { color: var(--text-4); display: inline-flex; }
.row-ico .ico { width: 18px; height: 18px; }
.row-value {
  font-size: 14.5px;
  color: var(--text-3);
  text-align: right;
  word-break: break-word;
  min-width: 0;
}
.row-switch { min-height: 50px; }

.tag-link {
  display: inline-block;
  padding: 2px 10px;
  margin: 2px 0 2px 6px;
  border-radius: 10px;
  background: var(--fill);
  color: var(--primary);
  font-size: 13px;
}

/* switch */
.switch { display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 46px;
  height: 27px;
  border-radius: 14px;
  background: var(--fill-2);
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: background 0.24s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.switch-thumb {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(19px); }

/* ---------------- detail page ---------------- */

.detail { padding-top: 8px; }

.viewer {
  background: var(--viewer-bg);
  padding: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.viewer a { display: block; width: 100%; }
.viewer img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
}

.detail-head { padding: 18px 4px 12px; }
.detail-title { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.detail-sub { margin-top: 6px; font-size: 14px; color: var(--text-3); }

.card.desc { padding: 16px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); white-space: pre-wrap; }
.card.desc { margin-top: 12px; }

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
}
.pager-btn { flex: 1; }
.pager-btn:first-child { justify-content: flex-start; padding-left: 16px; }
.pager-btn:last-child { justify-content: flex-end; padding-right: 16px; }
.pager-index { font-size: 13px; color: var(--text-4); flex: none; }

/* ---------------- empty state ---------------- */

.empty {
  margin-top: 12px;
  padding: 44px 24px;
  text-align: center;
}
.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--fill);
  color: var(--text-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.empty-icon .ico { width: 30px; height: 30px; }
.empty h3 { font-size: 17px; font-weight: 600; }
.empty p { margin-top: 6px; font-size: 14px; color: var(--text-3); }
.empty .btn { margin-top: 16px; }

/* ---------------- admin: tabs ---------------- */

.admin { padding-bottom: 60px; }
.admin-hero { padding: 4px 4px 14px; }

.tabs {
  position: relative;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--divider);
  margin: 0 -10px 16px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 14px 13px;
  font-size: 15px;
  color: var(--text-3);
  border-radius: 10px 10px 0 0;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.tab:hover { background: var(--fill); }
.tab.is-active { color: var(--text); font-weight: 600; }
.tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 3px;
  width: 20px;
  border-radius: 2px 2px 0 0;
  background: var(--primary);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.25, 1), width 0.28s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.panel { display: none; }
.panel.is-active { display: block; animation: fadeUp 0.32s cubic-bezier(0.2, 0.9, 0.25, 1); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 14px 13px;
}
.stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { font-size: 12.5px; color: var(--text-4); }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .searchbar { flex: 1; margin: 0; }

/* admin photo list */
.photo-list { display: flex; flex-direction: column; gap: 8px; }
.plist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  animation: fadeUp 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.plist-thumb {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  object-fit: cover;
  background: var(--fill);
  flex: none;
}
.plist-main { flex: 1; min-width: 0; }
.pi-title {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pi-meta { margin-top: 3px; font-size: 12.5px; color: var(--text-4); display: flex; gap: 8px; flex-wrap: wrap; }
.pi-meta .warn { color: var(--error); }
.plist-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.skeleton {
  height: 78px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--fill) 30%, var(--fill-2) 50%, var(--fill) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* device import grid */
.panel-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }
.muted { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }

.device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.dev-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--fill);
  border: 2px solid transparent;
  transition: border-color 0.18s, transform 0.18s;
}
.dev-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dev-item:active { transform: scale(0.97); }
.dev-item.selected { border-color: var(--primary); }
.dev-item .dev-check {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.18s, transform 0.18s, background 0.18s;
}
.dev-item .dev-check .ico { width: 13px; height: 13px; }
.dev-item.selected .dev-check { opacity: 1; transform: none; background: var(--primary); border-color: #fff; }
.dev-item.imported { opacity: 0.45; }
.dev-item.imported::after {
  content: '已导入';
  position: absolute;
  inset: auto 0 0 0;
  padding: 3px 0;
  text-align: center;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
}
.import-bar {
  position: sticky;
  bottom: calc(12px + var(--safe-bottom));
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* ---------------- text fields ---------------- */

.tf {
  display: block;
  background: var(--fill);
  border-radius: 12px;
  padding: 8px 14px 9px;
  margin-bottom: 10px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.tf:focus-within { background: var(--card); border-color: var(--primary); }
.tf-label { display: block; font-size: 12px; color: var(--text-4); margin-bottom: 2px; }
.tf input, .tf textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  font-size: 15.5px;
  color: var(--text);
  resize: vertical;
  line-height: 1.45;
  padding: 0;
}
.tf textarea { min-height: 46px; }
.card.pad .tf:last-of-type { margin-bottom: 4px; }

/* ---------------- dialog / toast ---------------- */

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
@keyframes fadeIn { from { opacity: 0; } }

.dialog {
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--shadow-float);
  padding: 22px;
  animation: dialogIn 0.26s cubic-bezier(0.2, 0.9, 0.25, 1);
}
@keyframes dialogIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
}
.dialog h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.dialog .dialog-sub { margin-top: 6px; font-size: 13.5px; color: var(--text-3); }
.dialog .dialog-body { margin-top: 14px; }
.dialog .dialog-foot { display: flex; gap: 10px; margin-top: 16px; }
.dialog .dialog-foot .btn { flex: 1; }
.dialog .btn-danger { background: var(--error); color: #fff; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translate(-50%, 12px);
  z-index: 80;
  max-width: min(86vw, 420px);
  padding: 11px 18px;
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.2, 0.9, 0.25, 1);
  pointer-events: none;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(200, 40, 30, 0.94); }

/* ---------------- auth ---------------- */

.auth-body {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--primary-soft), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, var(--primary-soft), transparent 60%),
    var(--bg);
}
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 18px calc(32px + var(--safe-bottom));
  gap: 18px;
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-2);
}
.auth-brand .ico { width: 30px; height: 30px; color: var(--primary); }
.auth-card {
  width: min(420px, 100%);
  padding: 26px 22px 20px;
  border-radius: var(--radius-lg);
}
.auth-card h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.auth-hint { margin: 8px 0 18px; font-size: 14px; color: var(--text-3); line-height: 1.55; }
.auth-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
}
.auth-link:hover { color: var(--primary); }

/* ---------------- responsive ---------------- */

@media (min-width: 560px) {
  .masonry, html:not(.js) .masonry { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .masonry { display: grid; }
  html:not(.js) .masonry { display: block; columns: 3; }
  .device-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page { padding-left: 20px; padding-right: 20px; }
}
@media (min-width: 820px) {
  .masonry { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html:not(.js) .masonry { columns: 4; }
  .hero-title { font-size: 36px; }
  .device-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stat-row { gap: 12px; }
}
@media (min-width: 1120px) {
  .masonry { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  html:not(.js) .masonry { columns: 5; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 28px; }
  .stat b { font-size: 19px; }
  .appbar-row { padding-left: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
