@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  font-family: 'DM Sans', Arial, sans-serif;
  color: #e8e9e9;
  background: #0c1624;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible { outline: 2px solid #e6bd69; outline-offset: 3px; }

.loading, .fatal { min-height: 100vh; display: grid; place-content: center; text-align: center; }
.loading, .fatal p, .fatal button { font-size: 24px; }
.fatal button { justify-self: center; padding: 10px 20px; }
.site-shell { min-height: 100vh; background: radial-gradient(circle at 75% -10%, rgba(52, 81, 102, .16), transparent 31%), #0c1624; }
.topbar { min-height: 76px; border-bottom: 1px solid #263543; display: flex; justify-content: space-between; align-items: center; padding: 0 max(5vw, calc((100vw - 1200px) / 2)); background: rgba(12, 22, 36, .9); }
.brand { display: flex; align-items: center; }
.brand-text { display: grid; gap: 2px; }
.brand-text strong { font-family: Georgia, serif; color: #f4e3b8; font-size: 16px; letter-spacing: .13em; }
.brand-text small { color: #87919c; font-size: 12px; letter-spacing: .25em; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 26px; }
.account { color: #9daab5; font-size: 12px; }
.account strong { color: #e6e5de; font-weight: 600; }
.text-button { color: #dcbf83; border: 0; background: transparent; font-size: 12px; padding: 9px 0; }
.text-button:hover { color: #fff0c7; }
.main { width: min(1200px, 90vw); margin: 0 auto; padding: 61px 0 75px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #cda763; font-size: 15px; font-weight: 700; letter-spacing: .27em; }
.eyebrow-line { width: 21px; height: 1px; background: #cda763; }
.page-heading { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 34px; }
h1, h2, h3, p { margin-top: 0; }
.page-heading h1 { font: 600 clamp(30px, 3.2vw, 43px)/1.2 'Cinzel', Georgia, serif; letter-spacing: -.035em; color: #f2efe4; margin-bottom: 12px; }
.page-heading p { color: #9da9b4; font-size: 21px; line-height: 1.55; max-width: 850px; margin: 0; }
.circle-icon { display: grid; place-items: center; overflow: hidden; border: 1px solid #8c744d; border-radius: 50%; background: #e8e5dd; box-shadow: 0 0 0 4px #b9954517; }
.circle-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.heading-sigil { width: 74px; height: 74px; flex: 0 0 74px; }
.main-nav { display: flex; gap: 5px; border-bottom: 1px solid #33404b; margin-bottom: 24px; }
.nav-item { border: 0; border-bottom: 2px solid transparent; background: none; padding: 17px 22px 18px; margin-bottom: -1px; color: #a4afb9; font-weight: 600; font-size: 19px; }
.nav-item.active { color: #f4e3bd; border-color: #d6aa59; }
.nav-item:hover { color: #fff; }
.nav-icon { margin-right: 7px; font-size: 18px; vertical-align: -1px; }
.nav-count { color: #d9bd85; margin-left: 8px; border: 1px solid #4d4b40; padding: 2px 7px; border-radius: 10px; font-size: 15px; }
.notice { border: 1px solid #856c3a; background: #2a2a25; color: #f2d598; padding: 12px 16px; border-radius: 5px; font-size: 19px; margin-bottom: 16px; }
.content-card { background: #142231; border: 1px solid #31404d; border-radius: 7px; box-shadow: 0 20px 75px rgba(0,0,0,.16); }
.card-topline { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #2c3b48; min-height: 53px; padding: 0 31px; }
.section-kicker { color: #c9a866; font-size: 15px; letter-spacing: .2em; font-weight: 700; }
.status, .group-total { color: #9eabb5; font-size: 16px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.status { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #77818a; }
.status.saved .status-dot { background: #72b58d; }
.status.changed .status-dot { background: #e6bd69; }
.section-heading { padding: 30px 31px 20px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.section-heading h2 { font: 600 25px/1.3 'Cinzel', Georgia, serif; color: #f1ebdd; letter-spacing: -.015em; margin-bottom: 7px; }
.section-heading p { color: #9facb7; font-size: 19px; line-height: 1.55; margin: 0; }
.count-badge { white-space: nowrap; border: 1px solid #46505a; color: #bfaa7d; padding: 8px 11px; font-size: 15px; font-weight: 700; letter-spacing: .12em; }
.property-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid #35434e; padding: 0 31px; gap: 25px; }
.property-tab { padding: 13px 8px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: #9eacb6; font-size: 19px; font-weight: 700; margin-bottom: -1px; white-space: nowrap; }
.property-tab.selected { color: #f0d6a0; border-color: #d8ac61; }
.property-tab:hover { color: #fff; }
.ranking-layout { padding: 28px 31px 30px; }
.ranking-labels { display: flex; justify-content: space-between; padding: 0 1px 9px; color: #a9b6c0; font-size: 14px; letter-spacing: .19em; font-weight: 700; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-card { min-height: 68px; background: #1c2d3d; border: 1px solid #3a4b58; border-radius: 4px; display: flex; align-items: center; padding: 0 13px 0 18px; position: relative; transition: border-color .15s, background .15s; }
.rank-card:first-child { border-color: #a9834c; background: #29323a; }
.rank-card:hover { border-color: #a88d5d; }
.rank-card.dragging { z-index: 3; background: #2a3d4c; border-color: #e3bb70; box-shadow: 0 12px 28px #060b12a6; transition: none; }
.rank-number { font: 600 19px Georgia, serif; color: #9da6ae; width: 44px; }
.rank-card:first-child .rank-number { color: #e5bd72; }
.category-name { font-size: 21px; font-weight: 600; color: #e8e9e7; flex: 1; }
.rank-actions { display: flex; gap: 1px; align-items: center; }
.move-button, .drag-handle { display: grid; place-items: center; border: 0; background: transparent; color: #a5b3bc; height: 40px; width: 38px; padding: 0; font-size: 24px; }
.move-button:hover, .drag-handle:hover { color: #f5d28e; }
.drag-handle { font-size: 30px; cursor: grab; touch-action: none; }
.drag-handle:active { cursor: grabbing; }
.exclude-button { display: grid; place-items: center; flex: 0 0 40px; height: 40px; margin-left: 5px; border: 1px solid #805c5b; border-radius: 3px; background: #342c33; color: #f0b5a9; font-size: 27px; line-height: 1; }
.exclude-button:hover { background: #58383b; color: #ffe1d8; }
.least-label { color: #8896a1; font-size: 14px; letter-spacing: .18em; font-weight: 700; padding-top: 13px; }
.rank-empty { color: #a5b2bc; font-size: 18px; margin: 8px 0 0; }
.excluded-section { margin-top: 27px; border-top: 1px solid #3b4852; padding-top: 22px; }
.excluded-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.excluded-heading strong { color: #e7d1c9; font: 600 22px Georgia, serif; }
.excluded-heading span { color: #c3948a; font-size: 14px; font-weight: 700; letter-spacing: .13em; }
.excluded-section > p { margin: 8px 0 17px; color: #aab6be; font-size: 17px; line-height: 1.5; }
.excluded-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.excluded-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 61px; padding: 9px 13px 9px 18px; border: 1px dashed #675452; border-radius: 4px; background: #252b34; }
.excluded-card .category-name { color: #b7afb0; }
.excluded-tag { color: #c59b90; font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.restore-button { border: 1px solid #75654f; border-radius: 3px; background: #29343d; color: #ead0a0; padding: 7px 10px; font-size: 16px; font-weight: 700; }
.restore-button:hover { background: #3a4650; }
.excluded-section .excluded-empty { margin: 0; color: #8797a2; font-size: 16px; }
.content-list { display: grid; gap: 9px; padding: 27px 31px 30px; }
.content-row { min-height: 64px; background: #1c2d3d; border: 1px solid #3a4b58; border-radius: 4px; padding: 10px 15px 10px 19px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.content-name { color: #e8e9e7; font-size: 21px; font-weight: 600; }
.content-options { display: flex; flex: 0 0 auto; gap: 5px; }
.content-option { min-width: 80px; min-height: 44px; border: 1px solid #53616d; border-radius: 3px; background: #172634; color: #aebbc5; font-size: 18px; font-weight: 700; }
.content-option:hover { border-color: #b99b68; color: #fff; }
.content-option.selected.yes { border-color: #82b99b; background: #28493e; color: #cdf2d8; }
.content-option.selected.maybe { border-color: #c5a86b; background: #4a4030; color: #f1deb2; }
.content-option.selected.no { border-color: #a9807c; background: #493736; color: #f2cfca; }
.card-footer { min-height: 84px; border-top: 1px solid #34424d; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 31px; color: #9cabb6; font-size: 16px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 30px; background: linear-gradient(#eac57e, #c69951); border: 1px solid #f2d695; border-radius: 3px; color: #1a2228; font-size: 18px; font-weight: 700; padding: 12px 17px; min-height: 48px; box-shadow: inset 0 1px #fff5bc55; }
.primary-button:hover:not(:disabled) { filter: brightness(1.09); }
.primary-button span { font-size: 17px; line-height: 1; }
.footer { color: #627480; text-align: center; font-size: 15px; letter-spacing: .08em; padding: 23px; }
.footer span { color: #b58d4e; margin: 0 5px; }

.group-card .section-heading { padding-bottom: 27px; }
.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 22px 31px 19px; }
.table-description { display: flex; gap: 13px; align-items: center; }
.table-description strong { color: #eadbbd; font: 600 24px Georgia, serif; }
.table-description span { color: #95a5b0; font-size: 16px; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.view-toggle { display: flex; border: 1px solid #52606a; background: #1b2a37; height: 44px; padding: 2px; border-radius: 3px; white-space: nowrap; }
.view-toggle button { border: 0; background: transparent; color: #a8b6bf; font-size: 16px; font-weight: 700; padding: 0 10px; border-radius: 2px; }
.view-toggle button.selected { background: #43515a; color: #f1d393; }
.view-toggle button:hover:not(.selected) { color: #fff; }
.search-box { display: flex; align-items: center; height: 44px; border: 1px solid #465460; background: #1a2a39; padding: 0 10px; color: #a7b5bf; }
.search-box span { font-size: 23px; line-height: 1; }
.search-box input { border: none; outline: none; background: transparent; color: #f0f1ef; width: 170px; font-size: 18px; }
.search-box input::placeholder { color: #8797a4; }
.secondary-button { color: #e4c790; border: 1px solid #796342; background: #26313a; padding: 8px 12px; height: 44px; font-size: 16px; font-weight: 700; border-radius: 2px; }
.secondary-button:hover { background: #34424b; }
.table-scroll { overflow-x: auto; border-top: 1px solid #34434f; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
thead { background: #1a2b3a; }
th, td { border-bottom: 1px solid #2e3e4c; padding: 14px 13px; font-size: 18px; }
thead th { padding: 0; }
thead th:first-child, tbody th { position: sticky; left: 0; z-index: 1; min-width: 170px; }
thead th:first-child { background: #1a2b3a; z-index: 2; }
tbody th { background: #142231; font-weight: 600; }
tbody tr:hover td, tbody tr:hover th { background: #203242; }
.sort-button { width: 100%; min-height: 52px; padding: 8px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; border: 0; background: none; color: #9eacb7; font-size: 15px; font-weight: 700; letter-spacing: .09em; }
.sort-button:hover, .sort-button.active { color: #e8c781; }
.sort-button span { font-size: 14px; color: #bc9d65; }
.person-cell { display: grid; gap: 3px; }
.person-name { color: #e8e9e7; }
.person-login { color: #91a2af; font-size: 15px; font-weight: 400; }
.person-cell small { display: inline-block; font-size: 12px; letter-spacing: .08em; color: #d8b879; margin-left: 7px; }
.table-choice { color: #cbd3d7; }
.table-choice.first { color: #f0cf8d; font-weight: 700; }
.content-table-choice { display: inline-block; min-width: 68px; text-align: center; border-radius: 3px; padding: 5px 8px; font-size: 16px; font-weight: 700; }
.content-table-choice.yes { color: #cdf2d8; background: #28493e; }
.content-table-choice.maybe { color: #f1deb2; background: #4a4030; }
.content-table-choice.no { color: #f2cfca; background: #493736; }
.table-dash { color: #647482; }
.date-cell { color: #9aaab5; }
.pending { color: #83929d; font-style: italic; }
.empty-table { text-align: center; padding: 35px; color: #a2b0b9; }
.table-footer { padding: 17px 31px; color: #8d9da9; font-size: 16px; }

.account-details { margin: 0 31px 28px; padding: 22px 20px; background: #1b2c3a; border: 1px solid #394957; display: grid; gap: 20px; }
.account-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-details label, .danger-kicker { display: block; font-size: 15px; letter-spacing: .16em; font-weight: 700; color: #c9a866; margin-bottom: 8px; }
.account-details input { width: 100%; height: 50px; border: 1px solid #52606a; background: #122230; color: #f2f0e8; padding: 0 13px; outline: none; border-radius: 2px; font-size: 19px; }
.account-details input:focus { border-color: #d9b674; }
.account-details p { margin: 8px 0 0; color: #9facb7; font-size: 17px; line-height: 1.45; }
.account-save { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.account-save .form-error { flex: 1; min-height: 0; padding: 0; }
.danger-zone { border-top: 1px solid #34424d; padding: 30px 31px 35px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 320px); gap: 34px; }
.danger-kicker { color: #e49e8b; }
.danger-zone h3 { font: 600 19px/1.35 'Cinzel', Georgia, serif; color: #f1e5dc; margin: 10px 0; }
.danger-zone p { color: #adb8bf; font-size: 18px; line-height: 1.55; margin: 0; max-width: 490px; }
.danger-zone p strong { color: #f1e5dc; }
.danger-zone label { display: block; color: #d5b6ab; font-size: 15px; font-weight: 700; letter-spacing: .1em; margin-bottom: 8px; }
.danger-zone input { width: 100%; height: 48px; border: 1px solid #725b59; background: #192834; color: #f2eee9; padding: 0 12px; border-radius: 2px; outline: none; font-size: 19px; }
.danger-zone input:focus { border-color: #e6a693; }
.delete-button { background: #673e3b; color: #ffe2da; border: 1px solid #b46e65; border-radius: 3px; padding: 10px 15px; font-size: 18px; font-weight: 700; }
.delete-button:hover:not(:disabled) { background: #854c46; }

.login-page { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; isolation: isolate; overflow-x: hidden; background: radial-gradient(ellipse at 50% 39%, #234359 0, #102638 38%, #0b1726 72%); padding: 35px 16px; }
.login-page::before { content: ''; position: absolute; inset: 0; z-index: -2; opacity: .28; background: repeating-linear-gradient(125deg, transparent 0 95px, #7c9bae10 96px 97px); }
.login-glow { position: absolute; z-index: -1; width: 640px; height: 640px; border: 1px solid #b9954533; border-radius: 50%; box-shadow: 0 0 0 85px #ad8b3410, 0 0 0 170px #ad8b3408; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.login-card { width: min(460px, 100%); border: 1px solid #6d624f; background: linear-gradient(145deg, #1b3040ee, #111e2bee); box-shadow: 0 30px 100px #0009, inset 0 1px #ccad6a33; padding: 34px 48px 38px; text-align: center; }
.login-emblem { width: 80px; height: 80px; margin: 0 auto 13px; }
.eyebrow.center { display: block; color: #d1b173; }
.login-card h1 { color: #f4eddb; font: 600 34px/1.3 'Cinzel', Georgia, serif; margin: 18px 0; }
.login-card h1 em { color: #eac686; font-style: normal; }
.login-intro { color: #afbdc6; font-size: 18px; line-height: 1.55; max-width: 360px; margin: 0 auto 29px; }
.login-card form { text-align: left; }
.login-card label { display: block; color: #d3bd90; font-size: 15px; font-weight: 700; letter-spacing: .13em; margin: 17px 0 8px; }
.login-card input { width: 100%; border: 1px solid #52606a; background: #122230; color: #f2f0e8; height: 50px; padding: 0 13px; outline: none; border-radius: 2px; font-size: 19px; }
.login-card input:focus { border-color: #d9b674; }
.login-card input::placeholder { color: #748a99; }
.username-suggestions { text-align: left; }
.username-suggestions:empty { display: none; }
.username-suggestions p { color: #d9c595; font-size: 16px; line-height: 1.4; margin: 13px 0 7px; }
.suggestion-list { display: flex; flex-wrap: wrap; gap: 6px; }
.suggestion-item { border: 1px solid #776b55; color: #e8d9ae; background: #283744; border-radius: 3px; padding: 6px 9px; font-size: 16px; }
.suggestion-item:hover { background: #384958; }
.create-anyway { display: block; border: 0; background: transparent; color: #dda78b; font-size: 16px; text-decoration: underline; padding: 9px 0 0; }
.form-success { color: #a3dfba; font-size: 16px; padding-bottom: 10px; }
.form-error { min-height: 30px; padding-top: 8px; color: #ffa795; font-size: 16px; }
.primary-button.full { width: 100%; justify-content: space-between; min-height: 52px; }
.login-footnote { border-top: 1px solid #3d4b53; margin-top: 26px; padding-top: 20px; color: #8fa0ac; font-size: 16px; }
.login-bottom { color: #738693; font-size: 14px; letter-spacing: .17em; margin-top: 25px; }
.login-bottom span { color: #d4ad64; margin: 0 6px; }

@media (max-width: 800px) {
  .heading-sigil { display: none; }
  .main { width: min(100% - 32px, 700px); padding-top: 40px; }
  .danger-zone { grid-template-columns: 1fr; gap: 22px; }
  .table-tools { align-items: stretch; flex-direction: column; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 16px; min-height: 68px; }
  .brand-text strong { font-size: 12px; }
  .brand-text small { font-size: 10px; }
  .topbar-right { gap: 9px; }
  .account { display: none; }
  .page-heading h1 { font-size: 27px; }
  .page-heading p { font-size: 18px; }
  .nav-item { padding: 13px 10px; font-size: 16px; }
  .main-nav { overflow-x: auto; }
  .nav-item { white-space: nowrap; }
  .nav-icon { display: none; }
  .nav-count { margin-left: 2px; }
  .card-topline, .section-heading, .ranking-layout, .content-list, .card-footer, .table-tools, .table-footer { padding-left: 17px; padding-right: 17px; }
  .property-tabs { padding: 0 17px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading p { font-size: 16px; }
  .count-badge { display: none; }
  .card-footer { flex-direction: column; align-items: stretch; }
  .card-footer .primary-button { align-self: stretch; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .table-actions { width: 100%; }
  .table-actions { flex-wrap: wrap; }
  .content-row { align-items: stretch; flex-direction: column; gap: 10px; }
  .content-options { width: 100%; }
  .content-option { flex: 1; min-width: 0; }
  .rank-card { padding-left: 10px; padding-right: 8px; }
  .rank-number { width: 34px; }
  .rank-actions { display: grid; grid-template-columns: repeat(2, 34px); gap: 2px; }
  .move-button, .drag-handle, .exclude-button { width: 34px; height: 34px; }
  .exclude-button { margin-left: 0; }
  .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .account-details { margin-left: 17px; margin-right: 17px; }
  .account-fields { grid-template-columns: 1fr; }
  .account-save { flex-direction: column; align-items: stretch; }
  .danger-zone { padding-left: 17px; padding-right: 17px; }
  .login-card { padding: 29px 25px; }
}
