:root { font-family: "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; color: #15273a; background: #f4f7fb; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.bar { padding: 15px max(20px, calc((100% - 1000px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #112e48; color: white; }
.brand { display: flex; align-items: center; text-decoration: none; color: inherit; gap: 10px; letter-spacing: .07em; }
.brand strong, .brand small { display: block; }
.brand small { font-size: .61rem; color: #c5d4e4; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #d4ede9; color: #134d48; font-weight: 800; }
main { width: min(1000px, calc(100% - 40px)); margin: 44px auto; }
.heading { margin-bottom: 28px; }
h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.65rem); letter-spacing: -.06em; }
.heading p { color: #526579; margin: 10px 0 0; }
.panel { background: #fff; border: 1px solid #d9e2ee; border-radius: 16px; padding: 22px; }
.panel { max-width: 420px; }
h2 { margin: 0 0 18px; }
form { display: grid; gap: 10px; }
label { font-weight: 650; }
input, button { min-height: 43px; font: inherit; border-radius: 8px; padding: 8px 13px; }
input { width: 100%; border: 1px solid #a8b8c7; background: #fff; color: inherit; }
button { border: 1px solid transparent; background: #175b61; color: #fff; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
.quiet { background: transparent; color: inherit; border-color: currentColor; }
:focus-visible { outline: 3px solid #377cbe; outline-offset: 3px; }
.preview { font-size: .82rem; color: #d5edea; }
.search { display: grid; gap: 6px; width: min(100%, 300px); margin-bottom: 16px; }
@media (max-width: 460px) { main { margin-top: 28px; } }
.space-mode {
  min-height: 100vh;
  color: #e9f3ff;
  background: radial-gradient(ellipse at 12% 8%, #172647 0, transparent 44%),
    radial-gradient(ellipse at 85% 65%, #111d36 0, transparent 52%), #070e1e;
}
.space-mode .bar { background: #0b1426; border-bottom: 1px solid #223453; }
.space-mode main { width: min(1120px, calc(100% - 36px)); margin-top: 24px; }
.diliv-search { padding: 15px clamp(12px, 3vw, 22px); margin-bottom: 18px; border: 1px solid #355477; border-radius: 16px; background: #101e35; }
.diliv-search label { color: #e9f3ff; }
.diliv-search-input { display: flex; gap: 8px; }
.diliv-search-input input { min-width: 0; color: #e9f3ff; background: #0c172b; border-color: #52729a; }
.diliv-search-input input::placeholder { color: #adc1d8; }
.diliv-search-input button { flex: none; background: #235b73; }
#diliv-search-status { margin: 10px 0 0; color: #b9dafa; }
#diliv-search-status:empty { margin: 0; }
.diliv-search-results { margin-top: 13px; padding-top: 12px; border-top: 1px solid #395577; }
.diliv-search-results h2 { margin: 0 0 10px; font-size: 1.15rem; }
.diliv-search-results h3 { margin: 12px 0 4px; font-size: 1rem; color: #b9dafa; }
.diliv-search-results p { margin: 6px 0; color: #bfd3e9; }
.diliv-search-results ul { margin: 0; padding: 0; list-style: none; }
.diliv-search-results li, .prompt-amounts > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #294361; }
.prompt-amounts { max-width: 660px; margin: 0 0 10px; }
.prompt-amounts > div { padding: 7px 0; }
.diliv-search-results dd { margin: 0; }
.diliv-search-results details { padding: 6px 0; border-bottom: 1px solid #294361; }
.diliv-search-results details dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 8px 0; }
.diliv-person { max-width: 660px; margin: 0 0 10px; padding: 12px 14px; border: 1px solid #355477; border-radius: 10px; }
.diliv-person dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.diliv-person dt { color: #b9dafa; }
.diliv-person dd { overflow-wrap: anywhere; }
.staff-name-button { background: transparent; padding: 0 6px 0 0; min-height: 34px; color: #ddf4ff; font-weight: 750; text-decoration: underline; text-underline-offset: .2em; }
.staff-name-hint { font-size: .82rem; font-weight: 500; color: #b9dafa; margin-left: 6px; }
.staff-hr { margin-top: 14px; padding-top: 12px; border-top: 1px solid #355477; }
.staff-hr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.staff-hr-tab { min-height: 34px; padding: 4px 9px; background: #172e4b; border-color: #45688d; }
.staff-hr-tab[aria-pressed="true"] { background: #d3edff; color: #15273a; }
.staff-hr p:empty { display: none; }
.staff-hr dl + dl { margin-top: 10px; padding-top: 10px; border-top: 1px solid #355477; }
.diliv-search-results summary { cursor: pointer; }
.diliv-search-results a, .prompt-detail { color: #b9e2ff; text-decoration: underline; text-underline-offset: .2em; }
.diliv-search-results a { display: inline-block; margin-right: 12px; }
.prompt-detail { background: transparent; padding: 5px 3px; text-align: left; }
.sections { margin: 0 auto 18px; }
.orbit-path { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; list-style: none; margin: 0 0 12px; padding: 0; color: #e9f3ff; font-size: .88rem; }
.orbit-path:empty { display: none; }
.orbit-path li { display: flex; align-items: center; }
.orbit-path li + li::before { content: '›'; margin-right: 7px; color: #91a8c4; }
.orbit-crumb { min-height: 32px; padding: 2px 4px; background: transparent; color: #b9dafa; text-decoration: underline; text-underline-offset: .2em; }
.space-mode .search { margin-bottom: 12px; color: #c0d9f0; font-size: .87rem; }
.space-mode .search input { color: #e9f3ff; background: #101e35; border-color: #3a5575; }
.space-mode .search input::placeholder { color: #97afc9; }
.orbit-stage {
  isolation: isolate;
  position: relative;
  height: 520px;
  overflow: hidden;
  border: 1px solid #2b4367;
  border-radius: 26px;
  background:
    radial-gradient(circle at 14% 23%, #c5ebff 0 1px, transparent 2px) 0 0 / 137px 117px,
    radial-gradient(circle at 72% 31%, #85a9d988 0 1px, transparent 2px) 20px 40px / 181px 148px,
    radial-gradient(circle at 35% 80%, #e7d9ff77 0 1px, transparent 2px) 60px 24px / 233px 173px,
    radial-gradient(ellipse at 50% 52%, #1b395777, transparent 57%),
    linear-gradient(145deg, #101d35, #0a1225 62%, #111d34);
}
.orbit-stage::before, .orbit-stage::after {
  content: '';
  position: absolute;
  inset: 14% 15%;
  border: 1px solid #84adf22c;
  border-radius: 50%;
  pointer-events: none;
}
.orbit-stage::after { inset: 25% 27%; border-color: #89dce823; }
.orbit-compact { height: 250px; }
.orbit-center { position: absolute; z-index: 2; inset: 50% auto auto 50%; width: clamp(112px, 17vw, 158px); transform: translate(-50%, -50%); }
.orbit-core {
  display: grid;
  place-content: center;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  padding: 10px;
  border: 1px solid #a6e6ff;
  border-radius: 50%;
  text-align: center;
  overflow-wrap: anywhere;
  color: #f3faff;
  background: radial-gradient(circle at 32% 23%, #305e83, #142c53 63%, #122344);
  box-shadow: 0 0 0 8px #75ccfb12, 0 0 45px #66b7ff65, inset 0 0 22px #83cee53b;
  font-size: clamp(.96rem, 2.1vw, 1.36rem);
  font-weight: 750;
  line-height: 1.25;
  animation: core-arrive 250ms ease-out both;
}
button.orbit-core:hover { background: radial-gradient(circle at 32% 23%, #3a7898, #193964 64%); }
.orbit-node, .orbit-link { position: absolute; inset: 50% auto auto 50%; }
.orbit-node {
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 3px;
  width: clamp(84px, 15vw, 113px);
  aspect-ratio: 1;
  padding: 7px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.18;
  font-size: clamp(.75rem, 1.6vw, .96rem);
  font-weight: 700;
  color: #ecf7ff;
  border: 1px solid #6b9bc7;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 23%, #254467, #152845 70%);
  box-shadow: 0 5px 19px #020b1c99, inset 0 0 13px #6299d32c;
  transform: translate(calc(-50% + var(--orbit-x, 0px)), calc(-50% + var(--orbit-y, 0px)));
  animation: orbit-arrive 270ms ease-out both;
}
.orbit-node small { color: #a9caeb; font-weight: 550; font-size: .72rem; }
.orbit-node:hover { border-color: #b6efff; background: #274b6d; box-shadow: 0 0 21px #76c7fd54; }
.orbit-person { border-color: #66aca8; background: radial-gradient(circle at 32% 23%, #244e59, #12303e 72%); }
.orbit-link {
  width: var(--orbit-length, 0px);
  height: 1px;
  transform: rotate(var(--orbit-angle, 0rad));
  transform-origin: left center;
  background: linear-gradient(90deg, #8cdcff40, #9edaff9c);
  pointer-events: none;
}
.orbit-node:focus-visible, .orbit-core:focus-visible, .orbit-crumb:focus-visible, .orbit-pages button:focus-visible { outline: 3px solid #a7eafb; }
.orbit-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#orbit-status { margin: 10px 0; color: #b8d4ee; }
#orbit-status:empty { margin: 0; }
.orbit-pages { margin: 10px 0 0 auto; display: flex; align-items: center; gap: 8px; color: #b8d4ee; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orbit-pages button { min-height: 34px; min-width: 42px; padding: 2px 8px; border: 1px solid #42638a; background: #142947; font-size: 1.15rem; }
.orbit-pages button:disabled { cursor: default; opacity: .35; }
.worker-profile { width: min(420px, 100%); margin: 0 auto; padding: 15px 18px; border: 1px solid #365477; background: #101e35; border-radius: 16px; }
.worker-profile dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.worker-profile dt { color: #b8d4ee; }
.worker-profile dd { margin: 0; overflow-wrap: anywhere; }
.space-mode :is(#sales, #work-status) { padding: clamp(12px, 3vw, 24px); border: 1px solid #2b4367; border-radius: 16px; color: #15273a; background: #f4f7fb; }
@keyframes orbit-arrive {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.66); }
  to { opacity: 1; transform: translate(calc(-50% + var(--orbit-x, 0px)), calc(-50% + var(--orbit-y, 0px))) scale(1); }
}
@keyframes core-arrive { from { opacity: .2; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .orbit-node, .orbit-core { animation: none; } }
@media (max-width: 540px) {
  .space-mode main { width: calc(100% - 20px); margin-top: 13px; }
  .orbit-stage { height: 456px; border-radius: 18px; }
  .orbit-compact { height: 208px; }
}

.sales-filters { grid-template-columns: minmax(143px, 1fr) minmax(110px, .7fr) minmax(160px, 1.5fr) auto; align-items: end; }
.sales-filters.work-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; }
.work-results { display: grid; gap: 16px; }
.work-results :is(th, td) { white-space: nowrap; }
@media (max-width: 540px) {
  .sales-filters.work-filters { grid-template-columns: minmax(0, 1fr); }
}
.sales-filters label { display: grid; gap: 6px; }
select { min-height: 43px; padding: 8px 11px; font: inherit; color: inherit; background: #fff; border: 1px solid #a8b8c7; border-radius: 8px; }
.sales-results { overflow: auto; background: #fff; border: 1px solid #d9e2ee; border-radius: 12px; }
.sales-results table { width: 100%; border-collapse: collapse; text-align: left; }
.sales-results caption { padding: 16px; color: #15273a; text-align: left; font-weight: 700; }
.sales-results th, .sales-results td { padding: 12px 16px; border-top: 1px solid #dbe5ee; }
.sales-results thead, .sales-results tfoot { background: #eaf5f3; }
.sales-results .amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sales-store-button { padding: 4px 2px; background: transparent; color: #175b61; font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: .2em; }
.sales-store-button:hover { color: #112e48; }
#sales-detail { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 22px; color: #15273a; border: 1px solid #d9e2ee; border-radius: 16px; }
#sales-detail::backdrop { background: #112e4866; }
#sales-detail header { display: flex; gap: 16px; justify-content: space-between; align-items: start; }
#sales-detail h2 { margin: 0; font-size: 1.3rem; }
#sales-detail p { margin: 8px 0 0; color: #526579; }
#sales-detail-status:empty { display: none; }
#sales-detail dl { margin: 16px 0 0; }
#sales-detail dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 8px; border-bottom: 1px solid #dbe5ee; }
#sales-detail dl > div:first-child { background: #eaf5f3; font-weight: 700; }
#sales-detail dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
#sales-closing-sheet { margin-top: 16px; border: 1px solid #bdd2d4; border-radius: 8px; }
#sales-closing-sheet summary { padding: 12px; color: #175b61; font-weight: 700; cursor: pointer; }
#sales-closing-status:empty { display: none; }
#sales-closing-sheet p { margin: 0 12px 12px; }
#closing-comparison { margin: 0 12px 12px; padding: 10px; background: #f4f7fb; border-radius: 6px; overflow-x: auto; }
#closing-comparison h3 { font-size: 1rem; margin: 0 0 6px; }
#closing-comparison p { margin: 0 0 8px; font-size: .875rem; }
#closing-comparison table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
#closing-comparison th, #closing-comparison td { padding: 6px 4px; border-top: 1px solid #dbe5ee; text-align: right; white-space: nowrap; }
#closing-comparison th:first-child { text-align: left; }
#closing-comparison small { display: block; font-size: .7rem; }
#closing-comparison .different { color: #9b3d13; font-weight: 700; }
#sales-closing-images { display: grid; gap: 10px; }
#sales-closing-images:not(:empty) { padding: 0 12px 12px; }
#sales-closing-images img { display: block; width: 100%; height: auto; border: 1px solid #d9e2ee; border-radius: 6px; }
@media (max-width: 600px) {
  .sales-filters { grid-template-columns: 1fr 1fr; }
  .sales-results th, .sales-results td { padding: 10px 8px; }
}
