/*
 * Copyright (c) 2026 爱玩机的发烧友. All rights reserved.
 * 未经授权，禁止复制、修改或分发。
 */

:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --text: #101828;
  --text-2: rgba(16, 24, 40, 0.66);
  --text-3: rgba(16, 24, 40, 0.46);
  --line: rgba(16, 24, 40, 0.1);
  --line-strong: rgba(16, 24, 40, 0.16);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.94);
  --surface-hover: #ffffff;
  --surface-inset: rgba(16, 24, 40, 0.055);
  --glow-1: rgba(70, 140, 255, 0.2);
  --glow-2: rgba(130, 100, 230, 0.1);
  --brand: #0c77e7;
  --brand-light: #2f8bff;
  --brand-ink: #0a63c4;
  --male: #2b8fe6;
  --male-bg: rgba(43, 143, 230, 0.13);
  --male-line: rgba(43, 143, 230, 0.32);
  --female: #ef5a96;
  --female-bg: rgba(239, 90, 150, 0.13);
  --female-line: rgba(239, 90, 150, 0.32);
  --other: #64748b;
  --other-bg: rgba(100, 116, 139, 0.14);
  --other-line: rgba(100, 116, 139, 0.3);
  --media-bg: #dce5f2;
  --placeholder-gradient: radial-gradient(420px 420px at 50% 18%, rgba(70, 140, 255, 0.28), transparent 70%),
    linear-gradient(160deg, #e9eff8, #cfdaea 72%);
  --placeholder-text: rgba(16, 24, 40, 0.22);
  --scrim-1: rgba(255, 255, 255, 0.22);
  --scrim-2: rgba(255, 255, 255, 0);
  --scrim-3: rgba(244, 246, 251, 0.2);
  --scrim-4: rgba(244, 246, 251, 0.85);
  --panel-gradient: linear-gradient(180deg, rgba(244, 246, 251, 0.55) 0%, rgba(244, 246, 251, 0.72) 92px, #f4f6fb 224px);
  --panel-offset: 210px;
  --panel-pad-top: 0px;
  --title-shadow: none;
  --glass-btn-bg: rgba(255, 255, 255, 0.72);
  --glass-btn-border: rgba(16, 24, 40, 0.12);
  --glass-btn-text: #101828;
  --cta-bg: rgba(244, 246, 251, 0.92);
  --cta-line: rgba(16, 24, 40, 0.08);
  --toast-bg: rgba(20, 26, 38, 0.88);
  --toast-text: #ffffff;
  --toast-border: transparent;
  --modal-bg: #ffffff;
  --modal-border: rgba(16, 24, 40, 0.1);
  --modal-shadow: 0 -18px 60px rgba(15, 23, 42, 0.18);
  --modal-backdrop: rgba(15, 23, 42, 0.44);
  --skeleton-a: #e6ecf4;
  --skeleton-b: #f4f7fb;
  --error-icon-bg: rgba(12, 119, 231, 0.1);
  --error-icon-line: rgba(12, 119, 231, 0.22);
  --error-icon-text: #0a63c4;
  --chip-color: #0a63c4;
  --chip-bg: rgba(12, 119, 231, 0.12);
  --chip-border: rgba(12, 119, 231, 0.28);
  --avatar-bg: rgba(16, 24, 40, 0.06);
  --avatar-border: rgba(16, 24, 40, 0.12);
  --work-bg: #dce5f2;
  --shadow-color: rgba(15, 23, 42, 0.14);
  --start-shadow: rgba(12, 119, 231, 0.28);
  --radius: 24px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f19;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --surface: rgba(255, 255, 255, 0.07);
  --surface-2: rgba(255, 255, 255, 0.12);
  --surface-hover: rgba(255, 255, 255, 0.15);
  --surface-inset: rgba(255, 255, 255, 0.09);
  --glow-1: rgba(28, 92, 210, 0.22);
  --glow-2: rgba(116, 62, 214, 0.12);
  --brand-light: #5aa9ff;
  --male: #7dd3fc;
  --male-bg: rgba(125, 211, 252, 0.16);
  --male-line: rgba(125, 211, 252, 0.38);
  --female: #f9a8d4;
  --female-bg: rgba(249, 168, 212, 0.16);
  --female-line: rgba(249, 168, 212, 0.38);
  --other: #cbd5e1;
  --other-bg: rgba(255, 255, 255, 0.1);
  --other-line: rgba(255, 255, 255, 0.18);
  --media-bg: #151b29;
  --placeholder-gradient: radial-gradient(420px 420px at 50% 18%, rgba(90, 169, 255, 0.35), transparent 70%),
    linear-gradient(160deg, #1c2a45, #0d1220 72%);
  --placeholder-text: rgba(255, 255, 255, 0.28);
  --scrim-1: rgba(255, 255, 255, 0.18);
  --scrim-2: rgba(255, 255, 255, 0);
  --scrim-3: rgba(11, 15, 25, 0.24);
  --scrim-4: rgba(11, 15, 25, 0.94);
  --panel-gradient: linear-gradient(180deg, rgba(11, 15, 25, 0) 0%, rgba(11, 15, 25, 0.62) 92px, #0b0f19 224px);
  --title-shadow: 0 2px 18px rgba(0, 0, 0, 0.32);
  --glass-btn-bg: rgba(12, 16, 26, 0.42);
  --glass-btn-border: rgba(255, 255, 255, 0.18);
  --glass-btn-text: #ffffff;
  --cta-bg: rgba(11, 15, 25, 0.92);
  --cta-line: rgba(255, 255, 255, 0.08);
  --toast-bg: rgba(255, 255, 255, 0.14);
  --toast-text: #ffffff;
  --toast-border: rgba(255, 255, 255, 0.16);
  --modal-bg: #141a26;
  --modal-border: rgba(255, 255, 255, 0.1);
  --modal-shadow: 0 -18px 60px rgba(0, 0, 0, 0.5);
  --modal-backdrop: rgba(0, 0, 0, 0.62);
  --skeleton-a: #151b29;
  --skeleton-b: #1d2538;
  --error-icon-bg: rgba(12, 119, 231, 0.14);
  --error-icon-line: rgba(12, 119, 231, 0.28);
  --error-icon-text: #9bcbff;
  --chip-color: #9bcbff;
  --chip-bg: rgba(12, 119, 231, 0.18);
  --chip-border: rgba(12, 119, 231, 0.36);
  --avatar-bg: rgba(255, 255, 255, 0.1);
  --avatar-border: rgba(255, 255, 255, 0.16);
  --work-bg: #151b29;
  --shadow-color: rgba(0, 0, 0, 0.24);
  --start-shadow: rgba(12, 119, 231, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(1100px 680px at 8% -8%, var(--glow-1), transparent 62%),
    radial-gradient(900px 600px at 100% 0%, var(--glow-2), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

/* ── 顶部品牌 ─────────────────────────────────────────────── */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.back-btn,
.theme-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--glass-btn-text);
  background: var(--glass-btn-bg);
  border: 1px solid var(--glass-btn-border);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.back-btn[hidden] {
  display: none;
}

.theme-btn {
  margin-left: auto;
}

.theme-btn svg {
  display: block;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 4px 2px;
}

.brand img {
  width: auto;
  height: 30px;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.28));
}

/* ── 角色卡布局 ───────────────────────────────────────────── */

.card-layout {
  width: 100%;
}

.card-media {
  position: relative;
  height: 62vh;
  min-height: 430px;
  max-height: 720px;
  overflow: hidden;
  background: var(--media-bg);
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--placeholder-gradient);
}

.cover-placeholder span {
  font-size: 96px;
  font-weight: 700;
  color: var(--placeholder-text);
}

.media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--scrim-1) 0%,
    var(--scrim-2) 32%,
    var(--scrim-3) 58%,
    var(--scrim-4) 100%
  );
  pointer-events: none;
}

