:root {
  color-scheme: dark;
  --bg: #0b0e12;
  --panel: #11161d;
  --panel2: #18202a;
  --line: #283440;
  --text: #edf2f5;
  --muted: #8d9aa5;
  --accent: #75a99f;
  --accent2: #587f78;
  --danger: #ff6680;
}
* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
[hidden] { display: none !important; }
body { max-width: 100%; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { border: 1px solid #86b7ad33; border-radius: 9px; padding: 11px 16px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 750; cursor: pointer; box-shadow: none; transition: transform .14s ease, filter .14s ease, background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease; }
button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:active { transform: translateY(0) scale(.975); }
button:disabled { cursor: default; opacity: .45; filter: none; transform: none; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; background: #0c0f15; color: var(--text); resize: vertical; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #608b83; box-shadow: 0 0 0 3px #75a99f18; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.label-with-info { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.info-marker { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; min-width: 18px; padding: 0; border-radius: 50%; border: 1px solid #33504b; background: #0c0f15; color: var(--accent); font-size: 11px; font-weight: 900; line-height: 1; box-shadow: none; }
.info-marker:hover, .info-marker:focus-visible { transform: none; filter: none; background: #14221f; color: var(--text); border-color: #5f8f86; outline: none; }
.info-marker::after { content: attr(data-tooltip); position: absolute; z-index: 80; left: 50%; bottom: calc(100% + 9px); width: min(270px, 72vw); padding: 10px 12px; border: 1px solid #38534f; border-radius: 10px; background: #0b1015f7; color: var(--text); font-size: 12px; font-weight: 700; line-height: 1.35; text-align: left; white-space: normal; box-shadow: 0 18px 40px #0009; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(5px); transition: opacity .14s ease, transform .14s ease; }
.info-marker::before { content: ""; position: absolute; z-index: 81; left: 50%; bottom: calc(100% + 4px); width: 9px; height: 9px; border-right: 1px solid #38534f; border-bottom: 1px solid #38534f; background: #0b1015f7; opacity: 0; pointer-events: none; transform: translateX(-50%) rotate(45deg); transition: opacity .14s ease; }
.info-marker:hover::after, .info-marker:focus-visible::after, .info-marker:hover::before, .info-marker:focus-visible::before { opacity: 1; transform: translateX(-50%) translateY(0); }
.info-marker:hover::before, .info-marker:focus-visible::before { transform: translateX(-50%) rotate(45deg); }
.audio-edit-grid .info-marker::after, .curve-panel .info-marker::after { bottom: auto; top: calc(100% + 9px); }
.audio-edit-grid .info-marker::before, .curve-panel .info-marker::before { bottom: auto; top: calc(100% + 4px); border: 0; border-left: 1px solid #38534f; border-top: 1px solid #38534f; }
.audio-edit-grid label:nth-child(odd) .info-marker::after, .curve-panel .info-marker::after { left: 0; transform: translateY(-5px); }
.audio-edit-grid label:nth-child(odd) .info-marker::before, .curve-panel .info-marker::before { left: 7px; transform: rotate(45deg); }
.audio-edit-grid label:nth-child(even) .info-marker::after { left: auto; right: 0; transform: translateY(-5px); }
.audio-edit-grid label:nth-child(even) .info-marker::before { left: auto; right: 7px; transform: rotate(45deg); }
.audio-edit-grid label:nth-child(odd) .info-marker:hover::after, .audio-edit-grid label:nth-child(odd) .info-marker:focus-visible::after, .curve-panel .info-marker:hover::after, .curve-panel .info-marker:focus-visible::after { transform: translateY(0); }
.audio-edit-grid label:nth-child(even) .info-marker:hover::after, .audio-edit-grid label:nth-child(even) .info-marker:focus-visible::after { transform: translateY(0); }
.audio-edit-grid .info-marker:hover::before, .audio-edit-grid .info-marker:focus-visible::before, .curve-panel .info-marker:hover::before, .curve-panel .info-marker:focus-visible::before { transform: rotate(45deg); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(36px, 7vw, 64px); line-height: 1.02; letter-spacing: -3px; }
h2 { margin-bottom: 0; font-size: 30px; letter-spacing: -1px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.error { color: var(--danger); min-height: 20px; }
.card { min-width: 0; max-width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 15px; padding: 22px; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 70% 20%, #19282a, transparent 35%), radial-gradient(circle at 20% 85%, #141c25, transparent 30%); }
.login-card { width: min(430px, 100%); display: grid; gap: 16px; }
.remember-login { display: flex; align-items: center; gap: 9px; width: fit-content; cursor: pointer; }
.remember-login input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.maintenance-login-notice { display: grid; gap: 4px; padding: 13px 14px; border: 1px solid #8a7043; border-radius: 10px; background: #2a2418; color: #e7cf98; }
.maintenance-login-notice span { color: #b9aa89; font-size: 12px; }
.legacy-login-note { display:flex; align-items:flex-start; gap:10px; padding:11px 12px; border:1px solid #3c5660; border-radius:9px; background:#152129; color:#b9cbd2; }
.legacy-login-note > span { width:20px; height:20px; flex:0 0 20px; display:grid; place-items:center; border:1px solid var(--accent); border-radius:50%; color:var(--accent); font-size:11px; font-weight:900; }
.legacy-login-note p { margin:0; font-size:11px; line-height:1.55; }
.legacy-login-note strong { display:block; margin-bottom:2px; color:var(--text); font-size:11px; }
.brand, .logo span, .player-art span { display: grid; place-items: center; width: 56px; height: 46px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 950; font-size: 15px; letter-spacing: -1px; transform: rotate(-3deg); box-shadow: 0 10px 26px #0005; }
#app { width: 100%; min-height: 100vh; display: grid; grid-template-columns: 235px minmax(0, 1fr); }
aside { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 26px 18px; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 18px; }
#app > aside .logo { margin-top:28px; }
.logo strong { font-weight: 900; letter-spacing: -1px; }
.logo span { width: 42px; height: 34px; border-radius: 9px; font-size: 11px; }
.app-version { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 800; }
nav { margin-top: 45px; display: grid; gap: 6px; }
.nav, .ghost { background: transparent; color: var(--muted); text-align: left; }
.nav.active, .nav:hover { background: var(--panel2); color: var(--text); }
.profile { margin-top: auto; padding: 14px; display: grid; }
.profile span { color: var(--accent); font-size: 11px; font-weight: 800; }
.profile .ghost { padding-left: 0; margin-top: 8px; }
.content { width: 100%; min-width: 0; max-width: 100%; padding: 35px clamp(20px, 5vw, 70px); overflow-x: hidden; }
.maintenance-admin-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 11px 14px; border: 1px solid #8a7043; border-radius: 11px; background: linear-gradient(135deg, #2d2618, #1c1a16); color: #e7cf98; }
.maintenance-admin-banner span { color: #b9aa89; font-size: 12px; }
.page { width: 100%; min-width: 0; max-width: 100%; }
header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 17px; }
.update-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.update-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 8px; }
.update-entry-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.update-entry-actions button { padding: 7px 10px; }
.update-intro h3, .update-intro p { margin-bottom: 0; }
.current-version { border: 1px solid #4e776f; border-radius: 99px; padding: 6px 11px; color: var(--accent); background: #14221f; font-size: 11px; font-weight: 800; white-space: nowrap; }
.changelog { display: grid; gap: 10px; }
.update-entry { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 24px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); content-visibility: auto; contain-intrinsic-size: auto 140px; }
.update-entry.latest { border-color: #4e776f; background: linear-gradient(135deg, #14221f, var(--panel)); }
.update-version { display: grid; align-content: start; gap: 3px; }
.update-version strong { color: var(--accent); font-size: 18px; }
.update-version span { color: var(--muted); font-size: 10px; }
.update-entry h3 { margin-bottom: 5px; font-size: 16px; }
.update-entry p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.system-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.system-heading h3, .system-heading p { margin-bottom: 0; }
.service-pills { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 8px; }
.service-pill { border: 1px solid var(--line); border-radius: 99px; padding: 5px 9px; color: var(--muted); background: var(--panel2); font-size: 10px; font-weight: 800; }
.service-pill.active { border-color: #416c61; color: #8fd4c4; background: #17302a; }
.service-pill.inactive { border-color: #713c48; color: #ff9aaa; background: #28171c; }
#webhook-test { width: auto; padding: 7px 10px; border: 1px solid var(--line); }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 15px; }
.metric-card { display: grid; align-content: start; gap: 7px; min-height: 130px; }
.metric-card > span, .metric-card small { color: var(--muted); font-size: 10px; font-weight: 700; }
.metric-value { font-size: 20px; line-height: 1.2; }
.metric-value.healthy { color: #8fd4c4; }
.metric-value.unhealthy { color: #ff9aaa; }
.metric-track { height: 5px; overflow: hidden; margin-top: auto; border-radius: 99px; background: var(--line); }
.metric-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.feature-card { margin-bottom: 70px; }
.maintenance-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-bottom: 15px; border-color: #665839; background: linear-gradient(135deg, #1c1a16, var(--panel)); }
.maintenance-card h3, .maintenance-card p { margin-bottom: 0; }
.section-heading h3, .section-heading p { margin-bottom: 0; }
.feature-list { display: grid; margin-top: 14px; }
.feature-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 13px 4px; border-top: 1px solid var(--line); }
.feature-row > div { display: grid; gap: 2px; }
.feature-row > div span { color: var(--muted); font-size: 11px; }
.feature-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.feature-switch input { position: absolute; opacity: 0; pointer-events: none; }
.feature-switch i { position: relative; width: 38px; height: 21px; border-radius: 99px; background: #34404a; transition: background-color .18s ease; }
.feature-switch i::after { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; border-radius: 50%; background: #a4adb4; transition: transform .18s ease, background-color .18s ease; }
.feature-switch input:checked + i { background: #315c54; }
.feature-switch input:checked + i::after { transform: translateX(17px); background: #a9ded2; }
.feature-switch input:disabled + i { opacity: .65; }
.feature-switch span { min-width: 45px; color: var(--muted); font-size: 10px; }
.feedback-button { position: fixed; z-index: 50; right: 24px; bottom: 24px; padding: 10px 15px; border-radius: 99px; box-shadow: 0 12px 35px #0008; }
.playlist { position: relative; min-height: 210px; display: flex; flex-direction: column; background: linear-gradient(145deg, var(--panel2), var(--panel)); transition: transform .2s, border-color .2s; }
.playlist-menu { position: absolute; right: 14px; top: 13px; z-index: 2; }
.playlist-menu + .playlist-status { margin-right: 42px; }
.playlist:hover { transform: translateY(-2px); border-color: #4b6b68; }
.playlist-status { align-self: end; border: 1px solid var(--line); border-radius: 99px; padding: 3px 8px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 1px; transition: color .25s ease, background-color .25s ease, border-color .25s ease; }
.playlist-status.playing { border-color: #416c61; color: #8fd4c4; background: #17302a; }
.playlist-status.generating { border-color: #7d7040; color: #d7c27a; background: #292516; }
.playlist-status.waiting, .playlist-status.queued { border-color: #7d7040; color: #d7c27a; background: #292516; }
.playlist-status.rendering { border-color: #4b6f93; color: #9ecbff; background: #142033; }
.playlist-status.error { border-color: #713c48; color: #ff9aaa; background: #28171c; }
.playlist .count { color: var(--accent); font-size: 40px; font-weight: 900; }
.playlist-count { display: flex; align-items: baseline; gap: 7px; }
.count-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .4px; }
.playlist .actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.playlist .actions button { flex: 1 1 105px; min-width: 0; }
.playlist .actions .ghost { text-align: center; border: 1px solid var(--line); }
.playlist-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.playlist-toolbar h3, .playlist-toolbar p { margin-bottom: 0; }
.playlist-tools { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 10px; flex: 1; }
.playlist-tools input { max-width: 340px; min-width: min(260px, 100%); }
.playlist-filter-tabs { flex: 0 0 auto; }
.upload-card { display: grid; grid-template-columns: minmax(180px, .6fr) 2fr; gap: 20px; align-items: center; margin-bottom: 18px; }
.upload-card form { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 9px; }
.transcribe-audio { display: flex; align-items: center; gap: 9px; padding: 0 4px; cursor: pointer; }
.transcribe-audio input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.form-row { display: flex; gap: 9px; }
.user-create-form { display: grid; grid-template-columns: minmax(190px,1fr) minmax(220px,1.2fr) minmax(170px,.75fr) 120px; gap: 12px; align-items: end; }
.user-create-field { display: grid; gap: 7px; min-width: 0; }
.user-create-field > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.user-create-field input, .user-create-field select, .user-create-button { min-height: 50px; }
.user-create-field input, .user-create-field select { padding-inline: 14px; font-size: 15px; }
.user-create-button { min-width: 120px; font-weight: 850; }
.user-form-error { grid-column: 1 / -1; margin: 0; }
.library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 10px; }
.library-toolbar h3 { margin-bottom: 3px; }
.library-toolbar p { margin-bottom: 0; }
.library-toolbar input { max-width: none; }
.library-tools { display: flex; align-items: center; justify-content: end; gap: 10px; flex: 1; }
.library-tools input { flex: 1; }
#song-search { flex:1 1 320px; min-width:220px; }
#song-uploader-filter { flex:0 0 155px; width:155px; max-width:155px; min-width:0; padding-inline:10px; }
.site-hub-back { position:fixed; z-index:100; top:10px; left:10px; padding:7px 10px; border:1px solid var(--line); border-radius:7px; background:#111820ee; color:var(--muted); font-size:11px; font-weight:800; text-decoration:none; box-shadow:0 5px 16px #0006; transition:background .16s ease,color .16s ease,border-color .16s ease; }
.site-hub-back:hover { border-color:var(--accent); background:var(--panel2); color:var(--text); }
.library-total { min-width: 105px; display: grid; justify-items: end; padding: 5px 10px; border-right: 1px solid var(--line); }
.library-total strong { color: var(--accent); font-size: 22px; line-height: 1; }
.library-total span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.storage-total { min-width: 150px; display: grid; gap: 3px; padding: 5px 10px; border-right: 1px solid var(--line); }
.storage-total strong { color: var(--text); font-size: 12px; line-height: 1; white-space: nowrap; }
.storage-total span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.storage-track { width: 100%; height: 3px; overflow: hidden; border-radius: 99px; background: var(--line); }
.storage-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.list { position: relative; display: grid; gap: 2px; overflow: visible; }
.load-more-sounds { justify-self: center; margin: 14px 0 4px; border: 1px solid var(--line); text-align: center; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px; border-bottom: 1px solid var(--line); }
.user-item { display: grid; grid-template-columns: 1fr auto auto; transition: background-color .18s ease, opacity .18s ease; }
.user-item:hover { background: #151d25; }
.user-actions { display: flex; align-items: center; gap: 7px; }
.group-card { display: grid; gap: 16px; margin-top: 18px; }
.group-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #0e1319; }
.group-form > .permission-grid { grid-column: 1 / -1; }
.admin-group-toggle { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.admin-group-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 7px; }
.permission-option { display: flex; grid-template-columns: none; align-items: start; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #10171e; cursor: pointer; }
.permission-option input { width: 16px; height: 16px; flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--accent); }
.permission-option span { display: grid; gap: 2px; color: var(--text); }
.permission-option small, .group-list-item span { color: var(--muted); font-size: 10px; }
.group-list { display: grid; gap: 7px; }
.group-list-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border-top: 1px solid var(--line); }
.group-list-item > div:first-child { display: grid; gap: 2px; }
.password-user-button { padding: 8px 11px; border: 1px solid var(--line); white-space: nowrap; }
.delete-user-button { padding: 8px 11px; border-color: #713c48; background: #28171c; color: #ff9aaa; box-shadow: none; }
.song-item { position: relative; z-index: 0; display: grid; grid-template-columns: 34px minmax(150px, 1fr) minmax(220px, 420px) auto 42px; align-items: center; gap: 12px; padding: 13px; border-bottom: 1px solid var(--line); transition: background-color .18s ease, opacity .18s ease; animation: settle-in .2s ease both; content-visibility: auto; contain-intrinsic-size: auto 88px; }
.song-item:has(.song-menu[open]) { z-index: 20; content-visibility: visible; }
.song-item:hover { background: #151d25; }
.single-link-button { border: 1px solid var(--line); padding: 8px 11px; white-space: nowrap; text-align: center; }
.favorite { width: 34px; height: 34px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; font-size: 21px; transition: color .16s ease, transform .18s ease; }
.favorite.active { color: #e4c96e; }
.favorite.active:hover { transform: scale(1.12) rotate(-5deg); }
.song-info { display: grid; gap: 3px; min-width: 0; }
.song-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-meta, .song-description { color: var(--muted); font-size: 12px; }
.song-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-tags, .tag-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { border: 1px solid #3b4b56; border-radius: 99px; padding: 2px 7px; color: #9fb7b2; background: #131c22; font-size: 10px; }
.transcription-marker { border-color: #665d3c; color: #d8c47b; background: #252217; }
.transcription-marker-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.transcription-marker-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.tag-filters { min-height: 24px; margin-bottom: 12px; }
.tag-filter { padding: 4px 9px; border-radius: 99px; background: transparent; border-color: var(--line); color: var(--muted); font-size: 11px; box-shadow: none; }
.tag-filter.active { background: #1d3531; border-color: #4e776f; color: var(--text); }
.preview { width: 100%; height: 38px; margin: 0; }
.preview-slot { min-width: 220px; }
.preview-trigger { width: 100%; height: 38px; border: 1px solid var(--line); }
.song-menu { position: relative; z-index: 2; }
.song-menu[open] { z-index: 30; }
.song-menu summary { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); cursor: pointer; list-style: none; font-weight: 900; letter-spacing: 2px; }
.song-menu summary::-webkit-details-marker { display: none; }
.song-menu summary:hover, .song-menu[open] summary { background: var(--panel2); color: var(--text); }
.song-menu-popover { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); width: 170px; display: grid; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); box-shadow: 0 12px 30px #0008; }
.song-menu-popover button { text-align: left; background: transparent; border-color: transparent; color: var(--text); box-shadow: none; }
.song-menu-popover .danger-action { background: #28171c; color: #ff9aaa; }
.badge { border: 1px solid var(--line); border-radius: 99px; padding: 4px 9px; color: var(--accent); font-size: 11px; font-weight: 800; }
dialog { width: min(900px, calc(100% - 30px)); max-width: calc(100vw - 30px); max-height: calc(100vh - 30px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); padding: 0; opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .18s ease, transform .18s ease, overlay .18s ease allow-discrete, display .18s ease allow-discrete; }
dialog[open] { opacity: 1; transform: translateY(0) scale(1); }
dialog::backdrop { background: #0000; backdrop-filter: blur(0); transition: background-color .18s ease, backdrop-filter .18s ease, overlay .18s ease allow-discrete, display .18s ease allow-discrete; }
dialog[open]::backdrop { background: #000b; backdrop-filter: blur(5px); }
@starting-style {
  dialog[open] { opacity: 0; transform: translateY(10px) scale(.985); }
  dialog[open]::backdrop { background: #0000; backdrop-filter: blur(0); }
}
.dialog-card { position: relative; padding: 28px; display: grid; gap: 16px; }
.dialog-actions { display: flex; gap: 8px; }
.dialog-actions button, .dialog-actions .button-link { flex: 1; text-align: center; }
.button-link { display: grid; place-items: center; border-radius: 9px; padding: 11px 16px; color: var(--muted); text-decoration: none; }
.control-button { border: 1px solid var(--line); text-align: center; box-shadow: none; }
.close { position: sticky; z-index: 8; justify-self: end; right: 14px; top: 14px; margin: -14px 0 -44px auto; padding: 3px 10px; background: #111820f2; color: var(--muted); font-size: 24px; backdrop-filter: blur(8px); }
.invite-button { position: absolute; right: 62px; top: 14px; width: 42px; height: 42px; display: grid; place-items: center; padding: 10px; background: transparent; border-color: var(--line); color: var(--muted); box-shadow: none; }
.invite-button:hover { background: var(--panel2); color: var(--text); }
.invite-button svg { width: 21px; height: 21px; fill: currentColor; }
.duplicate-button { right: 110px; }
.picker { max-height: 300px; overflow: auto; display: grid; gap: 5px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; }
.pick input { width: auto; accent-color: var(--accent); }
.radio-panel { display: grid; grid-template-columns: 1fr minmax(150px, 260px); align-items: center; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #0d1217; }
.radio-panel p { margin-bottom: 4px; }
.playlist-duration { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.generation-warning { margin-top: 8px; padding: 7px 9px; border: 1px solid #665d37; border-radius: 7px; background: #242114; color: #d7c27a; font-size: 11px; }
.radio-controls { display: flex; gap: 6px; }
.volume-control { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.volume-control input { padding: 0; accent-color: var(--accent); }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.editor-heading h3 { margin-bottom: 0; }
.playlist-queue { max-height: 320px; overflow: auto; display: grid; gap: 5px; }
.queue-editor-item { display: grid; grid-template-columns: 25px 42px minmax(120px, 1fr) minmax(130px, 190px) 36px 38px; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #0e1319; transition: transform .18s ease, opacity .18s ease, border-color .18s ease, background-color .18s ease; animation: settle-in .2s ease both; }
.queue-editor-item:hover { border-color: #3e514f; background: #111920; }
.queue-editor-item.active { border-color: #4b756d; background: #13221f; }
.queue-editor-item.dragging { opacity: .35; }
.drag-handle { color: var(--muted); cursor: grab; font-size: 20px; }
.queue-position { width: 34px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.remove-audio { padding: 8px; min-width: 34px; box-shadow: none; }
.remove-audio { background: transparent; border-color: transparent; color: var(--muted); font-size: 20px; }
.audio-edit-button { padding: 7px; background: transparent; border-color: var(--line); color: var(--muted); box-shadow: none; }
.sound-volume { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 7px; }
.sound-volume span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.sound-volume input { padding: 0; accent-color: var(--accent); }
#playlist-audio-dialog { width: min(620px, calc(100% - 30px)); }
.audio-visual-editor { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #0d1217; }
.audio-mini-timeline { display: grid; gap: 8px; }
.timeline-ruler { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 800; }
.timeline-track { position: relative; height: 70px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(90deg, #101820, #0b1016); }
.timeline-track::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, #ffffff10 0 1px, transparent 1px 10%); }
#audio-clip-preview { position: absolute; z-index: 2; left: 0; top: 12px; width: 100%; height: 46px; overflow: hidden; border: 1px solid #4e776f; border-radius: 10px; background: linear-gradient(135deg, #1a3632, #12211f); box-shadow: 0 8px 20px #0005; transition: left .15s ease, width .15s ease; }
#audio-curve-preview { position: absolute; inset: 0; display: block; background: linear-gradient(135deg, #8fd4c4, #d8c47b); opacity: .75; transition: clip-path .15s ease; }
#audio-curve-handles { position: absolute; inset: 0; z-index: 4; display: block; }
.curve-point { position: absolute; width: 18px; height: 18px; min-width: 18px; padding: 0; border: 2px solid #dcefeb; border-radius: 50%; background: var(--accent); box-shadow: 0 4px 14px #0009, 0 0 0 4px #75a99f24; cursor: ns-resize; transform: translate(-50%, -50%); touch-action: none; }
.curve-point:hover, .curve-point:focus-visible, .curve-point.dragging { transform: translate(-50%, -50%) scale(1.12); filter: none; border-color: #fff; outline: none; }
.curve-point::after { content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 8px); padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; background: #0b1015e8; color: var(--text); font-size: 10px; font-weight: 900; opacity: 0; transform: translateX(-50%) translateY(3px); pointer-events: none; transition: opacity .12s ease, transform .12s ease; }
.curve-point:hover::after, .curve-point:focus-visible::after, .curve-point.dragging::after { opacity: 1; transform: translateX(-50%) translateY(0); }
#audio-overlap-preview { position: absolute; z-index: 3; left: 0; top: 0; height: 100%; background: #d8c47b33; border-right: 2px solid #d8c47b; }
.curve-panel { display: grid; gap: 10px; }
.curve-panel p { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #10171e; color: var(--muted); font-size: 13px; }
.curve-panel strong { color: var(--accent); font-size: 12px; }
.curve-panel input { padding: 0; accent-color: var(--accent); }
.event-flow-panel { display: grid; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.event-flow { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; }
.event-node { position: relative; flex: 0 0 min(210px, 70vw); display: grid; gap: 4px; text-align: left; padding: 13px 14px 13px 18px; border: 1px solid var(--line); border-radius: 13px; background: #0e1319; color: var(--text); box-shadow: none; }
.event-node::after { content: ""; position: absolute; right: -11px; top: 50%; width: 10px; border-top: 1px solid var(--line); }
.event-node:last-child::after { display: none; }
.event-node span { color: var(--accent); font-size: 11px; font-weight: 900; }
.event-node small { color: var(--muted); font-size: 11px; }
.event-node.active { border-color: #527b73; background: #13221f; }
.event-point-editor { display: grid; gap: 10px; }
.event-point-head { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(220px, 1fr) auto; align-items: end; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #0d1217; }
.event-point-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.event-point-actions button { white-space: nowrap; }
.event-point-songs { display: grid; gap: 5px; }
.event-sound-item { display: grid; grid-template-columns: 25px 42px minmax(120px, 1fr) 38px; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #0e1319; transition: opacity .18s ease, border-color .18s ease, background-color .18s ease; }
.event-sound-item:hover { border-color: #3e514f; background: #111920; }
.event-sound-item.dragging { opacity: .35; }
.team-user-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; }
.team-user { display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #10171e; cursor: pointer; }
.team-user input { width: auto; accent-color: var(--accent); }
.team-user span { display: grid; }
.team-user small { color: var(--muted); font-size: 10px; }
.team-dialog { width: min(560px, calc(100% - 30px)); }
.owner-transfer { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.empty-queue { display: grid; gap: 4px; place-items: center; padding: 35px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
.library-dialog-card { min-height: 500px; grid-template-rows: auto auto auto auto 1fr auto; }
.picker-source-tabs { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #0d1217; width: fit-content; }
.picker-source { padding: 7px 12px; background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.picker-source.active { background: var(--panel2); border-color: var(--line); color: var(--text); }
.compact-dialog { width: min(560px, 100%); }
.library-picker { overflow: auto; display: grid; align-content: start; gap: 7px; }
.library-song { display: grid; grid-template-columns: 34px minmax(150px, 1fr) minmax(220px, 350px); align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0e1319; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; animation: settle-in .2s ease both; content-visibility: auto; contain-intrinsic-size: auto 68px; }
.library-song:hover { transform: translateY(-1px); border-color: #3e514f; }
.library-song.selected { border-color: #66a99d; background: #132b26; box-shadow: inset 3px 0 0 var(--accent); }
.picker-footer { position: sticky; z-index: 4; right: 0; bottom: 0; justify-self: end; width: max-content; max-width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin: 0 -8px -8px auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #111820f2; color: var(--muted); box-shadow: 0 -10px 30px #0008; backdrop-filter: blur(8px); }
.audio-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#toast { position: fixed; z-index: 20; right: 20px; bottom: 20px; padding: 12px 17px; border-radius: 9px; background: var(--accent2); color: #fff; font-weight: 700; opacity: 0; transform: translateY(15px) scale(.97); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
#toast.show { opacity: 1; transform: translateY(0); }
.page:not([hidden]) { animation: page-in .2s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes settle-in { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
.player-body { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: radial-gradient(circle at 50% 10%, #19282a, var(--bg) 52%); }
.player-shell { width: min(620px, 100%); text-align: center; }
.player-shell h1 { margin-bottom: 12px; }
.player-art { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 35px; margin: 0 auto 28px; background: linear-gradient(145deg, #1b252e, #0e1217); display: grid; place-items: center; transform: rotate(2deg); box-shadow: 0 25px 80px #0008; }
.player-art span { width: 96px; height: 80px; font-size: 27px; border-radius: 22px; }
audio { width: 100%; margin: 15px 0 25px; accent-color: var(--accent); }
.queue { display: grid; gap: 5px; text-align: left; }
.queue-item { padding: 11px 14px; border-radius: 9px; color: var(--muted); }
.queue-item.active { color: var(--text); background: var(--panel2); border-left: 3px solid var(--accent); }
@media (max-width: 1400px) {
  #app { grid-template-columns: 220px minmax(0, 1fr); }
  aside { padding-inline: 12px; }
  .content { padding: 28px 22px; }
  .library-toolbar, .library-tools, .playlist-toolbar, .playlist-tools, .form-row { flex-wrap: wrap; }
  .library-tools input { flex: 1 1 260px; min-width: min(260px, 100%); }
  .library-total, .storage-total { flex: 0 0 auto; }
  .song-item { grid-template-columns: 34px minmax(0, 1fr) max-content 42px; }
  .song-item .favorite { grid-column: 1; grid-row: 1; }
  .song-item .song-info { grid-column: 2; grid-row: 1; }
  .song-item .single-link-button { grid-column: 3; grid-row: 1; }
  .song-item .song-menu { grid-column: 4; grid-row: 1; }
  .song-item .preview-slot { grid-column: 2 / -1; grid-row: 2; min-width: 0; }
  .library-song { grid-template-columns: 34px minmax(0, 1fr); }
  .library-song .preview-slot { grid-column: 2; min-width: 0; }
}
@media (max-width: 1000px) {
  #app { grid-template-columns: 190px minmax(0, 1fr); }
  .logo { gap: 8px; }
  .logo strong { font-size: 15px; }
  .app-version { display: none; }
  .upload-card { grid-template-columns: 1fr; align-items: stretch; }
  .upload-card form { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .user-create-form { grid-template-columns: minmax(220px,1fr) minmax(220px,1fr); }
  .user-create-button { width: 100%; }
  .library-toolbar, .playlist-toolbar { align-items: stretch; flex-direction: column; }
  .library-tools, .playlist-tools { justify-content: start; }
  .library-total, .storage-total { justify-items: start; border-right: 0; }
}
@media (max-width: 750px) {
  #app { display: block; }
  aside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  nav { margin-top: 20px; display: flex; flex-wrap: wrap; }
  .nav { flex: 1 1 auto; text-align: center; }
  .profile { display: none; }
  .content { padding: 24px 16px; }
  .upload-card, .upload-card form, .form-row, .library-toolbar, .library-tools, .playlist-toolbar, .playlist-tools { display: grid; grid-template-columns: 1fr; }
  .user-create-form { grid-template-columns: 1fr; }
  .library-total, .storage-total { justify-items: start; border-right: 0; border-bottom: 1px solid var(--line); }
  .song-item { grid-template-columns: 34px 1fr 42px; }
  .song-item .preview-slot { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .song-item .single-link-button { grid-column: 1 / -1; grid-row: 3; }
  .song-menu { grid-column: 3; grid-row: 1; }
  .radio-panel, .library-song { grid-template-columns: 1fr; }
  .library-song .preview-slot { grid-column: 1; }
  .radio-controls { flex-wrap: wrap; }
  .queue-editor-item { grid-template-columns: 20px 38px 1fr 32px; }
  .queue-editor-item .sound-volume { grid-column: 3 / -1; }
  .queue-editor-item .audio-edit-button { grid-column: 3; }
  .event-point-head { grid-template-columns: 1fr; }
  .event-point-actions { justify-content: stretch; }
  .event-point-actions button { flex: 1 1 auto; }
  .owner-transfer, .audio-edit-grid, .curve-panel, .library-song { grid-template-columns: 1fr; }
  .user-item { grid-template-columns: 1fr auto; }
  .user-item .user-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .group-form { grid-template-columns: 1fr; }
  .group-form > .permission-grid { grid-column: 1; }
  .group-list-item { align-items: stretch; flex-direction: column; }
  .picker-footer { width: 100%; align-items: stretch; flex-direction: column; }
  .dialog-card { padding: 22px 15px; }
  header { align-items: center; }
  .update-intro, .update-entry { grid-template-columns: 1fr; display: grid; }
  .update-entry { gap: 8px; }
  .system-heading, .feature-row, .maintenance-card { grid-template-columns: 1fr; display: grid; }
  .service-pills { justify-content: start; }
  .feedback-button { right: 14px; bottom: 14px; }
}
.discord-login { min-height:44px; display:grid; place-items:center; border:1px solid #6975b9; border-radius:6px; color:#fff; background:#5865f2; font-weight:800; text-decoration:none; }
.discord-login:hover { background:#6672f4; }
.login-divider { display:block; color:var(--muted); font-size:.68rem; font-weight:700; text-align:center; letter-spacing:.08em; }

/* Handbook */
.handbook-page { max-width: 1180px; margin: 0 auto; padding-bottom: 80px; }
.handbook-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); align-items: end; gap: 28px; margin-bottom: 18px; }
.handbook-heading h3 { margin-bottom: 4px; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.08; letter-spacing: -1.2px; }
.handbook-heading p { margin-bottom: 0; }
.handbook-search { display: grid; gap: 7px; }
.handbook-search > label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.handbook-search > div { position: relative; }
.handbook-search input { min-height: 48px; padding-right: 48px; }
.handbook-search button { position: absolute; right: 5px; top: 5px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-color: transparent; text-align: center; font-size: 20px; }
.handbook-search > span { min-height: 17px; color: var(--muted); font-size: 11px; text-align: right; }
.handbook-hero { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.5fr); gap: 28px; margin-bottom: 18px; padding: 28px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--line)); border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--panel)), var(--panel) 62%); }
.handbook-hero h3 { margin: 7px 0 8px; font-size: 25px; line-height: 1.1; }
.handbook-hero p { margin-bottom: 0; color: var(--muted); }
.handbook-kicker { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: 1.8px; }
.handbook-quicksteps { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.handbook-quicksteps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--bg) 58%, transparent); }
.handbook-quicksteps b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 11px; }
.handbook-quicksteps span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.handbook-quicksteps strong { display: block; color: var(--text); font-size: 12px; }
.handbook-empty { justify-items: center; gap: 4px; margin-bottom: 18px; text-align: center; }
.handbook-empty:not([hidden]) { display: grid; }
.handbook-empty span { color: var(--muted); font-size: 12px; }
.handbook-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: start; gap: 18px; }
.handbook-toc { position: sticky; top: 24px; width: auto; height: auto; max-height: calc(100vh - 48px); display: block; overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.handbook-toc > strong { display: block; margin-bottom: 12px; color: var(--muted); font-size: 9px; letter-spacing: 1.5px; }
.handbook-toc nav { display: grid; gap: 2px; margin: 0; }
.handbook-toc a { padding: 8px 9px; border-radius: 7px; color: var(--muted); font-size: 11px; font-weight: 750; line-height: 1.25; text-decoration: none; transition: color .15s ease, background-color .15s ease; }
.handbook-toc a:hover, .handbook-toc a:focus-visible { outline: none; background: var(--panel2); color: var(--text); }
.handbook-manual { min-width: 0; display: grid; gap: 12px; }
.handbook-section { scroll-margin-top: 24px; min-width: 0; padding: 25px 27px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.handbook-section > header { align-items: center; justify-content: start; gap: 13px; margin-bottom: 17px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.handbook-section > header > span { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 65%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent) 13%, var(--panel2)); color: var(--accent); font-size: 12px; font-weight: 900; }
.handbook-section > header small { display: block; color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: 1.5px; }
.handbook-section > header h3 { margin: 1px 0 0; font-size: 21px; line-height: 1.15; }
.handbook-section > p { color: var(--muted); }
.handbook-section h4 { margin: 0 0 8px; color: var(--text); font-size: 13px; }
.handbook-section ul { display: grid; gap: 7px; margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.handbook-section li::marker { color: var(--accent); font-weight: 900; }
.handbook-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.handbook-role-grid > div { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--panel2) 55%, var(--panel)); }
.handbook-role-grid strong { color: var(--accent); font-size: 12px; }
.handbook-role-grid span { color: var(--muted); font-size: 11px; }
.handbook-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.handbook-columns > div { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: color-mix(in srgb, var(--panel2) 42%, var(--panel)); }
.handbook-columns p { margin: 0; color: var(--muted); font-size: 12px; }
.handbook-note, .handbook-warning, .handbook-tip { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px; margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 9%, var(--panel2)); }
.handbook-note strong, .handbook-warning strong, .handbook-tip strong { color: var(--text); font-size: 11px; }
.handbook-note span, .handbook-warning span, .handbook-tip span { color: var(--muted); font-size: 11px; }
.handbook-warning { border-left-color: #d8c47b; background: color-mix(in srgb, #d8c47b 9%, var(--panel2)); }
.handbook-tip { border-left-color: #72b4dd; background: color-mix(in srgb, #72b4dd 9%, var(--panel2)); }
.handbook-steps { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.handbook-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--muted); font-size: 12px; }
.handbook-steps li > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--panel2); color: var(--accent); font-size: 10px; font-weight: 900; }
.handbook-steps strong { display: block; color: var(--text); font-size: 12px; }
.handbook-fineprint { margin: 14px 0 0; padding-top: 13px; border-top: 1px solid var(--line); font-size: 11px; }
.handbook-feature-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.handbook-feature-row > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--panel2); color: var(--accent); font-weight: 900; }
.handbook-feature-row strong { font-size: 12px; }
.handbook-feature-row p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.handbook-definitions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.handbook-definitions > div { padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.handbook-definitions dt { color: var(--accent); font-size: 11px; font-weight: 850; }
.handbook-definitions dd { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.handbook-faq { display: grid; gap: 7px; }
.handbook-faq details { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--panel2) 45%, var(--panel)); }
.handbook-faq summary { padding: 12px 14px; color: var(--text); font-size: 12px; font-weight: 800; cursor: pointer; }
.handbook-faq details[open] summary { border-bottom: 1px solid var(--line); color: var(--accent); }
.handbook-faq p { margin: 0; padding: 12px 14px; color: var(--muted); font-size: 11px; }

@media (max-width: 1050px) {
  .handbook-heading, .handbook-hero { grid-template-columns: 1fr; }
  .handbook-layout { grid-template-columns: 1fr; }
  .handbook-toc { position: static; max-height: none; }
  .handbook-toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .handbook-page { padding-bottom: 35px; }
  .handbook-heading { gap: 16px; }
  .handbook-search > span { text-align: left; }
  .handbook-hero, .handbook-section { padding: 18px 15px; border-radius: 12px; }
  .handbook-toc { padding: 13px; }
  .handbook-toc nav, .handbook-role-grid, .handbook-columns, .handbook-definitions { grid-template-columns: 1fr; }
  .handbook-note, .handbook-warning, .handbook-tip { grid-template-columns: 1fr; gap: 3px; }
}
