:root {
  color-scheme: light;
  --ink: #152644;
  --muted: #52627a;
  --line: #dce3eb;
  --yellow: #ffda3f;
  font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f4f6f9;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: #24477b; text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; }
button, .btn, select { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #3874c2; outline-offset: 3px; }
.shell { width: min(100% - 32px, 920px); margin-inline: auto; }
.top { color: white; background: #142541; border-bottom: 3px solid var(--yellow); }
.bar, .brand, .toplinks, .actions, .heading { display: flex; align-items: center; gap: 18px; }
.bar { min-height: 72px; justify-content: space-between; }
.brand, .toplinks a, .top .link { color: white; }
.brand { text-decoration: none; gap: 12px; font-weight: 650; }
.brand img { width: 74px; height: 44px; object-fit: contain; border-radius: 5px; background: white; padding: 3px; }
.link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: .2em; }
main.shell { padding: clamp(26px,5vw,50px) 0 64px; }
.auth { max-width: 425px; }
h1 { font-size: clamp(1.65rem,4vw,2.2rem); letter-spacing: -.045em; line-height: 1.15; margin: 0; }
p { margin: .4em 0 0; }
.heading { justify-content: space-between; margin: 0 0 22px; }
.muted, small { color: var(--muted); }
.box { background: white; border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px,3vw,30px); }
.login form { margin-top: 20px; display: grid; }
.login input { margin-bottom: 15px; }
label { display: block; font-weight: 650; font-size: .94rem; margin-bottom: 6px; }
label span { font-weight: normal; color: var(--muted); }
input:not([type=checkbox]), textarea, select { width: 100%; min-height: 44px; border: 1px solid #aab6c5; border-radius: 7px; padding: 9px 12px; color: var(--ink); background: white; }
input::placeholder, textarea::placeholder { color: #62718a; opacity: 1; }
input[type=file] { font-size: .88rem; }
input[type=file]::file-selector-button { margin-right: 10px; padding: 4px 7px; border: 0; border-radius: 4px; color: var(--ink); background: #eaf0f6; cursor: pointer; }
textarea { resize: vertical; }
small { display: block; font-size: .83rem; margin-top: 5px; overflow-wrap: anywhere; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 9px 17px; color: var(--ink); background: white; border: 1px solid #bcc8d5; border-radius: 8px; font-weight: 680; text-decoration: none; text-align: center; }
.btn:hover { background: #eff3f7; }
.btn.primary { background: var(--yellow); border-color: #e4bd20; }
.btn.primary:hover { background: #ffd022; }
button:disabled { opacity: .6; cursor: default; }
.back { display: inline-block; margin-bottom: 19px; }
.list { margin-top: 18px; }
.row { display: grid; grid-template-columns: 56px minmax(0,1fr) auto 75px; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.row:last-child { padding-bottom: 0; }
.thumb, .photo img { object-fit: contain; background: #f5f7fa; border: 1px solid var(--line); border-radius: 9px; }
.identity strong, .heading p, .confirm strong { overflow-wrap: anywhere; }
.identity small { margin: 3px 0 0; }
.visibility { font-size: .83rem; color: #246448; }
.visibility.muted { color: var(--muted); }
.edit { min-width: 70px; padding-inline: 10px; }
.editor { display: grid; gap: 22px; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 22px; }
.wide { grid-column: 1 / -1; }
.photo { border-block: 1px solid var(--line); padding-block: 18px; display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: center; gap: 20px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 9px 0 0; }
.check input { width: 18px; height: 18px; margin: 0; }
.publication { max-width: 330px; }
.actions { flex-wrap: wrap; gap: 10px; }
.remove { color: #9d2d2a; margin-left: auto; }
.btn.danger { color: white; background: #9d2d2a; border-color: #9d2d2a; }
.confirm { max-width: 590px; }
.confirm .actions { margin-top: 20px; }
.alert, .success { margin: 0 0 20px; border-radius: 8px; padding: 12px 16px; }
.alert { color: #81271f; background: #fff0ed; border: 1px solid #e6b4ac; }
.success { color: #1d5d39; background: #ebf6ed; border: 1px solid #bbd9c0; }
@media (max-width: 590px) {
  .shell { width: calc(100% - 24px); }
  .bar { min-height: 61px; }
  .brand { gap: 7px; font-size: .86rem; }
  .brand img { width: 52px; height: 34px; }
  .toplinks { gap: 13px; font-size: .85rem; }
  .heading { align-items: flex-start; gap: 10px; }
  .heading .btn { white-space: nowrap; padding-inline: 11px; }
  .row { grid-template-columns: 42px minmax(0,1fr) auto; gap: 1px 10px; }
  .row .thumb { width: 42px; height: 42px; grid-column: 1; grid-row: 1 / span 2; }
  .identity { grid-column: 2; }
  .visibility { grid-row: 2; grid-column: 2; }
  .edit { grid-column: 3; grid-row: 1 / span 2; min-width: 58px; }
  .fields { grid-template-columns: 1fr; }
  .photo { grid-template-columns: 1fr; gap: 12px; }
  .photo img { width: 90px; height: 90px; }
  .actions .remove { width: 100%; margin: 8px 0 0; }
}
