/* Character creator start page: switcher, start card, import tab. Components live in creator-start-v1.js. */
.start-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 6px;padding:0 0 10px;border-bottom:1px solid #bba68180}
.start-bar .start-context{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.start-bar .eyebrow{font-size:12px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.start-bar .start-context strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chars-wrap{position:relative}
.chars-trigger{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;background:#f6edd7;border:1px solid var(--brass);border-radius:4px;color:var(--ink);font:inherit;font-size:15px;cursor:pointer;box-shadow:inset 0 1px 0 #fff8;}
.chars-trigger .count{display:inline-block;min-width:24px;padding:0 7px;border-radius:11px;background:var(--wine);color:#f6e9cf;font-size:13px;text-align:center}
.chars-trigger[aria-expanded=true]{background:#e9dcc0;border-color:var(--wine)}
.chars-pop{position:absolute;z-index:30;top:calc(100% + 6px);right:0;width:min(470px,calc(100vw - 32px));max-height:min(680px,calc(100vh - 120px));max-height:min(680px,calc(100dvh - 120px));display:flex;flex-direction:column;background:#f4ebd6;border:1px solid var(--brass);border-radius:5px;box-shadow:0 0 0 2px #2a1c0f33,0 14px 34px #000a;padding:0}
.chars-pop[hidden]{display:none}
.chars-pop .pop-head{padding:12px 14px 8px}
.chars-pop h3{margin:0 0 8px;font-size:17px}
.chars-pop .pop-search{width:100%;min-height:44px}
.chars-pop .pop-filters{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.chars-pop .chip{min-height:32px;padding:3px 10px;border-radius:16px;font-size:13px;background:#efe3c8;border:1px solid var(--line);color:var(--ink);cursor:pointer}
.chars-pop .chip[aria-pressed=true]{background:var(--wine);border-color:var(--wine-dark);color:#f6e9cf}
.chars-pop select{min-height:32px;font-size:13px;padding:2px 6px;border-radius:16px}
.chars-pop .pop-list{overflow:auto;overscroll-behavior:contain;padding:2px 8px 6px;margin:0;list-style:none;flex:1;min-height:120px}
.chars-pop .pop-group-title{margin:10px 6px 2px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.char-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 8px;margin:2px 0;background:transparent;border:1px solid transparent;border-bottom-color:#bba68155;border-radius:4px;color:var(--ink);font:inherit;cursor:pointer;min-height:52px}
.char-row:hover,.char-row:focus-visible{background:#e9dcc0;border-color:var(--brass)}
.char-row[aria-current=true]{background:#e6d4bd;border-color:var(--wine)}
.char-row .char-main{flex:1;min-width:0;display:flex;flex-direction:column}
.char-row .char-name{font-weight:bold;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.char-row .char-meta{font-size:12.5px;color:var(--muted);line-height:1.3}
.char-row .tag{flex:none;font-size:11.5px;padding:1px 7px;border-radius:10px;border:1px solid var(--line);background:#efe3c8;white-space:nowrap}
.char-row .tag.ready{border-color:var(--moss);color:#2f4a28;background:#dfe7cd}
.char-row .tag.current{border-color:var(--wine);color:var(--wine);background:#f1dcd8}
.char-row .tag.captured{border-color:#33496c;color:#33496c;background:#dde5f1}
.chars-pop .dup-note{font-size:12px;color:var(--muted);margin:4px 8px 6px}
.chars-pop details.pop-untouched{margin:8px 6px 4px;border-top:1px solid #bba68155;padding-top:6px}
.chars-pop details>summary{cursor:pointer;font-size:14px;min-height:36px;display:flex;align-items:center}
.chars-pop .pop-foot{display:flex;gap:8px;justify-content:space-between;align-items:center;padding:10px 14px;border-top:1px solid #bba681}
.chars-pop .pop-foot a{font-size:14px}
.chars-pop .pop-empty{padding:18px 10px;text-align:center;color:var(--muted)}
.chars-backdrop{display:none}
.start-card{margin:12px 0 0;padding:0;border:1px solid var(--line);border-radius:5px;background:#f8f1de99;overflow:hidden}
.start-tabs{display:flex;gap:0;margin:10px 12px 0;padding:3px;border:1px solid #bba780;border-radius:4px;background:#e4d7bd55}
.start-tabs [role=tab]{flex:1;min-height:42px;padding:8px 12px;background:transparent;border:0;border-right:1px solid #bba78070;border-radius:0;font:inherit;font-size:16px;color:var(--muted);cursor:pointer;box-shadow:none;display:flex;gap:8px;align-items:center;justify-content:center}
.start-tabs [role=tab]:last-child{border-right:0}
.start-tabs [role=tab][aria-selected=true]{color:#fff5df;font-weight:bold;background:#76162b url('/art/creator-weathered-oxblood-v1.png') center/cover;border-radius:3px;box-shadow:inset 0 0 0 1px #c1a16b66}
.start-tabs .badge-n{font-size:12px;padding:0 7px;border-radius:10px;background:var(--wine);color:#f6e9cf}
.start-tabs [aria-selected=true] .badge-n{background:#f6e9cf;color:var(--wine)}
.start-panel{padding:16px 18px 18px}
.start-panel[hidden]{display:none}
.start-grid{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:14px 16px}
.start-grid .full{grid-column:1/-1}
.start-card .field>label,.start-card fieldset.edition legend{display:block;font-weight:bold}
.start-card .field>.hint{font-weight:normal;margin:2px 0 6px}
.start-card .field>input,.start-card .field>select{width:100%}
.start-grid .name-input-row{display:flex;gap:8px}
.start-grid .name-input-row input{flex:1;min-width:0}
fieldset.edition{border:0;margin:0;padding:0;min-width:0}
fieldset.edition legend{font-weight:bold;padding:0;margin:0 0 6px}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.seg>label{position:relative;display:block;padding:10px 12px 10px 38px;border:1px solid var(--line);border-radius:5px;background:#faf7f0cc;cursor:pointer;font-weight:normal}
.seg>label b{display:block;font-size:17px}
.seg>label small{display:block;color:var(--muted);font-size:13px;line-height:1.3}
.seg input{position:absolute;left:12px;top:14px;width:18px;height:18px;margin:0;accent-color:var(--wine)}
.seg>label:has(input:checked){border-color:var(--wine);background:#f2e1d6;box-shadow:inset 0 0 0 1px var(--wine)}
.seg>label:has(input:focus-visible){outline:3px solid #155fae;outline-offset:2px}
.seg>label:has(input:disabled){opacity:.55;cursor:not-allowed}
.start-banner{margin-bottom:12px !important;display:flex;gap:12px;align-items:center;margin:10px 0 0;padding:10px 14px;border:1px solid var(--brass);border-left:4px solid var(--wine);border-radius:4px;background:#f1e4c7}
.start-banner b{display:block}
.import-steps{margin:0 0 12px;padding-left:20px}
.import-steps li{margin:2px 0}
.import-or{display:flex;align-items:center;gap:10px;margin:16px 0 10px;color:var(--muted);font-size:13px;text-transform:uppercase;letter-spacing:.08em}
.import-or:before,.import-or:after{content:"";flex:1;border-top:1px solid #bba68199}
.import-row{display:flex;gap:8px}
.import-row input{flex:1;min-width:0}
.claim-list{list-style:none;margin:0;padding:0}
.claim-list li{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #bba68155}
.claim-list .who{flex:1;min-width:0}
.start-foot{margin:10px 2px 0;font-size:14px;color:var(--muted)}
.ready-note{margin:10px 0 0;padding:10px 14px;border:1px solid var(--moss);border-left:4px solid var(--moss);border-radius:4px;background:#e6ead3}
@media(max-width:640px){
 .start-grid{grid-template-columns:1fr}
 .seg{grid-template-columns:1fr}
 .start-panel{padding:14px 12px 16px}
 .start-tabs [role=tab]{font-size:14px;padding:6px 4px}
 .chars-wrap{width:100%}.chars-trigger{width:100%;justify-content:space-between}
 .chars-pop{position:fixed;left:8px;right:8px;top:auto;bottom:8px;width:auto;max-height:78vh;max-height:78dvh;z-index:120}
 .chars-backdrop.open{display:block;position:fixed;inset:0;background:#140d0899;z-index:110}
 .import-row{flex-direction:column}
}

.chars-pop .pop-filters select{width:auto;flex:1 1 140px;min-width:0}

.chars-pop .pop-sublist{list-style:none;margin:0;padding:0}
.pop-untouched-row{display:flex;flex-direction:column}
.pop-untouched-row .discard{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 8px 6px}
.pop-untouched-row .discard-btn,.pop-untouched-row .discard-ask button{min-height:44px}
.discard-ask{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13px}
.discard-note{font-size:13px;color:#7a1b1b}
.chars-pop .danger{background:#8a1c1c;color:#fff4e8;border-color:#5a1010}
body.chars-sheet-open{overflow:hidden}
.start-card .name-undo{margin-top:6px}
.chars-wrap .chars-trigger:focus-visible,.start-tabs [role=tab]:focus-visible,.char-row:focus-visible,.chars-pop .chip:focus-visible{outline:3px solid #155fae;outline-offset:2px}
.chars-pop .pop-foot button{min-height:36px}
.chars-pop .pop-foot a{display:inline-flex;align-items:center;min-height:36px}
@media(max-width:640px){.chars-pop .chip,.chars-pop select,.chars-pop .pop-foot button,.chars-pop .pop-foot a,.chars-pop details>summary,.chars-pop .discard-btn{min-height:44px}.chars-pop .chip{padding:3px 14px}}
@media(max-width:640px){.start-card select,.start-card input[type=text],.start-card button{min-height:44px}}

/* Choice picker: long multi-select lists collapse to a row (count, chips, Choose...) with the list in a popover that reuses the switcher's. */
.choice-picker{position:relative;margin:6px 0;grid-column:1/-1;min-width:0}
.choice-picker-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 8px;border:1px solid var(--line);border-radius:4px;background:#faf6eb66}
.choice-picker-row.choice-needed{border-color:#a45953;box-shadow:0 0 0 2px #a4595314}
.choice-picker-count{font-size:14px;color:var(--muted);white-space:nowrap}
.choice-picker-chips{display:flex;flex:1 1 160px;flex-wrap:wrap;gap:6px;min-width:0}
.choice-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 3px 2px 10px;border:1px solid var(--brass);border-radius:14px;background:#efe3c8;font-size:14px}
.choice-chip button{width:26px;height:26px;min-height:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--wine);font-size:18px;line-height:1;cursor:pointer;box-shadow:none}
.choice-chip button:hover,.choice-chip button:focus-visible{background:#e0cfae}
.choice-picker-trigger{margin-left:auto}
.choice-picker-pop{right:auto;left:0}
.choice-picker-pop .pop-head{padding-bottom:4px}
.choice-picker-pop .pop-search{margin-top:2px}
.choice-picker-live{margin:0;font-size:13px;color:var(--muted)}
.choice-picker-pop .pop-foot{justify-content:space-between}
.choice-picker-pop .pop-list.choice-picker-list{display:block;grid-template-columns:none;max-height:none;overflow:auto;margin:0;padding:2px 8px 6px;border:0;gap:0}
.choice-picker-pop .class-skill{display:flex;align-items:center;gap:10px;margin:0;padding:6px 8px;min-height:40px;border:0;border-bottom:1px solid #bba68140;background:none;font-weight:normal}
.choice-picker-pop .class-skill input{flex:none;width:20px;height:20px;margin:0}
.choice-picker-pop .class-skill:has(input:disabled){opacity:.55}
.choice-picker-pop .choice-group{margin:10px 8px 2px}
.choice-picker-pop .pop-empty{padding:12px;margin:0}
@media(max-width:640px){
 .choice-picker-pop{left:8px}
 .choice-picker-trigger{width:100%;justify-content:center;margin-left:0}
 .choice-picker-pop .class-skill{min-height:48px}
 .choice-picker-pop .pop-foot button{min-height:44px}
 .choice-chip button{width:32px;height:32px}
}
