:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #254641;
  background: #eef4ef;
  --ink: #254641;
  --quiet: #4b6961;
  --line: #cbdcd5;
  --paper: #fafdF7;
  --accent: #9b411e;
  --accent-ink: #743317;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 22%, var(--paper), transparent 66%), #eef4ef;
  font-size: 15px;
  line-height: 1.5;
}
[hidden] { display: none !important; }
a { color: #1256a0; text-underline-offset: .17em; }
button, input { color: inherit; font: inherit; }
button:not(:disabled), summary, .file-button { cursor: pointer; }
button:disabled { opacity: .58; }
:focus-visible { outline: 2px solid #22705e; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 5.8vw, 2.75rem); line-height: 1.09; letter-spacing: -.045em; font-weight: 670; }
h2 { font-size: 1.16rem; font-weight: 670; letter-spacing: -.018em; line-height: 1.22; }
h3 { font-size: 1rem; font-weight: 660; }
label, legend { font-size: .91rem; font-weight: 620; }
.site-header {
  max-width: 1060px;
  min-height: 65px;
  margin-inline: auto;
  padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.035em; }
.brand span { margin-left: .2em; font-weight: 520; color: var(--quiet); }
.shell {
  margin: 0 auto;
  padding: 10px max(19px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(19px, env(safe-area-inset-left));
}
.create-shell { max-width: 470px; padding-top: max(28px, env(safe-area-inset-top)); }
.admin-shell { max-width: 630px; padding-top: 24px; }
.cover {
  display: block;
  width: 100%;
  height: clamp(110px, 28vw, 158px);
  margin: 4px auto 15px;
}
.create-shell h1 { margin-bottom: 24px; }
.create-shell > .button { width: 100%; }
.create-shell form { display: grid; gap: 6px; }
.create-shell form > p { margin: 0 0 7px; color: var(--quiet); }
.form-row { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.form-row input { flex: 1 1 145px; }
.form-row .button { flex: 0 0 auto; }
input:is([type="text"], [type="email"]) {
  min-width: 0;
  min-height: 46px;
  padding: 9px 11px;
  background: #fbfcf9;
  border: 1px solid #a9c2b7;
  border-radius: 7px;
  font-size: 16px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.25;
  text-align: center;
}
.primary { background: #2b584f; color: #fbfdf9; }
.primary:is(:hover, :focus-visible) { background: #244d45; }
.secondary { border-color: #a8c2b7; color: var(--ink); background: #f8fbf6; }
.secondary:is(:hover, :focus-within) { background: #edf5ed; }
.text-button {
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .21em;
  color: #315952;
  padding: 8px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 560;
  justify-self: start;
}
.signin-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 16px 0;
  color: var(--quiet);
  font-size: .82rem;
}
.signin-divider::before, .signin-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.export-help {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: .91rem;
}
.export-help summary { min-height: 44px; padding: 12px 0; color: var(--ink); font-weight: 620; }
.export-help ol { margin: 0 0 10px; padding-left: 23px; }
.export-help li + li { margin-top: 5px; }
.export-help[open] { padding-bottom: 5px; }
.feedback {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #ccdcd2;
  border-radius: 7px;
  background: #e7f1e8;
}
.feedback[data-error="true"] { color: var(--accent-ink); border-color: #e1c9b9; background: #fbf1e9; }
.heading-row, .actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.heading-row { margin-bottom: 20px; }
.badge { font-size: .79rem; color: var(--quiet); background: #dfece2; border-radius: 30px; padding: 3px 9px; }
.panel {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcf8e8;
}
.panel-heading { margin-bottom: 14px; }
.panel-heading p { margin-top: 5px; color: var(--quiet); }
.quiet { color: var(--quiet); font-size: .87rem; }
.file-button { position: relative; overflow: hidden; }
.file-button:focus-within { outline: 2px solid #22705e; outline-offset: 3px; }
.file-button input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: inherit; }
.file-button:has(input:disabled) { opacity: .6; cursor: default; }
.upload-progress { display: grid; gap: 5px; margin-top: 12px; }
progress { width: 100%; min-height: 12px; accent-color: #2b584f; }
#import-status, #media-progress, #music-progress, #gallery-empty { margin-top: 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(83px, 1fr)); gap: 8px; }
.gallery-item { position: relative; display: block; border-radius: 7px; background: #e2ebe4; overflow: hidden; min-height: 64px; aspect-ratio: 1; }
.gallery-choice { display: block; width: 100%; height: 100%; }
.gallery-item :is(img, video) { width: 100%; height: 100%; display: block; object-fit: cover; }
.gallery-choice:has(input) { cursor: pointer; }
.gallery-item:has(input:not(:checked)) :is(img, video) { opacity: .45; }
.gallery-item input { position: absolute; left: 6px; bottom: 6px; width: 21px; height: 21px; accent-color: #2b584f; margin: 0; }
.gallery-item input::after { content: ''; position: absolute; inset: -8px; }
.gallery-item:focus-within { outline: 2px solid #22705e; outline-offset: 2px; }
.gallery-choice > span { position: absolute; right: 4px; top: 4px; background: #fafff4de; border-radius: 4px; padding: 1px 5px; font-size: .68rem; }
.gallery-remove { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; font-size: 19px; }
.gallery-remove::before { content: ''; position: absolute; width: 23px; height: 23px; z-index: -1; border-radius: 50%; background: #fafff4ef; }
.gallery-remove { isolation: isolate; }
.gallery-remove:hover::before, .gallery-remove:focus-visible::before { background: #fff; }
.gallery-remove:focus-visible { outline-offset: -3px; }
#gallery-empty { margin-bottom: 8px; }
#media-picker { margin-top: 12px; }
#music-current { margin-bottom: 10px; }
#music-current p { overflow-wrap: anywhere; margin-bottom: 4px; }
audio { display: block; width: min(100%, 270px); }
.alias-field {
  display: flex;
  margin: 5px 0;
  border: 1px solid #a9c2b7;
  border-radius: 7px;
  min-width: 0;
  align-items: center;
  background: #fbfcf9;
}
.alias-field:focus-within { outline: 2px solid #22705e; outline-offset: 2px; }
.alias-field span { padding-left: 10px; white-space: nowrap; font-size: .88rem; color: var(--quiet); }
.alias-field input { flex: 1; border: none; background: transparent; width: 100%; padding-left: 2px; outline: 0; }
.publish-actions, #published-links { margin-top: 13px; }
.publish-actions > * { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 380px) {
  .form-row .button { flex: 1 1 100%; }
  .panel { padding: 14px; }
  .actions { gap: 10px; }
}