.card-panel {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: calc(var(--panel-offset) * -1) auto 0;
  padding: var(--panel-pad-top) 20px 150px;
  background: var(--panel-gradient);
}

.identity {
  position: relative;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.name-row h1 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.4px;
  text-overflow: ellipsis;
  text-shadow: var(--title-shadow);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gender-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--other);
  background: var(--other-bg);
  border: 1px solid var(--other-line);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gender-icon.is-male {
  color: var(--male);
  background: var(--male-bg);
  border-color: var(--male-line);
}

.gender-icon.is-female {
  color: var(--female);
  background: var(--female-bg);
  border-color: var(--female-line);
}

.card-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding: 6px 10px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.card-id:hover {
  background: var(--surface-hover);
}

.card-id svg {
  flex: 0 0 auto;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 18px;
  padding: 8px 10px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.18s ease;
}

.author-row:not(.is-static):active,
.author-row:not(.is-static):hover {
  background: var(--surface-2);
}

.author-row.is-static {
  cursor: default;
}

.author-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  object-fit: cover;
  background: var(--avatar-bg);
  border: 1px solid var(--avatar-border);
  border-radius: 50%;
}

.author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.author-name {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-signature {
  overflow: hidden;
  color: var(--text-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-chevron {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--text-3);
}

.official-chip {
  flex: 0 0 auto;
  padding: 2px 6px;
  color: var(--chip-color);
  font-size: 10px;
  font-weight: 500;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 6px;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat strong {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--text-2);
  font-size: 11px;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--line-strong);
}

.card-content {
  margin-top: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  color: var(--text-2);
  font-size: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.description {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.78;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notice {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 11px;
}

/* ── 微信 / QQ 环境提示 ───────────────────────────────────── */

.env-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 11px 13px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 14px;
}

.env-tip-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  color: var(--chip-color);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  background: var(--surface-2);
  border-radius: 999px;
}

.env-tip p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.6;
}

