/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d1020;
  --surface:  #161b2e;
  --surface2: #1a1f34;
  --panel:    #111526;
  --border:   #252840;
  --border2:  #1e2340;
  --text:     #e8eeff;
  --muted:    #7a829e;
  --accent:   #6C63FF;
  --green:    #10B981;
  --red:      #EF4444;
  --amber:    #F59E0B;
  --blue:     #2563EB;
  --tone-1: #7D4EF2;
  --tone-2: #cfbdff;
  --tone-3: #5b64ff;
}

body[data-theme='ocean'] {
  --tone-1: #0ea5e9;
  --tone-2: #67e8f9;
  --tone-3: #2563eb;
}

body[data-theme='sunset'] {
  --tone-1: #f97316;
  --tone-2: #fbbf24;
  --tone-3: #ef4444;
}

html, body {
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(125,78,242,.18), transparent 60%),
    radial-gradient(900px 420px at 15% 5%, rgba(99,102,241,.14), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  overflow-x: hidden;
  user-select: none;
}

body {
  position: relative;
  padding: 24px 14px 20px;
}

.app-shell {
  width: min(1140px, 100%);
  margin: 0 auto;
}

.bg-orb {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: .22;
  pointer-events: none;
  z-index: 0;
}
.bg-orb-top {
  top: -140px;
  right: -80px;
  background: linear-gradient(135deg, var(--tone-1), var(--tone-2));
}
.bg-orb-left {
  bottom: 8%;
  left: -110px;
  background: linear-gradient(135deg, var(--tone-3), var(--tone-1));
}

