:root { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color: #23282d; background: #fff; font-synthesis: none; color-scheme: light; letter-spacing: 0; line-height: 1.5; --ink: #23282d; --muted: #727982; --line: #e5e8eb; --accent: #13796d; --surface: #f6f7f8; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-bottom: 140px; }
body { margin: 0; -webkit-text-size-adjust: 100%; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; font-size: 16px; letter-spacing: 0; touch-action: manipulation; }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select { min-height: 48px; }
button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid var(--accent); border-radius: 6px; padding: 10px 16px; color: #fff; background: var(--accent); font-weight: 700; cursor: pointer; }
button:hover { background: #0b655a; }
button:disabled { opacity: .45; cursor: default; }
input, select { display: block; min-width: 0; width: 100%; min-height: 50px; margin-top: 8px; padding: 11px 13px; background: #fff; color: var(--ink); border: 1px solid #ccd1d6; border-radius: 6px; scroll-margin: 80px 0 160px; }
input::placeholder { color: #969ca3; }
input:focus, select:focus { border-color: var(--accent); outline: 2px solid #13796d20; outline-offset: 1px; }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
label { display: block; min-width: 0; font-size: 13px; font-weight: 600; color: #565f68; }
.secondary { color: #424b54; background: #fff; border-color: #d3d8dc; }
.secondary:hover { background: var(--surface); }
.icon { width: 20px; height: 20px; flex: 0 0 20px; }
.icon-button { width: 48px; min-width: 48px; height: 48px; padding: 0; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 68px; padding: 8px max(24px, calc((100% - 960px) / 2)); border-bottom: 1px solid var(--line); background: #fff; }
header a { display: flex; align-items: center; min-height: 44px; font-size: 13px; color: #59636c; white-space: nowrap; }
.brand { gap: 10px; color: var(--ink); font-size: 15px; font-weight: 750; }
.brand img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
main { max-width: 1008px; margin: auto; padding: 32px 24px 64px; }
body.registration-open main { padding-bottom: calc(136px + env(safe-area-inset-bottom, 0px)); }
.heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.heading h1 { margin: 0; color: #20262b; font-size: 26px; line-height: 1.4; font-weight: 750; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 7px; border-radius: 4px; background: #edf5f1; color: #37725a; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; background: currentColor; border-radius: 50%; }
.status.pending { background: #fff4df; color: #926113; }
#message { margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); color: #34765c; background: #f2f8f5; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
#message.error { color: #a54443; border-color: #b64d4b; background: #fff4f3; }
#message:empty { display: none; }
#eventSection { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.event-context { flex-wrap: wrap; gap: 6px 14px; margin-bottom: 24px; }
.event-context h2 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 700; }
#spawnAt, #registeredBy { font-size: 12px; color: var(--muted); line-height: 1.6; }
.reporter-fields { display: grid; grid-template-columns: minmax(0, 400px); gap: 12px; position: relative; z-index: 10; }
.reporter { min-width: 0; }
.reporter input { min-height: 52px; }
.reporter-input { position: relative; }
.reporter-suggestions { position: absolute; top: calc(100% + 5px); left: 0; right: 0; max-height: min(240px, 40dvh); overflow-y: auto; background: #fff; border: 1px solid #ccd5d1; border-radius: 6px; box-shadow: 0 6px 20px #23282d14; }
.reporter-suggestions button { display: flex; width: 100%; min-height: 48px; padding: 10px 14px; justify-content: flex-start; background: #fff; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); text-align: left; font-weight: 400; overflow-wrap: anywhere; }
.reporter-suggestions button:last-child { border-bottom: 0; }
.reporter-suggestions button:hover, .reporter-suggestions button[aria-selected="true"] { background: #edf6f2; }
#rosterSource { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.item-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: sticky; top: 0; z-index: 5; margin-top: 24px; padding: 0; border-bottom: 1px solid var(--line); background: #fff; }
.item-tabs button { min-width: 0; min-height: 54px; padding: 10px 4px; color: #81878d; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-size: 14px; font-weight: 600; }
.item-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.item-tabs button > span:first-child { white-space: nowrap; }
.tab-count { font-size: 11px; font-weight: 700; color: var(--accent); }
.tab-count:not(:empty) { min-width: 18px; padding: 1px 4px; background: #e8f4ee; border-radius: 4px; }
.item-group { margin: 0; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.loot-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 84px; border-bottom: 1px solid var(--line); }
.loot-item[data-selected="true"] { background: #f0f8f4; box-shadow: inset 3px 0 var(--accent); }
.loot-item.single-item { grid-template-columns: minmax(0, 1fr); min-height: 68px; }
.item-choice { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin: 0; padding: 12px 16px; color: var(--ink); cursor: pointer; font-weight: 400; }
.item-choice input[type=checkbox], .no-items input, .pending-filter input { width: 22px; height: 22px; min-height: 22px; flex: 0 0 22px; margin: 0; accent-color: var(--accent); }
.item-name { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.single-item .item-name::before { content: ""; display: inline-block; width: 3px; height: 14px; margin-right: 10px; border-radius: 1px; vertical-align: -2px; background: #a7adb2; }
.loot-item[data-rank="여행자"] .item-name::before { background: #5d9b74; }
.loot-item[data-rank="하늘빛"] .item-name::before { background: #5d97ca; }
.loot-item[data-rank="달빛"] .item-name::before { background: #9b7cbb; }
.loot-item[data-rank="붉은 바다"] .item-name::before { background: #d67873; }
.quantity-item { grid-column: 1 / -1; }
.quantity-item .item-choice { padding-right: 0; }
.quantity-control { display: grid; grid-template-columns: 44px 64px 44px; align-items: center; margin-right: 12px; border: 1px solid #d2d8dc; border-radius: 6px; overflow: hidden; background: #fff; }
.quantity-control button { width: 44px; min-width: 44px; min-height: 46px; height: 46px; padding: 0; color: #5c656d; background: #fff; border: 0; border-radius: 0; }
.quantity-control button:hover { background: var(--surface); }
.quantity-control .icon { width: 16px; height: 16px; flex-basis: 16px; }
.quantity-control input { width: 64px; min-width: 0; min-height: 46px; height: 46px; margin: 0; padding: 6px 2px; color: var(--ink); border: 0; border-radius: 0; text-align: center; font-weight: 650; font-size: 18px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.quantity-control:focus-within { outline: 2px solid #13796d30; border-color: var(--accent); }
.quantity-control input:focus { outline: 0; }
.quantity-control input::-webkit-inner-spin-button, .quantity-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.quantity-control button:disabled { opacity: .3; }
.no-items { display: flex; align-items: center; gap: 10px; min-height: 60px; margin: 16px 0 0; padding: 10px 4px; cursor: pointer; color: #68717a; font-size: 14px; font-weight: 400; }
.selection-review { margin-top: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.selection-review h3, #completed h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.selection-review ul, #completedItems { list-style: none; margin: 0; padding: 0; }
.selection-review li, #completedItems li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.selection-review li strong, #completedItems li strong { flex-shrink: 0; font-variant-numeric: tabular-nums; font-size: 14px; }
.form-end { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; padding: 14px 24px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #fff; }
.form-end-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; max-width: 960px; margin: auto; }
#selectedCount { font-size: 12px; line-height: 1.7; color: var(--muted); }
#selectedCount strong { display: block; color: var(--ink); font-size: 15px; }
.form-actions { display: flex; align-items: center; gap: 8px; }
#submit { min-width: 144px; min-height: 50px; padding: 10px 18px; }
#submitLabel { white-space: nowrap; }
#submit .icon { filter: brightness(0) invert(1); }
#formMessage { grid-column: 1 / -1; color: #a54443; font-size: 12px; margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
#completed { padding-bottom: 8px; }
#registeredBy { margin: 14px 0 18px; }
#historySection { margin-top: 28px; border-top: 1px solid var(--line); }
#historyDetails > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; cursor: pointer; list-style: none; }
#historyDetails > summary::-webkit-details-marker { display: none; }
#historyDetails > summary h2 { margin: 0; font-size: 16px; font-weight: 700; }
#historyDetails > summary .icon { width: 17px; height: 17px; opacity: .55; }
#historyDetails[open] > summary > .icon { transform: rotate(90deg); }
.history-overview { display: flex; align-items: center; gap: 36px; padding: 10px 0 24px; }
.history-overview > div { display: flex; align-items: center; gap: 10px; }
.history-overview span { font-size: 12px; color: var(--muted); }
.history-overview strong { color: #2b343b; font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.history-overview > div:first-child strong { color: #a27224; }
.history-controls { align-items: flex-end; gap: 10px; }
.history-controls label { flex: 1; min-width: 0; }
.history-controls select { min-height: 48px; }
.history-toolbar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 24px; margin-bottom: 20px; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.pending-filter { display: flex; align-items: center; gap: 8px; min-height: 48px; white-space: nowrap; font-size: 13px; font-weight: 400; }
.pending-filter input { width: 20px; height: 20px; min-height: 20px; flex-basis: 20px; }
#events { border-top: 1px solid #ced4d9; }
.event { display: grid; grid-template-columns: 220px minmax(0, 1fr) 112px; align-items: center; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.event h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 3px 0 5px; font-size: 17px; font-weight: 700; }
.event p { margin: 4px 0; font-size: 13px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.event p.event-guild { font-size: 11px; margin: 0; color: #858c92; }
.event p.event-time, .event p.event-reporter { font-size: 11px; }
.event-items { display: flex; flex-wrap: wrap; gap: 5px 20px; margin: 0; padding: 0; list-style: none; }
.event-items li { display: flex; align-items: baseline; gap: 6px; font-size: 13px; line-height: 1.6; color: #505b64; }
.event-items strong { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--ink); }
.event p.event-reporter { margin-top: 7px; }
.event p.event-waiting { color: #a27224; font-size: 12px; }
.event-link { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 44px; color: #48545d; font-size: 12px; font-weight: 600; white-space: nowrap; }
.event-link .icon { width: 15px; height: 15px; flex-basis: 15px; opacity: .6; }
.event[data-state="pending"] .event-link { color: var(--accent); }
.empty { padding: 28px 0; color: var(--muted); text-align: center; font-size: 14px; }
dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid #d2d8dc; border-radius: 8px; color: var(--ink); overflow-y: auto; }
dialog::backdrop { background: #23282d66; }
dialog h2 { margin: 0 0 24px; font-size: 19px; }
dialog input { min-height: 52px; font-size: 18px; }
#reopenMessage { color: #a54443; font-size: 13px; }
.dialog-actions { display: flex; gap: 10px; margin-top: 24px; }
.dialog-actions button { flex: 1; }
@media (max-width: 720px) {
  header { min-height: 60px; padding: 8px 20px; gap: 12px; }
  .brand { gap: 8px; font-size: 13px; }
  .brand img { width: 28px; height: 28px; }
  header > a:last-child { font-size: 12px; }
  main { padding: 26px 20px 48px; }
  .heading { flex-wrap: wrap; gap: 12px; }
  .heading h1 { font-size: 23px; }
  #eventSection { margin-top: 24px; padding-top: 20px; }
  .event-context { display: block; margin-bottom: 24px; }
  .event-context h2 { margin-bottom: 4px; font-size: 18px; }
  .reporter-fields { grid-template-columns: minmax(0, 1fr); }
  .item-tabs { margin-top: 20px; }
  .item-grid { grid-template-columns: minmax(0, 1fr); }
  .item-choice { padding-left: 12px; padding-right: 12px; }
  .form-end { padding-left: 20px; padding-right: 20px; }
  .history-overview { gap: 28px; padding-bottom: 20px; }
  .history-toolbar { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .event { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 12px; padding: 20px 0; }
  .event-info { grid-column: 1; }
  .event-link { grid-column: 2; grid-row: 1; align-self: center; }
  .event-detail { grid-column: 1 / -1; }
  .event-items { gap: 3px 16px; }
  .event p.event-waiting { display: none; }
}
@media (max-width: 359px) {
  header { padding-left: 16px; padding-right: 16px; }
  main { padding-left: 16px; padding-right: 16px; }
  .heading h1 { font-size: 21px; }
  .heading { gap: 8px; }
  .status { font-size: 10px; }
  .item-name { font-size: 14px; }
  .item-choice { padding-left: 10px; padding-right: 10px; }
  .item-tabs button { font-size: 13px; gap: 4px; }
  .quantity-control { grid-template-columns: 40px 52px 40px; margin-right: 8px; }
  .quantity-control button { width: 40px; min-width: 40px; }
  .quantity-control input { width: 52px; }
  .form-end { padding-left: 16px; padding-right: 16px; }
  #submit { min-width: 132px; }
}