.guide-steps {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.9;
}

.guide-url {
  margin: 14px 0 0;
  padding: 10px 12px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.6;
  word-break: break-all;
  overflow-wrap: anywhere;
  background: var(--surface-inset);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  -webkit-user-select: all;
  user-select: all;
}

.guide-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.guide-actions .start-btn {
  height: 48px;
  font-size: 15px;
}

.cta-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--cta-bg);
  border-top: 1px solid var(--cta-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.start-btn {
  width: 100%;
  height: 52px;
  padding: 0 24px;
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #1683ff, #0b66d6);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 24px var(--start-shadow);
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.start-btn:active {
  transform: scale(0.99);
  filter: brightness(0.95);
}

.download-link {
  padding: 4px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.download-link:hover {
  color: var(--text);
}

/* ── 加载 / 错误 ──────────────────────────────────────────── */

.skeleton {
  padding-bottom: 80px;
}

.skeleton-media {
  height: 62vh;
  min-height: 430px;
  background: linear-gradient(110deg, var(--skeleton-a) 8%, var(--skeleton-b) 18%, var(--skeleton-a) 33%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

.skeleton-body {
  max-width: 720px;
  margin: -100px auto 0;
  padding: 0 20px;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 12px;
  background: var(--surface-inset);
  border-radius: 8px;
}

.skeleton-line.w60 {
  width: 60%;
  height: 30px;
}

.skeleton-line.w35 {
  width: 35%;
}

.skeleton-line.w80 {
  width: 80%;
}

.skeleton-line.w50 {
  width: 50%;
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 82vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 100px 24px 60px;
  text-align: center;
}

.error-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 20px;
  color: var(--error-icon-text);
  background: var(--error-icon-bg);
  border: 1px solid var(--error-icon-line);
  border-radius: 22px;
}

.error-page h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.error-page p {
  max-width: 340px;
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

.error-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  margin-top: 26px;
}

.noscript {
  padding: 80px 24px;
  color: var(--text-2);
  text-align: center;
}

/* ── 作者主页 ─────────────────────────────────────────────── */

.author-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 98px 20px 64px;
}

.author-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.author-avatar-wrap {
  position: relative;
}

.author-avatar-lg {
  width: 96px;
  height: 96px;
  object-fit: cover;
  background: var(--avatar-bg);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  box-shadow: 0 18px 44px var(--shadow-color);
}

.official-badge {
  position: absolute;
  right: -8px;
  bottom: -6px;
  padding: 3px 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  background: linear-gradient(135deg, #1683ff, #0b66d6);
  border: 2px solid var(--bg);
  border-radius: 999px;
}

.author-hero h1 {
  margin: 16px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.author-signature {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.author-count {
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 12px;
}

.author-count strong {
  color: var(--text);
  font-size: 15px;
}

.works-section {
  margin-top: 42px;
}

.works-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.works-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.works-header span {
  color: var(--text-2);
  font-size: 12px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.work-card {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.work-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--work-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.2s ease;
}

.work-card:hover .work-cover {
  transform: translateY(-2px);
}

.work-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(5, 8, 14, 0.55));
  content: "";
  pointer-events: none;
}

.work-name {
  margin-top: 8px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-tags {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 48px 16px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

/* ── 下载弹层 ─────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--modal-shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--text-2);
  font-size: 20px;
  line-height: 1;
  background: var(--surface-inset);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.modal-mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.modal-panel h2 {
  margin: 14px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.modal-desc {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.download-options {
  margin-top: 18px;
}

.download-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background 0.18s ease;
}

.download-option:hover {
  background: var(--surface-2);
}

.download-option.is-disabled {
  opacity: 0.55;
}

.download-option strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.download-option span {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 11px;
}

.download-option .dl-arrow {
  flex: 0 0 auto;
  color: var(--brand-light);
  font-size: 20px;
  line-height: 1;
}

.dl-loading {
  padding: 14px 2px;
  color: var(--text-2);
  font-size: 13px;
}

.modal-hint {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.6;
}

/* ── Toast ────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 108px;
  left: 50%;
  z-index: 300;
  padding: 10px 16px;
  color: var(--toast-text);
  font-size: 13px;
  background: var(--toast-bg);
  border: 1px solid var(--toast-border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── PC / 平板 ────────────────────────────────────────────── */

@media (min-width: 600px) {
  .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .site-header {
    position: static;
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px 32px 0;
  }

  .brand img {
    height: 32px;
  }

  .card-layout {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 32px 72px;
  }

  .card-media {
    position: sticky;
    top: 28px;
    height: 560px;
    min-height: 0;
    max-height: none;
    border-radius: 28px;
    box-shadow: 0 24px 60px var(--shadow-color);
  }

  .media-scrim {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.2) 100%
    );
  }

  .card-panel {
    max-width: none;
    margin: 0;
    padding: 8px 0 0;
    background: transparent;
  }

  .name-row h1 {
    font-size: 42px;
  }

  .card-content {
    margin-top: 28px;
  }

  .cta-bar {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 30px 0 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .start-btn {
    width: 220px;
  }

  .download-link {
    width: auto;
  }

  .toast {
    bottom: 32px;
  }

  .error-page {
    min-height: 78vh;
    padding-top: 40px;
  }

  .skeleton {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 56px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 32px 72px;
  }

  .skeleton-media {
    height: 560px;
    min-height: 0;
    border-radius: 28px;
  }

  .skeleton-body {
    max-width: none;
    margin: 20px 0 0;
    padding: 0;
  }

  .author-page {
    padding: 32px 32px 72px;
  }

  .author-avatar-lg {
    width: 120px;
    height: 120px;
    border-radius: 32px;
  }

  .author-hero h1 {
    font-size: 36px;
  }

  .works-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .works-section {
    margin-top: 52px;
  }

  .modal {
    align-items: center;
  }

  .modal-panel {
    width: 420px;
    max-width: 420px;
    padding: 28px;
    border-radius: 24px;
  }
}

@media (min-width: 1120px) {
  .works-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
