:root {
  color-scheme: light;
  --canvas: #fff;
  --surface: #f5f5f7;
  --field-bg: #fff;
  --ink: #1d1d1f;
  --muted: #67676d;
  --line: rgb(0 0 0 / 10%);
  --control: #85858b;
  --accent: #0066cc;
  --primary: #0066cc;
  --primary-hover: #005bb9;
  --success: #146b3a;
  --danger: #c9252d;
  --glass: rgb(255 255 255 / 94%);
  --sheet-shadow: 0 5px 30px rgb(0 0 0 / 22%);
  --ease: cubic-bezier(.28,.11,.32,1);
  --safe-top: max(env(safe-area-inset-top,0px),calc(var(--tg-safe-area-inset-top,0px) + var(--tg-content-safe-area-inset-top,0px)));
  --safe-bottom: max(env(safe-area-inset-bottom,0px),calc(var(--tg-safe-area-inset-bottom,0px) + var(--tg-content-safe-area-inset-bottom,0px)));
  --safe-left: max(env(safe-area-inset-left,0px),calc(var(--tg-safe-area-inset-left,0px) + var(--tg-content-safe-area-inset-left,0px)));
  --safe-right: max(env(safe-area-inset-right,0px),calc(var(--tg-safe-area-inset-right,0px) + var(--tg-content-safe-area-inset-right,0px)));
  --gutter: 20px;
  --header-height: 52px;
  --dock-space: calc(80px + var(--safe-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101012;
  --surface: #202023;
  --field-bg: #19191c;
  --ink: #f5f5f7;
  --muted: #aaaab1;
  --line: rgb(255 255 255 / 14%);
  --control: #8e8e93;
  --accent: #2997ff;
  --success: #64d991;
  --danger: #ff736d;
  --glass: rgb(16 16 18 / 94%);
  --sheet-shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {color-scheme: dark; --canvas: #101012; --ink: #f5f5f7; --muted: #aaaab1; --line: rgb(255 255 255 / 14%); --glass: rgb(16 16 18 / 94%)}
}
* {box-sizing: border-box}
html {scroll-padding-top: calc(var(--safe-top) + var(--header-height) + 20px)}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.02em;
  -webkit-tap-highlight-color: transparent;
}
h1,h2,h3,p,dl,dt,dd {margin: 0}
h1,h2,h3,strong {font-weight: 600}
a {color: inherit}
button,input,textarea,select {font: inherit; color: inherit}
button {border: 0; background: transparent; cursor: pointer}
button,a,input,select,textarea,summary {touch-action: manipulation}
button:disabled {opacity: .4; cursor: default}
button,summary,.btn,.brand,.role-link,.filter-link,.main-nav a {transition: color 120ms var(--ease),background-color 120ms var(--ease)}
:focus-visible {outline: 2px solid var(--accent); outline-offset: 2px}
#screen:focus {outline: none}
[hidden] {display: none !important}
.sr,.icon-only>span {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.i {display: inline-block; flex: none; vertical-align: middle}
.wrap {
  width: 100%; max-width: 1328px; margin-inline: auto;
  padding-left: max(var(--gutter),var(--safe-left));
  padding-right: max(var(--gutter),var(--safe-right));
}
#screen {padding-top: 20px; padding-bottom: calc(40px + var(--dock-space))}
.skip-link {
  position: fixed; top: 4px; left: var(--gutter); z-index: 20; transform: translateY(-180%);
  display: grid; place-items: center; min-height: 44px; padding: 0 16px;
  background: var(--canvas); color: var(--accent); border-radius: 8px;
}
.skip-link:focus {transform: none}

/* The frame mark and the page navigation share the same baseline. */
.topbar {
  position: sticky; top: 0; z-index: 5; isolation: isolate;
  padding-top: var(--safe-top); border-bottom: 1px solid var(--line);
}
.topbar::before {content: ""; position: absolute; inset: 0; z-index: -1; background: var(--canvas)}
.top-inner {display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: var(--header-height)}
.brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; width: fit-content;
  text-decoration: none; white-space: nowrap; font-size: 19px; font-weight: 600; letter-spacing: -.02em;
}
.brand img {width: 32px; height: 32px}
:root[data-theme="dark"] .brand img {filter: invert(1)}
.feed-stamp {color: var(--muted); font-size: 12px; line-height: 1.35; letter-spacing: .005em; text-align: right}
.feed-stamp time {display: block; font-variant-numeric: tabular-nums; white-space: nowrap}
.main-nav {
  display: flex; justify-content: center; align-items: stretch; gap: 8px;
  position: fixed; inset: auto 0 0; z-index: 5;
  padding: 4px max(12px,var(--safe-right)) max(4px,var(--safe-bottom)) max(12px,var(--safe-left));
  background: var(--canvas); border-top: 1px solid var(--line);
}
.main-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-width: 44px; min-height: 48px; color: var(--muted); text-decoration: none;
  font-size: 12px; line-height: 1.3; letter-spacing: 0;
}
.main-nav a[aria-current] {color: var(--accent); font-weight: 600}
body[data-action-bar] .main-nav,body.editing-field .main-nav {display: none}
@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .topbar::before,.main-nav {
    background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
}

/* Casting feed */
.feed-cover {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; min-height: 232px;
  background: #0b0b0c; color: #f5f5f7; border-radius: 16px;
}
.cover-portrait {
  position: absolute; z-index: -1; inset: 0 0 0 auto; width: 58%; height: 100%;
  object-fit: cover; object-position: 52% 45%;
  -webkit-mask-image: linear-gradient(90deg,transparent,#000 32%);
  mask-image: linear-gradient(90deg,transparent,#000 32%);
}
:root[data-theme="dark"] .cover-portrait {filter: brightness(.93)}
.cover-enter {animation: develop 420ms var(--ease) both}
@keyframes develop {from {opacity: .3} to {opacity: 1}}
.cover-copy {max-width: 66%; padding: 28px 20px}
.cover-copy h1 {font-size: clamp(40px,11.2vw,48px); line-height: 1.05; letter-spacing: -.025em}
.cover-stats {
  display: flex; flex-direction: column; flex-wrap: wrap; column-gap: 8px; margin-top: 12px;
  color: #d2d2d6; font-size: 15px; line-height: 1.45; letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
}
.cover-stats span {white-space: nowrap}
.cover-action {margin-top: 24px}
.browse-layout {margin-top: 28px}
.collection-rail,.desktop-label {display: none}
.listing,.role-info,.list-title,.list-title h2,.tools {min-width: 0}
.list-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.list-title,.tools,.collection-key,.sort-key,.search-key {display: flex; align-items: center}
.list-title {gap: 8px}
.list-title h2,.collection-key {font-size: clamp(20px,5.4vw,26px); line-height: 1.15; font-weight: 600; letter-spacing: -.005em}
.collection-key {gap: 4px; min-height: 44px; padding: 0; text-align: left}
.collection-key .i {color: var(--muted)}
.total {color: var(--muted); font-size: 15px; letter-spacing: -.015em; font-variant-numeric: tabular-nums}
.tools {flex: none; gap: 8px}
.search-key,.sort-key,.icon-only,.icon-btn,.list-search button {
  display: inline-flex; justify-content: center; align-items: center; flex: none;
  min-width: 44px; min-height: 44px; padding: 0; border-radius: 8px;
}
.search-key,.sort-key {color: var(--ink); background: var(--surface)}
.sort-key {gap: 8px}
.sort-key span {display: none}
.search {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding-left: 12px;
  background: var(--field-bg); border: 1px solid var(--control); border-radius: 8px;
}
.search>svg {color: var(--muted)}
.search:focus-within {border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px}
.search input {
  flex: 1; min-width: 0; min-height: 44px; border: none; background: none; outline: none;
  font-size: 17px; letter-spacing: -.02em;
}
.search input::-webkit-search-cancel-button {display: none}
.list-search {display: none}
.searching .list-title,.searching .search-key {display: none}
.searching .tools {flex: 1}
.searching .list-search {display: flex}
.filter-nav {display: grid; gap: 8px}
.filter-link {
  display: flex; align-items: center; gap: 12px; min-height: 48px; min-width: 0;
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
  font-size: 15px; line-height: 1.35; letter-spacing: -.015em;
}
.filter-link .i,.counter {color: var(--muted)}
.counter {margin-left: auto; font-size: 14px; letter-spacing: 0; font-variant-numeric: tabular-nums}
.filter-link[aria-current] {background: var(--surface); font-weight: 600}
.filter-link[aria-current] .i {color: var(--accent)}
.role-row {border-bottom: 1px solid var(--line)}
.role-link {
  display: grid; grid-template-columns: minmax(0,1fr) 20px; align-items: center; gap: 12px;
  min-height: 64px; padding: 20px 0; text-decoration: none; border-radius: 4px;
}
.role-byline,.detail-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
  color: var(--muted); font-size: 13px; line-height: 1.4; letter-spacing: 0;
}
.role-byline span,.detail-meta span {overflow-wrap: anywhere}
.role-byline time,.detail-meta time {white-space: nowrap; font-variant-numeric: tabular-nums}
.role-byline time::before,.detail-meta time::before {content: "·"; margin-right: 8px}
.draft-indicator,.age {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  color: var(--muted); background: var(--surface); font-size: 13px; line-height: 1.4; letter-spacing: 0;
}
.role-title {display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px}
.role-title h3 {font-size: 22px; line-height: 1.18; letter-spacing: -.005em; overflow-wrap: anywhere}
.project-name {margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.45; letter-spacing: -.015em; overflow-wrap: anywhere}
.row-facts {display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px}
.row-facts>div,.role-note,.reason {display: flex; align-items: baseline; gap: 8px; min-width: 0; max-width: 100%}
.row-facts dt,.role-note>.i,.reason>.i {align-self: flex-start; color: var(--muted); line-height: 1.4}
.row-facts dd,.role-note,.reason {font-size: 14px; line-height: 1.43; letter-spacing: 0; overflow-wrap: anywhere}
.row-facts dd {color: var(--muted)}
.role-note,.reason {margin-top: 8px; color: var(--muted)}
.role-note>.i,.reason>.i {margin-top: 2px}
.reason.positive,.reason.positive>.i {color: var(--success)}
.row-arrow {color: var(--muted); justify-self: end}
.group-title {padding: 20px 0 8px; font-size: 17px; letter-spacing: -.02em}
.empty-state {padding: 48px 20px; text-align: center}
.empty-icon {display: inline-flex; margin-bottom: 16px; color: var(--muted)}
.empty-state :is(h1,h3) {font-size: 22px; line-height: 1.2; letter-spacing: -.005em}
.empty-state p {max-width: 440px; margin: 8px auto 0; color: var(--muted); font-size: 15px; letter-spacing: -.015em}
.empty-state .btn {margin-top: 20px}
.loading {min-height: 232px; padding-top: 40px; text-align: center; color: var(--muted)}
.entry-note {max-width: 640px; padding-top: 32px}
.entry-note p {color: var(--muted)}

/* Actions and links */
.btn,.back-link,.text-link {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-width: 44px; min-height: 44px; text-decoration: none;
  font-size: 15px; line-height: 1.35; font-weight: 400; letter-spacing: -.015em;
}
.btn {padding: 8px 16px; border: 1px solid transparent; border-radius: 10px; text-align: center; cursor: pointer}
.btn.primary {background: var(--primary); color: #fff}
.btn[aria-busy="true"] {position: relative; color: transparent; opacity: 1}
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--ink); border-right-color: transparent; animation: submitting 700ms linear infinite;
}
.btn.primary[aria-busy="true"]::after {border-color: #fff; border-right-color: transparent}
@keyframes submitting {to {transform: rotate(1turn)}}
.btn.secondary {border-color: var(--control); color: var(--ink); background: transparent}
.btn.quiet,.text-link {color: var(--accent)}
.cover-action {border-radius: 99px; padding-inline: 16px}
.back-link {padding: 0; color: var(--muted)}
.text-link {text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere}
.btn.icon-only {width: 44px; height: 44px; padding: 0; background: var(--surface); border-radius: 50%}
.btn,.collection-key,.sort-key,.search-key {transition: transform 120ms var(--ease),background-color 120ms var(--ease),color 120ms var(--ease)}
.btn:active:not(:disabled),.sort-key:active,.search-key:active,.collection-key:active {transform: scale(.97)}
.link-row,.photo-upload,.save-row,.draft-tools {display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px}
.link-row,.photo-upload,.save-row {margin-top: 16px}
.small-note,.help,.form-message {color: var(--muted); font-size: 14px; line-height: 1.43; letter-spacing: 0}
.help {max-width: 620px; margin-bottom: 16px}
.form-message.error,.field-error {color: var(--danger)}
.form-message:empty,.link-row:empty,.photos:empty {display: none}

/* Role, response editor and actor profile */
.page-heading {padding: 20px 0 28px}
.page-heading h1,.detail-heading h1 {
  font-size: clamp(36px,8vw,64px); line-height: 1.07; letter-spacing: -.025em; overflow-wrap: anywhere;
}
.page-heading p,.detail-heading>p:not(.reason):not(.source-name) {
  max-width: 640px; margin-top: 12px; color: var(--muted); font-size: 19px; letter-spacing: -.015em; line-height: 1.35;
}
.page-heading+.browse-layout {margin-top: 8px}
.detail-heading {padding: 16px 0 32px}
.detail-meta,.detail-heading>.source-name {margin-bottom: 12px}
.detail-meta .source-name {font-size: inherit}
.source-name {color: var(--muted); font-size: 14px; letter-spacing: 0}
.source-name>.i {margin-right: 4px}
.detail-main,.profile-sections {min-width: 0}
.panel {min-width: 0; margin-bottom: 32px}
.panel h2,.section-heading,.dialog-head h2 {
  display: block; margin-bottom: 16px; font-size: 22px; line-height: 1.2; letter-spacing: -.005em; font-weight: 600;
}
.pre {max-width: 640px; white-space: pre-wrap; overflow-wrap: anywhere}
.detail-facts {max-width: 640px}
.detail-facts>div {
  display: grid; grid-template-columns: minmax(0,2fr) minmax(0,3fr); gap: 16px;
  padding-block: 12px; border-bottom: 1px solid var(--line);
}
.detail-facts dt {color: var(--muted); font-size: 15px; letter-spacing: -.015em}
.detail-facts dd {overflow-wrap: anywhere; font-variant-numeric: tabular-nums}
.small-heading {margin: 20px 0 8px; font-size: 17px; letter-spacing: -.02em}
.actions-panel,.import-panel {padding: 20px; background: var(--surface); border-radius: 16px}
.actions-panel h2,.import-panel h2 {font-size: 20px}
.actions-panel>.btn,.actions-panel>.small-note,.actions-panel>.status-label {margin-block: 4px}
.status-label,.notice {color: var(--success); font-size: 15px}
.status-label .i {margin-right: 8px}
.notice {margin-top: 12px}
.role-actions,.draft-save {
  position: fixed; z-index: 4; inset: auto 0 var(--keyboard-gap,0px);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; border-top: 1px solid var(--line); background: var(--canvas);
  padding: 8px max(12px,var(--safe-right)) max(8px,var(--safe-bottom)) max(12px,var(--safe-left));
}
.role-actions>.primary,.draft-save>.primary {flex: 1}
.dock-back,.reminder-key {width: 44px; height: 44px; flex: none; padding: 0}
.dock-back>span,.reminder-key>span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
body[data-action-bar] .back-link {display: none}
.profile-layout {display: grid; gap: 28px}
.import-panel {margin: 0; align-self: start}
.import-panel form {display: grid; gap: 12px}
.import-panel .btn {justify-self: start}
.import-panel .form-message:not(:empty) {margin-top: 12px}
.fields {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 12px}
.fields>.field {grid-column: 1 / -1}
.fields>.field:is([data-field="from"],[data-field="to"]) {grid-column: span 1}
.field {display: flex; flex-direction: column; gap: 8px; min-width: 0}
.field>span {font-size: 14px; letter-spacing: 0; color: var(--muted)}
.field>span.section-heading {margin: 0 0 4px; color: var(--ink); font-size: 22px; letter-spacing: -.005em}
.field input,.field textarea,.field select,.import-photo select {
  width: 100%; min-width: 0; min-height: 48px; padding: 8px 12px;
  border: 1px solid var(--control); border-radius: 8px; background: var(--field-bg);
  color: var(--ink); font-size: 17px; line-height: 1.47; letter-spacing: -.02em;
}
.field textarea {resize: vertical}
.field input:focus,.field select:focus,.field textarea:focus {border-color: var(--accent)}
input::placeholder,textarea::placeholder {color: var(--muted); opacity: 1}
.field small {font-size: 14px; letter-spacing: 0; color: var(--muted)}
.field [aria-invalid="true"] {border-color: var(--danger)}
.field small.field-error {display: flex; align-items: baseline; gap: 8px; color: var(--danger)}
.field-error .i {align-self: flex-start; margin-top: 2px}
.accordion {border-top: 1px solid var(--line); margin: 0}
.accordion summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding-block: 12px; font-size: 17px; font-weight: 600;
  list-style: none; cursor: pointer;
}
.accordion summary::-webkit-details-marker {display: none}
.accordion summary .i {color: var(--muted); transition: transform 220ms var(--ease)}
.accordion[open] {padding-bottom: 24px}
.accordion[open] summary .i {transform: rotate(180deg)}
.accordion+.panel:not(.accordion) {margin-block: 20px}
.save-row:not(.draft-save) {margin: 20px 0 40px}
#profile-form>.save-row {padding-top: 20px; border-top: 1px solid var(--line); margin-top: 0}
.draft-tools {justify-content: space-between; margin-top: 8px}
.draft-tools .quiet {padding-left: 0}
.form-wrap {max-width: 760px; margin-inline: auto}
.form-wrap>.accordion {margin-bottom: 24px; border-bottom: 1px solid var(--line)}
.source-options {max-height: 280px; overflow: auto; overscroll-behavior: contain; margin-top: 12px}
.source-options label,.check-row,.import-field {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  padding-block: 8px; font-size: 15px; letter-spacing: -.015em; cursor: pointer;
}
.source-options label+label,.import-field+.import-field {border-top: 1px solid var(--line)}
.source-options span,.import-field span {min-width: 0; overflow-wrap: anywhere}
.source-options small,.import-field small {display: block; color: var(--muted); font-size: 13px; letter-spacing: 0}
input[type="checkbox"] {width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--primary)}
.photo-upload {align-items: flex-end}
.file-label {position: relative}
.file-label:focus-within {outline: 2px solid var(--accent); outline-offset: 2px}
.file-label input {position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer}
.photos,.import-photos {display: grid; grid-template-columns: repeat(auto-fill,minmax(min(132px,100%),1fr)); gap: 16px}
.photo-tile,.import-photo {display: flex; flex-direction: column; gap: 8px; min-width: 0}
.photo-tile img,.import-photo img {width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; background: var(--surface); border-radius: 8px}
.photo-tile>span {display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 8px; font-size: 14px; letter-spacing: 0}
.photo-tile.selectable {cursor: pointer}
.photo-tile.selectable>span {justify-content: flex-start}
.photo-tile:has(:checked) img {outline: 2px solid var(--accent); outline-offset: 2px}
.portfolio-panel .form-message:not(:empty) {margin-top: 12px}

