/* Casting · Școala de Film
   Direcția „Slate de film”: hârtie caldă, titluri Archivo condensat, etichete mono, accente de vară. */

:root {
  --paper: #F3EFE6;
  --paper-2: #EBE5D8;
  --field: #FCFBF8;
  --ink: #1A1916;
  --ink-2: #4A463F;
  --muted: #6B665C;
  --line: #D9D2C3;
  --field-line: #8A8478;
  --rec: #C2311B;
  --danger: #9A2A17;
  --sun: #F4C542;
  --sun-pale: #FBE7A1;
  --sky: #A9D3DE;
  --coral: #E86A4A;
  --coral-pale: #F6B9A6;
  --teal: #1F6F6B;

  --f-display: 'Archivo Variable', 'Arial Narrow', sans-serif;
  --f-body: 'Hanken Grotesk Variable', Helvetica, Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 64px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--rec); }
a.plain { text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* Tipografie */
.lbl {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ink { color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.mono { font-family: var(--f-mono); font-size: 13px; }
.lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; margin: 0 0 24px; }
.display, .display-md, .display-sm, .card-title {
  font-family: var(--f-display);
  font-stretch: 78%;
  font-weight: 650;
  letter-spacing: -.02em;
  margin: 0;
}
.display { font-size: clamp(56px, 10vw, 156px); line-height: .92; margin-bottom: 64px; position: relative; }
.display-md { font-size: clamp(40px, 5vw, 68px); line-height: 1; margin: 6px 0 16px; }
.display-sm { font-size: clamp(32px, 4vw, 46px); line-height: 1; }
.light { font-weight: 300; }
.display .light { padding-left: .6em; }

/* Structură */
.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-wide { max-width: 1400px; margin: 0 auto; padding-left: clamp(16px, 3vw, 40px); padding-right: clamp(16px, 3vw, 40px); }
.row-between { display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; align-items: center; }
.row-gap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-lg { display: flex; flex-direction: column; gap: 36px; margin-top: 36px; }
.grid-2, .grid-3 { display: grid; gap: 28px 28px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2.tight { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.topbar { border-bottom: 1px solid var(--ink); }
.topbar > div { padding-top: 16px; padding-bottom: 16px; }
.rec { display: inline-flex; gap: 10px; align-items: center; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: blink 2.4s steps(1) infinite; }
.rec.is-off .rec-dot { background: var(--field-line); animation: none; }
@keyframes blink { 50% { opacity: .25; } }

.stripe {
  height: 16px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: repeating-linear-gradient(-45deg, var(--ink) 0 14px, var(--sun) 14px 28px);
}

.site-footer { border-top: 1px solid var(--ink); }
.site-footer .wrap { padding-top: 24px; padding-bottom: 24px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* Antet casting */
.hero { position: relative; padding-top: clamp(48px, 8vw, 112px); padding-bottom: 72px; }
.sun {
  position: absolute;
  top: clamp(64px, 9vw, 128px);
  right: clamp(16px, 8vw, 140px);
  width: clamp(110px, 22vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  animation: rise 1.2s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.slate-line { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 36px; position: relative; }
.hero-body { display: flex; flex-wrap: wrap; gap: 48px 96px; align-items: flex-start; position: relative; }
.hero-text { flex: 1 1 440px; min-width: 0; max-width: 620px; }
.hero-text .muted { margin: 0; }
.details { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); border-top: 1px solid var(--ink); flex: 0 1 420px; min-width: 0; }
.details dt { padding: 14px 0; border-bottom: 1px solid var(--line); }
.details dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.details dt:nth-last-child(2), .details dd:last-child { border-bottom-color: var(--ink); }
.details.wide { grid-template-columns: 150px minmax(0, 1fr); margin: 0 0 36px; }

.looking { margin-top: 72px; position: relative; }
.looking > .lbl { margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { padding: 24px 24px 28px; border-radius: 4px; }
.card .lbl { margin-bottom: 10px; }
.card-title { font-size: 34px; line-height: 1.1; margin-bottom: 8px; display: block; }
.card p { margin: 0; }

.tone-sun { background: var(--sun); }
.tone-sky { background: var(--sky); }
.tone-coral { background: var(--coral-pale); }
.badge.tone-coral { background: var(--coral); }
.tone-teal { background: var(--teal); color: #fff; }

/* Formular */
.form-layout { display: flex; flex-wrap: wrap; gap: 40px 96px; align-items: flex-start; padding-top: 80px; padding-bottom: 120px; }
.form-aside { flex: 1 1 220px; max-width: 260px; min-width: 0; }
.form-aside > .lbl { margin-bottom: 18px; }
.form-aside p { margin: 0 0 28px; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; gap: 14px; padding: 9px 0; text-decoration: none; font-size: 15px; }
.toc .lbl { padding-top: 3px; }
.form-main { flex: 999 1 560px; min-width: 0; max-width: 780px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.sec { padding: 64px 0; border-top: 1px solid var(--ink); scroll-margin-top: 24px; }
.sec:first-of-type { padding-top: 0; border-top: 0; }
.sec-last { padding-bottom: 0; }
.sec-head { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  font-family: var(--f-mono); font-weight: 500; font-size: 13px; letter-spacing: .08em; color: var(--ink);
}
.sec-intro { margin: 0 0 40px; max-width: 54ch; }

.fld { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.inp {
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  padding: 13px 16px;
  min-height: 54px;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.inp::placeholder { color: #7D776B; }
.inp:focus { border-color: var(--rec); box-shadow: 0 0 0 1px var(--rec); }
textarea.inp { resize: vertical; line-height: 1.5; min-height: 120px; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.hint.warn { color: var(--danger); font-size: 14px; }
.err { margin: 0; font-size: 14px; color: var(--danger); font-weight: 500; }
.has-err > .inp, .has-err .inp { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.form-alert {
  margin: 0 0 40px; padding: 16px 20px; border: 1px solid var(--danger); border-radius: var(--radius);
  background: #F6E3DC; color: #7A1F10; font-weight: 500;
}

.grp { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.grp legend { padding: 0; margin-bottom: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span, .pill-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 999px; font-weight: 500; font-size: 15px;
  background: transparent; color: var(--ink); transition: background .15s, color .15s;
}
.pill:hover span, .pill-btn:hover { background: #E8E2D5; }
.pill input:checked + span, .pill-btn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.pill input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 3px; }
.pill-btn { font-family: inherit; cursor: pointer; }
.has-err .pill span { border-color: var(--danger); }

.minor { margin-top: 36px; padding: 28px; border: 1px solid var(--ink); border-radius: 4px; background: var(--sun-pale); display: flex; flex-direction: column; gap: 24px; }
.minor > p { margin: -16px 0 0; color: var(--ink-2); }

.check { display: flex; gap: 16px; cursor: pointer; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--rec); flex: none; }
.check.soft { color: var(--ink-2); }
.consents { max-width: 64ch; gap: 22px; }

/* Fotografii */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.photo-grid:empty { display: none; }
.photo-grid:not(:empty) { margin-bottom: 12px; }
.slot { margin: 0; position: relative; aspect-ratio: 3 / 4; background: var(--paper-2); overflow: hidden; border-radius: 4px; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot[draggable="true"] { cursor: grab; }
.slot.is-dragging { opacity: .4; }
.slot.is-uploading img { opacity: .45; filter: grayscale(1); }
.slot-kept { display: flex; align-items: flex-end; padding: 10px; border: 1px dashed var(--ink); }
.slot-badge { position: absolute; left: 8px; bottom: 8px; background: var(--paper); color: var(--ink); padding: 5px 7px; font-size: 10px; }
.slot-progress { position: absolute; left: 10px; right: 10px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.slot-bar { height: 3px; background: var(--paper); }
.slot-bar > span { display: block; height: 3px; width: 0; background: var(--coral); transition: width .2s; }
.slot-error { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px; background: rgba(246, 227, 220, .94); color: #7A1F10; font-size: 13px; line-height: 1.35; }
.slot-tools { position: absolute; top: 4px; right: 4px; left: 4px; display: flex; justify-content: space-between; }
.slot-btn {
  width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(26, 25, 22, .72); color: #fff; font-size: 16px; line-height: 1;
}
.slot-btn:hover { background: var(--ink); }
.slot-btn[disabled] { visibility: hidden; }
.slot-moves { display: flex; gap: 4px; }

.dropzone {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 22px 24px; border: 1px dashed var(--ink); border-radius: var(--radius);
  cursor: pointer; background: transparent; transition: background .15s;
}
.dropzone:hover, .dropzone.is-over { background: var(--sun-pale); }
.dropzone .lbl { flex-basis: 100%; }
.dz-plus { font-size: 30px; line-height: 1; font-weight: 300; }
.dz-text { font-weight: 600; }
.file-input { margin-top: 12px; font: inherit; font-size: 15px; }
.js .file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.js .file-input:focus-visible + .err, .js .file-input:focus-visible { outline: none; }
.photos { display: flex; flex-direction: column; gap: 8px; }
.photos.has-err .dropzone { border-color: var(--danger); }
.guide { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.guide-item { padding: 18px 20px; border-radius: 4px; }
.guide-item .lbl { margin-bottom: 6px; }
.guide-item p { margin: 0; font-size: 15px; }

/* Linkuri */
.links { display: flex; flex-direction: column; gap: 24px; }
.link-row { display: flex; gap: 16px; align-items: flex-start; }
.link-no { padding-top: 46px; }
.link-row .tag { margin-top: 42px; }
.tag {
  font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 999px; background: var(--sky); white-space: nowrap;
}
.tag[data-kind="Drive"] { background: var(--sun); }
.tag[data-kind="YouTube"], .tag[data-kind="Instagram"] { background: var(--coral-pale); }
.link-add { padding-left: 38px; display: flex; gap: 16px; align-items: center; }
.ghost {
  font: inherit; font-weight: 500; font-size: 15px; min-height: 44px; padding: 0; background: transparent; border: 0;
  color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}

/* Trimitere */
.submit-row { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.btn-submit {
  display: inline-flex; gap: 14px; align-items: center; justify-content: center;
  background: var(--coral); color: var(--ink); border: 0; min-height: 64px; padding: 0 36px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 18px; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s;
}
.btn-submit:hover { background: #F07D5F; color: var(--ink); transform: translateY(-1px); }
.btn-submit[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-submit .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.closed { padding: 32px; border: 1px solid var(--ink); border-radius: 4px; background: var(--paper-2); }
.closed .lbl { margin-bottom: 10px; }
.closed .lead { margin: 0; }

.btn-outline, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font: inherit; font-weight: 500;
  background: transparent; color: var(--ink); cursor: pointer;
}
.btn-outline:hover { background: #E8E2D5; color: var(--ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Confirmare, pagini de mesaj */
.slate-band { background: var(--ink); color: var(--paper); padding: 22px 0 26px; }
.slate-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; }
.slate-box > div { padding: 12px 14px; border: 1px solid var(--paper); margin-left: -1px; }
.slate-box .lbl { color: #B8B1A3; font-size: 10px; }
.slate-val { font-family: var(--f-mono); font-size: clamp(20px, 4vw, 32px); }
.thanks, .message-page { padding-top: 56px; padding-bottom: 96px; max-width: 760px; margin-left: 0; }
.thanks > .lbl { margin-bottom: 18px; }
.next-steps { list-style: none; margin: 12px 0 28px; padding: 0; border-top: 1px solid var(--ink); }
.next-steps li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.next-steps .lbl { padding-top: 4px; }
.thanks .small { margin-bottom: 28px; }
.message-page .lead { max-width: 56ch; }

.home-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding-top: 64px; padding-bottom: 96px; }
.home-item { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: 4px; text-decoration: none; transition: transform .15s; }
.home-item:hover { color: var(--ink); transform: translateY(-2px); }

.prose { max-width: 760px; margin-left: 0; padding-top: 56px; padding-bottom: 96px; }
.prose h2 { font-family: var(--f-display); font-stretch: 78%; font-weight: 650; font-size: 26px; margin: 40px 0 8px; }
.prose p { margin: 0 0 12px; }

/* ------- Admin ------- */
.admin { font-size: 15px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.admin-nav nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.admin-nav nav a { text-decoration: none; }
.admin-nav nav a.is-current { font-weight: 600; }
.lbl.fresh { color: var(--rec); }
.admin-main { padding-top: 36px; padding-bottom: 72px; }
.admin .display-md { margin-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 500; font-size: 14px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #E8E2D5; color: var(--ink); }
.btn.is-disabled { opacity: .3; pointer-events: none; }
.btn-coral { background: var(--coral); border-color: var(--coral); font-weight: 600; }
.btn-coral:hover { background: #F07D5F; }
.btn-danger-outline { border-color: var(--danger); color: var(--danger); }
.icon-btn { width: 40px; padding: 0; }

.login { max-width: 420px; margin: 12vh auto; padding: 0 16px; }
.login .display-md { margin-bottom: 28px; }
.empty-state { padding: 64px 0; max-width: 620px; }
.empty-state.small-pad { padding: 40px 0; }

.admin-head { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.stats { margin: 0; display: flex; gap: 32px; }
.stats dd { margin: 0; font-family: var(--f-mono); font-size: 28px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-bottom: 32px;
}
.seg { display: flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg a { min-height: 38px; padding: 0 16px; display: inline-flex; align-items: center; text-decoration: none; font-size: 14px; }
.seg a.on { background: var(--ink); color: var(--paper); }
.search {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--ink); border-radius: 999px;
  min-height: 40px; padding: 0 14px; flex: 1 1 200px; max-width: 280px;
}
.search input { border: 0; background: transparent; font: inherit; font-size: 14px; outline: none; min-width: 0; flex: 1; }
.sel {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink); border-radius: 999px; min-height: 40px; padding: 0 14px;
}
.sel.narrow { width: 82px; }
.age-range { display: inline-flex; gap: 6px; align-items: center; }

.contact-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 36px 20px; }
.sheet-card { text-decoration: none; display: block; }
.sheet-card:hover { color: var(--ink); }
.sheet-card:hover .sheet-photo { outline: 2px solid var(--ink); outline-offset: 3px; }
.sheet-photo { position: relative; aspect-ratio: 3 / 4; background: #2A2622; margin-bottom: 12px; border-radius: 3px; overflow: hidden; }
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; }
.sheet-photo .chip { position: absolute; left: 8px; top: 8px; }
.photo-count { position: absolute; right: 8px; bottom: 8px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); font-size: 10px; }
.sheet-name { font-weight: 600; font-size: 16px; }

.chip { font-family: var(--f-mono); font-weight: 500; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; white-space: nowrap; }
.chip-new { background: var(--rec); color: #fff; }
.chip-shortlist { background: var(--teal); color: #fff; }
.chip-callback { background: var(--sun); color: var(--ink); }
.chip-rejected { background: var(--line); color: var(--ink-2); }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); }
.data { border-collapse: collapse; width: 100%; min-width: 900px; font-size: 14px; }
.data th { text-align: left; font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--ink); }
.data td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data tr:hover td { background: var(--paper-2); }
.foot-note { margin-top: 40px; }

.detail-nav { margin-bottom: 32px; }
.detail { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.detail-photos { flex: 1 1 400px; min-width: 0; max-width: 560px; }
.main-photo { margin: 0 0 10px; position: relative; background: #2A2622; border-radius: 3px; overflow: hidden; }
.main-photo img { width: 100%; max-height: 80vh; object-fit: contain; }
.main-photo figcaption { position: absolute; left: 12px; bottom: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.thumb { padding: 0; border: 0; background: #2A2622; cursor: pointer; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 3px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.detail-info { flex: 999 1 480px; min-width: 0; }
.detail-info > .lbl { margin-bottom: 6px; }
.detail-info .grp { margin-bottom: 32px; }
.link-list { display: flex; flex-direction: column; gap: 4px; }
.quote { font-size: 20px; line-height: 1.5; max-width: 60ch; margin: 8px 0 36px; white-space: pre-line; }
.notes { margin-bottom: 36px; }
.notes .inp { background: var(--paper-2); min-height: 96px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 20px; border-top: 1px solid var(--ink); }
.detail-actions > .lbl { margin-right: auto; }
.detail-actions form { margin: 0; }

.edit-layout { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start; margin-top: 32px; }
.edit-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.edit-side { flex: 1 1 300px; max-width: 400px; min-width: 0; padding: 24px; border: 1px solid var(--ink); border-radius: var(--radius); gap: 20px; }
.edit-h { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--ink); font-family: var(--f-display); font-stretch: 78%; font-weight: 650; font-size: 28px; }
.edit-h-row { border-bottom: 1px solid var(--ink); padding-bottom: 12px; align-items: baseline; }
.edit-h-row .edit-h { border: 0; padding: 0; }
.admin .inp { font-size: 16px; min-height: 46px; padding: 11px 14px; }
.admin textarea.inp { min-height: 80px; }
.note-box { padding: 20px; border-radius: var(--radius); background: var(--sun-pale); }
.card-list { display: flex; flex-direction: column; gap: 16px; }
.card-edit { display: flex; gap: 16px; padding: 20px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--field); }
.card-edit .inp { background: #fff; }
.card-dot { width: 14px; height: 14px; margin-top: 4px; flex: none; border-radius: 50%; }
.card-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card-fields .grid-2 { gap: 16px; }
.card-tools { display: flex; flex-direction: column; gap: 6px; flex: none; }
.icon-round { width: 40px; height: 40px; border: 1px solid var(--field-line); background: var(--field); color: var(--ink); border-radius: 999px; cursor: pointer; font-size: 15px; }
.icon-round:hover { border-color: var(--ink); }
.icon-round.danger { color: var(--danger); }
.empty-cards { padding: 28px; border: 1px dashed var(--field-line); border-radius: var(--radius); text-align: center; color: var(--muted); }
.add-card { min-height: 52px; border: 1px dashed var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.add-card:hover { background: var(--sun-pale); }
.danger-zone { max-width: 560px; margin-top: 96px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.danger-zone .edit-h { align-self: stretch; color: var(--danger); border-color: var(--danger); }
.danger-zone .fld { align-self: stretch; }

.modal {
  width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); overflow: hidden;
}
.modal-match-lbl { font-size: 14px; color: var(--muted); }
.modal-match-lbl code { font-family: var(--f-mono); font-size: 14px; color: var(--ink); background: var(--sun-pale); padding: 1px 6px; border-radius: 4px; }
.modal::backdrop { background: rgba(26, 25, 22, .45); }
.modal-body { margin: 0; padding: 28px; display: flex; flex-direction: column; gap: 16px; border-top: 6px solid var(--danger); }
.modal-title { margin: 0; font-family: var(--f-display); font-stretch: 78%; font-weight: 650; font-size: 28px; line-height: 1.1; }
.modal-text { margin: 0; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.btn.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn.btn-danger:hover { background: #B23620; color: #fff; }
.btn-danger:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .display { margin-bottom: 40px; }
  .display .light { padding-left: 0; }
  .form-layout { padding-top: 48px; }
  .form-aside { display: none; }
  .sec { padding: 48px 0; }
  .sec-intro { margin-bottom: 28px; }
  .minor { padding: 20px 16px; }
  .link-row { flex-wrap: wrap; }
  .link-no { display: none; }
  .link-row .tag { margin-top: 0; }
  .link-add { padding-left: 0; }
  .btn-submit { width: 100%; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .details, .details.wide { grid-template-columns: 110px minmax(0, 1fr); }
  .stats { gap: 20px; }
  .card-edit { flex-wrap: wrap; }
  .card-tools { flex-direction: row; }
}
