:root {
  color-scheme: dark;
  --ink: #0f0e0d;
  --panel: #181715;
  --line: #39332f;
  --paper: #ece7de;
  --muted: #aaa095;
  --accent: #c0687a;
  --wine: #743749;
  font-family: Jost, sans-serif;
  color: var(--paper);
  background: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
:root.studio-document {
  color-scheme: light;
  --ink: #f5f3f1;
  --panel: #fdfaf5;
  --line: #ded4c7;
  --paper: #2b2421;
  --muted: #6e6058;
  --accent: #6e2233;
  --wine: #6e2233;
}
.workspace {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
}
.studio-bar { min-height: 68px; padding: 10px clamp(14px, 2.4vw, 36px); display: flex; align-items: center; gap: clamp(12px, 2vw, 32px); flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.studio-id { display: flex; align-items: baseline; gap: 14px; margin-right: auto; white-space: nowrap; }
.wordmark { font: 400 30px/.95 "Bodoni Moda", Georgia, serif; letter-spacing: -.045em; }
.studio-id span, .mode { color: var(--muted); }
.studio-id span { border-left: 1px solid var(--line); padding-left: 14px; font-size: 13px; }
.studio-actions { display: flex; align-items: center; gap: clamp(10px, 1.5vw, 22px); flex-wrap: wrap; }
.studio-actions form { margin: 0; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 7px 14px; color: var(--paper); background: transparent; border: 1px solid var(--line); text-decoration: none; cursor: pointer; font-size: 14px; }
.button:hover { background: #272320; }
.button.primary { background: var(--wine); border-color: var(--wine); }
.button.primary:hover { background: #834256; }
.button.quiet { padding-inline: 2px; border-color: transparent; color: var(--muted); }
.button.quiet:hover { color: var(--paper); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.workspace .button:hover { background: #eee5db; }
.workspace .button.primary { color: #fff8f2; }
.workspace .button.primary:hover { background: #591b29; }
.workspace .button.quiet:hover { background: transparent; }
.button:disabled { opacity: .45; cursor: default; }
.workspace .button[aria-pressed="true"] { background: #f3e7e8; border-color: var(--accent); }
.studio-status { color: var(--muted); font-size: 13px; max-width: 260px; }
#studio { flex: 1; min-height: 0; overflow: hidden; }
#studio, #studio button, #studio input { font-family: Jost, sans-serif; }
.sign-in { min-height: 100dvh; display: grid; grid-template-columns: minmax(340px, 1fr) minmax(360px, 1.1fr); }
.sign-in-panel { display: flex; flex-direction: column; padding: clamp(32px, 7vw, 110px); }
.sign-in-panel > header { display: flex; gap: 16px; align-items: baseline; }
.sign-in-panel > header .mode { font-size: 14px; }
.sign-in-main { width: min(100%, 370px); margin-block: auto; padding-block: 54px; }
.sign-in-main h1 { font: 400 clamp(42px, 5vw, 74px)/1.02 "Bodoni Moda", Georgia, serif; letter-spacing: -.035em; margin: 0 0 18px; }
.sign-in-main p { color: var(--muted); line-height: 1.55; margin: 0 0 34px; }
.sign-in-main form { display: grid; gap: 15px; }
.sign-in-main label { display: grid; gap: 6px; font-size: 14px; }
.sign-in-main input { min-height: 46px; width: 100%; padding: 8px 12px; background: var(--panel); color: var(--paper); border: 1px solid var(--line); border-radius: 0; }
.sign-in-main form button { justify-self: start; min-width: 120px; margin-top: 4px; }
.sign-in-main #login-status { min-height: 1.6em; color: #e5a5b2; margin: 4px 0 0; }
.cover-study { display: grid; grid-template-rows: 1fr auto; margin: 22px 22px 22px 0; padding: clamp(20px, 4vw, 68px); background: #fdfcf9; color: #141414; }
.cover-study img { width: min(100%, 460px); align-self: center; justify-self: center; }
.cover-study figcaption { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid #e4decf; font-size: 13px; color: #6e6862; }
@media (max-width: 750px) {
  .sign-in { grid-template-columns: 1fr; }
  .sign-in-main { padding-block: 64px 22px; }
  .cover-study { margin: 0 20px 20px; min-height: 250px; }
  .cover-study img { width: min(100%, 290px); }
  .studio-bar { gap: 8px; }
  .studio-actions { gap: 10px; }
  .studio-status { font-size: 12px; }
}
#studio [role="tab"][aria-selected="true"] { color: var(--accent); }

.release-dialog { width: min(460px, calc(100% - 36px)); border: 1px solid var(--line); padding: 28px; background: var(--panel); color: var(--paper); }
.release-dialog::backdrop { background: rgb(20 16 14 / .45); }
.release-dialog h2 { margin: 0 0 10px; font: 400 34px/1.1 "Bodoni Moda", Georgia, serif; }
.release-dialog p { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }
.release-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.release-actions + button { margin-top: 8px; }
