:root {
  --bg: #0e1120;
  --bg2: #161a30;
  --card: #1d2240;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef0ff;
  --muted: #9aa2c7;
  --brand: #8b5cf6;
  --brand2: #ec4899;
  --accent: #f7b733;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(700px 400px at 85% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(700px 400px at 0% 10%, rgba(236, 72, 153, 0.15), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 17, 32, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand-logo { width: 30px; height: 30px; }
.brand-name { background: linear-gradient(90deg, var(--brand), var(--brand2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: all 0.2s;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.site-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(139, 92, 246, 0.35), rgba(236, 72, 153, 0.35)); }

/* ---------- layout ---------- */
#app { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
.page { display: none; }
.page.active { display: block; animation: pageIn 0.25s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section { margin-top: 44px; }
.section-title { font-size: 22px; margin-bottom: 18px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 28px; margin-top: 8px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.search-box { max-width: 560px; margin: 0 auto 18px; }
.search-box input { width: 100%; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; outline: none; }
.search-box input:focus { border-color: var(--accent); }
.card-grid .card.hide { display: none; }
.mute-btn { background: none; border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 34px; font-size: 16px; cursor: pointer; color: var(--text); flex-shrink: 0; }
.mute-btn:hover { border-color: var(--accent); }
#page-game .page-head, #page-tool .page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#page-game .page-head h1, #page-tool .page-head h1 { margin-top: 0; }
.mount { display: flex; flex-direction: column; align-items: center; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 42px 0 20px; }
.hero-logo { width: 96px; height: 96px; filter: drop-shadow(0 8px 24px rgba(139, 92, 246, 0.45)); }
.hero h1 {
  font-size: clamp(36px, 7vw, 56px);
  margin: 14px 0 6px;
  background: linear-gradient(90deg, var(--accent), var(--brand2), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 16px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 22px;
  min-width: 120px;
}
.stat-card b { display: block; font-size: 24px; color: var(--accent); }
.stat-card span { font-size: 13px; color: var(--muted); }

/* ---------- check-in card ---------- */
.checkin-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 28px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.checkin-info { display: flex; align-items: center; gap: 12px; }
.checkin-icon { font-size: 36px; }
.checkin-title { font-weight: 700; font-size: 16px; }
.checkin-sub { color: var(--muted); font-size: 13px; }
.checkin-days { display: flex; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.checkin-day { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.checkin-day.on { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, 0.6); }
.checkin-day.today { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- touch controls ---------- */
.touch-controls {
  display: none;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.tc-row { display: flex; gap: 10px; }
.tc-btn {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #242a4d;
  color: var(--text);
  font-size: 26px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.tc-btn:active { transform: scale(0.93); background: #343a63; }
.tc-wide { width: 64px; font-size: 22px; }
@media (pointer: coarse) {
  .touch-controls { display: flex; }
}

/* ---------- resume builder ---------- */
.resume-wrap {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.resume-side {
  flex: 0 0 156px;
  width: 156px;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  padding-right: 2px;
}
.resume-side::-webkit-scrollbar { width: 6px; }
.resume-side::-webkit-scrollbar-thumb { background: rgba(127, 127, 127, 0.35); border-radius: 3px; }
.resume-layout {
  flex: 1;
  min-width: 0;
  max-width: 880px;
}
.resume-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.resume-tip {
  flex: 1 1 100%;
  font-size: 12px;
  color: var(--muted);
}
.resume-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-sep {
  width: 1px;
  height: 22px;
  background: var(--line);
  display: inline-block;
  margin: 0 2px;
}
.rs-autosave {
  margin-left: auto;
  font-size: 11px;
  color: var(--green);
  white-space: nowrap;
}
.tpl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tpl-filter {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.tpl-filter:hover { color: var(--text); border-color: rgba(139, 92, 246, 0.5); }
.tpl-filter.active {
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border-color: transparent;
}
.tpl-card.hide { display: none; }
.tpl-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 0;
  max-width: none;
  min-width: 0;
}
.tpl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  min-width: 0;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.tpl-card:hover { transform: translateY(-3px); }
.tpl-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(247, 183, 51, 0.35);
}
.tpl-card span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 920px) {
  .resume-wrap { flex-direction: column; }
  .resume-side { position: static; width: 100%; max-height: none; }
  .tpl-gallery { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}
.tpl-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 10px;
  line-height: 16px;
  color: #fff;
  background: rgba(139, 92, 246, 0.85);
  border-radius: 999px;
  vertical-align: 1px;
}
.tpl-mini {
  position: relative;
  width: 100%;
  aspect-ratio: 210 / 297;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  background: #e9edf2;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 8px;
}
.mini-page {
  width: 794px;
  min-height: 1123px;
  transform: scale(0.14);
  transform-origin: top left;
  pointer-events: none;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}
.tpl-mini .resume-page {
  box-shadow: none;
  border-radius: 4px;
  max-width: none;
}
.resume-stage {
  position: relative;
  display: flex;
  justify-content: center;
}
.resume-stage .resume-page {
  transform-origin: top left;
  transition: transform 0.18s ease;
}
.dx-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 12, 24, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dx-mask[hidden] { display: none !important; }
.dx-modal {
  width: min(560px, 100%);
  max-height: 82vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.dx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dx-head h3 { font-size: 18px; }
.dx-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.dx-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.16); }
.dx-score {
  font-size: 14px;
  color: var(--text);
  background: rgba(247, 183, 51, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.dx-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
  margin-right: 6px;
}
.dx-list { list-style: none; display: grid; gap: 8px; }
.dx-list li {
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.5;
}
.dx-bad { background: rgba(248, 113, 113, 0.14); color: #fecaca; }
.dx-tip-li { background: rgba(34, 211, 238, 0.1); color: #a5f3fc; }
.dx-ok { background: rgba(52, 211, 153, 0.14); color: #a7f3d0; }
.dx-tip {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted);
}
.resume-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  max-height: 82vh;
  overflow-y: auto;
}
.resume-tools { display: flex; gap: 10px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-group label { font-size: 13px; color: var(--muted); }
.form-group input, .form-group textarea, .form-group select {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--brand);
}
.form-group input[type="file"] { padding: 8px; cursor: pointer; }
.rs-photo-box { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rs-photo-preview {
  width: 84px;
  height: 104px;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg2);
  flex-shrink: 0;
}
.rs-photo-preview span { font-size: 11px; }
.rs-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.form-sec { margin: 18px 0 10px; font-size: 15px; color: var(--accent); }
.resume-entry {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.entry-del {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--red);
  font-size: 18px;
  cursor: pointer;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.skill-tag {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.skill-tag button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.resume-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.resume-actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.resume-actions select {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
}
.resume-page {
  background: #fff;
  color: #222;
  width: 794px;
  max-width: 100%;
  min-height: 1123px;
  border-radius: 8px;
  padding: 36px 34px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
  font-size: 13.5px;
  line-height: 1.7;
}
.resume-page.tpl-blue { --ac: #2563eb; }
.resume-page.tpl-orange { --ac: #ea580c; }
.resume-page.tpl-sidebar { --ac: #0f766e; }
.resume-page.tpl-campus { --ac: #059669; background: #fbfefc; }
.resume-page.tpl-dark { --ac: #b45309; background: #fffdf7; }
.resume-page.tpl-creative { --ac: #db2777; }
.resume-page.tpl-minimal { --ac: #111; }
.resume-page.tpl-magazine { --ac: #0f172a; font-family: Georgia, "Times New Roman", serif; }
.resume-page.tpl-tech { --ac: #0284c7; }
.resume-page.tpl-nordic { --ac: #333; background: #fafaf9; }
.resume-page.tpl-timeline { --ac: #4f46e5; }
.resume-page.tpl-classic { --ac: #1e40af; }
.resume-page h1 { font-size: 26px; color: var(--ac); }
.resume-page .rs-head { border-bottom: 2px solid var(--ac); padding-bottom: 10px; margin-bottom: 6px; }
.resume-page .rs-title { color: var(--ac); font-weight: 600; font-size: 14px; margin-top: 2px; }
.resume-page .rs-contactline { color: #6b7280; font-size: 12px; margin-top: 6px; }
.resume-page .rs-head.with-photo { display: flex; align-items: center; gap: 16px; }
.resume-page .rs-head.with-photo > div:first-child { flex: 1; min-width: 0; }
.resume-page .rs-head-photo {
  width: 88px;
  height: 112px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.resume-page .rs-head-photo img { width: 100%; height: 100%; object-fit: cover; }
.resume-page .rs-side-photo {
  width: 100%;
  height: 130px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}
.resume-page .rs-side-photo img { width: 100%; height: 100%; object-fit: cover; }
.resume-page h2 {
  font-size: 15px;
  color: var(--ac);
  margin: 14px 0 6px;
  border-left: 3px solid var(--ac);
  padding-left: 8px;
}
.resume-page .rs-item { margin-bottom: 10px; }
.resume-page .rs-row { display: flex; justify-content: space-between; font-weight: 600; gap: 10px; }
.resume-page .rs-time { color: #777; font-weight: 400; font-size: 12px; white-space: nowrap; }
.resume-page .rs-desc { color: #444; font-size: 13px; margin-top: 2px; white-space: pre-wrap; }
.resume-page .rs-award-list { margin: 4px 0 6px; padding-left: 18px; }
.resume-page .rs-award-list li { font-size: 13px; line-height: 1.8; color: #333; }
.resume-page .rs-award-list li::marker { color: var(--ac); }
.resume-page .rs-item { position: relative; }
.rs-del {
  position: absolute;
  right: -8px;
  top: -10px;
  width: 19px;
  height: 19px;
  line-height: 17px;
  text-align: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 5;
}
.rs-item:hover .rs-del { opacity: 1; }
.rs-csec { margin-top: 2px; }
.rs-csec-title { position: relative; display: inline-block; }
.rs-csec-title .rs-del { right: -26px; top: 0; }
.rs-add-item {
  display: inline-block;
  margin: 4px 0 8px;
  padding: 2px 10px;
  font-size: 11px;
  color: var(--accent);
  background: transparent;
  border: 1px dashed rgba(247, 183, 51, 0.7);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}
.rs-add-item:hover { background: rgba(247, 183, 51, 0.12); }
.resume-page [data-f],
.resume-page [data-e],
.resume-page [data-x],
.resume-page [data-c],
.resume-page [data-cs],
.resume-page [data-item],
.resume-page [data-s],
.resume-page [data-h],
.resume-page [data-a] {
  border-radius: 3px;
  cursor: text;
  outline: none;
  transition: box-shadow 0.15s, background 0.15s;
}
.resume-page [data-f]:hover,
.resume-page [data-e]:hover,
.resume-page [data-x]:hover,
.resume-page [data-c]:hover,
.resume-page [data-cs]:hover,
.resume-page [data-item]:hover,
.resume-page [data-s]:hover,
.resume-page [data-h]:hover,
.resume-page [data-a]:hover {
  box-shadow: 0 0 0 1px dashed rgba(247, 183, 51, 0.8);
  background: rgba(247, 183, 51, 0.07);
}
.resume-page .editing {
  box-shadow: 0 0 0 2px var(--accent);
  background: #fffbeb;
}
.resume-page [data-photo] { cursor: pointer; position: relative; }
.resume-page [data-photo]:hover::after {
  content: '点击换照片';
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 6;
}
.rs-chip {
  display: inline-block;
  background: #eef2ff;
  color: #333;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 12px;
  margin: 3px 4px 0 0;
}

/* resume templates */
.resume-page.tpl-sidebar { display: grid; grid-template-columns: 215px 1fr; gap: 0 22px; }
.resume-page.tpl-sidebar .rs-head { grid-column: 1 / -1; }
.resume-page.tpl-sidebar .rs-side { border-right: 1px solid #e5e7eb; padding-right: 16px; }
.resume-page.tpl-sidebar .rs-side h2 { border-left: none; padding-left: 0; }
.resume-page.tpl-sidebar .rs-main { min-width: 0; }
.rs-contact { font-size: 13px; color: #555; margin: 5px 0; }
.resume-page.tpl-blue .rs-item, .resume-page.tpl-orange .rs-item { border-bottom: 1px solid #f1f5f9; padding-bottom: 8px; }
.resume-page.tpl-blue h1, .resume-page.tpl-orange h1 { font-size: 30px; }
.resume-page.tpl-blue .rs-chip, .resume-page.tpl-orange .rs-chip { border: 1px solid rgba(37, 99, 235, 0.25); }
.resume-page.tpl-orange .rs-chip { border-color: rgba(234, 88, 12, 0.25); }
.resume-page.tpl-sidebar .rs-side h2 { letter-spacing: 2px; font-size: 13px; margin-top: 16px; }
.resume-page.tpl-sidebar .rs-chip { display: block; width: fit-content; margin: 5px 0 0; }
.resume-page.tpl-sidebar .rs-main h2 { margin-top: 18px; }
.resume-page.tpl-campus h2 { display: inline-block; background: #d1fae5; padding: 3px 12px; border-radius: 999px; border-left: none; }
.resume-page.tpl-campus .rs-chip { background: #d1fae5; }
.resume-page.tpl-dark h2 { display: inline-block; border-left: none; padding-left: 0; border-bottom: 2px solid #fbbf24; }
.resume-page.tpl-tech .rs-chip { font-family: Consolas, "Courier New", monospace; background: #e0f2fe; border: 1px solid rgba(2, 132, 199, 0.35); }
.resume-page.tpl-creative h2 {
  display: inline-block;
  background: linear-gradient(90deg, var(--ac), #f59e0b);
  color: #fff;
  border-left: none;
  padding: 3px 12px;
  border-radius: 6px;
}
.resume-page.tpl-minimal h1 { letter-spacing: 3px; }
.resume-page.tpl-minimal h2 { display: inline-block; border-bottom: 1px solid #111; }
.resume-page.tpl-magazine .rs-desc::first-letter {
  font-size: 2.6em;
  font-weight: bold;
  float: left;
  line-height: 1;
  margin: 2px 6px 0 0;
  color: var(--ac);
}
.resume-page.tpl-nordic .rs-item { border-bottom: 1px solid #f0efed; padding-bottom: 8px; }
.resume-page.tpl-campus h2 { color: #059669; }
.resume-page.tpl-dark .rs-head {
  background: linear-gradient(90deg, #1f2937, #374151);
  color: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  border-bottom: none;
}
.resume-page.tpl-dark .rs-head h1 { color: #fbbf24; }
.resume-page.tpl-dark .rs-head p { color: #d1d5db; }
.resume-page.tpl-creative .rs-head {
  background: linear-gradient(90deg, #db2777, #f59e0b);
  color: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  border-bottom: none;
}
.resume-page.tpl-creative .rs-head h1 { color: #fff; }
.resume-page.tpl-creative .rs-head p { color: rgba(255, 255, 255, 0.85); }
.resume-page.tpl-minimal .rs-head { border-bottom: 1px solid #111; }
.resume-page.tpl-minimal h2 { border-left: none; padding-left: 0; border-bottom: 1px solid #eee; }
.resume-page.tpl-minimal .rs-chip { background: #f4f4f5; }
.resume-page.tpl-magazine .rs-head { border-bottom: 3px double var(--ac); }
.resume-page.tpl-magazine h1 { font-size: 34px; letter-spacing: 1px; }
.resume-page.tpl-tech .rs-head {
  background: linear-gradient(90deg, #0f172a, #1e3a8a);
  color: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  border-bottom: none;
}
.resume-page.tpl-tech .rs-head h1 { color: #7dd3fc; }
.resume-page.tpl-tech .rs-head p { color: #cbd5e1; }
.resume-page.tpl-tech .rs-chip { background: #e0f2fe; }
.resume-page.tpl-nordic h1 { font-weight: 400; letter-spacing: 6px; }
.resume-page.tpl-nordic .rs-head { border-bottom: 1px solid #d6d3d1; }
.resume-page.tpl-nordic h2 { color: #78716c; border-left: none; padding-left: 0; letter-spacing: 2px; font-size: 13px; }
.resume-page.tpl-timeline .rs-item { position: relative; padding-left: 18px; border-left: 2px solid #e0e7ff; margin-bottom: 12px; }
.resume-page.tpl-timeline .rs-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ac);
}
.resume-page.tpl-classic .rs-classic-top { display: flex; gap: 20px; align-items: center; border-bottom: 3px solid var(--ac); padding-bottom: 14px; }
.resume-page.tpl-classic .rs-classic-photo {
  width: 104px;
  height: 132px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  flex-shrink: 0;
}
.resume-page.tpl-classic .rs-classic-photo img { width: 100%; height: 100%; object-fit: cover; }
.resume-page.tpl-classic .rs-classic-photo span { font-size: 30px; color: #9ca3af; }
.resume-page .ph-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #eef0f4;
  color: #aab2c0;
  font-size: 24px;
}
.resume-page.tpl-classic h1 { font-size: 28px; }
.resume-page.tpl-classic .rs-classic-title { color: var(--ac); font-weight: 600; margin-top: 2px; }
.resume-page.tpl-classic .rs-classic-contact { color: #6b7280; font-size: 12px; margin-top: 6px; }
.resume-page.tpl-classic .rs-classic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin: 14px 0 4px; }
.resume-page.tpl-classic .rs-pair { display: flex; font-size: 13px; line-height: 1.9; }
.resume-page.tpl-classic .rs-pair b { color: #6b7280; font-weight: 600; width: 78px; flex-shrink: 0; }
.resume-page.tpl-classic .rs-pair span { color: #222; }

/* ---------- daily report ---------- */
.dr-wrap { width: 100%; max-width: 480px; text-align: center; }
.dr-canvas { width: 100%; max-width: 380px; border-radius: 16px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45); }
.dr-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ---------- print (resume PDF) ---------- */
@media print {
  body * { visibility: hidden; }
  .resume-page, .resume-page * { visibility: visible; }
  .resume-page {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    transform: none !important;
    margin-left: 0 !important;
    box-shadow: none;
    border-radius: 0;
    min-height: 0;
  }
  .site-header, .site-footer, .resume-toolbar, .tpl-gallery, .resume-form, .resume-actions, .toast, .ad-slot { display: none !important; }
  .rs-del, .rs-add-item { display: none !important; }
  @page { margin: 12mm; }
}

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, 0.5); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.card-icon { font-size: 40px; }
.card-title { font-weight: 700; margin: 8px 0 4px; font-size: 17px; }
.card-desc { color: var(--muted); font-size: 13px; min-height: 40px; }
.card-link { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--brand); }
/* ---------- favorites ---------- */
.fav-star {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(14, 17, 32, 0.78);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: color 0.15s, transform 0.15s, border-color 0.15s;
}
.fav-star:hover { color: #f7b733; transform: scale(1.1); }
.fav-star.on { color: #f7b733; border-color: rgba(247, 183, 51, 0.55); }
.favs-empty { text-align: center; color: var(--muted); padding: 36px 0 10px; }
.feature-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.feature-card .card-desc { min-height: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(139, 92, 246, 0.45); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; box-shadow: none; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: rgba(139, 92, 246, 0.6); box-shadow: none; }
.btn-small { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: linear-gradient(90deg, #ef4444, #f97316); box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3); }

/* ---------- game shell ---------- */
.game-shell {
  width: 100%;
  max-width: 640px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.game-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.stat { font-size: 14px; color: var(--muted); }
.stat b { color: var(--text); font-size: 17px; }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 14px; }
.mount canvas { display: block; margin: 0 auto; max-width: 100%; height: auto; border-radius: 12px; }

/* ---------- 2048 ---------- */
.t2048-wrap { position: relative; max-width: 420px; margin: 0 auto; }
.t2048-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px;
  background: #12152b;
  border-radius: 12px;
  touch-action: manipulation;
  user-select: none;
}
.t2048-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: clamp(20px, 6vw, 34px);
  font-weight: 800;
  color: #fff;
}
.t2048-v2 { background: #f5e6b8; color: #7c5a12; }
.t2048-v4 { background: #f2d58e; color: #7c5a12; }
.t2048-v8 { background: #f7b733; color: #fff; }
.t2048-v16 { background: #f59e0b; color: #fff; }
.t2048-v32 { background: #fb923c; color: #fff; }
.t2048-v64 { background: #f87171; color: #fff; }
.t2048-v128 { background: #ec4899; color: #fff; }
.t2048-v256 { background: #a855f7; color: #fff; }
.t2048-v512 { background: #8b5cf6; color: #fff; }
.t2048-v1024 { background: #6366f1; color: #fff; }
.t2048-v2048 { background: #22d3ee; color: #102a33; }
.t2048-born { animation: born 0.18s ease; }
@keyframes born { from { transform: scale(0.6); } to { transform: scale(1); } }
.t2048-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(14, 17, 32, 0.82);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  text-align: center;
}
.t2048-msg { font-size: 20px; font-weight: 700; }
.t2048-overlay[hidden], .sn-overlay[hidden], .tt-overlay[hidden] { display: none; }

/* ---------- snake ---------- */
.sn-wrap, .tt-main { position: relative; max-width: 420px; margin: 0 auto; }
.sn-overlay, .tt-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(14, 17, 32, 0.82);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  text-align: center;
}
.sn-msg, .tt-msg { font-size: 20px; font-weight: 700; }

/* ---------- tetris ---------- */
.tt-layout { display: flex; gap: 16px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.tt-main { max-width: 300px; }
.tt-side { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-top: 4px; }
.tt-next-label { font-size: 13px; color: var(--muted); }
#tt-next { background: #10142a; border-radius: 8px; }

/* ---------- minesweeper ---------- */
.mine-board {
  --cell: clamp(26px, 8vw, 38px);
  display: grid;
  grid-template-columns: repeat(9, var(--cell));
  gap: 3px;
  background: #12152b;
  padding: 8px;
  border-radius: 12px;
  margin: 0 auto;
}
.mine-cell {
  width: var(--cell);
  height: var(--cell);
  border: none;
  border-radius: 6px;
  font-size: calc(var(--cell) * 0.48);
  font-weight: 700;
  cursor: pointer;
  background: #343a63;
  color: var(--text);
  transition: transform 0.08s;
}
.mine-cell:hover { background: #424a7d; }
.mine-cell:active { transform: scale(0.94); }
.mine-cell.revealed { background: #1e2342; cursor: default; }
.mine-cell.flag { background: #343a63; }
.mine-cell.boom { background: #7f1d1d; }
.mine-cell.num-1 { color: #60a5fa; }
.mine-cell.num-2 { color: #34d399; }
.mine-cell.num-3 { color: #f87171; }
.mine-cell.num-4 { color: #a78bfa; }
.mine-cell.num-5 { color: #f7b733; }
.mine-cell.num-6 { color: #22d3ee; }
.mine-cell.num-7 { color: #fff; }
.mine-cell.num-8 { color: #9aa2c7; }
.mine-face {
  font-size: 26px;
  background: #343a63;
  border: none;
  border-radius: 10px;
  width: 46px;
  height: 46px;
  cursor: pointer;
  line-height: 1;
}
.mine-face:hover { background: #424a7d; }

/* ---------- gomoku ---------- */
#gm-canvas { cursor: pointer; max-width: 520px; }

/* ---------- whack-a-mole ---------- */
.wh-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 380px;
  margin: 0 auto;
}
.wh-hole {
  position: relative;
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #4a3a24, #2b2014);
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  touch-action: manipulation;
}
.wh-mole {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -60%;
  font-size: clamp(34px, 10vw, 54px);
  line-height: 1;
  transition: bottom 0.12s ease;
  pointer-events: none;
}
.wh-hole.up .wh-mole { bottom: 12%; }

/* ---------- bubble wrap ---------- */
.bubble-wrap { width: 100%; max-width: 560px; }
.bubble-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.bubble {
  position: relative;
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #eef2ff, #8b5cf6 65%, #6d28d9);
  box-shadow: inset -3px -3px 6px rgba(0, 0, 0, 0.25), inset 3px 3px 6px rgba(255, 255, 255, 0.35);
  transition: transform 0.08s;
  touch-action: manipulation;
}
.bubble:hover { transform: scale(1.08); }
.bubble:active { transform: scale(0.9); }
.bubble.popped {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  transform: scale(0.82);
}
.bubble.pop { animation: bbPop 0.3s ease forwards; }
.bubble.pop::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  animation: bbRipple 0.38s ease-out forwards;
}
@keyframes bbPop { 0% { transform: scale(1); opacity: 1; } 55% { transform: scale(1.28); opacity: 0.75; } 100% { transform: scale(0.05); opacity: 0; } }
@keyframes bbRipple { from { transform: scale(0.35); opacity: 0.9; } to { transform: scale(2.1); opacity: 0; } }

/* ---------- woodfish ---------- */
.woodfish-wrap { text-align: center; width: 100%; max-width: 480px; }
.woodfish-stats { display: flex; gap: 18px; justify-content: center; margin-bottom: 18px; }
.woodfish {
  border: none;
  cursor: pointer;
  background: transparent;
  padding: 0;
  display: inline-block;
  filter: drop-shadow(0 12px 24px rgba(124, 74, 31, 0.45));
  transition: transform 0.08s;
  touch-action: manipulation;
}
.woodfish.hit { animation: knock 0.22s ease; }
@keyframes knock {
  0% { transform: rotate(0) scale(1); }
  35% { transform: rotate(-6deg) scale(0.96); }
  70% { transform: rotate(4deg) scale(1.02); }
  100% { transform: rotate(0) scale(1); }
}
.wf-float-area { position: relative; height: 0; }
.wf-float-text {
  position: absolute;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  animation: floatUp 0.9s ease forwards;
  pointer-events: none;
}
@keyframes floatUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-70px); }
}
.woodfish-ctrl { display: flex; gap: 18px; justify-content: center; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; }

/* ---------- soup ---------- */
.soup-wrap { width: 100%; max-width: 600px; }
.soup-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 26px;
  text-align: center;
}
.soup-quote {
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1.7;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.soup-quote.fade-in { animation: pageIn 0.35s ease; }
.soup-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
/* ---------- answer book ---------- */
.ab-wrap { width: 100%; max-width: 560px; }
.ab-card {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 26px;
}
.ab-label { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.ab-book {
  width: 132px;
  height: 132px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 62px;
  background: linear-gradient(145deg, #f7b733, #f97316);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(247, 183, 51, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
}
.ab-book:hover { transform: translateY(-3px) scale(1.03); }
.ab-book:active { transform: scale(0.94); }
.ab-book.flip { animation: abFlip 0.5s ease; }
@keyframes abFlip {
  0% { transform: rotateY(0) scale(1); }
  35% { transform: rotateY(55deg) scale(1.08); }
  70% { transform: rotateY(-30deg) scale(0.97); }
  100% { transform: rotateY(0) scale(1); }
}
.ab-answer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.5;
  margin: 22px 0 2px;
  padding: 0 8px;
}
.ab-answer.fade-in { animation: pageIn 0.35s ease; }
/* ---------- psychic ---------- */
.psy-wrap { width: 100%; max-width: 560px; }
.psy-card {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 20px;
}
.psy-step { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.psy-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  max-width: 440px;
  margin: 18px auto 0;
}
.psy-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 0 4px;
  line-height: 1.1;
}
.psy-cell b { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.psy-cell i { font-style: normal; font-size: 15px; }
.psy-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.psy-ball {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.psy-ball-icon {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #a78bfa, #6d28d9 70%);
  box-shadow: 0 14px 34px rgba(109, 40, 217, 0.4), inset 0 -6px 16px rgba(0, 0, 0, 0.25);
}
.psy-ball-text { color: var(--text); font-size: 15px; font-weight: 700; margin: 4px 0 0; }
.psy-ball.fade-in { animation: pageIn 0.4s ease; }

/* ---------- countdown ---------- */
.cd-wrap { width: 100%; max-width: 520px; text-align: center; }
.cd-set { display: flex; gap: 18px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.cd-set label { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.cd-set input[type="time"] {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
}
.cd-big {
  font-size: clamp(42px, 12vw, 72px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--accent), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 8px 0 18px;
}
.cd-bar { height: 14px; background: var(--card); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.cd-progress { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--cyan), var(--brand)); transition: width 0.6s; }
.cd-info { color: var(--muted); margin-top: 16px; }
.cd-moyu { margin-top: 10px; font-size: 16px; }
.cd-moyu b { color: var(--accent); }

/* ---------- disguise ---------- */
.dg-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #0d1020;
  display: flex;
  flex-direction: column;
}
.dg-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #141830;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.dg-badge { font-weight: 700; font-size: 15px; }
.dg-tip { color: var(--muted); font-size: 13px; }
.dg-actions { margin-left: auto; display: flex; gap: 8px; }

/* code */
.dg-code { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.dg-titlebar { display: flex; align-items: center; gap: 8px; background: #1a1f38; padding: 10px 14px; }
.dg-dot { width: 12px; height: 12px; border-radius: 50%; }
.dg-dot-r { background: #f87171; }
.dg-dot-y { background: #f7b733; }
.dg-dot-g { background: #34d399; }
.dg-tab { margin-left: 10px; font-size: 13px; color: var(--muted); }
.dg-code-body { flex: 1; overflow: auto; background: #10142a; padding: 16px; }
.dg-code-line { font-family: Consolas, "Courier New", monospace; font-size: 14px; color: #c9d1ff; white-space: pre-wrap; }
.dg-status { background: #1a1f38; padding: 8px 14px; font-size: 13px; color: var(--green); }

/* excel */
.dg-excel { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; }
.dg-excel-bar { background: #1a1f38; padding: 8px 14px; font-size: 13px; color: var(--muted); display: flex; gap: 16px; }
.dg-excel-func { margin-left: auto; color: var(--text); }
.dg-excel-body { flex: 1; overflow: auto; padding: 14px; }
.dg-excel table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 13px; }
.dg-excel th { background: #1a1f38; color: var(--muted); padding: 6px 10px; border: 1px solid #2a2f52; text-align: center; font-weight: 600; }
.dg-excel td { padding: 6px 10px; border: 1px solid #2a2f52; color: var(--text); font-variant-numeric: tabular-nums; }
.dg-excel td.sel { background: rgba(247, 183, 51, 0.25); outline: 2px solid var(--accent); }
.dg-excel-status { background: #1a1f38; padding: 8px 14px; font-size: 13px; color: var(--muted); }

/* chat */
.dg-chat { flex: 1; display: flex; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.dg-chat-side { width: 160px; background: #141830; border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.dg-chat-me { font-size: 13px; color: var(--muted); padding: 4px 8px; margin-bottom: 4px; }
.dg-chat-contact { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.dg-chat-contact.active { background: rgba(139, 92, 246, 0.18); color: var(--text); }
.dg-chat-avatar { font-size: 20px; }
.dg-chat-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 6px; }
.dg-chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #10142a; }
.dg-chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.dg-chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.dg-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 78%; }
.dg-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.dg-avatar { font-size: 30px; flex-shrink: 0; }
.dg-bubble { background: #242a4d; padding: 9px 13px; border-radius: 12px; font-size: 14px; position: relative; }
.dg-msg.me .dg-bubble { background: #3b2f63; }
.dg-chat-input { border-top: 1px solid var(--line); padding: 10px 16px; color: var(--muted); font-size: 13px; }

/* doc */
.dg-doc { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #353a55; }
.dg-doc-bar { background: #1a1f38; padding: 8px 14px; font-size: 13px; color: var(--muted); display: flex; gap: 16px; }
.dg-doc-page {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  color: #222;
  max-width: 760px;
  width: 100%;
  margin: 18px auto;
  padding: 48px 56px;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.dg-doc-page h1 { font-size: 24px; margin-bottom: 22px; }
.dg-doc-page p { font-size: 15px; line-height: 2; text-indent: 2em; }
.dg-cursor { display: inline-block; width: 2px; height: 1em; background: #222; vertical-align: text-bottom; animation: blink 0.9s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.dg-doc-status { background: #1a1f38; padding: 8px 14px; font-size: 13px; color: var(--muted); }

/* ---------- ad slot / footer / toast ---------- */
.ad-slot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 14px;
  margin: 26px 0 6px;
  background: rgba(255, 255, 255, 0.02);
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 20px 34px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer p { margin: 4px 0; }
.muted { color: var(--muted); }
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  background: #242a4d;
  color: var(--text);
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2000;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.bi-spin { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 10px auto 0; max-width: 560px; flex-wrap: wrap; }
.bi-spin span { color: var(--muted); font-size: 13px; }
.bi-spin button { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer; }
.bi-spin button.on { color: #fff; background: linear-gradient(90deg, var(--brand), var(--brand2)); border-color: transparent; }
.bi-controls { max-width: 560px; margin: 10px auto 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.bi-aim-note { color: var(--muted); font-size: 12px; }
.bi-power-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; flex-wrap: wrap; justify-content: center; }
.bi-power-row input[type="range"] { width: 170px; accent-color: #f7b733; }
.bi-power-row b { color: var(--accent); min-width: 44px; }
.bi-shell { max-width: 1120px; }
.bi-layout { display: flex; gap: 24px; align-items: flex-start; justify-content: center; max-width: 1100px; margin: 0 auto; }
.bi-table-col { flex: 1; min-width: 0; }
.bi-side { width: 250px; flex-shrink: 0; display: flex; flex-direction: column; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 18px; position: sticky; top: 84px; }
.bi-side .bi-power-row span { font-size: 15px; }
.bi-side input[type="range"] { width: 200px; height: 22px; }
.bi-power-row b { font-size: 15px; }
.bi-shoot-btn { width: 100%; font-size: 24px; font-weight: 800; padding: 17px 10px; border-radius: 14px; }
.bi-side-hint { color: var(--muted); font-size: 13px; margin: 0; text-align: center; line-height: 1.5; }
.bi-spin button { font-size: 14px; padding: 7px 15px; }
@media (max-width: 720px) {
  .bi-layout { flex-direction: column; align-items: stretch; }
  .bi-side { width: auto; position: static; flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 12px; }
  .bi-side-hint { display: none; }
  .bi-side input[type="range"] { width: 160px; }
}
.bi-hud { display: flex; gap: 12px; justify-content: space-between; align-items: center; max-width: 560px; margin: 12px auto 0; flex-wrap: wrap; }
.bi-turn { font-weight: 700; color: var(--accent); }
.bi-group { color: var(--muted); font-size: 13px; }
.bi-tip { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(10, 12, 24, 0.82); color: #fff; font-size: 12px; padding: 7px 12px; border-radius: 999px; pointer-events: none; z-index: 3; max-width: 92%; text-align: center; }
/* ---------- games batch ---------- */
.bo-wrap { position: relative; max-width: 760px; margin: 0 auto; }
  .bo-wrap canvas { display: block; width: 100%; height: auto; }
.bo-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(10, 12, 24, 0.78); border-radius: 12px; z-index: 5;
}
.bo-overlay[hidden] { display: none; }
.ttt-board { display: grid; grid-template-columns: repeat(3, 96px); gap: 8px; justify-content: center; margin: 18px auto; }
.ttt-cell { width: 96px; height: 96px; font-size: 40px; font-weight: 800; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; }
.ttt-cell.tX { color: #f7b733; }
.ttt-cell.tO { color: #a78bfa; }
.ll-wrap { position: relative; max-width: 504px; margin: 0 auto; }
.ll-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.ll-board { display: grid; grid-template-columns: repeat(8, 52px); gap: 4px; justify-content: center; padding: 30px; }
.ll-tile { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: transform 0.12s ease, border-color 0.12s ease; }
.ll-tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.ll-tile.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(247, 183, 51, 0.35); transform: scale(1.06); }
.ll-tile.gone { opacity: 0; pointer-events: none; border-color: transparent; background: transparent; }
.ll-tile.hint { animation: llHint 0.4s ease infinite alternate; }
@keyframes llHint { from { transform: scale(1); } to { transform: scale(1.12); box-shadow: 0 0 0 3px rgba(247, 183, 51, 0.5); } }
.mem-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 420px; margin: 18px auto; }
.mem-card { position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 30px; cursor: pointer; overflow: hidden; }
.mem-card span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.mem-back { background: linear-gradient(145deg, #3b2f63, #242a4d); color: var(--muted); }
.mem-card.open .mem-back { display: none; }
.mem-card.done { opacity: 0.6; cursor: default; }
.gs-wrap { max-width: 420px; margin: 20px auto; text-align: center; }
.gs-msg { margin-bottom: 14px; color: var(--text); }
.gs-input { width: 140px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 18px; text-align: center; margin-right: 8px; }
.gs-hint { margin-top: 14px; font-size: 15px; color: var(--accent); min-height: 22px; }
.rp-stage { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 22px 0 6px; }
.rp-side.shake { animation: rpShake 0.28s ease infinite; }
@keyframes rpShake { 0%, 100% { transform: rotate(-10deg) translateY(0); } 50% { transform: rotate(10deg) translateY(-5px); } }
.rp-btns .btn:disabled { opacity: 0.55; cursor: default; }
.rp-side { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; font-size: 54px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.rp-vs { font-size: 18px; color: var(--muted); font-weight: 700; }
.rp-msg { text-align: center; color: var(--muted); margin: 12px 0; min-height: 22px; }
.rp-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.bj-table { max-width: 520px; margin: 18px auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.bj-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.bj-label { width: 44px; color: var(--muted); font-size: 13px; }
.bj-cards { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.bj-card { width: 42px; height: 58px; display: flex; align-items: center; justify-content: center; background: #fff; color: #111; border-radius: 8px; font-weight: 800; font-size: 16px; }
.bj-points { color: var(--accent); font-weight: 700; min-width: 30px; text-align: right; }
.bj-msg { text-align: center; padding: 10px 0; color: var(--text); }
.bj-btns { display: flex; gap: 12px; justify-content: center; }
.sp-wrap { position: relative; max-width: 340px; margin: 16px auto 0; }
.sp-wrap canvas { width: 100%; height: auto; }
.sp-arrow { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); color: #f7b733; font-size: 24px; z-index: 2; }
.sp-result { text-align: center; margin-top: 14px; font-weight: 700; color: var(--accent); min-height: 24px; }
.dc-stage { text-align: center; margin: 22px 0; }
.dc-dice { font-size: 52px; min-height: 70px; }
.dc-dice.shake { animation: diceShake 0.8s ease; }
@keyframes diceShake { 0% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 50% { transform: rotate(12deg); } 75% { transform: rotate(-8deg); } 100% { transform: rotate(0); } }
.dc-result { color: var(--muted); margin: 10px 0; min-height: 22px; }
.dc-btns { display: flex; gap: 14px; justify-content: center; }
.rt-pad { max-width: 420px; margin: 20px auto; height: 200px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; border: 1px solid var(--line); cursor: pointer; user-select: none; }
.rt-pad.red { background: #3f2a2a; color: #fca5a5; }
.rt-pad.green { background: #1c3a2c; color: #86efac; }
.rt-pad.idle { background: var(--card); color: var(--muted); }
.hn-board { display: flex; gap: 24px; justify-content: center; align-items: flex-end; margin: 26px 0; }
.hn-peg { width: 150px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 0; cursor: pointer; border-radius: 12px; border: 1px solid transparent; }
.hn-peg.sel { border-color: var(--accent); background: rgba(247, 183, 51, 0.08); }
.hn-disk { height: 22px; border-radius: 8px; background: linear-gradient(90deg, #f7b733, #f97316); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.hn-base { width: 100%; height: 8px; background: var(--line); border-radius: 4px; }
.sl-board { display: grid; grid-template-columns: repeat(4, 84px); gap: 8px; justify-content: center; margin: 18px auto; max-width: 380px; }
.sl-tile { width: 84px; height: 84px; font-size: 26px; font-weight: 800; background: linear-gradient(145deg, #3b2f63, #242a4d); border: 1px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; }
.sl-tile.empty { background: transparent; border-color: transparent; cursor: default; }
.pn-keys { display: flex; gap: 8px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pn-key { width: 74px; height: 150px; border-radius: 10px; background: #fff; color: #111; border: 1px solid #ccc; font-size: 18px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 14px; gap: 6px; }
.pn-key.hit { background: #f7b733; }
.pn-key i { font-style: normal; font-size: 12px; color: #777; }

/* ---------- tools batch ---------- */
.kb-zone { min-height: 220px; border: 2px dashed var(--line); border-radius: 16px; margin: 12px 0; padding: 16px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: text; outline: none; }
.kb-zone:focus { border-color: var(--accent); }
.kb-cap { position: absolute; top: 60%; font-size: 26px; font-weight: 800; animation: capFly 1.4s ease forwards; }
@keyframes capFly { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--drift), -220px) rotate(220deg); } }
.ft-sticks { width: 120px; height: 120px; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 58px; background: linear-gradient(145deg, #f7b733, #f97316); border-radius: 50%; cursor: pointer; box-shadow: 0 12px 30px rgba(247, 183, 51, 0.35); user-select: none; }
.ft-sticks.shake { animation: abFlip 0.7s ease; }
.ft-result { margin-top: 18px; }
.ft-level { font-size: 24px; font-weight: 800; color: var(--accent); }
.ft-text { margin-top: 8px; color: var(--text); line-height: 1.6; }

/* ---------- eat picker ---------- */
.eat-wrap { width: 100%; max-width: 560px; }
.eat-modes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.eat-mode { padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer; transition: all 0.15s; }
.eat-mode.on { color: #fff; background: linear-gradient(90deg, var(--brand), var(--brand2)); border-color: transparent; }
.eat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; min-height: 190px; }
.eat-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; min-height: 86px; }
.eat-card i { font-style: normal; font-size: 26px; }
.eat-card b { font-size: 13px; color: var(--text); line-height: 1.35; }
.eat-card.win { border-color: var(--accent); background: rgba(247, 183, 51, 0.1); animation: eatWin 0.5s ease; }
@keyframes eatWin { 0% { transform: scale(1); } 45% { transform: scale(1.12); } 100% { transform: scale(1); } }
.eat-result { text-align: center; margin-top: 14px; font-size: 15px; color: var(--text); min-height: 22px; }
.eat-result b { color: var(--accent); font-weight: 800; }
/* ---------- tactile tools ---------- */
.mash-box { position: relative; max-width: 340px; margin: 8px auto 0; overflow: hidden; border-radius: 16px; padding: 18px 12px 14px; }
.mash-box.shake { animation: mashShake 0.18s ease; }
@keyframes mashShake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-4px, 2px); } 50% { transform: translate(4px, -2px); } 75% { transform: translate(-3px, -1px); } }
.mash-btn { display: block; width: 150px; height: 150px; margin: 0 auto 16px; border-radius: 50%; border: none; font-size: 26px; font-weight: 800; color: #fff; background: radial-gradient(circle at 35% 30%, #f87171, #dc2626 70%); cursor: pointer; box-shadow: 0 14px 34px rgba(220, 38, 38, 0.4), inset 0 -8px 18px rgba(0, 0, 0, 0.25); transition: transform 0.08s ease; }
.mash-btn:active { transform: scale(0.92); }
.mash-progress { height: 10px; background: #242a4d; border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.mash-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f7b733, #f97316); transition: width 0.1s ease; }
.mash-count { color: var(--muted); font-size: 13px; }
.mash-part { position: absolute; bottom: 40%; width: 8px; height: 8px; border-radius: 50%; background: #f7b733; animation: mashPart 0.6s ease forwards; }
@keyframes mashPart { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.4); } }
.sq-wrap { margin: 10px 0; }
.sq-blob { width: 150px; height: 150px; margin: 0 auto; border-radius: 48% 52% 46% 54%; background: linear-gradient(145deg, #fda4af, #f472b6); display: flex; align-items: center; justify-content: center; font-size: 48px; cursor: grab; transition: transform 0.08s ease, border-radius 0.08s ease; box-shadow: 0 14px 30px rgba(244, 114, 182, 0.3); user-select: none; }
.sq-blob.squish { transform: scale(0.72, 0.5); border-radius: 55% 45% 60% 40%; }
.sq-blob.wobble { animation: sqWobble 0.45s ease; }
@keyframes sqWobble { 0% { transform: scale(0.72, 0.5); } 35% { transform: scale(1.12, 0.86); } 70% { transform: scale(0.94, 1.05); } 100% { transform: scale(1, 1); } }
.sq-count { margin-top: 12px; color: var(--muted); font-size: 13px; }
.slap-stage { position: relative; height: 170px; display: flex; align-items: center; justify-content: center; }
.slap-face { font-size: 88px; cursor: pointer; user-select: none; transition: transform 0.1s ease; }
.slap-face.hit { animation: slapFace 0.35s ease; }
@keyframes slapFace { 0%, 100% { transform: translate(0, 0) rotate(0); } 20% { transform: translate(-14px, 6px) rotate(-12deg); } 45% { transform: translate(12px, -4px) rotate(10deg); } 70% { transform: translate(-6px, 2px) rotate(-5deg); } }
.slap-hand { position: absolute; right: 15%; top: 30%; font-size: 46px; opacity: 0; }
.slap-hand.fly { animation: slapFly 0.35s ease; }
@keyframes slapFly { 0% { opacity: 1; transform: translate(50px, -20px) rotate(20deg); } 100% { opacity: 0; transform: translate(-90px, 30px) rotate(-10deg); } }
.slap-count { color: var(--muted); font-size: 13px; }
.punch-wrap { margin: 8px 0; position: relative; height: 220px; }
.punch-line { position: absolute; top: 0; left: 50%; width: 3px; height: 70px; background: #3a4068; transform: translateX(-50%); }
.punch-bag { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); width: 96px; height: 120px; background: linear-gradient(145deg, #8b5cf6, #6d28d9); border-radius: 46px 46px 30px 30px; display: flex; align-items: center; justify-content: center; font-size: 40px; cursor: pointer; box-shadow: 0 12px 26px rgba(109, 40, 217, 0.35); transform-origin: top center; user-select: none; }
.punch-bag.swing { animation: punchSwing 0.9s ease; }
@keyframes punchSwing { 0% { transform: translateX(-50%) rotate(0); } 18% { transform: translateX(-50%) rotate(24deg); } 45% { transform: translateX(-50%) rotate(-18deg); } 75% { transform: translateX(-50%) rotate(8deg); } 100% { transform: translateX(-50%) rotate(0); } }
/* ---------- disguise batch ---------- */
.dg-mail, .dg-im, .dg-wiki { flex: 1; display: flex; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.dg-side { width: 190px; background: #141830; border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.dg-side-head { font-size: 13px; color: var(--muted); padding: 4px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dg-mail-item { padding: 10px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.dg-mail-item b { display: block; color: var(--text); font-size: 13px; margin-bottom: 3px; }
.dg-mail-item span { font-size: 11px; }
.dg-mail-item.active { background: rgba(139, 92, 246, 0.18); color: var(--text); }
.dg-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #10142a; }
.dg-mail-head { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.dg-mail-body { flex: 1; overflow: auto; padding: 18px 22px; color: var(--text); font-size: 14px; line-height: 1.8; }
.dg-mail-body p { margin: 0 0 10px; }
.dg-muted { color: var(--muted); font-size: 12px; }
.dg-tbl { border-collapse: collapse; width: 100%; font-size: 13px; color: var(--text); }
.dg-tbl th { background: #1a1f38; color: var(--muted); padding: 8px 10px; border: 1px solid #2a2f52; text-align: left; }
.dg-tbl td { padding: 8px 10px; border: 1px solid #2a2f52; }
.dg-tbl .tag { color: #f7b733; }
.dg-tbl-wrap { flex: 1; overflow: auto; padding: 14px; }
.dg-slide { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; }
.dg-slide-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; }
.dg-slide-title { font-size: 30px; font-weight: 800; color: var(--text); }
.dg-slide-list { list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 16px; }
.dg-slide-notes { padding: 10px 16px; background: #1a1f38; font-size: 12px; color: var(--muted); }
.dg-slide-dots { display: flex; gap: 6px; justify-content: center; padding: 8px; }
.dg-slide-dots i { width: 8px; height: 8px; border-radius: 50%; background: #3a4068; }
.dg-slide-dots i.on { background: var(--accent); }
.dg-browser { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; }
.dg-browser-tabs { display: flex; gap: 4px; padding: 8px 10px 0; background: #1a1f38; }
.dg-browser-tabs span { font-size: 12px; color: var(--muted); padding: 7px 12px; border-radius: 8px 8px 0 0; background: #12162e; }
.dg-browser-tabs span.on { background: #10142a; color: var(--text); }
.dg-browser-addr { margin: 8px 10px; padding: 7px 12px; background: #12162e; border-radius: 8px; font-size: 12px; color: var(--muted); }
.dg-lock { color: #34d399; }
.dg-browser-body { flex: 1; overflow: auto; padding: 20px 24px; color: var(--text); }
.dg-browser-body h1 { font-size: 22px; margin: 0 0 12px; }
.dg-browser-body p { line-height: 1.7; }
.dg-term { flex: 1; display: flex; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0a0e1e; }
.dg-term-body { flex: 1; overflow: auto; padding: 16px; font-family: Consolas, "Courier New", monospace; font-size: 13px; color: #6ee7b7; line-height: 1.7; white-space: pre-wrap; }
.dg-mm { flex: 1; position: relative; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; }
.dg-mm-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #3b2f63; color: #fff; padding: 18px 22px; border-radius: 14px; font-weight: 800; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4); }
.dg-mm-branch { position: absolute; top: 50%; transform: translateY(-50%); width: 150px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: #242a4d; }
.dg-mm-branch b { color: var(--text); }
.dg-mm-branch span { font-size: 12px; color: var(--muted); }
.dg-mm-branch.b1 { left: 8%; }
.dg-mm-branch.b2 { left: 28%; }
.dg-mm-branch.b3 { right: 28%; }
.dg-mm-branch.b4 { right: 8%; }
.dg-cal { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; }
.dg-cal-head { padding: 12px 16px; background: #1a1f38; font-weight: 700; }
.dg-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 14px; }
.dg-cal-grid span { text-align: center; padding: 10px 0; font-size: 13px; color: var(--text); border-radius: 8px; }
.dg-cal-grid span.muted { color: #3a4068; }
.dg-cal-grid span.has { background: rgba(247, 183, 51, 0.18); }
.dg-cal-grid span.today { background: var(--accent); color: #111; font-weight: 800; }
.dg-cal-events { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.dg-todo { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; padding: 14px; }
.dg-todo-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.dg-todo-item { padding: 10px 12px; background: #242a4d; border-radius: 10px; font-size: 14px; color: var(--text); }
.dg-todo-item.done { opacity: 0.55; text-decoration: line-through; }
.dg-todo-input { margin-top: 12px; color: var(--muted); font-size: 13px; }
.dg-dash { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; padding: 16px; }
.dg-dash-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dg-dash-card { background: #242a4d; border-radius: 12px; padding: 14px; }
.dg-dash-card b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.dg-dash-card i { font-style: normal; font-size: 18px; font-weight: 800; color: var(--text); }
.dg-dash-chart { flex: 1; display: flex; align-items: flex-end; gap: 10px; padding: 18px 4px 0; }
.dg-dash-chart .bar { flex: 1; background: linear-gradient(180deg, #a78bfa, #6d28d9); border-radius: 6px 6px 0 0; }
.dg-ticket { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; }
.dg-jira { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; min-height: 0; margin: 14px; }
.dg-jira-col { display: flex; flex-direction: column; gap: 10px; background: #141830; border-radius: 12px; padding: 12px; }
.dg-jira-col h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.dg-jira-card { background: #242a4d; border-radius: 10px; padding: 12px; font-size: 13px; color: var(--text); }
.dg-jira-card.hot { border-left: 3px solid #f7b733; }
.dg-jira-card.done { opacity: 0.6; }
.dg-search-bar { margin-bottom: 14px; padding: 10px 14px; background: #242a4d; border-radius: 10px; color: var(--muted); font-size: 13px; }
.dg-recruit { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; padding: 14px; gap: 10px; }
.dg-recruit-head { font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dg-recruit-item { display: flex; align-items: center; gap: 12px; background: #242a4d; padding: 12px; border-radius: 10px; }
.dg-recruit-item b { flex: 1; }
.dg-recruit-item span { color: var(--muted); font-size: 12px; }
.dg-recruit-item i { font-style: normal; color: var(--brand); font-size: 12px; }
.dg-figma { flex: 1; display: flex; min-height: 0; margin: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #10142a; }
.dg-figma-side { width: 180px; background: #141830; border-right: 1px solid var(--line); padding: 10px; }
.dg-layer { font-size: 12px; color: var(--muted); padding: 5px 8px; }
.dg-layer.sub { padding-left: 22px; }
.dg-layer.on { color: var(--text); background: rgba(139, 92, 246, 0.18); border-radius: 6px; }
.dg-figma-canvas { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: auto; }
.dg-figma-frame { width: 320px; background: #f4f4f5; border-radius: 8px; padding: 14px; }
.dg-figma-nav { height: 22px; background: #d4d4d8; border-radius: 4px; margin-bottom: 10px; }
.dg-figma-hero { height: 90px; background: #a78bfa; border-radius: 6px; margin-bottom: 10px; }
.dg-figma-cards { display: flex; gap: 8px; }
.dg-figma-cards i { flex: 1; height: 60px; background: #e4e4e7; border-radius: 6px; }
.dg-cursor { display: inline-block; width: 2px; height: 16px; background: #f7b733; animation: blink 1s infinite; vertical-align: -3px; margin-left: 2px; }
.dg-im-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #10142a; }
/* ---------- home sphere ---------- */
.sphere-section { position: relative; text-align: center; padding: 10px 0 8px; }
.sphere-stage { position: relative; perspective: 1300px; height: 470px; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; user-select: none; overflow: hidden; border-radius: 24px; background: radial-gradient(ellipse at 50% 40%, #171a36 0%, #0b0d1d 70%); }
.sphere-stage:active { cursor: grabbing; }
.sphere-bg { position: absolute; inset: 0; pointer-events: none; }
.sphere-bg i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0.5; animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.8; } }
.sphere-canvas { position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; margin: -180px 0 0 -180px; z-index: 1; pointer-events: none; }
.sphere-back, .sphere-front { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.sphere-back { z-index: 0; }
.sphere-front { z-index: 2; }
.sphere-item { position: absolute; left: 0; top: 0; width: 52px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 50%; text-decoration: none; color: #e0f2fe; background: radial-gradient(circle at 35% 30%, rgba(34, 211, 238, 0.3), rgba(7, 14, 26, 0.78) 72%); border: 1px solid rgba(125, 235, 255, 0.35); backdrop-filter: blur(3px); box-shadow: 0 0 18px rgba(34, 211, 238, 0.28), inset 0 0 14px rgba(34, 211, 238, 0.12), 0 8px 22px rgba(0, 0, 0, 0.4); transition: border-color 0.15s, box-shadow 0.15s; }
.sphere-item::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 70%); animation: chipPulse 3.4s ease-in-out infinite; animation-delay: var(--pd, 0s); pointer-events: none; }
@keyframes chipPulse { 0%, 100% { opacity: 0.35; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.08); } }
.sphere-item i { font-style: normal; font-size: 23px; line-height: 1; }
.sphere-item b { font-size: 10px; font-weight: 600; letter-spacing: 0; color: #a5f3fc; }
.sphere-item:hover { border-color: rgba(125, 235, 255, 0.85); box-shadow: 0 0 28px rgba(34, 211, 238, 0.5), inset 0 0 16px rgba(34, 211, 238, 0.18), 0 10px 24px rgba(0, 0, 0, 0.45); }
.sphere-hint { position: relative; z-index: 3; color: var(--muted); font-size: 12px; margin: 8px 0 0; }
@media (max-width: 640px) {
  .sphere-stage { height: 360px; perspective: 900px; }
  .sphere-canvas { width: 270px; height: 270px; margin: -135px 0 0 -135px; }
  .sphere-item { width: 44px; height: 44px; }
  .sphere-item i { font-size: 19px; }
  .sphere-item b { font-size: 9px; }
}
/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .header-inner { padding: 10px 14px; gap: 12px; }
  #app { padding: 18px 14px 50px; }
  .hero { padding: 28px 0 10px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .game-shell { padding: 12px; }
  .dg-chat-side { width: 118px; }
  .dg-doc-page { padding: 28px 22px; }
}
