:root {
  color-scheme: light;
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --text: #161821;
  --muted: #6f7485;
  --border: rgba(20, 24, 40, 0.1);
  --accent: #7357ff;
  --accent-2: #42d6c5;
  --accent-soft: rgba(115, 87, 255, 0.12);
  --danger: #d94d67;
  --shadow: 0 24px 70px rgba(27, 32, 64, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0e16;
  --surface: #141722;
  --surface-2: #1b1f2d;
  --text: #f4f5fb;
  --muted: #a1a7b8;
  --border: rgba(255, 255, 255, 0.1);
  --accent-soft: rgba(115, 87, 255, 0.2);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 16px 24px;
  pointer-events: none;
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 66px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,.18);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(10,12,30,.12);
  pointer-events: auto;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(115,87,255,.3);
}
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; font-size: 22px; margin-bottom: 20px; }
.brand strong { display: block; font-size: 15px; letter-spacing: .02em; }
.brand small { color: var(--muted); display: block; margin-top: 2px; font-size: 11px; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { padding: 10px 13px; color: var(--muted); font-size: 14px; border-radius: 10px; transition: .2s ease; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 7px; }
.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: var(--surface-2); }
.menu-button { display: none; }

.hero {
  position: relative;
  min-height: 760px;
  height: 100vh;
  overflow: hidden;
  color: #fff;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 15% 24%, rgba(111, 83, 255, .52), transparent 33%),
    radial-gradient(circle at 82% 25%, rgba(32, 216, 191, .28), transparent 26%),
    linear-gradient(125deg, #090b16 0%, #11152d 48%, #17132d 100%);
  background-size: cover;
  background-position: center;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 92%);
}
.hero-orb { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .9; animation: float 8s ease-in-out infinite; }
.hero-orb-one { width: 230px; height: 230px; left: -60px; top: 36%; background: linear-gradient(145deg, rgba(115,87,255,.45), rgba(115,87,255,0)); }
.hero-orb-two { width: 180px; height: 180px; right: 8%; bottom: 8%; background: linear-gradient(145deg, rgba(66,214,197,.36), rgba(66,214,197,0)); animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-18px) translateX(10px); } }
.hero-content { position: relative; z-index: 2; width: min(1180px, calc(100% - 48px)); margin: 55px auto 0; display: grid; grid-template-columns: 1.18fr .82fr; gap: 76px; align-items: center; }
.hero-copy h1 { margin: 0; max-width: 760px; font-size: clamp(46px, 6vw, 86px); line-height: 1.03; letter-spacing: -.055em; font-weight: 800; }
.hero-copy p { max-width: 680px; margin: 28px 0 0; color: rgba(255,255,255,.72); font-size: clamp(17px, 1.7vw, 21px); line-height: 1.85; }
.hero-actions { display: flex; gap: 13px; margin-top: 34px; flex-wrap: wrap; }
.primary-button, .ghost-button {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}
.primary-button { color: #fff; background: linear-gradient(135deg, var(--accent), #8d76ff); box-shadow: 0 12px 28px rgba(115,87,255,.28); }
.primary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.primary-button.full { width: 100%; }
.ghost-button { color: #fff; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.hero-console { width: 100%; max-width: 430px; justify-self: end; border: 1px solid rgba(255,255,255,.13); border-radius: 24px; background: rgba(9,11,24,.58); backdrop-filter: blur(18px); box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; transform: rotate(1.4deg); }
.console-top { height: 45px; display: flex; align-items: center; gap: 7px; padding: 0 17px; border-bottom: 1px solid rgba(255,255,255,.1); }
.console-top span { width: 10px; height: 10px; border-radius: 50%; background: #ff6b75; }
.console-top span:nth-child(2) { background: #ffd163; }
.console-top span:nth-child(3) { background: #54d69b; }
.console-body { padding: 26px; font-family: "SFMono-Regular", Consolas, monospace; }
.console-body > p { color: rgba(255,255,255,.63); line-height: 1.7; font-size: 13px; }
.console-body strong { font-size: 28px; display: block; margin: 18px 0 10px; }
.console-line { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.08); padding: 13px 0; font-size: 13px; color: rgba(255,255,255,.68); }
.console-line b { color: #fff; }
.console-line .online { color: #62e6bd; }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 7px; color: rgba(255,255,255,.58); font-size: 11px; letter-spacing: .12em; }

.announcement { width: min(1180px, calc(100% - 48px)); margin: 26px auto 0; padding: 14px 18px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); display: flex; align-items: center; gap: 10px; color: var(--muted); box-shadow: 0 10px 30px rgba(20,24,60,.06); }
.announcement svg { color: var(--accent); }
.topic-strip { width: min(1180px, calc(100% - 48px)); margin: 26px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.topic-item { min-height: 72px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); box-shadow: 0 9px 26px rgba(20,24,60,.05); }
.topic-item svg { color: var(--accent); }

.page-shell { width: min(1180px, calc(100% - 48px)); margin: 76px auto 90px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
.content-column { min-width: 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.section-heading p { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 8px; }
.section-heading h2 { font-size: 34px; margin: 0; letter-spacing: -.035em; }
.section-heading > span { color: var(--muted); font-size: 13px; }
.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 18px; scrollbar-width: none; }
.category-tabs button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 9px 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.category-tabs button.active { color: #fff; border-color: transparent; background: var(--accent); }
.featured-grid, .post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.featured-grid { margin-bottom: 20px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-cover { display: block; position: relative; aspect-ratio: 16/10; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-cover img { transform: scale(1.035); }
.post-cover > span { position: absolute; top: 14px; left: 14px; background: rgba(10,12,24,.72); color: #fff; backdrop-filter: blur(10px); border-radius: 999px; padding: 7px 10px; font-size: 11px; }
.post-card-body { padding: 20px; }
.post-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.post-meta span { display: flex; align-items: center; gap: 6px; }
.post-meta b { color: var(--accent); font-size: 11px; }
.post-card h3 { margin: 15px 0 10px; font-size: 21px; line-height: 1.35; letter-spacing: -.02em; }
.post-card h3 a:hover { color: var(--accent); }
.post-card-body > p { margin: 0; color: var(--muted); line-height: 1.75; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-footer { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag-row { display: flex; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.round-link { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--accent); }

.sidebar { display: grid; gap: 18px; position: sticky; top: 102px; }
.profile-card, .side-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; }
.profile-card { text-align: center; padding-bottom: 22px; }
.profile-cover { height: 98px; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 28%), linear-gradient(135deg, var(--accent), var(--accent-2)); }
.avatar { width: 86px; height: 86px; border-radius: 25px; object-fit: cover; margin: -43px auto 14px; border: 5px solid var(--surface); background: var(--surface-2); }
.profile-card h3 { margin: 0; font-size: 22px; }
.profile-card > p { color: var(--muted); line-height: 1.7; font-size: 13px; padding: 0 24px; }
.profile-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 20px 20px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.profile-stats span { color: var(--muted); font-size: 11px; }
.profile-stats b { display: block; color: var(--text); font-size: 18px; margin-bottom: 3px; }
.social-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.social-links a { background: var(--surface-2); color: var(--muted); border-radius: 9px; padding: 7px 10px; font-size: 11px; }
.side-card { padding: 20px; }
.side-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.side-title b { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud button { border: 0; background: var(--surface-2); color: var(--muted); padding: 7px 9px; border-radius: 9px; cursor: pointer; font-size: 11px; }
.tag-cloud button:hover { background: var(--accent-soft); color: var(--accent); }
.quote-card { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); }
.quote-card > span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.quote-card blockquote { margin: 15px 0 0; line-height: 1.9; font-size: 14px; }
.loading-state, .empty-state { min-height: 260px; display: grid; place-items: center; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: 22px; }

.site-footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto 28px; padding: 34px 0 8px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; }
.site-footer strong { color: var(--text); font-size: 17px; }
.site-footer p { margin: 5px 0 0; }
.footer-meta { display: grid; justify-items: end; text-align: right; gap: 2px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; margin-bottom: 3px; }
.footer-links a { color: var(--text); font-weight: 700; }
.footer-links a:hover { color: var(--accent); }
.site-footer.compact { justify-content: center; }
.site-footer.compact .footer-meta { justify-items: center; text-align: center; }

.search-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding-top: 120px; }
.search-backdrop { position: absolute; inset: 0; border: 0; background: rgba(5,7,16,.62); backdrop-filter: blur(8px); }
.search-panel { width: min(650px, calc(100% - 32px)); position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; }
.search-input-wrap { display: flex; align-items: center; gap: 11px; border: 1px solid var(--border); border-radius: 14px; padding: 0 10px 0 14px; }
.search-input-wrap input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; color: var(--text); outline: 0; }
.search-panel > p { color: var(--muted); margin: 13px 4px 2px; font-size: 12px; }

.article-page { width: min(880px, calc(100% - 40px)); margin: 0 auto; padding: 138px 0 90px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 38px; }
.article-header { text-align: center; }
.article-category { display: inline-flex; background: var(--accent-soft); color: var(--accent); padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.article-header h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.12; letter-spacing: -.045em; margin: 20px 0; }
.article-header > p { color: var(--muted); font-size: 18px; line-height: 1.8; max-width: 720px; margin: 0 auto; }
.article-meta { margin-top: 24px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.article-meta span { display: inline-flex; align-items: center; gap: 7px; }
.article-cover { width: 100%; aspect-ratio: 16/8.5; object-fit: cover; border-radius: 28px; margin: 46px 0; box-shadow: var(--shadow); }
.article-body { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.95; }
.article-body h1, .article-body h2, .article-body h3 { line-height: 1.3; letter-spacing: -.025em; margin: 2em 0 .8em; }
.article-body h1 { font-size: 34px; }
.article-body h2 { font-size: 28px; }
.article-body h3 { font-size: 22px; }
.article-body p { margin: 1.1em 0; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.article-body code { background: var(--surface-2); border-radius: 6px; padding: .15em .4em; font-size: .9em; }
.article-body pre { overflow-x: auto; background: #10131d; color: #e8ebf7; border-radius: 16px; padding: 20px; }
.article-body pre code { background: transparent; padding: 0; }
.article-body blockquote { margin: 1.5em 0; border-left: 4px solid var(--accent); padding: 10px 18px; color: var(--muted); background: var(--surface); }
.article-body img { border-radius: 16px; margin: 26px auto; }
.article-body.mini { font-size: 14px; line-height: 1.7; }
.article-body.mini h1 { font-size: 24px; }
.article-body.mini h2 { font-size: 20px; }
.center-page { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 8px; padding: 30px; }
.center-page h1 { font-size: 64px; margin: 0; }
.center-page p { color: var(--muted); }
.center-page a { color: var(--accent); }

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #0c0f1b; }
.login-visual { color: #fff; position: relative; overflow: hidden; padding: 10vw; display: flex; flex-direction: column; justify-content: flex-end; background: radial-gradient(circle at 40% 25%, rgba(115,87,255,.42), transparent 34%), radial-gradient(circle at 80% 76%, rgba(66,214,197,.22), transparent 27%); }
.login-visual h1 { font-size: clamp(58px, 8vw, 110px); line-height: .95; margin: 0; letter-spacing: -.06em; }
.login-visual p { color: rgba(255,255,255,.65); font-size: 18px; }
.login-orbit { position: absolute; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; top: 9%; left: 18%; }
.login-orbit::before, .login-orbit::after { content: ""; position: absolute; border-radius: 50%; }
.login-orbit::before { width: 26px; height: 26px; background: var(--accent-2); top: 40px; right: 42px; box-shadow: 0 0 50px rgba(66,214,197,.8); }
.login-orbit::after { inset: 60px; border: 1px solid rgba(255,255,255,.1); }
.login-card { background: var(--surface); padding: clamp(34px, 8vw, 110px); display: flex; flex-direction: column; justify-content: center; }
.login-card h2 { margin: 0 0 8px; font-size: 34px; }
.login-card > p { color: var(--muted); line-height: 1.7; margin-bottom: 26px; }
.login-card label, .editor-form > label, .settings-form > label, .field-grid label { display: grid; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.login-card input, .admin-panel input, .admin-panel textarea { width: 100%; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); color: var(--text); padding: 12px 13px; outline: 0; }
.login-card input { height: 48px; margin: 4px 0 18px; }
.login-card input:focus, .admin-panel input:focus, .admin-panel textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.text-link { color: var(--muted); text-align: center; margin-top: 16px; font-size: 12px; }
.form-message { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.form-message.error { background: rgba(217,77,103,.12); color: var(--danger); margin-bottom: 14px; }
.admin-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

.admin-app { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); background: var(--bg); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; }
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 4px 7px 24px; border-bottom: 1px solid var(--border); }
.admin-brand b, .admin-brand small { display: block; }
.admin-brand small { color: var(--muted); margin-top: 3px; font-size: 10px; }
.admin-sidebar nav { display: grid; gap: 6px; margin-top: 22px; }
.admin-sidebar nav button, .admin-sidebar-bottom button { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 11px; color: var(--muted); cursor: pointer; text-align: left; }
.admin-sidebar nav button.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.admin-sidebar-bottom { margin-top: auto; display: grid; gap: 8px; border-top: 1px solid var(--border); padding-top: 16px; }
.admin-sidebar-bottom a { color: var(--muted); font-size: 13px; padding: 10px 12px; }
.admin-main { min-width: 0; padding: 38px; }
.admin-topbar { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.admin-topbar p { margin: 0 0 5px; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; }
.admin-topbar h1 { margin: 0; font-size: 30px; }
.admin-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; }
.panel-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.post-table { display: grid; }
.post-row { display: grid; grid-template-columns: minmax(240px, 2fr) .75fr .7fr .8fr 90px; gap: 16px; align-items: center; padding: 14px 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.post-row.table-head { border-top: 0; padding-top: 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.table-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table-title img { width: 70px; height: 48px; object-fit: cover; border-radius: 9px; }
.table-title b { color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.table-title small { display: block; margin-top: 4px; color: var(--muted); }
.status { display: inline-flex; border-radius: 999px; padding: 6px 9px; font-style: normal; font-size: 11px; }
.status.published { color: #159765; background: rgba(21,151,101,.12); }
.status.draft { color: #a56f13; background: rgba(206,145,30,.13); }
.row-actions { display: flex; gap: 7px; }
.row-actions button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.row-actions button.danger { color: var(--danger); }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr); gap: 22px; align-items: start; }
.editor-form, .settings-form { display: grid; gap: 18px; }
.settings-section-title { margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.settings-section-title b { font-size: 17px; color: var(--text); }
.settings-section-title span { font-size: 11px; color: var(--muted); }
.field-grid { display: grid; gap: 16px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-panel textarea { resize: vertical; min-height: 100px; }
.admin-panel .markdown-editor { min-height: 420px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; line-height: 1.7; }
.check-row { display: flex; align-items: center; gap: 22px; }
.check-row label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.check-row input { width: auto; }
.input-action { display: flex; gap: 8px; }
.upload-button { display: inline-flex !important; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--border); color: var(--text) !important; cursor: pointer; }
.upload-button input { display: none; }
.preview-panel { position: sticky; top: 22px; max-height: calc(100vh - 44px); overflow: auto; }
.preview-label { display: inline-block; color: var(--accent); background: var(--accent-soft); padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.preview-panel > h1 { font-size: 34px; line-height: 1.2; margin: 20px 0 10px; }
.preview-excerpt { color: var(--muted); line-height: 1.7; }
.preview-panel > img { border-radius: 14px; margin: 18px 0; }
.link-editor { border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.link-editor-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.link-editor-title button { border: 0; background: var(--accent-soft); color: var(--accent); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.link-row { display: grid; grid-template-columns: .55fr 1fr 38px; gap: 8px; margin-top: 8px; }
.link-row button { border: 1px solid var(--border); background: var(--surface); color: var(--danger); border-radius: 9px; display: grid; place-items: center; cursor: pointer; }

.profile-more { margin: 16px auto 0; display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 12px; font-weight: 700; }
.about-page { width: min(1080px, calc(100% - 48px)); margin: 0 auto; padding: 138px 0 90px; }
.about-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) 360px; gap: 70px; align-items: center; min-height: 430px; padding: 54px; border: 1px solid var(--border); border-radius: 30px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.about-copy > p { margin: 0 0 14px; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.about-copy h1 { margin: 0; font-size: clamp(48px, 7vw, 82px); line-height: 1.04; letter-spacing: -.05em; }
.about-copy > div { margin-top: 24px; max-width: 650px; color: var(--muted); font-size: 18px; line-height: 1.9; }
.about-portrait { aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: var(--surface-2); }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-content-shell { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 34px; align-items: start; margin-top: 46px; }
.about-content { padding: 34px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); }
.about-aside { position: sticky; top: 110px; padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.about-aside > span { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.about-aside > strong { display: block; margin-top: 10px; font-size: 24px; }
.about-aside > p { color: var(--muted); line-height: 1.8; font-size: 13px; }

@media (max-width: 980px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; padding-top: 80px; }
  .hero-console { justify-self: start; max-width: 520px; transform: none; }
  .hero { height: auto; min-height: 900px; }
  .page-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(3, 1fr); }
  .profile-card { grid-column: span 2; }
  .topic-strip { grid-template-columns: repeat(2,1fr); }
  .about-hero { grid-template-columns: 1fr 280px; gap: 40px; padding: 40px; }
  .about-content-shell { grid-template-columns: 1fr; }
  .about-aside { position: static; }
  .admin-app { grid-template-columns: 82px minmax(0,1fr); }
  .admin-sidebar { padding: 18px 10px; }
  .admin-brand div, .admin-sidebar nav button:not(.active) { }
  .admin-brand div, .admin-sidebar nav button { font-size: 0; }
  .admin-sidebar nav button svg { width: 20px; height: 20px; }
  .admin-sidebar-bottom a { font-size: 0; }
  .admin-sidebar-bottom button { font-size: 0; }
  .editor-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; max-height: none; }
}

@media (max-width: 760px) {
  .site-header { padding: 10px 12px; }
  .header-inner { height: 58px; border-radius: 17px; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .main-nav { display: none; position: absolute; left: 12px; right: 12px; top: 74px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
  .main-nav.open { display: grid; }
  .main-nav a { padding: 12px; }
  .menu-button { display: grid; }
  .hero { min-height: 850px; }
  .hero-content { width: min(100% - 32px, 1180px); margin-top: 0; }
  .hero-copy h1 { font-size: clamp(42px, 13vw, 64px); }
  .hero-copy p { font-size: 16px; }
  .hero-console { max-width: 100%; }
  .announcement, .topic-strip, .page-shell, .site-footer { width: calc(100% - 28px); }
  .page-shell { margin-top: 56px; }
  .featured-grid, .post-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .profile-card { grid-column: auto; }
  .site-footer { flex-direction: column; }
  .footer-meta { justify-items: start; text-align: left; }
  .footer-links { justify-content: flex-start; }
  .article-page { padding-top: 112px; }
  .about-page { width: calc(100% - 28px); padding-top: 112px; }
  .about-hero { grid-template-columns: 1fr; padding: 28px; min-height: 0; }
  .about-portrait { width: min(100%, 360px); }
  .about-copy h1 { font-size: 46px; }
  .about-content { padding: 24px; }
  .article-header h1 { font-size: 40px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 34vh; padding: 34px 28px; }
  .login-visual h1 { font-size: 56px; }
  .login-card { padding: 42px 28px; }
  .admin-app { display: block; }
  .admin-sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-brand { border: 0; padding: 0 8px 0 0; }
  .admin-brand div { display: none; }
  .admin-sidebar nav { display: flex; margin: 0; }
  .admin-sidebar nav button { font-size: 0; padding: 10px; }
  .admin-sidebar-bottom { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; }
  .admin-sidebar-bottom a { display: none; }
  .admin-main { padding: 22px 14px; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .post-table { overflow-x: auto; }
  .post-row { min-width: 760px; }
  .field-grid.two { grid-template-columns: 1fr; }
  .input-action { flex-direction: column; }
  .upload-button { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ===== Visual experience v2: cinematic layout + pointer effects ===== */
body[data-page] {
  --pointer-x: 50vw;
  --pointer-y: 35vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 30%),
    radial-gradient(circle at 95% 5%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 28%),
    var(--bg);
}
body[data-page]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .72;
  background: radial-gradient(420px circle at var(--pointer-x) var(--pointer-y), rgba(115,87,255,.09), transparent 70%);
}
body[data-page] #app { position: relative; z-index: 1; animation: page-in .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.site-header { padding: 18px 24px 0; transition: padding .35s ease; }
.site-header.is-scrolled { padding-top: 10px; }
.header-inner {
  max-width: 1360px;
  height: 70px;
  padding: 0 16px 0 18px;
  border-color: rgba(255,255,255,.16);
  background: color-mix(in srgb, #101523 82%, transparent);
  box-shadow: 0 18px 50px rgba(1,5,18,.22), inset 0 1px rgba(255,255,255,.05);
  border-radius: 24px;
  transition: height .35s ease, background .35s ease, box-shadow .35s ease, border-color .35s ease;
}
:root:not([data-theme="dark"]) .header-inner {
  background: color-mix(in srgb, #fff 86%, transparent);
  border-color: rgba(20,24,40,.11);
}
.site-header.is-scrolled .header-inner { height: 62px; background: color-mix(in srgb, #101523 94%, transparent); box-shadow: 0 16px 44px rgba(1,5,18,.28); }
:root:not([data-theme="dark"]) .site-header.is-scrolled .header-inner { background: color-mix(in srgb, #fff 94%, transparent); }
.brand { min-width: 250px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg,#7b5cff 0%,#4fd9d0 100%); box-shadow: 0 12px 30px rgba(115,87,255,.34); }
.brand strong { font-size: 16px; }
.brand small { font-size: 11px; opacity: .86; }
.main-nav { padding: 5px; gap: 3px; border-radius: 14px; }
.main-nav a { position: relative; padding: 10px 16px; font-weight: 650; color: color-mix(in srgb,var(--muted) 92%,transparent); }
.main-nav a::after { content:""; position:absolute; left:16px; right:16px; bottom:5px; height:2px; border-radius:99px; background:linear-gradient(90deg,var(--accent),var(--accent-2)); transform:scaleX(0); opacity:0; transition:.25s ease; }
.main-nav a:hover::after,.main-nav a.is-active::after { transform:scaleX(1); opacity:1; }
.main-nav a.is-active { color: var(--text); background: color-mix(in srgb,var(--surface-2) 76%,transparent); }
.icon-button { transition: transform .2s ease, background .2s ease, color .2s ease; }

.hero {
  min-height: 720px;
  height: min(960px, 100svh);
  isolation: isolate;
  background:
    radial-gradient(circle at 10% 16%, rgba(111,83,255,.48), transparent 31%),
    radial-gradient(circle at 82% 20%, rgba(43,221,207,.25), transparent 27%),
    linear-gradient(128deg,#070a16 0%,#11142c 50%,#17112a 100%);
}
.hero::before {
  content:"";
  position:absolute;
  inset:-20%;
  z-index:0;
  background:
    conic-gradient(from 215deg at 32% 40%, transparent 0 22%, rgba(112,76,255,.18) 30%, transparent 42% 100%),
    conic-gradient(from 35deg at 76% 50%, transparent 0 32%, rgba(56,224,203,.12) 40%, transparent 52% 100%);
  filter: blur(35px);
  animation: aurora-drift 15s ease-in-out infinite alternate;
}
.hero::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    radial-gradient(360px circle at var(--pointer-x) var(--pointer-y), rgba(144,111,255,.16), transparent 68%),
    linear-gradient(to bottom, transparent 72%, rgba(5,7,16,.48));
}
@keyframes aurora-drift { to { transform: translate3d(3%,-2%,0) rotate(4deg) scale(1.06); } }
.hero-grid { z-index:1; background-size: 64px 64px; opacity:.9; mask-image:linear-gradient(to bottom,#000 0%,rgba(0,0,0,.8) 68%,transparent 100%); }
.hero-orb { z-index:1; }
.hero-content {
  z-index:3;
  width:min(1360px,calc(100% - 64px));
  margin:72px auto 0;
  grid-template-columns:minmax(0,1.28fr) minmax(340px,.72fr);
  gap:clamp(54px,7vw,112px);
}
.hero-copy { min-width:0; }
.hero-copy h1 {
  max-width:860px;
  font-size:clamp(54px,5.15vw,82px);
  line-height:.98;
  letter-spacing:-.065em;
  text-wrap:balance;
  text-shadow:0 14px 50px rgba(0,0,0,.18);
}
.hero-title-line { display:block; white-space:nowrap; }
.hero-title-accent { width:max-content; max-width:100%; color:transparent; background:linear-gradient(100deg,#ffffff 0%,#e9e2ff 45%,#71e8dc 100%); -webkit-background-clip:text; background-clip:text; filter:drop-shadow(0 14px 30px rgba(87,209,203,.09)); }
.hero-copy p { max-width:680px; margin-top:30px; color:rgba(242,244,255,.72); font-size:clamp(17px,1.35vw,21px); line-height:1.9; }
.hero-actions { margin-top:36px; }
.primary-button,.ghost-button { min-height:48px; border-radius:15px; padding:0 20px; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background .25s ease; }
.primary-button { background:linear-gradient(110deg,#6f4cff 0%,#8b6cff 58%,#5bd8cf 130%); box-shadow:0 18px 42px rgba(104,76,255,.32), inset 0 1px rgba(255,255,255,.28); }
.primary-button:hover { box-shadow:0 22px 48px rgba(104,76,255,.4), inset 0 1px rgba(255,255,255,.3); }
.ghost-button { background:rgba(255,255,255,.055); box-shadow:inset 0 1px rgba(255,255,255,.08); }
.ghost-button:hover { background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.3); }
.hero-console {
  max-width:440px;
  border-color:rgba(132,167,255,.16);
  border-radius:28px;
  background:linear-gradient(145deg,rgba(11,17,34,.84),rgba(8,12,25,.68));
  box-shadow:0 38px 100px rgba(0,0,0,.42),0 0 0 1px rgba(114,88,255,.08),0 0 70px rgba(68,210,202,.06);
  transform:perspective(1100px) rotateY(-4deg) rotateX(var(--tilt-x,0deg)) rotateY(calc(-4deg + var(--tilt-y,0deg)));
  transition:transform .2s ease-out,box-shadow .3s ease;
}
.hero-console::after,.tilt-surface::after { content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit; background:radial-gradient(280px circle at var(--shine-x,50%) var(--shine-y,50%),rgba(255,255,255,.1),transparent 58%); opacity:0; transition:opacity .25s ease; }
.hero-console:hover::after,.tilt-surface:hover::after { opacity:1; }
.console-body { padding:30px; }
.console-body strong { font-size:31px; letter-spacing:-.04em; }
.scroll-hint { bottom:24px; opacity:.86; animation:scroll-pulse 2.2s ease-in-out infinite; }
@keyframes scroll-pulse { 50% { transform:translateX(-50%) translateY(6px); opacity:.55; } }

.announcement { position:relative; z-index:5; margin-top:-24px; border-color:color-mix(in srgb,var(--accent) 20%,var(--border)); background:color-mix(in srgb,var(--surface) 88%,transparent); backdrop-filter:blur(18px); box-shadow:0 20px 55px rgba(14,18,46,.12); }
.topic-strip { margin-top:22px; gap:14px; }
.topic-item { min-height:78px; position:relative; overflow:hidden; transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease; }
.topic-item::before { content:""; position:absolute; inset:auto 12% -46px; height:62px; background:radial-gradient(ellipse,var(--accent-soft),transparent 70%); opacity:0; transition:.3s ease; }
.topic-item:hover { transform:translateY(-4px); border-color:color-mix(in srgb,var(--accent) 32%,var(--border)); box-shadow:0 18px 45px rgba(28,29,71,.1); }
.topic-item:hover::before { opacity:1; }
.page-shell { width:min(1240px,calc(100% - 56px)); margin-top:92px; grid-template-columns:minmax(0,1fr) 330px; gap:40px; }
.section-heading h2 { font-size:clamp(34px,3.2vw,44px); }
.post-card { position:relative; transform:perspective(900px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(0); transition:transform .22s ease-out,box-shadow .28s ease,border-color .28s ease; will-change:transform; }
.post-card:hover { transform:perspective(900px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(-6px); border-color:color-mix(in srgb,var(--accent) 24%,var(--border)); }
.post-card.featured { box-shadow:0 18px 45px rgba(31,31,78,.08); }
.post-cover::after { content:""; position:absolute; inset:0; background:linear-gradient(to top,rgba(5,7,17,.22),transparent 52%); pointer-events:none; }
.profile-card { position:relative; transform:perspective(900px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transition:transform .22s ease-out,box-shadow .25s ease; }
.profile-card:hover { box-shadow:var(--shadow); }
.profile-more { display:inline-flex; align-items:center; gap:7px; margin-top:16px; color:var(--accent); font-size:12px; font-weight:800; }
.site-footer { margin-top:30px; padding-top:40px; padding-bottom:28px; }

body[data-page="about"] { background:linear-gradient(180deg,#0a0d18 0,#10142a 520px,var(--bg) 520px); }
:root:not([data-theme="dark"]) body[data-page="about"] { background:linear-gradient(180deg,#10142a 0,#17182e 520px,var(--bg) 520px); }
.about-page { width:min(1180px,calc(100% - 56px)); padding:142px 0 100px; }
.about-hero {
  position:relative;
  min-height:520px;
  grid-template-columns:minmax(0,1.18fr) 360px;
  gap:clamp(48px,8vw,100px);
  padding:64px 70px;
  border-color:rgba(255,255,255,.12);
  color:#fff;
  background:
    radial-gradient(circle at 10% 20%,rgba(111,83,255,.36),transparent 36%),
    radial-gradient(circle at 90% 12%,rgba(42,218,204,.18),transparent 28%),
    linear-gradient(135deg,rgba(15,18,42,.94),rgba(10,14,29,.94));
  box-shadow:0 42px 110px rgba(1,5,18,.34);
}
.about-hero::before { content:""; position:absolute; inset:0; pointer-events:none; background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px); background-size:54px 54px; mask-image:linear-gradient(110deg,#000,transparent 88%); }
.about-copy { position:relative; z-index:2; }
.about-copy .back-link { margin-bottom:54px; color:rgba(255,255,255,.68); }
.about-copy > p { color:#76e1d6; }
.about-copy h1 { max-width:620px; font-size:clamp(58px,6.3vw,86px); color:#fff; }
.about-copy > div:not(.about-signature) { color:rgba(243,245,255,.72); font-size:19px; max-width:620px; }
.about-signature { display:flex; align-items:center; gap:14px; margin-top:34px; }
.about-signature span { font-size:18px; font-weight:800; }
.about-signature b { color:rgba(255,255,255,.52); font-size:12px; letter-spacing:.08em; }
.about-portrait { position:relative; z-index:2; aspect-ratio:4/5; border:1px solid rgba(255,255,255,.15); border-radius:28px; overflow:hidden; background:#11182b; transform:perspective(900px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) rotate(1.4deg); transition:transform .22s ease-out; box-shadow:0 34px 75px rgba(0,0,0,.32); }
.about-portrait img { position:relative; z-index:1; }
.portrait-halo { position:absolute; inset:-12%; background:radial-gradient(circle at 55% 25%,rgba(113,92,255,.6),transparent 42%),radial-gradient(circle at 35% 80%,rgba(71,218,207,.36),transparent 42%); filter:blur(20px); }
.portrait-caption { position:absolute; z-index:3; left:16px; right:16px; bottom:16px; padding:14px 15px; border:1px solid rgba(255,255,255,.14); border-radius:16px; background:rgba(7,11,23,.72); backdrop-filter:blur(14px); }
.portrait-caption b { display:block; color:#fff; }
.portrait-caption span { display:block; margin-top:4px; color:rgba(255,255,255,.6); font-size:11px; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.about-content-shell { margin-top:54px; grid-template-columns:minmax(0,1fr) 300px; gap:40px; }
.about-content,.about-aside { box-shadow:0 18px 55px rgba(20,24,60,.07); }

.magnetic { transform:translate3d(var(--magnetic-x,0),var(--magnetic-y,0),0); }
.icon-button.magnetic,.main-nav a.magnetic,.round-link.magnetic,.profile-more.magnetic { transition:transform .18s ease-out,background .2s ease,color .2s ease; }
.primary-button.magnetic,.ghost-button.magnetic { transform:translate3d(var(--magnetic-x,0),var(--magnetic-y,0),0); }

.reveal-item { opacity:0; transform:translateY(24px); filter:blur(5px); transition:opacity .7s cubic-bezier(.2,.7,.2,1) var(--reveal-delay,0ms),transform .7s cubic-bezier(.2,.7,.2,1) var(--reveal-delay,0ms),filter .7s ease var(--reveal-delay,0ms); }
.reveal-item.is-visible { opacity:1; transform:none; filter:none; }

.cursor-trail { position:fixed; inset:0; z-index:9997; pointer-events:none; }
.cursor-ring,.cursor-dot { position:fixed; top:0; left:0; z-index:9999; pointer-events:none; border-radius:50%; transform:translate3d(-100px,-100px,0); will-change:transform; }
.cursor-ring { width:34px; height:34px; margin:-17px 0 0 -17px; border:1px solid rgba(134,105,255,.8); box-shadow:0 0 24px rgba(112,81,255,.18),inset 0 0 14px rgba(83,225,211,.08); transition:width .2s ease,height .2s ease,margin .2s ease,background .2s ease,border-color .2s ease; }
.cursor-dot { width:5px; height:5px; margin:-2.5px 0 0 -2.5px; background:#80ece0; box-shadow:0 0 14px rgba(82,226,212,.9); }
.cursor-ring.is-active { width:52px; height:52px; margin:-26px 0 0 -26px; border-color:rgba(82,226,212,.7); background:rgba(112,81,255,.08); }
.cursor-ring.is-down { width:25px; height:25px; margin:-12.5px 0 0 -12.5px; }
.click-ripple { position:fixed; z-index:9998; width:16px; height:16px; margin:-8px 0 0 -8px; pointer-events:none; border:1px solid rgba(99,230,217,.8); border-radius:50%; animation:click-wave .65s ease-out forwards; }
@keyframes click-wave { to { opacity:0; transform:scale(6); border-color:rgba(117,88,255,.15); } }
.has-custom-cursor body[data-page],.has-custom-cursor body[data-page] a,.has-custom-cursor body[data-page] button { cursor:none; }

@media (max-width:1100px) {
  .hero-content { width:min(100% - 48px,1180px); grid-template-columns:minmax(0,1.1fr) minmax(310px,.72fr); gap:46px; }
  .hero-copy h1 { font-size:clamp(52px,6vw,72px); }
  .hero-title-line { white-space:normal; }
  .about-hero { grid-template-columns:minmax(0,1fr) 300px; padding:54px; }
}

@media (max-width:760px) {
  .site-header { padding:10px 12px 0; }
  .header-inner { height:62px; border-radius:19px; }
  .brand { min-width:0; }
  .brand-mark { width:38px; height:38px; }
  .brand small { display:none; }
  .hero { height:auto; min-height:100svh; padding:142px 0 92px; }
  .hero-content { width:calc(100% - 32px); margin:0 auto; grid-template-columns:1fr; gap:48px; }
  .hero-copy h1 { max-width:100%; font-size:clamp(44px,13vw,62px); line-height:1.02; }
  .hero-title-line { white-space:normal; }
  .hero-copy p { font-size:16px; line-height:1.8; }
  .hero-console { max-width:100%; transform:none; }
  .scroll-hint { display:none; }
  .announcement { margin-top:-14px; }
  .topic-strip { grid-template-columns:repeat(2,1fr); }
  .page-shell { width:calc(100% - 28px); margin-top:68px; }
  body[data-page="about"] { background:linear-gradient(180deg,#0b0e1c 0,#12152c 700px,var(--bg) 700px); }
  .about-page { width:calc(100% - 28px); padding-top:112px; }
  .about-hero { min-height:0; grid-template-columns:1fr; padding:30px; gap:38px; }
  .about-copy .back-link { margin-bottom:38px; }
  .about-copy h1 { font-size:50px; }
  .about-copy > div:not(.about-signature) { font-size:16px; }
  .about-signature { align-items:flex-start; flex-direction:column; gap:6px; }
  .about-portrait { width:min(100%,350px); margin:0 auto; transform:none; }
  .about-content-shell { margin-top:30px; gap:24px; }
}

@media (pointer:coarse) {
  .cursor-trail,.cursor-ring,.cursor-dot { display:none!important; }
  .magnetic { transform:none!important; }
}

@media (prefers-reduced-motion:reduce) {
  body[data-page] #app,.hero::before,.scroll-hint,.reveal-item { animation:none!important; transition:none!important; }
  .reveal-item { opacity:1; transform:none; filter:none; }
  .cursor-trail,.cursor-ring,.cursor-dot,.click-ripple { display:none!important; }
  .hero-console,.post-card,.profile-card,.about-portrait,.magnetic { transform:none!important; }
}


/* Layout Studio v3: balanced header, adjustable hero, and restrained motion. */
:root {
  --header-max-width: 1320px;
  --header-height: 68px;
  --nav-gap: 6px;
  --nav-font-size: 15px;
  --hero-max-width: 1320px;
  --hero-title-size: 76px;
  --hero-title-width: 790px;
  --hero-gap: 64px;
  --surface-roundness: 22px;
  --effect-strength: .72;
  --effect-opacity: .70;
  --orb-opacity: .82;
}
.site-header { padding: 16px 22px 0; }
.header-inner {
  width: min(var(--header-max-width), calc(100vw - 44px));
  max-width: none;
  height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: stretch;
  gap: 18px;
  padding: 0 14px 0 16px;
  border-radius: var(--surface-roundness);
}
.brand { min-width: 0; max-width: 100%; justify-self: start; overflow: hidden; }
.brand > span:last-child { min-width: 0; }
.brand strong,.brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-nav { justify-self: center; gap: var(--nav-gap); min-width: max-content; }
.main-nav a { font-size: var(--nav-font-size); padding: 10px 14px; }
.header-actions { justify-self: end; min-width: 0; }

.hero-content {
  width: min(var(--hero-max-width), calc(100% - 56px));
  grid-template-columns: minmax(0, 1.38fr) minmax(330px, .62fr);
  gap: var(--hero-gap);
  margin-top: 58px;
}
.hero-copy { min-width: 0; }
.hero-copy h1 {
  max-width: var(--hero-title-width);
  font-size: clamp(48px, 5.2vw, var(--hero-title-size));
  line-height: .98;
  letter-spacing: -.06em;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: keep-all;
}
.hero-title-line { display: block; white-space: normal; width: fit-content; max-width: 100%; }
.hero-title-line + .hero-title-line { margin-top: .03em; }
.hero-console { max-width: 420px; transform: rotate(.55deg); }
body[data-page="home"]::before { opacity: var(--effect-opacity); }
.hero-orb { opacity: var(--orb-opacity); }

@media (max-width: 1080px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .brand small { display: none; }
  .hero-content { grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); gap: 36px; }
  .hero-copy h1 { font-size: clamp(48px, 6.5vw, 70px); }
}
@media (max-width: 760px) {
  .site-header { padding: 10px 12px 0; }
  .header-inner { width: calc(100vw - 24px); display:flex; height:62px; }
  .brand { flex:1; }
  .main-nav { min-width:0; }
  .hero-content { width: min(100% - 30px, 620px); grid-template-columns:1fr; gap:28px; margin-top:84px; }
  .hero-copy h1 { max-width:100%; font-size:clamp(42px,13vw,62px); line-height:1.02; }
  .hero-console { max-width:none; justify-self:stretch; }
}

.appearance-layout { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr); gap:20px; align-items:start; }
.appearance-controls { display:grid; gap:17px; }
.settings-section-title.no-border { border-top:0; margin-top:0; padding-top:0; }
.range-field { display:grid; gap:9px; }
.range-field > span { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.range-field output { color:var(--accent); font-size:12px; font-weight:800; min-width:64px; text-align:right; }
.range-field input[type="range"] { width:100%; accent-color:var(--accent); }
.color-grid input[type="color"] { min-height:46px; padding:5px; cursor:pointer; }
.appearance-actions { display:flex; justify-content:space-between; gap:12px; margin-top:5px; }
.ghost-admin-button { border:1px solid var(--border); background:var(--surface-2); border-radius:12px; padding:0 16px; min-height:44px; cursor:pointer; }
.appearance-preview-panel { position:sticky; top:26px; overflow:hidden; }
.mini-site-preview { --pv-accent:#7c5cff; --pv-accent2:#2fd5c4; --pv-header-h:49px; --pv-nav-gap:4px; --pv-nav-font:11px; --pv-title-size:39px; --pv-title-width:62%; --pv-radius:16px; min-height:500px; padding:18px; color:#fff; border-radius:18px; overflow:hidden; background:radial-gradient(circle at 12% 20%,color-mix(in srgb,var(--pv-accent) 58%,transparent),transparent 36%),radial-gradient(circle at 88% 18%,color-mix(in srgb,var(--pv-accent2) 34%,transparent),transparent 28%),linear-gradient(135deg,#090b18,#11162b 54%,#0e1930); }
.mini-header { min-height:var(--pv-header-h); display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:10px; padding:7px 10px; border:1px solid rgba(255,255,255,.16); border-radius:var(--pv-radius); background:rgba(11,15,29,.72); }
.mini-brand { display:flex; align-items:center; gap:7px; min-width:0; }
.mini-brand i { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; font-style:normal; background:linear-gradient(135deg,var(--pv-accent),var(--pv-accent2)); }
.mini-brand b,.mini-brand small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mini-brand b { font-size:10px; }.mini-brand small { font-size:7px;color:rgba(255,255,255,.55); }
.mini-nav { display:flex; gap:var(--pv-nav-gap); justify-self:center; }
.mini-nav span { padding:6px 7px; font-size:var(--pv-nav-font); color:rgba(255,255,255,.7); }
.mini-actions { justify-self:end; color:rgba(255,255,255,.76); font-size:11px; letter-spacing:4px; }
.mini-hero { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(150px,.7fr); gap:22px; align-items:center; min-height:390px; padding:34px 16px 10px; }
.mini-hero h2 { width:var(--pv-title-width); max-width:100%; margin:0; font-size:var(--pv-title-size); line-height:1; letter-spacing:-.06em; text-wrap:balance; }
.mini-hero p { max-width:72%; color:rgba(255,255,255,.65); font-size:10px; line-height:1.7; }
.mini-hero button { border:0;border-radius:9px;padding:9px 13px;color:#fff;background:linear-gradient(135deg,var(--pv-accent),color-mix(in srgb,var(--pv-accent) 65%,#fff)); }
.mini-hero aside { min-height:190px; display:flex; flex-direction:column; justify-content:center; gap:10px; padding:18px; border:1px solid rgba(255,255,255,.14); border-radius:var(--pv-radius); background:rgba(4,10,21,.56); transform:rotate(.7deg); }
.mini-hero aside b { font-size:20px; }.mini-hero aside span { color:rgba(255,255,255,.55); font-size:9px; line-height:1.6; }
.appearance-tip { margin:12px 2px 0;color:var(--muted);font-size:12px;line-height:1.7; }
@media(max-width:1060px){.appearance-layout{grid-template-columns:1fr}.appearance-preview-panel{position:static}.mini-site-preview{min-height:430px}}
@media(max-width:620px){.mini-nav{display:none}.mini-site-preview{padding:10px}.mini-hero{grid-template-columns:1fr}.mini-hero h2,.mini-hero p{width:100%;max-width:100%}.appearance-actions{flex-direction:column}.appearance-actions>*{width:100%}}

/* Growth, privacy, SEO and media tools */
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 9999; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: #fff; transition: top .2s ease; }
.skip-link:focus { top: 14px; }
.load-more-wrap { display: flex; justify-content: center; padding: 28px 0 4px; }
.load-more-wrap .ghost-button { color: var(--text); border-color: var(--border); background: var(--surface); min-width: 180px; }

.legal-page { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 154px 0 96px; }
.legal-hero { padding: 42px 0 38px; border-bottom: 1px solid var(--border); }
.legal-hero > p { margin: 24px 0 10px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.legal-hero h1 { margin: 0; font-size: clamp(42px, 7vw, 78px); letter-spacing: -.055em; line-height: 1; }
.legal-hero > div { margin-top: 22px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.legal-hero > span { display: inline-block; margin-top: 16px; color: var(--muted); font-size: 12px; }
.legal-content { padding: 42px 0 10px; }

.seo-header { width: min(1180px, calc(100% - 40px)); margin: 24px auto 0; min-height: 64px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.seo-brand { font-weight: 800; }
.seo-header nav { display: flex; gap: 14px; color: var(--muted); font-size: 14px; }
.seo-fallback { width: min(920px, calc(100% - 40px)); margin: 70px auto 90px; }
.seo-fallback .seo-hero { padding: 48px 0; }
.seo-fallback .seo-hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.03; letter-spacing: -.055em; margin: 0; }
.seo-fallback .seo-hero p { color: var(--muted); font-size: 18px; line-height: 1.8; }
.seo-post-list { display: grid; gap: 16px; }
.seo-post-list article { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.seo-post-list h2 { margin: 0 0 8px; font-size: 20px; }
.seo-post-list p { margin: 0; color: var(--muted); line-height: 1.7; }
.seo-fallback > article > h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.08; letter-spacing: -.04em; }
.seo-fallback > article > p { color: var(--muted); line-height: 1.8; }
.seo-fallback > article img { width: 100%; border-radius: 20px; margin: 24px 0; }
.seo-footer { width: min(920px, calc(100% - 40px)); margin: 0 auto 28px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; gap: 18px; color: var(--muted); font-size: 13px; }

.admin-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.summary-card { min-height: 112px; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; }
.summary-card span { color: var(--muted); font-size: 12px; }
.summary-card b { font-size: 32px; letter-spacing: -.04em; }
.row-actions a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); }

.settings-details { border: 1px solid var(--border); border-radius: 16px; padding: 0 16px 16px; background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.settings-details summary { padding: 16px 0; font-weight: 800; cursor: pointer; }
.seo-score-card { display: grid; gap: 14px; margin-top: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.seo-score-head { display: grid; gap: 10px; }
.seo-score-head > div { display: flex; align-items: baseline; justify-content: space-between; }
.seo-score-head span { color: var(--muted); font-size: 12px; }
.seo-score-head b { font-size: 28px; color: var(--accent); }
progress { width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
progress::-webkit-progress-bar { background: var(--surface-2); }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.seo-checklist { display: grid; gap: 8px; }
.seo-checklist span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.seo-checklist .ok { color: #2ca77f; }
.seo-checklist .warn { color: #d78a32; }
.seo-warning { margin: 0; padding: 10px 12px; border-radius: 10px; color: #d78a32; background: color-mix(in srgb, #d78a32 12%, transparent); font-size: 12px; }

.seo-admin-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 20px; align-items: start; }
.seo-health-panel { position: sticky; top: 24px; display: grid; gap: 16px; }
.health-score { display: flex; align-items: baseline; gap: 5px; }
.health-score b { font-size: 54px; line-height: 1; letter-spacing: -.06em; color: var(--accent); }
.health-score span { color: var(--muted); }
.seo-tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seo-tools a { padding: 11px 12px; border-radius: 10px; text-align: center; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.seo-tools a:hover { color: var(--accent); }
.info-box { padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.info-box b { font-size: 13px; }
.info-box p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.seo-admin-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.privacy-editor { min-height: 420px; }
.settings-form label small { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.media-overview { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.media-overview > div { min-width: 0; flex: 1; }
.media-overview span { color: var(--muted); font-size: 12px; }
.media-overview b { display: block; margin: 8px 0 12px; font-size: 28px; }
.media-overview b small { color: var(--muted); font-size: 13px; font-weight: 500; }
.media-overview p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.media-upload { flex: 0 0 auto; position: relative; overflow: hidden; }
.media-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.media-card { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.media-card > a { display: block; aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.media-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.media-card:hover img { transform: scale(1.035); }
.media-card > div { padding: 13px; }
.media-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.media-card > div > span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.media-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.media-card-actions button { border: 0; border-radius: 9px; padding: 7px 9px; display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); cursor: pointer; font-size: 11px; }
.media-card-actions button:not(:disabled):hover { color: var(--danger); }
.media-card-actions button:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 1100px) {
  .seo-admin-layout { grid-template-columns: 1fr; }
  .seo-health-panel { position: static; }
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .admin-summary-grid { grid-template-columns: 1fr; }
  .seo-admin-actions, .media-overview { align-items: stretch; flex-direction: column; }
  .media-upload { width: 100%; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-header { flex-direction: column; align-items: flex-start; padding: 16px; }
  .seo-header nav { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .media-grid { grid-template-columns: 1fr; }
  .seo-tools { grid-template-columns: 1fr; }
  .legal-page { padding-top: 110px; }
}

/* Interactive quote, daily music and Markdown image editor */
.article-image { margin: 2rem 0; }
.article-image img { display: block; width: 100%; max-height: 760px; object-fit: contain; border-radius: calc(var(--surface-roundness) * .75); background: var(--surface-2); box-shadow: 0 18px 50px rgba(0,0,0,.14); }
.article-image figcaption { margin-top: 10px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.article-body ol { padding-left: 1.4em; line-height: 1.9; }

.side-title .card-switch { border: 0; padding: 6px 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-size: 10px; }
.side-title .card-switch:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.interactive-quote blockquote { min-height: 54px; }
.interactive-quote cite { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; font-style: normal; text-align: right; }
.interactive-quote blockquote.is-changing { animation: quote-change .38s ease; }
@keyframes quote-change { 0% { opacity: .15; transform: translateY(7px); } 100% { opacity: 1; transform: none; } }

.music-card { overflow: hidden; }
.music-summary { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px; align-items: center; margin-top: 15px; }
.music-summary > img,.music-art-placeholder { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 65%, #11162b), color-mix(in srgb, var(--accent-2) 60%, #11162b)); }
.music-art-placeholder { display: grid; place-items: center; color: white; }
.music-summary > div { min-width: 0; }
.music-summary b,.music-summary span,.music-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-summary b { font-size: 14px; }
.music-summary span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.music-summary small { margin-top: 3px; color: var(--accent-2); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.music-consent { min-height: 76px; margin-top: 14px; padding: 12px; display: grid; gap: 10px; place-items: center; border: 1px solid var(--border); border-radius: 13px; background: color-mix(in srgb, var(--surface-2) 74%, transparent); text-align: center; }
.music-consent p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.music-load,.music-open-link { border: 0; border-radius: 10px; padding: 9px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 65%,#fff)); color: #fff; font-size: 11px; font-weight: 750; cursor: pointer; }
.music-embed { display: block; width: 100%; border: 0; border-radius: 11px; background: var(--surface-2); }
.music-embed.video { aspect-ratio: 16/9; height: auto; }
.music-error { color: #d78a32; font-size: 11px; line-height: 1.5; }
.music-source { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.music-source:hover { color: var(--accent); }

.markdown-field { display: block; }
.markdown-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 8px; border: 1px solid var(--border); border-bottom: 0; border-radius: 13px 13px 0 0; background: var(--surface-2); }
.markdown-toolbar button,.markdown-upload { min-height: 32px; border: 1px solid transparent; border-radius: 8px; padding: 6px 9px; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); background: var(--surface); cursor: pointer; font: inherit; font-size: 11px; }
.markdown-toolbar button:hover,.markdown-upload:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); }
.markdown-upload { position: relative; overflow: hidden; }
.markdown-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.markdown-field .markdown-editor { margin-top: 0; border-radius: 0 0 13px 13px; }
.markdown-editor.is-dropping { outline: 3px solid color-mix(in srgb,var(--accent) 55%,transparent); background: color-mix(in srgb,var(--accent) 7%,var(--surface)); }
.markdown-help { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.media-picker-overlay { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 24px; }
.media-picker-backdrop { position: absolute; inset: 0; border: 0; background: rgba(3,6,16,.78); backdrop-filter: blur(10px); }
.media-picker-panel { position: relative; width: min(980px,100%); max-height: min(760px,88vh); overflow: auto; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.media-picker-panel > header { position: sticky; top: 0; z-index: 2; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); background: color-mix(in srgb,var(--surface) 90%,transparent); backdrop-filter: blur(18px); }
.media-picker-panel header b,.media-picker-panel header span { display: block; }
.media-picker-panel header span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.media-picker-loading { padding: 50px; color: var(--muted); text-align: center; }
.media-picker-grid { padding: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.media-picker-grid button { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; padding: 0; background: var(--surface-2); cursor: pointer; text-align: left; }
.media-picker-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.media-picker-grid span { display: block; padding: 9px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.media-picker-grid button:hover { border-color: var(--accent); transform: translateY(-2px); }
.media-card-actions > span { display: flex; gap: 5px; }

.widgets-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); gap: 20px; align-items: start; }
.widget-help { position: sticky; top: 24px; display: grid; gap: 12px; }
.quote-editor { min-height: 210px; }
.music-editor-item { margin-top: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb,var(--surface-2) 70%,transparent); }
.music-editor-head { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.music-editor-head button { border: 0; border-radius: 8px; padding: 7px 9px; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 11px; }
.music-editor-head button:hover { color: var(--danger); }
.widget-actions { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-form select { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 11px; padding: 0 12px; color: var(--text); background: var(--surface-2); }

@media (max-width: 1060px) {
  .widgets-layout { grid-template-columns: 1fr; }
  .widget-help { position: static; }
  .media-picker-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .media-picker-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .widget-actions { align-items: stretch; flex-direction: column; }
  .widget-actions > * { width: 100%; }
}


/* Simple music editor */
.simple-music-item .music-main-url { margin-top: 8px; }
.music-easy-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.music-upload-button { min-height: 42px; }
.music-detect-status {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 13px;
  border: 1px solid color-mix(in srgb,var(--accent) 42%,var(--border));
  border-radius: 11px; color: var(--accent-2); background: color-mix(in srgb,var(--accent) 8%,transparent);
  font-size: 12px; font-weight: 700;
}
.music-simple-tip { display: block; margin-top: 9px; color: var(--muted); line-height: 1.7; }
.music-advanced { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.music-advanced summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; }
.music-advanced[open] summary { margin-bottom: 12px; color: var(--text); }
.music-advanced label + label { margin-top: 10px; }
@media (max-width: 640px) {
  .music-easy-actions { align-items: stretch; }
  .music-easy-actions > * { width: 100%; justify-content: center; }
}

.media-audio-preview {
  min-height: 142px; display: flex !important; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--accent-2); background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb,var(--accent) 34%,transparent), transparent 42%),
    radial-gradient(circle at 80% 75%, color-mix(in srgb,var(--accent-2) 28%,transparent), transparent 40%),
    var(--surface-2);
}
.media-audio-preview span { color: var(--muted); font-size: 12px; }

/* Reliable simple music controls */
.music-item-feedback { display:block; min-height:1.4em; margin-top:10px; color:var(--muted); }
.music-item-feedback.success { color:#55dbc5; }
.music-item-feedback.error { color:#ff6f91; }
.music-upload-button[disabled] { opacity:.55; cursor:wait; }
.music-easy-actions { flex-wrap:wrap; }
.music-consent audio { width:100%; min-height:54px; }
.music-consent .music-load { cursor:pointer; }

/* Article video embeds */
.article-video { margin: 2rem 0; }
.article-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--border); border-radius: calc(var(--surface-roundness) * .78); background: #050712; box-shadow: 0 22px 60px rgba(0,0,0,.22); }
.article-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-video > video { display: block; width: 100%; max-height: 76vh; border: 1px solid var(--border); border-radius: calc(var(--surface-roundness) * .78); background: #050712; box-shadow: 0 22px 60px rgba(0,0,0,.22); }
.article-video figcaption { margin-top: 10px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.article-video-fallback { margin: 1.5rem 0; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); text-align: center; }
.article-video-fallback a { color: var(--accent-2); font-weight: 750; }
.article-body.mini .article-video { margin: 1rem 0; }
.article-body.mini .article-video-frame { border-radius: 12px; }

/* Music cards intentionally stay audio-only */
.music-external-note { width: 100%; display: grid; gap: 10px; place-items: center; }
.music-external-note p { margin: 0; }

@media (max-width: 640px) {
  .article-video { margin: 1.35rem -2px; }
  .article-video-frame { border-radius: 14px; }
}

/* ===== Opening animation ===== */
html.site-intro-active,
html.site-intro-active body {
  overflow: hidden;
}

.site-intro[hidden] {
  display: none !important;
}

.site-intro {
  --intro-duration: 1800ms;
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f8f9ff;
  background:
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--accent) 18%, transparent) 0, transparent 23%),
    radial-gradient(circle at 57% 54%, color-mix(in srgb, var(--accent-2) 10%, transparent) 0, transparent 28%),
    #15151c;
  opacity: 1;
  visibility: visible;
  transition: opacity .52s ease, visibility .52s ease, filter .52s ease;
}

.site-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 68%);
  opacity: .5;
}

.site-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  filter: blur(12px);
  pointer-events: none;
}

.site-intro-progress {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  width: min(86px, 18vw);
  height: 5px;
  transform: translateX(-50%);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.17);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04);
}

.site-intro-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7aa8ff 52%, var(--accent-2));
  box-shadow: 0 0 15px color-mix(in srgb, var(--accent) 65%, transparent);
}

.site-intro.is-running .site-intro-progress span {
  animation: site-intro-progress var(--intro-duration) cubic-bezier(.2,.72,.18,1) forwards;
}

.site-intro-skip {
  position: absolute;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 8px 14px;
  color: rgba(255,255,255,.64);
  background: rgba(255,255,255,.045);
  backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: .25s ease;
}

.site-intro.is-running .site-intro-skip {
  opacity: 1;
  transform: none;
  transition-delay: .35s;
}

.site-intro-skip:hover {
  color: #fff;
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.09);
}

.site-intro-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
  transform: translateY(10px) scale(.94);
  opacity: 0;
}

.site-intro.is-running .site-intro-center {
  animation: site-intro-center-in .82s cubic-bezier(.16,1,.3,1) forwards;
}

.site-intro-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  height: 170px;
  margin: -108px 0 0 -85px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 50%;
  opacity: .45;
  animation: site-intro-orbit 7s linear infinite;
}

.site-intro-orbit::before,
.site-intro-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.site-intro-orbit::before {
  width: 8px;
  height: 8px;
  top: 12px;
  left: 33px;
  background: var(--accent-2);
  box-shadow: 0 0 18px var(--accent-2);
}

.site-intro-orbit::after {
  inset: 18px;
  border: 1px dashed color-mix(in srgb, var(--accent-2) 20%, transparent);
}

.site-intro-avatar {
  position: relative;
  width: 106px;
  height: 106px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(145deg, #d9dbe2, #8b8e98);
  box-shadow:
    0 24px 70px rgba(0,0,0,.4),
    0 0 0 8px rgba(255,255,255,.025),
    0 0 55px color-mix(in srgb, var(--accent) 22%, transparent);
}

.site-intro-avatar.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-intro-avatar.is-generated {
  --avatar-bg-1: #c8cbd4;
  --avatar-bg-2: #8b8f99;
  --avatar-skin: #b9bbc2;
  --avatar-hair: #15161b;
  --avatar-shirt: #171820;
  background: linear-gradient(145deg, var(--avatar-bg-1), var(--avatar-bg-2));
}

.site-intro-avatar[data-avatar-variant="1"] { --avatar-bg-1:#c8c5e8; --avatar-bg-2:#6e65a6; --avatar-skin:#c9c4d5; --avatar-hair:#20202b; --avatar-shirt:#3a315d; }
.site-intro-avatar[data-avatar-variant="2"] { --avatar-bg-1:#b9d8d3; --avatar-bg-2:#4c817c; --avatar-skin:#c8d0cd; --avatar-hair:#16211f; --avatar-shirt:#214943; }
.site-intro-avatar[data-avatar-variant="3"] { --avatar-bg-1:#e1c7bb; --avatar-bg-2:#9b695a; --avatar-skin:#d2b9ae; --avatar-hair:#281d1a; --avatar-shirt:#57372f; }
.site-intro-avatar[data-avatar-variant="4"] { --avatar-bg-1:#c5d4eb; --avatar-bg-2:#55759f; --avatar-skin:#c7cbd3; --avatar-hair:#161a22; --avatar-shirt:#24364f; }
.site-intro-avatar[data-avatar-variant="5"] { --avatar-bg-1:#d9c5df; --avatar-bg-2:#785a84; --avatar-skin:#cec1d1; --avatar-hair:#211723; --avatar-shirt:#49334f; }

.intro-avatar-halo {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
}

.intro-avatar-head {
  position: absolute;
  z-index: 3;
  width: 39px;
  height: 48px;
  top: 25px;
  left: 39px;
  border-radius: 47% 46% 45% 48%;
  background: var(--avatar-skin);
  transform: rotate(-4deg);
  box-shadow: inset -5px -3px 0 rgba(0,0,0,.05);
}

.intro-avatar-head::before {
  content: "";
  position: absolute;
  right: -4px;
  top: 20px;
  width: 8px;
  height: 12px;
  border-radius: 50%;
  background: var(--avatar-skin);
}

.intro-avatar-head::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 23px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(17,18,22,.78);
}

.intro-avatar-hair {
  position: absolute;
  z-index: 4;
  top: 17px;
  left: 33px;
  width: 50px;
  height: 33px;
  border-radius: 58% 50% 34% 38%;
  background: var(--avatar-hair);
  transform: rotate(-7deg);
  clip-path: polygon(0 16%, 22% 1%, 49% 5%, 72% 0, 100% 23%, 92% 72%, 77% 54%, 60% 76%, 46% 48%, 24% 67%, 12% 45%);
}

.intro-avatar-neck {
  position: absolute;
  z-index: 2;
  top: 65px;
  left: 49px;
  width: 23px;
  height: 22px;
  background: var(--avatar-skin);
  transform: rotate(-5deg);
}

.intro-avatar-body {
  position: absolute;
  z-index: 2;
  left: 22px;
  bottom: -14px;
  width: 80px;
  height: 55px;
  border-radius: 48% 45% 0 0;
  background: var(--avatar-shirt);
  transform: rotate(-4deg);
}

.intro-avatar-body::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 0;
  width: 24px;
  height: 19px;
  background: rgba(255,255,255,.82);
  clip-path: polygon(0 0, 50% 100%, 100% 0, 78% 5%, 50% 65%, 20% 4%);
}

.site-intro-title {
  max-width: min(80vw, 440px);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .16em;
  color: rgba(255,255,255,.72);
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
}

.site-intro.is-running .site-intro-title {
  animation: site-intro-title-in .55s .28s ease forwards;
}

@keyframes site-intro-progress { to { transform: scaleX(1); } }
@keyframes site-intro-center-in { to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes site-intro-title-in { to { opacity:1; transform:none; } }
@keyframes site-intro-orbit { to { transform: rotate(360deg); } }

/* Admin preview */
.intro-avatar-actions {
  justify-content: flex-start;
  margin-top: -4px;
}

.intro-admin-preview {
  position: relative;
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  overflow: hidden;
  margin: 18px 0 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: #f8f9ff;
  background:
    radial-gradient(circle at center, rgba(124,92,255,.18), transparent 34%),
    #15151c;
  transition: opacity .2s ease;
}

.intro-admin-preview.is-disabled { opacity: .42; }

.intro-admin-progress {
  position: absolute;
  top: 10px;
  width: 62px;
  height: 4px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255,255,255,.16);
}

.intro-admin-progress i {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.intro-admin-avatar {
  position: relative;
  width: 74px;
  height: 74px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #c8cbd4, #757982);
  box-shadow: 0 16px 42px rgba(0,0,0,.35), 0 0 38px rgba(124,92,255,.22);
}

.intro-admin-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.intro-admin-avatar span { position:absolute; width:28px; height:34px; top:18px; left:28px; border-radius:48%; background:#b9bbc2; }
.intro-admin-avatar i { position:absolute; left:13px; bottom:-9px; width:57px; height:38px; border-radius:50% 50% 0 0; background:#171820; }
.intro-admin-preview > b { font-size:13px; letter-spacing:.12em; color:rgba(255,255,255,.72); }

@media (max-width: 640px) {
  .site-intro-avatar { width: 92px; height: 92px; }
  .site-intro-orbit { width: 148px; height: 148px; margin: -96px 0 0 -74px; }
  .site-intro-skip { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-intro,
  .site-intro-center,
  .site-intro-title,
  .site-intro-progress span,
  .site-intro-orbit {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