.app-shell > * {
  position: relative;
  z-index: 1;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  top: 10px;
  min-height: 56px;
  width: 100%;
  margin: 0 auto -6px;
  padding: 10px 18px;
  background: rgba(17, 17, 36, .72);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(125,78,242,.08);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.app-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.header-icon { font-size: 22px; color: var(--accent); }
.header-title {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e8ddff 0%, #cfbdff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.header-right { display: flex; align-items: center; gap: 8px; }

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(51,51,72,.75);
  border: 1px solid rgba(226,224,251,.2);
  flex-shrink: 0;
}
.theme-label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #c6c4e0;
  font-weight: 700;
}
.theme-dot {
  min-width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  cursor: pointer;
  opacity: .95;
  transform: scale(1);
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.theme-dot:hover { opacity: 1; transform: scale(1.04); }
.theme-dot.active {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(255,255,255,.22), 0 0 16px rgba(226,224,251,.35);
}
.theme-dot[data-theme='violet'] { background: linear-gradient(135deg, #7D4EF2, #cfbdff); }
.theme-dot[data-theme='ocean']  { background: linear-gradient(135deg, #0ea5e9, #67e8f9); }
.theme-dot[data-theme='sunset'] { background: linear-gradient(135deg, #f97316, #ef4444); }

.btn-expert {
  height: 32px;
  background: rgba(100,116,139,.12);
  color: #94a3b8;
  border: 1.5px solid rgba(100,116,139,.3);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  padding: 0 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-expert:hover { background: rgba(100,116,139,.22); border-color: #64748b; }
.btn-expert.active {
  background: rgba(245,158,11,.15);
  border-color: rgba(245,158,11,.6);
  color: #F59E0B;
}

/* ── App Visibility Settings ───────────────────────────────────────────── */
.visibility-settings {
  width: 100%;
  margin: 8px auto 0;
  background: rgba(26,26,45,.86);
  border-radius: 16px;
  padding: 14px 18px;
}
.visibility-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.visibility-hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.visibility-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.visibility-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.visibility-item:hover {
  border-color: var(--accent);
}
.visibility-item input {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}
.visibility-item.hidden {
  opacity: 0.5;
}


.btn-ffmpeg {
  height: 32px;
  background: rgba(16,185,129,.12);
  color: #10B981;
  border: 1.5px solid rgba(16,185,129,.3);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  padding: 0 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-ffmpeg:hover { background: rgba(16,185,129,.25); border-color: #10B981; }
.btn-ffmpeg.done  { background: rgba(16,185,129,.2);  border-color: #10B981; color: #10B981; }
.btn-ffmpeg.error { background: rgba(239,68,68,.12);  border-color: #EF4444; color: #EF4444; }

.btn-guide,
.btn-playlist {
  height: 34px;
  background: rgba(108,99,255,.12);
  color: var(--accent);
  border: 1.5px solid rgba(108,99,255,.3);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  padding: 0 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.btn-guide:hover,
.btn-playlist:hover { background: rgba(108,99,255,.25); border-color: var(--accent); }

@media (max-width: 1080px) {
  .btn-playlist { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 860px) {
  .btn-playlist { display: none; }
  .btn-guide { font-size: 13px; padding: 0 10px; }
  .theme-switcher { padding: 4px 8px; }
  .theme-label { display: none; }
}

.theme-select {
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(251,191,36,.28);
  background: rgba(34,29,26,.55);
  color: #ffd49b;
  font-size: 12px;
  font-weight: 700;
  padding: 0 28px 0 10px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.theme-select:focus { border-color: rgba(251,191,36,.55); }

.tools-badge { display: none; }

.accent-line { display: none; }

.hero {
  width: 100%;
  margin: 4px auto 0;
  min-height: 4px;
}
.hero-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  color: #c6c4e0;
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 900;
  background: linear-gradient(90deg, #e8eeff 0%, var(--tone-2) 35%, var(--tone-1) 70%, var(--tone-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title span {
  background: linear-gradient(135deg, var(--tone-1) 0%, var(--tone-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  margin: 14px auto 0;
  color: #b7b2cc;
  font-size: clamp(15px, 2vw, 21px);
  max-width: 760px;
  line-height: 1.58;
}
.hero-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary,
.btn-secondary {
  height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--tone-1) 0%, var(--tone-2) 100%);
  color: #1f1638;
  box-shadow: 0 12px 28px rgba(125,78,242,.3);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-secondary {
  background: rgba(51,51,72,.72);
  color: #e2e0fb;
}
.btn-secondary:hover { background: rgba(69,69,92,.8); }

/* ── License panel ────────────────────────────────────────────────────── */
.license-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(1120px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 10px 22px;
  background: rgba(17,21,38,.9);
  border-left: 1px solid rgba(108,99,255,.14);
  border-right: 1px solid rgba(108,99,255,.14);
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
.license-label { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }

.license-input-wrap { display: flex; flex: 1; gap: 0; }
.license-input-wrap input {
  flex: 1;
  height: 36px;
  background: #1e2340;
  color: var(--text);
  border: 1.5px solid #2a2d52;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.license-input-wrap input:focus { border-color: var(--accent); background: #20264a; }
.btn-eye {
  height: 36px; width: 36px;
  background: #1e2340;
  border: 1.5px solid #2a2d52;
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.btn-eye:hover { background: #252850; border-color: var(--accent); }

.btn-save {
  height: 36px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  padding: 0 20px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-save:hover { background: #5a52e0; }
.btn-save:active { background: #4a43cc; }

.license-status { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ── Scroll area ──────────────────────────────────────────────────────── */
.tools-head {
  margin: 16px 0 12px;
  padding: 10px 4px;
}
.tools-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .2em;
  font-weight: 700;
  color: #a5a2c2;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tools-head h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.tools-head p {
  color: #a9a5c1;
  max-width: 760px;
  line-height: 1.6;
}

.scroll-body {
  width: 100%;
  margin: 0 auto 10px;
  min-height: calc(100vh - 150px);
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding: 18px;
  background: rgba(30,30,49,.55);
  border-radius: 24px;
}
.scroll-body::-webkit-scrollbar { width: 6px; }
.scroll-body::-webkit-scrollbar-track { background: var(--panel); }
.scroll-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.scroll-body::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Layout: free-flow document */
body { display: block; }

/* ── Step headers ─────────────────────────────────────────────────────── */
.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.step-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.step-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(108,99,255,.12);
  border: 1px solid rgba(108,99,255,.25);
  border-radius: 20px;
  padding: 2px 12px;
  white-space: nowrap;
}
.step-badge-main {
  font-size: 12px;
  font-weight: 700;
  color: #F97316;
  background: rgba(249,115,22,.1);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: 20px;
  padding: 3px 14px;
  white-space: nowrap;
}
.step-badge-sub {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 20px;
  padding: 3px 14px;
  white-space: nowrap;
}
.step-header-sub { margin-top: 6px; }
.step-badge-num {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: #94a3b8;
  background: rgba(148,163,184,.1);
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── 2-column grid ────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.card {
  background: rgba(26,26,45,.95);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s ease, background .2s ease;
  box-shadow: 0 24px 45px rgba(13,16,32,.28);
}
.card:hover {
  background: rgba(40,40,60,.95);
  transform: translateY(-2px);
}

/* Top row */
.card-top { display: flex; align-items: center; gap: 14px; }
.card-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1.2px solid;
}
.card-meta { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.card-info-row { display: flex; align-items: center; gap: 6px; }
.card-info { font-size: 10px; }
.card-badge {
  font-size: 9px; font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Description */
.card-desc { color: #b6b3cd; font-size: 13px; line-height: 1.65; min-height: 42px; }
.card-notice {
  margin-top: 8px;
  padding: 7px 10px;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.4);
  border-radius: 6px;
  color: #F59E0B;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}

/* Divider */
.card-divider { display: none; }

/* Buttons */
.card-btns { display: flex; gap: 10px; }
.btn-flat {
  height: 40px;
  background: rgba(69,69,92,.6);
  color: #d0cee5;
  border: none;
  border-radius: 12px;
  font-size: 12px; font-weight: 700;
  font-family: inherit;
  padding: 0 14px;
  cursor: pointer;
  flex: 1;
}
.btn-flat:hover { background: rgba(69,69,92,.85); color: var(--text); }

.btn-action {
  height: 40px;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 12px; font-weight: 700;
  font-family: inherit;
  padding: 0 16px;
  cursor: pointer;
  flex: 1;
  transition: filter .15s;
}
.btn-action.launch,
.btn-action.open {
  background: linear-gradient(135deg, var(--tone-3), var(--tone-1));
}
.btn-action.launch:hover,
.btn-action.open:hover { filter: brightness(1.08); }
.btn-action.download { background: linear-gradient(135deg, var(--tone-1), var(--tone-2)); color: #24143f; }
.btn-action.download:hover { filter: brightness(1.05); }
.btn-action.busy    { background: #374151; color: #9ca3af; cursor: not-allowed; }

/* Card status */
.card-status {
  font-size: 10px; font-weight: 600;
  text-align: right;
  min-height: 14px;
  color: #a5a2bf;
}

/* ── Guide Modal (modern sample style) ───────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6,8,18,.78);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: linear-gradient(180deg, rgba(26,26,45,.96), rgba(18,19,35,.96));
  border: 1px solid rgba(251,191,36,.18);
  border-radius: 24px;
  width: 520px;
  max-width: min(92vw, 980px);
  box-shadow: 0 30px 80px rgba(249,115,22,.18);
  overflow: hidden;
}

.modal-wide {
  width: min(1080px, 94vw);
}

/* ── Guide Tabs ───────────────────────────────────────────────────────── */
.guide-tabs {
  display: flex;
  background: rgba(17,21,38,.7);
  border-bottom: 1px solid rgba(251,191,36,.15);
  padding: 10px;
  gap: 8px;
  overflow-x: auto;
}
.guide-tabs::-webkit-scrollbar { height: 5px; }
.guide-tabs::-webkit-scrollbar-thumb { background: rgba(251,191,36,.25); border-radius: 8px; }

.guide-tab {
  height: 36px;
  background: rgba(69,69,92,.45);
  border: 1px solid rgba(251,191,36,.12);
  border-radius: 999px;
  color: #cbc3d7;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, color .15s, background .15s;
}
.guide-tab:hover { color: #fff4d8; transform: translateY(-1px); }
.guide-tab.active {
  color: #2e1700;
  background: linear-gradient(135deg, var(--tone-1), var(--tone-2));
  border-color: transparent;
}

/* ── Guide Panels ─────────────────────────────────────────────────────── */
.guide-panel { display: none; flex-direction: column; gap: 14px; }
.guide-panel.active { display: flex; }

.guide-img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(251,191,36,.16);
  object-fit: cover;
}

.guide-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(251,191,36,.16);
}
.guide-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(17,21,38,.75);
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 800;
  border-bottom: 1px solid rgba(251,191,36,.15);
}
.modal-close {
  background: rgba(69,69,92,.45);
  border: 1px solid rgba(251,191,36,.18);
  color: #cbc3d7;
  font-size: 16px;
  cursor: pointer;
  width: 30px; height: 30px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(249,115,22,.2); color: #fff4ef; }

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 72vh;
  overflow-y: auto;
}
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(251,191,36,.22); border-radius: 3px; }

.guide-section {
  background: rgba(34,29,26,.45);
  border: 1px solid rgba(251,191,36,.14);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.guide-title { font-size: 13px; font-weight: 800; color: #ffd49b; }
.guide-text { font-size: 12.5px; color: #d7cfbf; line-height: 1.7; }
.guide-text b { color: #fff7ea; }
.guide-text code {
  background: rgba(69,69,92,.55);
  color: #fbbf24;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  font-family: 'Consolas', monospace;
}
.guide-tip { border-color: rgba(249,115,22,.42) !important; background: rgba(249,115,22,.13) !important; }

/* ── Notice Popup ─────────────────────────────────────────────────────── */
@keyframes noticeIn {
  from { opacity: 0; transform: translateY(-18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.notice-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 48px;
}
.notice-overlay.open { display: flex; }

.notice-modal {
  position: relative;
  width: 500px;
  max-width: 92vw;
  background: #13172b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.7), 0 0 0 1px rgba(108,99,255,.25);
  animation: noticeIn .28s cubic-bezier(.22,1,.36,1) both;
}

/* Gradient border shimmer trên cùng */
.notice-glow {
  height: 3px;
  background: linear-gradient(90deg, var(--tone-1), var(--tone-3), #00D4AA, #F97316, #EC4899, var(--tone-1));
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

.notice-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
  background: #111526;
  border-bottom: 1px solid #252840;
}
.notice-icon { font-size: 20px; }
.notice-title { font-size: 16px; font-weight: 700; flex: 1; }
.notice-badge {
  font-size: 10px; font-weight: 700;
  background: linear-gradient(135deg, var(--tone-1), var(--tone-3));
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: .5px;
}

.notice-body {
  padding: 20px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.75;
  max-height: 52vh;
  overflow-y: auto;
  white-space: pre-wrap;
}
.notice-body::-webkit-scrollbar { width: 4px; }
.notice-body::-webkit-scrollbar-thumb { background: #2a2d52; border-radius: 2px; }
.notice-loading { color: var(--muted); font-size: 12px; }
.notice-link {
  color: #818cf8;
  text-decoration: underline;
  text-decoration-color: rgba(129,140,248,.4);
  cursor: pointer;
  transition: color .15s;
}
.notice-link:hover { color: #a5b4fc; text-decoration-color: #a5b4fc; }

/* Styled notice content — headings & highlights */
.notice-body .n-heading {
  font-size: 14px; font-weight: 700;
  color: #a5b4fc;
  margin: 10px 0 4px;
  display: flex; align-items: center; gap: 6px;
}
.notice-body .n-heading:first-child { margin-top: 0; }
.notice-body .n-line {
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  border-left: 2px solid rgba(108,99,255,.5);
  border-radius: 0 6px 6px 0;
  margin-bottom: 6px;
}
.notice-body .n-warn {
  background: rgba(249,115,22,.1);
  border-left-color: #F97316;
  color: #fcd34d;
}

.notice-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: #0f1224;
  border-top: 1px solid #1e2340;
}
.btn-notice-skip {
  flex: 1;
  height: 38px;
  background: #1e2340;
  color: var(--muted);
  border: 1.5px solid #2a2d52;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-notice-skip:hover { background: #252850; color: var(--text); }
.btn-notice-close {
  height: 38px;
  padding: 0 28px;
  background: linear-gradient(135deg, #6C63FF, #2563EB);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-notice-close:hover { opacity: .88; }

@media (max-width: 640px) {
  body {
    padding: 12px 10px 14px;
  }

  .app-shell {
    width: 100%;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
    top: 6px;
    margin-bottom: -4px;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .header-left,
  .header-right {
    width: 100%;
  }

  .header-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .btn-guide,
  .btn-playlist,
  .theme-switcher,
  .theme-select {
    width: 100%;
  }

  .btn-guide,
  .btn-playlist {
    justify-content: center;
  }

  .theme-switcher {
    justify-content: space-between;
    border-radius: 14px;
    padding: 8px 10px;
  }

  .theme-label {
    display: block;
  }

  .hero {
    margin-top: 10px;
    min-height: 8px;
  }

  .hero-title {
    font-size: clamp(28px, 9vw, 40px);
    line-height: 1.12;
  }

  .tools-head {
    margin: 6px 0 8px;
    padding: 2px 2px;
  }

  .scroll-body {
    min-height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    padding: 12px;
    border-radius: 18px;
    overflow-y: auto;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .card-top {
    align-items: flex-start;
  }

  .card-name {
    font-size: 17px;
    line-height: 1.25;
  }

  .card-info-row {
    flex-wrap: wrap;
  }

  .card-desc {
    min-height: 0;
    font-size: 12.5px;
    line-height: 1.55;
  }

  .card-btns {
    flex-direction: column;
  }

  .btn-flat,
  .btn-action {
    width: 100%;
    min-height: 42px;
  }

  .card-status {
    text-align: left;
    min-height: 16px;
  }

  .visibility-settings {
    padding: 12px;
    border-radius: 14px;
  }

  .visibility-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .visibility-grid {
    gap: 6px;
  }

  .visibility-item {
    width: 100%;
    justify-content: space-between;
  }

  .modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }

  .modal,
  .modal-wide,
  .notice-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
  }

  .modal-header {
    padding: 14px 16px;
    font-size: 14px;
  }

  .guide-tabs {
    gap: 6px;
    padding: 8px;
  }

  .guide-tab {
    height: 34px;
    font-size: 11px;
    padding: 0 12px;
  }

  .modal-body {
    padding: 12px;
    max-height: 78vh;
  }

  .guide-section {
    padding: 12px;
    border-radius: 14px;
  }

  .guide-title {
    font-size: 12.5px;
  }

  .guide-text {
    font-size: 12px;
    line-height: 1.6;
  }

  .guide-img,
  .guide-video-wrap {
    border-radius: 12px;
  }

  .notice-overlay {
    padding: 12px 8px 0;
    align-items: flex-end;
  }

  .notice-header,
  .notice-body,
  .notice-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .notice-footer {
    flex-direction: column;
  }

  .btn-notice-skip,
  .btn-notice-close {
    width: 100%;
  }
}

@media (max-width: 400px) {
  .header-title {
    font-size: 20px;
  }

  .theme-switcher {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .card-top {
    gap: 10px;
  }

  .card-icon {
    width: 46px;
    height: 46px;
  }

  .card-name {
    font-size: 16px;
  }

  .guide-tab {
    font-size: 10.5px;
    padding: 0 10px;
  }
}
