:root {
  --paper: #f8f5f2;
  --card: #fffdfb;
  --ink: #2d2228;
  --muted: #6b5b65;
  --plum: #6b3650;
  --plum-dark: #503044;
  --rose: #f0e3e9;
  --line: #e8dce1;
  --pending-ink: #785015;
  --pending-paper: #f6ebd7;
  --accepted-ink: #2e5b43;
  --accepted-paper: #e8efe7;
  --closed-ink: #6d5661;
  --closed-paper: #efe8eb;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: inherit; }
p, h1, h2, h3, dl, dd { margin: 0; }
h1, h2, h3 { letter-spacing: -.045em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
.shell { width: min(100% - 64px, 1040px); margin-inline: auto; }
.skip-link { position: absolute; top: 8px; left: 12px; padding: 8px; z-index: 2; background: white; transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.masthead { background: #33262e; color: #fff9f8; }
.masthead-inner, .identity, .account, .demo-inner, .page-heading, .page-actions {
  display: flex;
  align-items: center;
}
.masthead-inner { min-height: 74px; justify-content: space-between; gap: 16px; }
.identity { gap: 16px; font-weight: 650; font-size: 14px; white-space: nowrap; }
.wordmark { font: 20px/1 Georgia, "Times New Roman", serif; letter-spacing: .19em; }
.identity-divider { width: 1px; height: 22px; background: #8c7483; }
.account { gap: 13px; font-size: 13px; }
#account-name { color: #f1dfe8; overflow-wrap: anywhere; }
.account a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; text-underline-offset: 4px; }
.account a:focus-visible { outline-color: white; }
.demo { background: #f0e6eb; color: var(--plum-dark); border-bottom: 1px solid var(--line); font-size: 13px; }
.demo-inner { min-height: 48px; justify-content: space-between; flex-wrap: wrap; }
.demo button { background: transparent; border: 0; font-size: 13px; color: inherit; min-height: 44px; padding-inline: 10px; }
.demo button[aria-pressed="true"] { font-weight: 750; text-decoration: underline; text-underline-offset: 5px; }

.main { padding-block: 46px 80px; }
.page-heading { justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 30px; }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; line-height: 1.14; }
.page-heading p { color: var(--muted); margin-top: 9px; font-size: 15px; }
.page-actions, .inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  min-height: 44px; padding: 8px 15px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.primary { background: var(--plum); color: white; }
.primary:hover { background: var(--plum-dark); }
.secondary { color: var(--plum-dark); border-color: #dfcdd6; background: var(--card); }
.secondary:hover { background: var(--rose); }
.button:active { transform: translateY(1px); }
.navigation { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 21px; }
.navigation button { min-height: 44px; padding: 0 2px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 650; }
.navigation button[aria-current="page"] { border-bottom-color: var(--plum); color: var(--plum); font-weight: 800; }
.navigation button:hover { color: var(--plum); }
.notice { padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; color: var(--plum-dark); background: var(--rose); }
.notice.error, .form-error { color: #8f2634; background: #faeeef; }
.content-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; flex-wrap: wrap; }
.section-title { font-size: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 5px 7px; }
.filter { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 8px; padding: 7px 11px; min-height: 44px; font-size: 13px; }
.filter[aria-pressed="true"], .filter:hover { background: var(--rose); color: var(--plum-dark); border-color: #e3cfd8; }
.filter[aria-pressed="true"] { font-weight: 750; }
.filter span { margin-left: 5px; font-variant-numeric: tabular-nums; }
.list { display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.booking { display: grid; grid-template-columns: 96px minmax(0,1fr); }
.date-block { border-right: 1px solid var(--line); padding: 19px 12px; text-align: center; color: var(--plum-dark); background: #fbf6f8; border-radius: 13px 0 0 13px; }
.date-block small, .date-block span { display: block; font-size: 13px; }
.date-block strong { display: block; font: 37px/.98 Georgia, serif; margin: 6px 0 7px; font-variant-numeric: lining-nums tabular-nums; }
.booking-body { padding: 17px 20px; min-width: 0; }
.card-heading, .slot-main, .partner-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-heading { align-items: flex-start; }
.card-heading h3 { font-size: 21px; line-height: 1.23; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; min-height: 26px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.pending { color: var(--pending-ink); background: var(--pending-paper); }
.accepted { color: var(--accepted-ink); background: var(--accepted-paper); }
.declined, .withdrawn, .unassigned { color: var(--closed-ink); background: var(--closed-paper); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 12px; color: var(--muted); margin-top: 7px; font-size: 14px; }
.meta span { overflow-wrap: anywhere; }
.note { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.slots { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.slot { padding-block: 7px; }
.slot + .slot { border-top: 1px solid #f1e8ec; }
.slot-info, .fee { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.slot-role { font-weight: 750; min-width: 60px; font-size: 14px; }
.slot-partner { font-size: 14px; overflow-wrap: anywhere; }
.slot-fee { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot .button { font-size: 13px; padding-inline: 11px; }
.history { color: var(--muted); font-size: 13px; padding-top: 2px; }
.history summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; }
.history ul { margin: 0 0 5px; padding-left: 20px; }
.offer-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 15px; }
.fee { color: var(--muted); font-size: 13px; }
.fee strong { color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.partner-row { padding: 13px 17px; }
.partner-row h3 { font-size: 17px; overflow-wrap: anywhere; }
.partner-row p { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); border: 1px dashed #ddcdd6; border-radius: 14px; }
.empty p + .button { margin-top: 12px; }

dialog { width: min(100% - 28px, 590px); max-height: 92dvh; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgb(45 34 40 / .52); }
#dialog-form { padding: 22px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-heading h2 { font-size: 25px; }
.dialog-heading p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.close { border: 0; color: var(--plum-dark); background: var(--rose); border-radius: 8px; font-size: 24px; width: 44px; height: 44px; line-height: 1; flex: 0 0 auto; }
.fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; font-size: 13px; font-weight: 700; }
.field small { font-size: 12px; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  min-width: 0; width: 100%; min-height: 44px; padding: 8px 10px;
  border-radius: 7px; border: 1px solid #d6c5ce; color: var(--ink); background: #fff; font-size: 16px; font-weight: 500;
}
.field textarea { resize: vertical; }
.field + .field, .field + .fields-grid, .fields-grid + .field, .field + fieldset, fieldset + fieldset { margin-top: 12px; }
.fields-grid > .field { margin: 0; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 10px; margin: 0; }
legend { padding-inline: 4px; color: var(--plum-dark); font-size: 13px; font-weight: 750; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.form-error { border-radius: 8px; padding: 10px 12px; margin-top: 14px; font-size: 14px; }

@media (max-width: 660px) {
  .shell { width: calc(100% - 32px); }
  .masthead-inner { min-height: 60px; }
  .identity { font-size: 12px; gap: 8px; }
  .wordmark { font-size: 15px; letter-spacing: .11em; }
  .identity-divider { height: 17px; }
  #account-name { display: none; }
  .account { font-size: 12px; }
  .main { padding-top: 27px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 21px; }
  .page-heading p { font-size: 14px; }
  .booking { grid-template-columns: 56px minmax(0,1fr); }
  .date-block { padding: 15px 4px; }
  .date-block strong { font-size: 30px; }
  .date-block small, .date-block span { font-size: 11px; }
  .booking-body { padding: 14px 12px; }
  .card-heading { flex-wrap: wrap-reverse; justify-content: flex-start; row-gap: 6px; }
  .card-heading h3 { flex-basis: 100%; font-size: 19px; }
  .meta { font-size: 13px; }
  .slot-main { align-items: flex-start; flex-wrap: wrap; gap: 5px; }
  .slot-info { flex: 1 1 145px; }
  .offer-footer .inline-actions { width: 100%; }
  .offer-footer .button { flex: 1; }
  .partner-row { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .fields-grid { grid-template-columns: 1fr; }
  #dialog-form { padding: 16px; }
}
.applicant { padding: 20px; }
.applicant-details { display: grid; grid-template-columns: 6em 1fr; gap: 8px 12px; margin: 18px 0; }
.applicant-details dt { color: var(--muted); }
.applicant-details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.applicant-details a { display: inline-block; margin-right: 12px; color: var(--plum); }
.portfolio-file { margin: 0 0 8px; max-width: 100%; }
.portfolio-file summary { color: var(--plum); cursor: pointer; font-weight: 650; }
.portfolio-file img { display: block; width: auto; max-width: 100%; max-height: 76vh; margin: 12px auto; object-fit: contain; }
.portfolio-file:not([open]) > :not(summary) { display: none; }
.portfolio-controls { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.applicant-details { grid-template-columns: 6em minmax(0,1fr); }
@media (max-width: 600px) {
  .applicant-details dd:has(.portfolio-file) { grid-column: 1 / -1; }
}
.roster-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 14px; }
.roster-tools h2 { font-size:19px; white-space:nowrap; }
.roster-search { position:relative; width:min(60%, 320px); }
.roster-search::before, .roster-search::after { content:""; position:absolute; pointer-events:none; }
.roster-search::before { width:11px; height:11px; border:1.6px solid var(--muted); border-radius:50%; top:14px; left:13px; }
.roster-search::after { width:6px; height:1.5px; background:var(--muted); transform:rotate(45deg); top:26px; left:23px; }
.roster-search input { border:1px solid var(--line); border-radius:8px; background:var(--card); width:100%; padding:10px 10px 10px 36px; min-height:42px; color:var(--ink); font-size:14px; }
.mobile-column-label { display:none; }
.roster-list { background:var(--card); border:1px solid var(--line); border-radius:12px; }
.roster-grid { display:grid; grid-template-columns:minmax(80px,.8fr) minmax(136px,1fr) minmax(195px,1.45fr) minmax(90px,.65fr) 12px; gap:16px; align-items:center; padding-inline:22px; }
.roster-columns { min-height:40px; background:#f6eff2; color:var(--muted); font-size:12px; font-weight:700; border-radius:11px 11px 0 0; }
.roster-columns > :nth-child(4), .roster-pay { text-align:right; }
.roster-entry { border-top:1px solid var(--line); }
.roster-summary { min-height:57px; padding-block:9px; cursor:pointer; list-style:none; }
.roster-summary::-webkit-details-marker { display:none; }
.roster-entry:last-child:not([open]) > summary { border-radius:0 0 11px 11px; }
.roster-summary:hover, .roster-entry[open] > summary { background:#faf3f6; }
.roster-summary:focus-visible { outline-offset:-3px; }
.roster-name { font-size:16px; overflow-wrap:anywhere; }
.roster-phone, .roster-pay { font-variant-numeric:tabular-nums; font-size:14px; }
.roster-phone { color:var(--muted); }
.roster-pay { font-weight:700; overflow-wrap:anywhere; }
.availability { display:flex; flex-wrap:wrap; gap:4px; }
.day-chip { display:inline-flex; align-items:center; justify-content:center; min-width:23px; min-height:24px; padding:2px 6px; border-radius:5px; font-size:12px; font-weight:650; overflow-wrap:anywhere; }
.day-chip.available { color:#315a48; background:#e4f1e9; }
.day-chip.flexible { color:#795316; background:#f9efd9; }
.day-chip.limited { color:#813e48; background:#f9e6e8; }
.day-chip.neutral { color:#665e63; background:#f0eded; }
.row-chevron { width:8px; height:8px; border:solid #8a7882; border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); justify-self:center; }
.roster-entry[open] > summary .row-chevron { transform:rotate(45deg); }
.roster-expanded { padding:18px 22px 20px; border-top:1px solid var(--line); }
.roster-works h3 { font-size:16px; margin-bottom:12px; }
.roster-works .muted { color:var(--muted); font-size:14px; }
.work-links { display:flex; gap:12px; flex-wrap:wrap; color:var(--plum); font-size:14px; }
.roster-more { margin-top:18px; border-top:1px solid var(--line); }
.roster-more > summary { padding-block:12px; cursor:pointer; color:var(--muted); font-size:14px; }
.roster-more .applicant-details { margin-top:0; }
@media (max-width:730px) {
  .roster-grid { grid-template-columns:minmax(90px,1fr) minmax(0,1.2fr) minmax(45px,.5fr) 8px; column-gap:8px; padding-inline:12px; }
  .mobile-column-label { display:inline; }
  .desktop-column-label, .roster-columns > :nth-child(2) { display:none; }
  .roster-summary { row-gap:1px; }
  .roster-name { grid-area:1/1; align-self:end; }
  .roster-phone { grid-area:2/1; align-self:start; font-size:11px; }
  .roster-summary .availability { grid-area:1/2/3/3; gap:3px; }
  .roster-pay { grid-area:1/3/3/4; font-size:13px; }
  .row-chevron { grid-area:1/4/3/5; }
  .day-chip { min-width:20px; padding:2px 4px; }
  .roster-expanded { padding-inline:14px; }
}
@media (max-width:420px) {
  .roster-tools { align-items:stretch; flex-direction:column; }
  .roster-search { width:100%; }
}
