:root {
    color-scheme: dark;
    font-family: system-ui, sans-serif;
    background: #10091a;
    color: #f9f5ff;
    line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #e3c9ff; }
a:hover { color: white; }
.top {
    display: flex; gap: 1rem; justify-content: space-between; align-items: center;
    background: #1d102d; border-bottom: 1px solid #513468; padding: 1rem max(1rem, calc((100% - 70rem)/2));
}
.top a { font-weight: 750; text-decoration: none; }
.top span, .panel p, small { color: #d4c5e0; }
.shell { width: min(70rem, calc(100% - 2rem)); margin: 2rem auto; }
.title-row, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.title-row { justify-content: space-between; }
.title-row h1, .title-row h2 { margin: .3rem 0 .8rem; }
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 1.25rem; }
.tabs a { padding: .5rem .75rem; border: 1px solid #634578; border-radius: 8px; text-decoration: none; }
.tabs a[aria-current] { background: #6237a6; color: white; }
.panel { background: #1f142e; padding: clamp(1rem, 4vw, 2rem); border: 1px solid #4a325d; border-radius: 16px; margin-bottom: 1rem; min-width: 0; }
.panel h1, .panel h2 { margin-top: 0; }
.narrow { max-width: 31rem; margin: 2rem auto; }
.field { display: grid; gap: .3rem; margin-bottom: .85rem; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
input, textarea, select {
    width: 100%; font: inherit; color: inherit; background: #10091b; border: 1px solid #775290;
    border-radius: 8px; padding: .55rem .7rem;
}
textarea { resize: vertical; }
button, .button {
    display: inline-block; font: inherit; font-weight: 700; color: white; background: #673bb0; border: 1px solid #9969dc;
    border-radius: 8px; padding: .55rem .85rem; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: #7748c4; }
.secondary { background: transparent; }
.danger { background: #482033; border-color: #a65373; }
:focus-visible { outline: 2px solid #e4c4ff; outline-offset: 3px; }
.check { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.check input { width: 1rem; height: 1rem; accent-color: #a46ced; }
.reveal { margin-top: -.45rem; font-size: .9rem; }
.record { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.1rem; padding: .85rem 0; border-bottom: 1px solid #513468; overflow-wrap: anywhere; }
.record small { display: block; }
.record p { margin: .35rem 0; }
.pre { white-space: pre-line; }
.notice { border: 1px solid #649e83; border-radius: 8px; background: #142e25; padding: .75rem; }
.notice.error { border-color: #a65373; background: #421d32; }
.image-field { margin-bottom: 1rem; }
.image-field small { display: block; margin-bottom: .4rem; }
.preview { display: block; max-width: min(100%, 240px); max-height: 145px; border-radius: 8px; margin-bottom: .5rem; }
@media (max-width: 650px) {
    .shell { margin-top: 1rem; }
    .fields { grid-template-columns: 1fr; }
}

fieldset { border: 1px solid #634578; border-radius: 10px; padding: .65rem 1rem; margin: 0 0 1rem; min-width: 0; }
legend { padding: 0 .35rem; color: #e3c9ff; }
