.sheet-workspace .command-header { min-height: 108px; padding-block: 18px; }
.sheet-workspace .command-header h1 { font-size: 1.55rem; margin-bottom: 6px; }
.sheet-workspace .command-main { padding-top: 24px; }
.sheet-workspace .view-heading h2 { font-size: 1.75rem; }
#view-dressing .view-heading { margin-bottom: 16px; gap: 14px; }
#view-dressing .view-heading .eyebrow { margin-bottom: 4px; }
/* Clear, familiar sheets; assignment map is a directory, not a venue floor plan. */
.sheet-guide { display: flex; gap: 14px; align-items: baseline; padding: 14px clamp(24px, 4vw, 62px); border-bottom: 1px solid var(--line); background: var(--blue-soft); color: #23376b; font-size: .84rem; }
.sheet-guide strong { white-space: nowrap; }
.sheet-guide[hidden], #view-dressing [hidden], #navDressingCount[hidden] { display: none !important; }
.data-table { font-size: .84rem; }
.data-table th { font-size: .72rem; letter-spacing: .025em; }
.table-scroll { max-height: 70vh; }
.data-table thead th { position: sticky; top: 0; z-index: 2; }
.data-table tbody tr:nth-child(even) td { background: #f3f1eb; }
.data-table tbody tr:hover td { background: #ecf1fb; }
.data-table td:first-child, .data-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.data-table th:first-child { z-index: 3; background: #e9dfd0; }
.artist-link b { text-decoration: underline; text-underline-offset: 3px; }
.dr-topbar, .dr-savebar, .dr-sheet-caption, .dr-bottom, .dr-map-intro { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.dr-topbar { justify-content: flex-start; margin-bottom: 12px; }
.dr-view-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: #e8e4dc; }
.dr-view-switch button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; background: transparent; color: #4e535d; font-weight: 700; cursor: pointer; }
.dr-view-switch button[aria-pressed="true"] { color: #17233a; background: white; box-shadow: 0 1px 5px #1018271c; }
.dr-filter { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; }
.dr-filter select, .dr-table select, .dr-table input, .dr-add-dialog input, .dr-add-dialog select { min-height: 44px; padding: 10px 12px; border: 1px solid #959baa; border-radius: 6px; background: white; color: var(--ink); font: inherit; }
.dr-filter select { max-width: 100%; }
.dr-status { margin: 8px 0 14px; color: #505762; font-size: .84rem; }
.dr-savebar { padding: 12px 16px; background: #fff; border: 1px solid var(--line-strong); border-bottom: 3px solid #3157c8; border-radius: 10px 10px 0 0; }
.dr-savebar > div, .dr-bottom > div { display: flex; flex-wrap: wrap; gap: 8px; }
#drUnsaved { font-size: .86rem; font-weight: 700; color: #245744; }
#drUnsaved.has-changes { color: #805015; }
.dr-conflict { padding: 16px; border: 2px solid #9d4f19; border-radius: 8px; background: #fff1db; color: #653111; }
.dr-sheet-caption { padding: 14px 2px; gap: 6px 20px; font-size: .8rem; color: #535b68; }
.dr-sheet-caption p { margin: 0; }
.dr-fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.dr-table-scroll { max-height: 64vh; overflow: auto; border: 1px solid #b5b9c2; background: white; border-radius: 8px; }
.dr-table { width: 100%; min-width: 880px; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
.dr-table thead th { position: sticky; top: 0; z-index: 3; height: 48px; padding: 10px 12px; text-align: left; border-right: 1px solid #c6cbd4; border-bottom: 2px solid #a4adbd; background: #e5eaf3; color: #243249; font-size: .82rem; }
.dr-table thead button { padding: 0; min-height: 28px; border: 0; background: none; color: inherit; text-align: left; font: inherit; font-weight: 700; cursor: pointer; }
.dr-table td, .dr-table tbody th { padding: 10px 12px; border-bottom: 1px solid #d7dbe2; border-right: 1px solid #d7dbe2; text-align: left; vertical-align: middle; font-weight: 400; background: white; }
.dr-table tbody tr:nth-child(even) > * { background: #f5f7fb; }
.dr-table tbody tr:hover > * { background: #edf3ff; }
.dr-table tbody th, .dr-table thead th:nth-child(2) { position: sticky; left: 0; z-index: 2; min-width: 205px; max-width: 255px; border-right: 2px solid #bbc4d2; }
.dr-table thead th:nth-child(2) { z-index: 4; }
.dr-table small { display: block; margin-top: 3px; color: #5a6474; font-size: .76rem; font-weight: 400; }
.dr-table select { min-width: 185px; width: 100%; }
.dr-table input { min-width: 200px; width: 100%; }
.dr-table input::placeholder { color: #6a7280; }
.dr-table .dr-row-number { color: #687386; text-align: center; font-size: .75rem; }
.dr-table td:nth-child(4) { min-width: 165px; max-width: 250px; }
.dr-table td:focus-within { background: #e0eaff !important; }
.dr-table :focus-visible, #view-dressing :focus-visible, .dr-add-dialog :focus-visible { outline: 3px solid #214daa; outline-offset: 2px; }
.dr-print-value { display: none; }
.dr-bottom { padding-top: 18px; align-items: flex-start; }
.dr-bottom p { flex: 1 1 300px; margin: 0; max-width: 640px; color: #606877; font-size: .76rem; }
.dr-bottom button { font-size: .78rem; }
.dr-map-intro { padding: 18px 0; align-items: flex-start; }
.dr-map-intro h3 { margin: 0; font-size: 1.1rem; }
.dr-map-intro > p { flex: 0 1 420px; margin: 0; color: #606877; font-size: .82rem; }
#drRooms { padding: 22px; border: 1px solid #b5bdcb; border-radius: 12px; background-color: #edf0f4; background-image: linear-gradient(#b4bfd426 1px,transparent 1px),linear-gradient(90deg,#b4bfd426 1px,transparent 1px); background-size: 20px 20px; }
.dr-map-section + .dr-map-section { margin-top: 28px; }
.dr-map-section h4 { margin: 0 0 12px; font-size: .82rem; letter-spacing: .04em; color: #34445f; }
.dr-map-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.dr-map-section:nth-child(n+2) .dr-map-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.dr-room-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 2px solid #7890ae; border-top-width: 6px; background: #fff; border-radius: 4px; box-shadow: 4px 4px 0 #1018270c; }
.dr-map-section:nth-child(2) .dr-room-card { border-color: #568578; }
.dr-map-section:nth-child(3) .dr-room-card { border-color: #a9a49b; border-style: dashed; box-shadow: none; }
.dr-room-card header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px; padding: 14px; border-bottom: 1px solid #dfe4ec; background: #f1f5fb; }
.dr-room-card h3 { margin: 0; font-size: 1rem; color: #273e60; }
.dr-room-card header > span { font-size: .74rem; color: #566375; }
.dr-room-card ul { list-style: none; padding: 0 14px; margin: 0; }
.dr-room-card li { padding: 10px 0; border-bottom: 1px solid #e7e9ed; }
.dr-room-card li:last-child { border: 0; }
.dr-room-card li > strong { display: block; font-size: .85rem; }
.dr-room-card li > span, .dr-room-card li > p { display: block; margin: 3px 0 0; font-size: .75rem; color: #596577; overflow-wrap: anywhere; }
.dr-room-card button { align-self: flex-start; margin: auto 14px 12px; padding-top: 12px; font-size: .75rem; text-align: left; }
.dr-empty { padding: 18px; color: #616978; font-size: .85rem; }
.dr-add-dialog { width: min(480px,calc(100vw - 28px)); max-height: 90dvh; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
.dr-add-dialog::backdrop { background: #101827b3; }
.dr-add-dialog h2 { font-size: 1.45rem; margin: 0 0 10px; }
.dr-add-dialog p { font-size: .85rem; color: #596273; }
.dr-add-dialog label { display: block; margin: 14px 0; font-size: .85rem; font-weight: 700; }
.dr-add-dialog label span { font-weight: 400; }
.dr-add-dialog input, .dr-add-dialog select { display: block; width: 100%; margin-top: 5px; font-weight: 400; }
.dr-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
#drAddError { color: #a32c36; }
#navDressingCount { width: auto; padding-inline: 5px; white-space: nowrap; font-size: .6rem; }
@media (max-width: 1120px) { .dr-map-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 720px) {
  .sheet-guide { padding: 12px 16px; flex-direction: column; gap: 5px; }
  .dr-savebar { gap: 12px; }
  .dr-savebar > div { width: 100%; }
  .dr-savebar button { flex: 1; padding-inline: 10px; }
  .dr-topbar { align-items: stretch; }
  .dr-view-switch { width: 100%; }
  .dr-view-switch button { flex: 1; padding-inline: 10px; }
  .dr-filter { width: 100%; }
  .dr-filter select { flex: 1; min-width: 0; }
  .dr-table { font-size: .84rem; }
  .dr-table tbody th, .dr-table thead th:nth-child(2) { min-width: 148px; max-width: 168px; }
  .dr-map-grid, .dr-map-section:nth-child(n+2) .dr-map-grid { grid-template-columns: 1fr; }
  #drRooms { padding: 16px; }
  .dr-bottom > div { width: 100%; }
}
@media print {
  body.printing-dressing .production-rail, body.printing-dressing .command-header, body.printing-dressing #sheetGuide, body.printing-dressing .ihfa-account-bar, body.printing-dressing #appStatus, body.printing-dressing .view-panel:not(#view-dressing), body.printing-dressing .dr-topbar, body.printing-dressing .dr-savebar, body.printing-dressing #drStatus, body.printing-dressing .dr-bottom > div, body.printing-dressing #drAdd, body.printing-dressing #toast { display: none !important; }
  body.printing-dressing .app-frame, body.printing-dressing .app-stage { display: block; }
  body.printing-dressing .command-main { padding: 0; min-height: 0; background: white; }
  body.printing-dressing .dr-table-scroll { overflow: visible; max-height: none; border: 0; }
  body.printing-dressing .dr-table { min-width: 0; font-size: 10pt; }
  body.printing-dressing .dr-table th, body.printing-dressing .dr-table td { position: static; min-width: 0; max-width: none; padding: 6px; }
  body.printing-dressing .dr-table input, body.printing-dressing .dr-table select { display: none; }
  body.printing-dressing .dr-print-value { display: inline; }
  body.printing-dressing .dr-room-card { break-inside: avoid; }
  body.printing-dressing .dr-room-card button { display: none; }
  body.printing-dressing #drRooms { background: white; padding: 0; border: 0; }
  body.printing-dressing .dr-map-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .sheet-workspace .command-header { gap: 12px; padding-block: 14px; }
  .sheet-workspace .command-header .eyebrow { display: none; }
  .sheet-workspace .command-header h1 { font-size: 1.22rem; }
  .sheet-workspace .show-line { font-size: .69rem; }
}

#drSheet, #drMap, #view-dressing button, #view-dressing input, #view-dressing select { scroll-margin-top: 125px; scroll-margin-bottom: 30px; }
.dr-scroll-hint { margin: 0 0 8px; color: #586273; font-size: .78rem; }
@media (max-width: 720px) {
  .dr-table { min-width: 740px; }
  .dr-table th:first-child, .dr-table .dr-row-number { display: none; }
  .dr-table tbody th, .dr-table thead th:nth-child(2) { width: 148px; }
  .dr-table td:nth-child(3), .dr-table thead th:nth-child(3) { width: 176px; padding-inline: 8px; }
  .dr-table select { min-width: 155px; padding-inline: 6px; }
}
@media print { .dr-scroll-hint { display: none; } }
