.login {
  width: min(100% - 36px, 460px);
  margin: max(24px, 8vh) auto 40px;
}
.login-card { margin-top: 11px; padding: clamp(22px, 5vw, 36px); background: var(--white); border: 1px solid var(--rule); }
.login-card h1 { font: normal clamp(35px, 7vw, 47px)/1.06 var(--serif); margin: 12px 0 22px; letter-spacing: -.04em; }
.login-card .button { margin-top: 16px; }
.studio { max-width: 960px; padding-bottom: 45px; }
.studio-header { min-height: 76px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; }
.studio-header .back-link { min-height: auto; }
.studio-heading { display: flex; gap: 14px; justify-content: space-between; align-items: end; margin-block: 33px 20px; }
.studio-heading h1 { margin: 5px 0 0; font: normal clamp(40px, 7vw, 64px)/1 var(--serif); letter-spacing: -.04em; }
.studio-status, .form-status { color: var(--muted); margin: 8px 0; }
.studio-status:empty, .form-status:empty { display: none; }
.form-error, .form-status[data-error], .studio-status[data-error] { color: #943422; }
.studio-works { border-top: 1px solid var(--rule); }
.studio-work { display: grid; grid-template-columns: 67px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.studio-work img { width: 67px; height: 67px; object-fit: cover; background: var(--mat); }
.studio-work h2 { margin: 0; font: normal 23px/1.2 var(--serif); overflow-wrap: anywhere; }
.studio-work p { font-size: 14px; color: var(--muted); margin: 3px 0 0; }
.studio-actions { display: flex; gap: 10px; align-items: center; }
.studio-settings { margin-top: 28px; background: var(--white); padding: 15px 18px; border: 1px solid var(--rule); }
.studio-settings summary { cursor: pointer; font-weight: 600; }
.studio-settings form { display: grid; justify-items: start; gap: 12px; margin-block: 18px 6px; }
.studio-settings form > label { width: min(100%, 420px); }
.studio label, .login label { display: block; font-size: 15px; }
.studio label input:not([type=checkbox], [type=file]), .studio label textarea, .studio label select, .login label input {
  display: block;
  width: 100%;
  border: 1px solid #b7a595;
  border-radius: 0;
  padding: 8px 10px;
  margin-top: 4px;
  min-height: 44px;
  background: #fffdf9;
  color: var(--ink);
}
.studio textarea { resize: vertical; }
.studio .check { display: flex; gap: 8px; align-items: center; min-height: 34px; }
.studio input[type=checkbox] { accent-color: var(--rust); width: 18px; height: 18px; margin: 0; }
.studio fieldset { padding: 9px 13px 13px; border: 1px solid var(--rule); min-width: 0; width: 100%; }
.studio legend { padding-inline: 5px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--rust);
  color: var(--white);
  border: 1px solid transparent;
  border-radius: 0;
  padding: 8px 13px;
  min-height: 43px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #783020; }
.button:disabled { opacity: .6; cursor: wait; }
.button-secondary { background: var(--white); border-color: #b7a595; color: var(--ink); }
.button-secondary:hover { background: var(--mat); }
.button-plain { background: transparent; color: var(--rust); }
.button-plain:hover { background: var(--mat); }
.work-editor {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: clamp(14px, 3vw, 25px);
}
.work-editor::backdrop { background: #2d241ebc; }
.work-editor form { display: grid; gap: 9px; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
.editor-heading h2 { font: normal clamp(26px, 6vw, 35px)/1 var(--serif); margin: 0; }
.editor-heading button { font-size: 29px; line-height: 1; min-width: 43px; }
.editor-fields { display: grid; grid-template-columns: 1.4fr .52fr 1fr; gap: 10px; }
.photo-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; position: relative; }
.photo-upload span { font-size: 13px; color: var(--muted); }
.photo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.photo-upload:focus-within label { outline: 2px solid var(--rust); outline-offset: 3px; }
.editor-photos { display: grid; gap: 9px; }
.editor-photos:not(:empty) { margin-top: 12px; }
.editor-photo { display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 9px; padding: 8px; background: var(--white); border: 1px solid var(--rule); }
.editor-photo img { width: 60px; height: 62px; object-fit: cover; background: var(--mat); }
.editor-photo-controls { display: flex; flex-wrap: wrap; gap: 0 7px; align-items: center; }
.editor-photo-controls .button { font-size: 13px; min-height: 36px; padding: 4px 7px; }
.photo-cover { color: var(--muted); font-size: 13px; padding-inline: 7px; }
.editor-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 13px; }
@media (max-width: 660px) {
  .studio-work { grid-template-columns: 56px 1fr; gap: 8px 11px; }
  .studio-work img { width: 56px; height: 56px; }
  .studio-actions { grid-column: 2; flex-wrap: wrap; gap: 0 7px; }
  .studio-actions .button { padding-inline: 8px; }
  .studio-heading { align-items: flex-start; flex-direction: column; }
  .editor-fields { grid-template-columns: 1fr 90px; }
  .editor-fields label:last-child { grid-column: 1 / -1; }
}