/* Native dialogs switch from a bottom sheet to a centred panel. */
html:has(dialog[open]) {overflow: hidden}
dialog {
  --sheet-height: min(calc(100dvh - var(--safe-top) - 16px),calc(var(--visual-height,100dvh) - 16px));
  position: fixed; inset: auto var(--safe-right) var(--keyboard-gap,0px) var(--safe-left);
  width: auto; max-width: none; max-height: var(--sheet-height); margin: 0; padding: 0;
  overflow: hidden; border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0;
  color: var(--ink); background: var(--canvas); box-shadow: var(--sheet-shadow);
}
dialog::backdrop {background: rgb(0 0 0 / 48%)}
dialog[open] {animation: sheet-in 320ms cubic-bezier(.16,1,.3,1)}
@keyframes sheet-in {from {opacity: 0; transform: translateY(12px)} to {opacity: 1; transform: none}}
.sheet-frame {display: flex; flex-direction: column; min-height: 0; max-height: var(--sheet-height); padding-bottom: max(8px,var(--safe-bottom))}
.dialog-head,.sheet-footer {display: flex; flex: none; align-items: center; gap: 8px; padding: 16px 20px}
.dialog-head {justify-content: space-between; padding-bottom: 8px}
.dialog-head h2 {margin: 0}
.sheet-body {min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 20px}
.sheet-body>.field~.field,.sheet-body>.small-note,.sheet-body>.form-message:not(:empty) {margin-top: 16px}
.sheet-footer {flex-wrap: wrap; border-top: 1px solid var(--line)}
.sheet-footer .primary {flex: 1}
.sort-options {display: grid; gap: 8px}
.sort-options button {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 12px; min-height: 48px; text-align: left; border-radius: 8px;
}
.sort-options button[aria-pressed="true"] {background: var(--surface)}
.option-check {display: inline-flex; color: var(--accent)}
.import-heading {margin: 24px 0 8px; font-size: 17px}
.import-field {align-items: flex-start}
.import-field input {margin-top: 4px}
.import-photo span {font-size: 14px; letter-spacing: 0}
.toast {
  position: fixed; z-index: 8; left: 50%; bottom: var(--dock-space); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); padding: 12px 16px;
  background: var(--ink); color: var(--canvas); border-radius: 12px; font-size: 14px; letter-spacing: 0;
}

