@font-face { font-family: 'Hylia Serif'; src: url('/assets/font/HyliaSerifBeta-Regular.otf') format('opentype'); font-display: swap; }
:root { color-scheme: dark; --bg: #0c1b2b; --panel: #102439; --deep: #08121d; --accent: #7ab4ee; --text: #e2e8f0; --muted: #9bafc4; --border: #294661; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 system-ui, -apple-system, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
h1 { font-family: 'Hylia Serif', Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: normal; letter-spacing: .06em; line-height: 1.3; margin: 0 0 .5rem; color: white; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 1rem; }
p { margin: .4rem 0 1rem; }
.muted { color: var(--muted); }
.small, small { font-size: .82rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; font-weight: 700; margin: 0 0 .5rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: 5px; background: #3578b9; color: white; padding: .6rem 1rem; font-weight: 600; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.button:hover { background: #438ccc; text-decoration: none; }
.secondary { background: var(--panel); border-color: var(--border); color: var(--text); }
.secondary:hover { background: #193753; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-header { background: var(--deep); border-bottom: 1px solid var(--border); padding: 1rem max(1.25rem, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; color: white; font-weight: 700; line-height: 1.3; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 4px; }
.brand small { display: block; color: var(--muted); font-weight: normal; }
.account { display: flex; align-items: center; gap: 1rem; font-size: .85rem; }
.container { max-width: 1180px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.form-container { max-width: 880px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; }
.page-heading p:last-child { margin-bottom: 0; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 7px; overflow: hidden; box-shadow: 0 6px 24px #0002; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--muted); background: var(--deep); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding: .9rem 1rem; }
td { border-top: 1px solid var(--border); padding: 1rem; font-size: .9rem; }
td:nth-child(2) { min-width: 220px; font-weight: 600; }
td:not(:nth-child(2)) { white-space: nowrap; }
tr:hover td { background: #17334d; }
.empty { padding: 2rem; text-align: center; }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: .85rem; }
.form-panel { padding: 1.75rem; margin: 0; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.3rem; }
label { font-weight: 600; font-size: .9rem; }
input, textarea { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 4px; padding: .65rem .8rem; background: var(--deep); color: var(--text); }
input::placeholder, textarea::placeholder { color: #71879f; opacity: 1; }
input:read-only { color: var(--muted); }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: #e99494; }
textarea { resize: vertical; font: .9rem/1.65 ui-monospace, SFMono-Regular, monospace; }
.toolbar { display: flex; flex-wrap: wrap; gap: .35rem; }
.toolbar button { background: #1a3751; color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: .3rem .65rem; font-size: .8rem; }
.toolbar button:hover { background: #264c6b; }
.chapters, .import-section, .audio-details { border-top: 1px solid var(--border); padding-top: 1.4rem; margin-top: .5rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.section-heading h2 { margin-bottom: 0; }
.timestamp-row { display: grid; grid-template-columns: 115px 1fr auto; gap: .6rem; align-items: start; margin-bottom: .7rem; }
.timestamp-row label { font-size: .75rem; }
.timestamp-row .button { margin-top: 1.55rem; }
.audio-details dl { margin: 0; }
.audio-details dl > div { display: grid; grid-template-columns: 100px 1fr; gap: 1rem; font-size: .85rem; margin: .4rem 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.message { border: 1px solid #b86666; background: #42252e; color: #ffd1d1; border-radius: 5px; padding: .8rem 1rem; margin-bottom: 1.25rem; }
.message.success { border-color: #438574; background: #163d34; color: #b9f1dd; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: min(100%, 430px); padding: 2.5rem; text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 20px 70px #0004; }
.cover { border-radius: 7px; margin-bottom: 1.5rem; box-shadow: 0 8px 25px #0005; }
.discord { display: flex; margin: 1.7rem 0 1rem; background: #5865f2; }
.discord:hover { background: #6875ff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .account #user-name { display: none; }
  .container { padding-top: 1.7rem; }
  .page-heading { align-items: start; }
  .form-panel { padding: 1rem; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .timestamp-row { grid-template-columns: 95px 1fr; }
  .timestamp-row .button { grid-column: 2; justify-self: end; margin-top: 0; }
}
