:root{font-family:system-ui,-apple-system,'Malgun Gothic',sans-serif;color:#e8edf8;background:#101521;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}.shell{max-width:1100px;margin:auto;padding:24px}.top{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-bottom:24px;border-bottom:1px solid #30394c}.brand{display:flex;gap:12px;align-items:center}.brand strong{font-size:22px;display:block}.brand small{display:block;color:#9daac0;font-size:11px;letter-spacing:1.3px}.logo{width:48px;height:48px;border-radius:13px;background:linear-gradient(135deg,#7c69de,#398cc9);display:grid;place-items:center;font-weight:800;font-size:29px}main{padding:32px 0;min-height:75vh}footer{text-align:center;color:#76839a;font-size:12px;padding:16px}.card{background:#1c2536;border:1px solid #344157;border-radius:16px;padding:26px;box-shadow:0 7px 24px #0002}.auth{max-width:460px;margin:48px auto}.auth h1,.page h1{margin:0 0 12px;font-size:26px}.muted{color:#a4b0c4}.hint{font-size:13px;color:#a4b0c4;line-height:1.6}.field{display:block;margin:15px 0}.field span{display:block;margin-bottom:8px;color:#c4cfdf;font-size:14px}input,select{width:100%;padding:12px 13px;background:#101827;color:#fff;border:1px solid #44536b;border-radius:9px}button{border:0;border-radius:9px;padding:11px 16px;background:#6154cc;color:white;font-weight:650}button:hover{filter:brightness(1.16)}button:disabled{opacity:.5;cursor:wait}.outline{border:1px solid #526078;background:transparent}.small{padding:7px 12px;font-size:13px}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row{display:flex;gap:14px;align-items:center;justify-content:space-between}.notice{padding:12px;border-radius:9px;margin:14px 0;background:#273550;color:#dce8ff}.notice.err{background:#482a36;color:#ffcad4}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.tile{padding:20px;background:#1c2536;border:1px solid #344157;border-radius:12px;min-height:140px}.tile h3{margin:0 0 10px}.tag{display:inline-block;border-radius:99px;padding:4px 9px;background:#344158;font-size:12px;color:#ccd7e6}.tag.pending{background:#554727;color:#ffdb91}.tag.active{background:#244c42;color:#9af2d1}.nav{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 24px}.nav button.selected{background:#6154cc}.nav button{background:#293449}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}td,th{padding:12px;text-align:left;border-bottom:1px solid #344157}th{color:#9eb0c9}h2{margin-top:0}@media(max-width:560px){.shell{padding:15px}.top{align-items:flex-start}.brand strong{font-size:18px}.row{align-items:flex-start;flex-direction:column}.card{padding:18px}}

.module{margin-top:16px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:0 14px}.metric{background:#111b2b;border-radius:9px;padding:14px;margin:12px 0;line-height:2}.metric strong{color:#b4e5d6}.account-row{padding:12px 0;border-bottom:1px solid #344157}.account-row li{margin:9px 0}.module td{vertical-align:middle}.module button.small{white-space:nowrap}
/* v0.2.1: 결정 일괄 등록 / 전체 보스 설정표 */
textarea{width:100%;padding:12px 13px;background:#101827;color:#fff;border:1px solid #44536b;border-radius:9px;resize:vertical;font:inherit}
.boss-table{min-width:1000px}.boss-table input,.boss-table select{min-width:86px;padding:8px;font-size:13px}.boss-table .run-difficulty{min-width:118px}.boss-table .run-memo{min-width:150px}.boss-table td{padding:8px 6px}.boss-table td strong{white-space:nowrap}.boss-table .run-income,.boss-table .run-efficiency{white-space:nowrap}
.preview-list{max-height:250px;overflow:auto;border:1px solid #344157;border-radius:9px;padding:8px}.preview-list div{padding:5px 8px;border-bottom:1px solid #344157}

/* v0.2.3: compact one-tap difficulty selection + save feedback */
.boss-table{min-width:1020px}
.boss-table .difficulty-buttons{display:flex;align-items:center;gap:5px;white-space:nowrap}
.boss-table button.difficulty-choice{width:34px;height:32px;min-width:34px;padding:0;border:1px solid #4b5870;background:#30394b;color:#99a6ba;font-size:12px;font-weight:800;border-radius:7px;opacity:.66;transition:background .12s,opacity .12s,border-color .12s}
.boss-table button.difficulty-choice[data-difficulty="이지"]{--diff:#70c6a1}
.boss-table button.difficulty-choice[data-difficulty="노멀"]{--diff:#83affb}
.boss-table button.difficulty-choice[data-difficulty="하드"]{--diff:#ff8b90}
.boss-table button.difficulty-choice[data-difficulty="카오스"]{--diff:#e9b869}
.boss-table button.difficulty-choice[data-difficulty="익스트림"]{--diff:#ae9bfa}
.boss-table button.difficulty-choice:hover,.boss-table button.difficulty-choice:focus-visible{opacity:1;border-color:var(--diff);color:var(--diff)}
.boss-table button.difficulty-choice.active{opacity:1;color:#0e1320;background:var(--diff);border-color:var(--diff);box-shadow:0 0 0 2px #ffffff16}
.boss-table .run-size{min-width:55px;width:58px;padding:8px}
.boss-table .run-minutes{min-width:70px;width:82px}
.boss-table .row-save-state{min-width:80px;font-size:12px;color:#a6b5ce;white-space:nowrap}
.boss-table .row-save-state[data-state="success"]{color:#80dab4}
.boss-table .row-save-state[data-state="pending"]{color:#f5ce84}
.boss-table .row-save-state[data-state="error"]{color:#ff9faa}
.save-status{font-size:12px;color:#aebbd0;margin:9px 0}

/* v0.2.4: collapsible boss categories */
.boss-table tr[hidden]{display:none}
.boss-table .boss-group-header th{padding:10px 8px;background:#27364e;border-top:2px solid #526381}
.boss-group-toggle{width:100%;text-align:left;background:transparent;border:0;padding:5px 10px;color:#e7edf8;font-weight:750}
.boss-group-toggle:hover{background:#364560}
.category-editor{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}
.boss-category-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #354258;border-radius:9px;padding:9px}
.boss-category-entry span{flex:1;font-size:14px}
.boss-category-entry select{width:130px;min-width:130px;padding:8px}

/* v0.3 party management */
.party-chips{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.party-member{display:inline-flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid #42506a;border-radius:9px;flex-wrap:wrap}
.party-member select{max-width:230px;width:auto;padding:7px}
.party-boss-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:8px;max-height:520px;overflow:auto}
.party-boss-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid #344157;border-radius:9px}
.party-boss-row strong{font-size:13px}
.party-boss-row .difficulty-buttons{display:flex;gap:4px}
.party-boss-row .difficulty-choice{width:32px;height:30px;min-width:32px;padding:0;border:1px solid #4b5870;background:#30394b;color:#99a6ba;font-size:12px;border-radius:6px;opacity:.75}
.party-boss-row .difficulty-choice[data-difficulty="이지"]{--diff:#70c6a1}
.party-boss-row .difficulty-choice[data-difficulty="노멀"]{--diff:#83affb}
.party-boss-row .difficulty-choice[data-difficulty="하드"]{--diff:#ff8b90}
.party-boss-row .difficulty-choice[data-difficulty="카오스"]{--diff:#e9b869}
.party-boss-row .difficulty-choice[data-difficulty="익스트림"]{--diff:#ae9bfa}
.party-boss-row .difficulty-choice.active{opacity:1;color:#101521;background:var(--diff);border-color:var(--diff)}
.party-boss-row .difficulty-choice:disabled{cursor:not-allowed}

/* v0.3.1: show party source without consuming the memo field. */
.boss-table .party-save-label{display:block;color:#a8bbf0;white-space:normal;overflow-wrap:anywhere;font-size:12px;font-weight:600}
.boss-table .row-memo-save{display:block;margin-top:4px;color:#8da7b5;font-size:11px}
.boss-table .row-memo-save[data-state="error"]{color:#ff9c9c}
.boss-table .row-memo-save[data-state="pending"]{color:#e9c37c}

/* v0.4.0 party scheduling */
.schedule-module{margin-top:22px;padding-top:14px;border-top:1px solid #44536b}
.schedule-header{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.schedule-header h3{margin:0}
.schedule-toolbar{margin:14px 0}.schedule-toolbar select{width:auto;min-width:160px;padding:7px}
.schedule-paints{display:flex;gap:5px;flex-wrap:wrap}.schedule-scroll{max-height:550px;overflow:auto;border:1px solid #394965;border-radius:10px}
.schedule-grid{display:grid;grid-template-columns:65px repeat(7,minmax(58px,1fr));min-width:520px;gap:2px;background:#152034;padding:4px;touch-action:none;user-select:none}
.schedule-corner,.schedule-day{position:sticky;top:0;z-index:3;background:#27364e;text-align:center;padding:7px 1px;font-weight:700}
.schedule-day small{display:block;font-weight:400;font-size:10px}.schedule-sat{color:#83affb}.schedule-sun{color:#ff8b90}
.schedule-hour{display:grid;place-items:center;background:#212e42;font-size:11px;color:#acbdd4;min-height:29px}
.schedule-cell{border-radius:4px;border:1px solid #3b4a61;background:#263248;color:#c7d6e8;min-width:0;min-height:29px;padding:2px;font-size:11px;font-weight:700}
.schedule-cell:disabled{opacity:1;cursor:default}.schedule-cell.schedule-no,.schedule-cell.schedule-unavailable{background:#838b9a;color:#101521}
.schedule-cell.schedule-flex,.schedule-cell.schedule-flexible{background:#a9dec0;color:#19482e}.schedule-cell.schedule-yes,.schedule-cell.schedule-available{background:#247947;color:#fff}
.schedule-cell.schedule-partial{background:#303d52;color:#e1eafa}.schedule-cell.is-confirmed{outline:3px solid #f4c76b;outline-offset:-3px}
.schedule-bottom{margin-top:14px;padding:12px;background:#162236;border-radius:10px}.schedule-bottom .actions select{width:auto;min-width:180px;padding:7px}
.schedule-save{min-height:20px;color:#8cddbb;font-size:12px;margin:8px 0}.schedule-save.err{color:#ff9eae}
.schedule-details{margin-top:12px}.schedule-details summary{cursor:pointer;color:#b9cffa}

/* v0.4.1: center-aligned error dialog and progressive party creation. */
.dia-error-layer{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;background:#050a14ae;padding:20px}
.dia-error-box{width:min(480px,100%);max-height:85vh;overflow:auto;background:#253046;color:#f9e7e9;border:1px solid #e28f9b;border-radius:16px;padding:26px;text-align:center;box-shadow:0 22px 64px #0009}
.dia-error-box strong{font-size:19px}.dia-error-box p{line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.empty-character-message{max-width:600px;margin:10vh auto;padding:34px;text-align:center}
.party-start-details{margin-top:18px}.party-start-details>summary{cursor:pointer;font-weight:750;padding:14px 18px;background:#29364b;border:1px solid #43526b;border-radius:10px}
.party-start-details[open]>summary{margin-bottom:14px}.party-start-details .grid{margin-top:10px}
.schedule-cell.confirm-eligible{cursor:pointer;box-shadow:inset 0 0 0 1px #e7c97e}
.schedule-cell.confirm-choice{outline:3px solid #ffcd58;outline-offset:-3px;box-shadow:0 0 0 2px #ffd47655}
.schedule-cell:disabled.confirm-eligible{cursor:default}.schedule-confirm-hint{margin-top:8px}


/* v0.4.2 revenue character cards */
.revenue-character-picker{margin:18px 0 14px}
.revenue-character-picker h3{margin:0 0 12px;font-size:18px}
.revenue-account-block{margin:0 0 16px}
.revenue-account-heading{display:flex;flex-wrap:wrap;gap:10px;align-items:baseline;margin:0 0 10px}
.revenue-account-heading strong{font-size:20px}
.revenue-account-heading span{color:#c9d6e8;font-size:15px}
.revenue-character-cards{display:flex;flex-wrap:wrap;gap:10px}
.revenue-character-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:108px;max-width:140px;padding:14px 12px;background:#1c2536;border:2px solid #5b6a80;border-radius:0;color:#fff;box-shadow:none}
.revenue-character-card:hover{background:#233048;border-color:#8ca0be;filter:none}
.revenue-character-card.selected{background:#22314a;border-color:#f0f4ff;box-shadow:0 0 0 2px #9bb1d633}
.revenue-character-name{font-size:18px;font-weight:800;line-height:1.1}
.revenue-character-meta{font-size:12px;color:#b8c6db;line-height:1.1}
.revenue-character-income{font-size:13px;color:#e4edf9;line-height:1.2}
.revenue-selected-summary{margin-top:10px}
@media(max-width:720px){.revenue-character-card{min-width:96px;padding:12px 10px}.revenue-character-name{font-size:16px}.revenue-account-heading strong{font-size:18px}}

/* v0.4.4: compact revenue table, preserve both ends on ordinary desktop widths. */
.boss-table{min-width:1050px;width:100%;table-layout:fixed}
.boss-table th,.boss-table td{padding:9px 5px;overflow-wrap:anywhere}
.boss-table th:nth-child(1){width:48px}
.boss-table th:nth-child(2){width:155px}
.boss-table th:nth-child(3){width:208px}
.boss-table th:nth-child(4){width:65px}
.boss-table th:nth-child(5){width:82px}
.boss-table th:nth-child(6){width:136px}
.boss-table th:nth-child(7){width:136px}
.boss-table th:nth-child(8){width:125px}
.boss-table th:nth-child(9){width:122px}
.boss-table .run-memo{width:100%;min-width:0;box-sizing:border-box}
.boss-table .run-size{width:57px;min-width:0}
.boss-table .run-minutes{width:76px;min-width:0}
.boss-table .run-income,.boss-table .run-efficiency{font-size:12px;white-space:normal;overflow-wrap:normal}
.boss-table .row-save-state{min-width:0}
.boss-table .difficulty-buttons{gap:3px}
.boss-table button.difficulty-choice{width:32px;min-width:32px}
.revenue-character-card{transition:background .15s,border-color .15s}
/* Make confirmation stand out and keep it in the toolbar above the time grid. */
.schedule-confirm-mode{border:2px solid #f2cb66;background:#463b25;color:#ffdf8a;box-shadow:0 0 0 1px #f2cb6633}
.schedule-confirm-mode:hover{background:#5c4b29;color:#fff1bf}
.schedule-confirm-mode.is-picking{background:#755e2d;color:#fff5d1;border-color:#ffd976}

/* v0.4.5: keep both edge columns visible while the center of the boss table scrolls. */
.revenue-detail-host .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.revenue-detail-host .boss-table{
  width:1235px;
  min-width:1235px;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
}
.revenue-detail-host .boss-table thead th{background:#1c2536}
.revenue-detail-host .boss-table th:nth-child(1){width:55px}
.revenue-detail-host .boss-table th:nth-child(2){width:161px}
.revenue-detail-host .boss-table th:nth-child(3){width:192px}
.revenue-detail-host .boss-table th:nth-child(4){width:64px}
.revenue-detail-host .boss-table th:nth-child(5){width:82px}
.revenue-detail-host .boss-table th:nth-child(6){width:141px}
.revenue-detail-host .boss-table th:nth-child(7){width:138px}
.revenue-detail-host .boss-table th:nth-child(8){width:168px}
.revenue-detail-host .boss-table th:nth-child(9){width:234px}
/* Sticky edges prevent the party/save status from disappearing offscreen. */
.revenue-detail-host .boss-table thead th:first-child,
.revenue-detail-host .boss-table tr[data-boss-row] td:first-child{
  position:sticky;left:0;z-index:2;background:#1c2536;
  box-shadow:2px 0 3px #0005;
}
.revenue-detail-host .boss-table thead th:last-child,
.revenue-detail-host .boss-table tr[data-boss-row] td:last-child{
  position:sticky;right:0;z-index:2;background:#1c2536;
  box-shadow:-2px 0 3px #0005;
}
.revenue-detail-host .boss-table thead th:first-child,
.revenue-detail-host .boss-table thead th:last-child{z-index:4}
.revenue-detail-host .boss-table .row-save-state{
  min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:keep-all;
}
.revenue-detail-host .boss-table .party-save-label{
  display:block;white-space:normal;overflow:visible;text-overflow:clip;
  overflow-wrap:anywhere;line-height:1.4;
}

/* v0.4.6 — 7-column compact revenue table (no frozen columns and no forced horizontal scroll on desktop). */
.revenue-detail-host .table-wrap{max-width:100%;overflow-x:auto}
.revenue-detail-host .boss-table{width:100%;min-width:790px;table-layout:fixed;border-collapse:collapse;border-spacing:0}
.revenue-detail-host .boss-table th,.revenue-detail-host .boss-table td{padding:7px 5px;vertical-align:middle;overflow-wrap:normal}
.revenue-detail-host .boss-table th:nth-child(1){width:16%}
.revenue-detail-host .boss-table th:nth-child(2){width:19%}
.revenue-detail-host .boss-table th:nth-child(3){width:7%}
.revenue-detail-host .boss-table th:nth-child(4){width:9%}
.revenue-detail-host .boss-table th:nth-child(5){width:13%}
.revenue-detail-host .boss-table th:nth-child(6){width:19%}
.revenue-detail-host .boss-table th:nth-child(7){width:17%}
.revenue-detail-host .boss-table thead th:first-child,
.revenue-detail-host .boss-table tr[data-boss-row] td:first-child,
.revenue-detail-host .boss-table thead th:last-child,
.revenue-detail-host .boss-table tr[data-boss-row] td:last-child{position:static;left:auto;right:auto;z-index:auto;box-shadow:none;background:transparent}
.revenue-detail-host .boss-table .boss-group-header th{padding:8px}
.revenue-detail-host .boss-table .difficulty-buttons{gap:3px;flex-wrap:nowrap}
.revenue-detail-host .boss-table button.difficulty-choice{width:27px;min-width:27px;height:28px;padding:0;font-size:11px}
.revenue-detail-host .boss-table .run-size{width:51px;min-width:0;padding:7px 3px}
.revenue-detail-host .boss-table .run-minutes{width:100%;min-width:0;padding:7px 5px}
.revenue-detail-host .boss-table .run-memo{width:100%;min-width:0;padding:7px 6px}
.revenue-detail-host .boss-table .run-revenue-combined{white-space:nowrap}
.revenue-detail-host .boss-table .run-income{display:block;white-space:nowrap;font-weight:700;font-size:13px;line-height:1.25;color:#ebf4ff}
.revenue-detail-host .boss-table .run-efficiency{display:block;white-space:nowrap;font-size:10px;line-height:1.15;color:#9fafc7;margin-top:2px}
.revenue-detail-host .boss-table .row-save-state{min-width:0;font-size:12px;line-height:1.25}
.revenue-detail-host .boss-table .party-save-label{font-size:12px;line-height:1.3;overflow-wrap:anywhere}
.revenue-detail-host .boss-table .row-memo-save{margin-top:2px;font-size:10px}
@media(max-width:820px){.revenue-detail-host .boss-table{min-width:790px}}

/* v0.4.6 — revenue quick-add dialog. */
.revenue-add-character{margin-top:2px;min-height:46px;padding:10px 16px;background:#27364e;border:1px dashed #8796b3;border-radius:9px;color:#e9edff;text-align:left}
.revenue-add-character:hover{background:#344462;border-color:#b8c7e2}
.revenue-character-dialog{width:min(440px,calc(100% - 30px));max-height:90vh;overflow:auto;color:#f1f5ff;background:#1c2536;border:1px solid #576784;border-radius:14px;padding:24px;box-shadow:0 25px 70px #000b}
.revenue-character-dialog::backdrop{background:#080e1ab8}
.revenue-character-dialog h3{margin:0 0 18px;font-size:20px}
.revenue-character-dialog .field{display:block;margin:12px 0}
.revenue-character-dialog .field input,.revenue-character-dialog .field select{margin-top:6px}
.revenue-dialog-actions{justify-content:flex-end;margin-top:18px}
.revenue-dialog-error{color:#ffb6c3;background:#492d3a;border-radius:8px;padding:10px}