@media (max-width: 359px) {
  :root {--gutter: 16px}
  .cover-copy {max-width: 72%; padding: 24px 16px}
  .cover-portrait {width: 54%; object-position: 40% 45%}
  .cover-action {font-size: 14px; padding-inline: 12px}
  .tools {gap: 4px}
  .collection-key {font-size: 19px}
  .list-title {gap: 4px}
}
@media (min-width: 480px) {
  .cover-copy {padding: 32px}
  .cover-stats {flex-direction: row}
  .cover-stats span+span::before {content: "·"; margin-right: 8px}
  .fields>.field:not(.wide) {grid-column: span 1}
  .sort-key {padding-inline: 12px}
  .sort-key span {display: inline; font-size: 14px; letter-spacing: 0}
}
@media (min-width: 768px) {
  :root {--gutter: clamp(40px,4.7vw,72px); --dock-space: 24px}
  html {scrollbar-gutter: stable}
  #screen {padding-top: 32px; padding-bottom: 80px}
  .top-inner {display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px}
  .main-nav,body[data-action-bar] .main-nav,body.editing-field .main-nav {
    position: static; display: flex; align-self: stretch; padding: 0; gap: 24px;
    border: none; background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .main-nav a {position: relative; flex: none; padding-inline: 4px; font-size: 14px}
  .main-nav .i {display: none}
  .main-nav a[aria-current] {color: var(--ink)}
  .main-nav a[aria-current]::after {content: ""; position: absolute; inset: auto 4px 0; height: 2px; background: currentColor}
  .feed-stamp {justify-self: end}
  .feed-stamp time {display: inline}
  .feed-cover {min-height: clamp(272px,23vw,328px); border-radius: 20px}
  .cover-copy {max-width: 54%; padding: 40px clamp(40px,4vw,64px)}
  .cover-portrait {object-position: 68% 45%}
  .cover-copy h1 {font-size: clamp(64px,6vw,88px); letter-spacing: -.03em}
  .cover-stats {font-size: 19px; letter-spacing: -.015em; column-gap: 12px}
  .cover-stats span+span::before {margin-right: 12px}
  .cover-action {margin-top: 28px; padding-inline: 20px}
  .browse-layout {
    display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0,2.9fr);
    align-items: start; gap: clamp(32px,4.2vw,64px); margin-top: 48px;
  }
  .collection-rail {position: sticky; top: calc(var(--header-height) + var(--safe-top) + 24px); display: block}
  .collection-rail h2 {margin: 12px 12px 16px; color: var(--muted); font-size: 14px; line-height: 1.43; letter-spacing: 0}
  .desktop-label {display: inline}
  .collection-key {display: none}
  .list-toolbar {padding-bottom: 16px}
  .list-title {gap: 12px}
  .list-title h2 {font-size: clamp(26px,2.3vw,32px); letter-spacing: -.015em}
  .searching .list-title {display: flex}
  .searching .tools {flex: 0 1 400px}
  .role-link {padding: 24px 0; gap: 24px}
  .role-title h3 {font-size: 26px}
  .row-facts {column-gap: 20px}
  .page-heading {padding: 20px 0 40px}
  .page-heading+.browse-layout {margin-top: 12px}
  .page-heading p,.detail-heading>p:not(.reason):not(.source-name) {font-size: 21px; letter-spacing: -.005em}
  .detail-heading {padding: 20px 0 40px}
  .detail-layout,.profile-layout {display: grid; grid-template-columns: minmax(0,1fr) minmax(236px,31%); gap: clamp(32px,5vw,80px); align-items: start}
  .detail-wrap,.profile-page {max-width: 1104px; margin-inline: auto}
  .panel {margin-bottom: 40px}
  .actions-panel,.import-panel {padding: 24px; position: sticky; top: calc(var(--header-height) + var(--safe-top) + 24px)}
  .actions-panel .btn {width: 100%}
  .actions-panel>.btn.quiet {justify-content: flex-start}
  .actions-panel>.btn.secondary {margin-top: 8px}
  .role-actions,.draft-save {position: static; margin: 0; padding: 0; border: 0; background: none}
  .role-actions {display: grid; justify-content: stretch}
  .role-actions .reminder-key {width: auto; height: auto; padding: 8px 12px}
  .reminder-key>span {position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal}
  .dock-back {display: none}
  body[data-action-bar] .back-link {display: inline-flex}
  .draft-save {display: inline-flex; margin-bottom: 32px}
  .profile-sections {grid-area: 1 / 1}
  .import-panel {grid-area: 1 / 2; margin: 0}
  .fields {gap: 20px 16px}
  .accordion {margin: 0}
  dialog {
    --sheet-height: min(84dvh,calc(var(--visual-height,100dvh) - 40px));
    inset: 0; width: min(432px,calc(100% - 40px)); margin: auto;
    border: 1px solid var(--line); border-radius: 18px;
  }
  #import-dialog {width: min(640px,calc(100% - 40px))}
  .sheet-frame {padding-bottom: 0}
  .sheet-footer .primary {flex: none}
}
@media (hover: hover) {
  .btn.primary:hover {background: var(--primary-hover)}
  .btn.secondary:hover,.filter-link:not([aria-current]):hover,.sort-options button:hover,.back-link:hover {background: var(--surface)}
  .btn.quiet:hover,.text-link:hover,.main-nav a:hover,.role-link:hover h3,.role-link:hover .row-arrow {color: var(--accent)}
  .search-key:hover,.sort-key:hover,.icon-only:hover,.icon-btn:hover {color: var(--accent)}
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {animation: none !important; transition: none !important; scroll-behavior: auto !important}
  .btn:active:not(:disabled),.sort-key:active,.search-key:active,.collection-key:active {transform: none}
}
