:root{--paper:#fbf9f6;--ink:#242424;--muted:#777168;--line:#dfddd8;--gold:#c5a059;--blue:#1976d2;--red:#ba1a1a;font-family:"Malgun Gothic",system-ui,sans-serif;color:var(--ink);background:var(--paper);font-size:16px}*{box-sizing:border-box}body{margin:0}.development{padding:9px 16px;text-align:center;font-size:12px;background:#eeebe4;color:#625b4d}.loading{text-align:center;padding:60px}button,input,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:10px;min-height:46px;padding:10px 18px;background:var(--ink);color:white;font-weight:600}button:disabled{background:#cbc8c2;cursor:not-allowed}button.secondary{background:#eeece7;color:var(--ink)}button.link{padding:0;min-height:32px;background:transparent;color:#775a19}button.danger{background:#fbe6e5;color:var(--red)}input,textarea{width:100%;padding:13px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink)}input:focus,textarea:focus{outline:2px solid var(--gold);outline-offset:1px}input[type=checkbox]{width:22px;height:22px;flex:none;accent-color:var(--ink)}label{display:block;font-size:14px;font-weight:600;margin:16px 0 7px}h1{font-size:28px;letter-spacing:-1px;margin:6px 0 14px}h2{font-size:19px;margin:0 0 18px}h3{font-size:15px;margin:0 0 7px}p{line-height:1.65}small,.muted{color:var(--muted);font-size:13px}.brand{font-size:13px;letter-spacing:2px;color:#775a19;font-weight:700}.card{background:white;border:1px solid var(--line);border-radius:16px;padding:24px;margin-bottom:18px}.auth{max-width:440px;margin:60px auto;padding:0 20px}.auth .brand{margin-bottom:16px}.auth form>button{width:100%;margin-top:22px}.auth .switch{text-align:center;margin-top:16px}.layout{max-width:1160px;margin:auto;display:grid;grid-template-columns:210px 1fr;min-height:90vh}.sidebar{padding:30px 22px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:13px}.sidebar button{background:transparent;color:var(--ink);text-align:left}.sidebar button.active{background:#e9e5dc}.sidebar .brand{margin-bottom:24px}.sidebar .account{margin-top:auto;padding-top:25px}.content{padding:34px;min-width:0}.top{display:flex;justify-content:space-between;align-items:center;gap:14px}.badge{font-size:12px;color:#775a19;padding:7px 10px;border-radius:20px;background:#f3ead6;white-space:nowrap}.holders{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:25px 0}.holder{display:flex;align-items:center;gap:10px;background:white;border:1px solid var(--line);padding:18px 15px;color:var(--ink);text-align:left}.dot{width:11px;height:11px;border-radius:50%;background:#969696;display:inline-block;flex:none}.blue{background:#1976d2}.yellow{background:#d8ad25}.green{background:#9ac7a5}.red{background:#ba1a1a}.gray{background:#969696}.unknown{background:transparent;border:1px dashed #777}.holder strong{font-size:24px;margin-left:auto}.client-row{display:flex;gap:12px;align-items:center;border-top:1px solid #eee;padding:17px 0;width:100%;background:transparent;color:var(--ink);border-radius:0;text-align:left}.client-row:first-child{border-top:0}.client-row .grow{flex:1}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.notice{background:#f3f0e8;border-radius:10px;padding:14px;font-size:13px;line-height:1.7}.empty{padding:35px 0;text-align:center;color:var(--muted)}.grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.grid label{margin-top:10px}.visit{border-top:1px solid #eee;padding:18px 0}.visit p{white-space:pre-wrap;overflow-wrap:anywhere}.consent{display:flex;align-items:flex-start;gap:12px;margin:18px 0;line-height:1.6}.consent label{margin:0;font-weight:400}.registration{max-width:550px;margin:28px auto;padding:0 18px}.registration .card{padding:22px}.registration .brand{margin-bottom:10px}details{margin:14px 0;border:1px solid var(--line);padding:13px;border-radius:10px}summary{cursor:pointer;font-weight:600;font-size:14px}details p{font-size:14px}canvas{display:block;width:100%;height:190px;background:#fbf9f6;border:1px dashed #b5afa1;border-radius:10px;touch-action:none}.sign-head{display:flex;justify-content:space-between;align-items:center;gap:6px;margin:20px 0 10px}.sign-head label{margin:0}.error{color:var(--red);font-size:14px;line-height:1.5;margin:12px 0}.saved{border-left:3px solid #4e9569;padding-left:16px}#toast{position:fixed;left:20px;right:20px;bottom:22px;margin:auto;max-width:500px;background:#242424;color:white;padding:15px 18px;border-radius:12px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:100}#toast.show{opacity:1}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px}.url{font-size:12px;overflow-wrap:anywhere}.full{width:100%;margin-top:18px}.field-note{font-size:12px;color:var(--muted);margin-top:5px}@media(max-width:720px){.layout{display:block}.sidebar{padding:18px 16px;border-right:0;border-bottom:1px solid var(--line);flex-direction:row;flex-wrap:wrap;gap:4px}.sidebar .brand{width:100%;margin-bottom:8px}.sidebar .account{margin:0;padding:0;display:none}.sidebar button{padding:7px 10px;min-height:40px;font-size:14px}.content{padding:22px 16px}.card{padding:19px}.holders{grid-template-columns:repeat(2,1fr)}h1{font-size:25px}.grid{grid-template-columns:1fr}.auth{margin-top:35px}.badge{white-space:normal}.top{align-items:flex-start}.registration{margin:20px auto}}

@media print{
  @page{size:A4;margin:15mm}
  body.printing-evidence{background:white;color:#000}
  body.printing-evidence .development,body.printing-evidence .sidebar,body.printing-evidence #toast,body.printing-evidence .content>:not(#evidence-report){display:none!important}
  body.printing-evidence .layout{display:block}
  body.printing-evidence .content{padding:0;max-width:none}
  body.printing-evidence #evidence-report{border:0;margin:0;padding:0;box-shadow:none;overflow-wrap:anywhere}
  body.printing-evidence #evidence-report button{display:none}
  body.printing-evidence #evidence-report details{border:0;break-before:auto}
  body.printing-evidence #evidence-report p{font-size:11pt;line-height:1.5;break-inside:avoid}
  body.printing-evidence #evidence-report summary{font-size:12pt;break-after:avoid}
  body.printing-evidence #evidence-report svg{max-height:60mm;break-inside:avoid}
}

.sign-head{flex-wrap:wrap}.sign-head label{margin-right:auto}.sign-head #sign-status{flex-basis:100%}

.pen-note .actions label{margin:0}.pen-note canvas{height:auto;aspect-ratio:5/3}.pen-history svg{display:block;width:100%;border:1px solid var(--line);background:#fbf9f6}.pen-note select{min-height:40px}

.saved-photo{display:block;max-width:100%;max-height:70vh;object-fit:contain;margin:1rem auto;border-radius:12px}

.holder>span:nth-child(2){min-width:0;word-break:keep-all}.holder-period{display:block;font-size:11px;font-weight:400;line-height:1.6;margin-top:5px}.holder strong{flex-shrink:0}

.registration-qr{display:block;width:280px;max-width:100%;height:auto;margin:18px auto;background:#fff}

.vip-marker{display:inline-block;border:1px solid #b49a61;border-radius:999px;padding:2px 7px;font-size:.75rem;color:#66542e;background:#faf6eb;max-width:100%;white-space:normal}

.client-row.client-card{border:1px solid #d8dde3;border-left:12px solid #969696;border-radius:0;background:#fff;margin:9px 0;padding:14px 12px;gap:10px}
.client-card[data-holder-status=blue]{border-left-color:#1976d2}.client-card[data-holder-status=yellow]{border-left-color:#b58a13}.client-card[data-holder-status=green]{border-left-color:#9ac7a5}.client-card[data-holder-status=red]{border-left-color:#ba1a1a}.client-card[data-holder-status=gray]{border-left-color:#969696}.client-card[data-holder-status=unknown]{border-left-color:#969696}
.client-card .grow{min-width:0;overflow-wrap:anywhere}.client-title{display:inline-flex;align-items:baseline;flex-wrap:wrap;gap:4px 9px}.holder-label{font-size:12px;font-weight:400;color:#625b4d}

/* Customer workspace: compact overview, one task at a time. */
.customer-detail .detail-subscription{margin:0 0 22px;padding:10px 14px;background:#f2efe8;border:0;color:#6d6250}
.detail-subscription summary{font-size:12px;font-weight:500}.detail-subscription p{margin:10px 0 0;font-size:12px}
.customer-detail #back{font-size:13px;margin-bottom:16px}
.client-detail-header{display:flex;align-items:center;gap:16px;margin:0 0 24px}
.client-avatar{width:58px;height:58px;flex:none;display:grid;place-items:center;border-radius:19px;background:linear-gradient(145deg,#eee5d2,#f6f3ed);border:1px solid #dfd1b5;color:#806334;font-size:24px;font-weight:600}
.client-identity{min-width:0;flex:1}.client-identity h1{margin:0 0 5px;font-size:28px}.client-identity p{margin:0;font-size:12px;overflow-wrap:anywhere}
.client-stage{display:inline-flex;align-items:center;gap:7px;flex:none;border:1px solid var(--line);background:white;border-radius:999px;padding:7px 10px;font-size:12px}
.client-stage .dot{width:8px;height:8px}
.client-highlights{display:grid;grid-template-columns:.8fr 1.25fr 1fr;background:linear-gradient(115deg,#fff,#f5f2ec);border:1px solid #e1d9ca;border-radius:16px;margin-bottom:26px;padding:20px 8px}
.client-highlights>div{min-width:0;padding:0 18px;border-right:1px solid #e5dfd4}.client-highlights>div:last-child{border:0}
.client-highlights span{display:block;color:var(--muted);font-size:12px;margin-bottom:10px}.client-highlights strong{display:block;font-size:21px;letter-spacing:-.5px;overflow-wrap:anywhere;line-height:1.4}.client-highlights small{font-size:13px;margin-left:4px;font-weight:400}
.client-detail-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;border-bottom:1px solid var(--line);margin-bottom:24px;background:var(--paper);position:sticky;top:0;z-index:5;padding-top:6px}
.client-detail-tabs button{background:transparent;color:var(--muted);border-radius:8px 8px 0 0;border-bottom:3px solid transparent;padding:13px 6px;font-size:14px;white-space:nowrap}
.client-detail-tabs button[aria-selected=true]{color:#795c2c;border-bottom-color:#b69b63;background:linear-gradient(0deg,#f1ece0,transparent);font-weight:700}
.client-detail-tabs button:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
.detail-panel[hidden]{display:none!important}.detail-panel{min-width:0;outline-offset:4px}.detail-panel .card{padding:22px;min-width:0}.detail-panel h2{font-size:17px;margin-bottom:16px}
#detail-panel-record{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start;gap:18px}
#detail-panel-record .card{margin:0}#client-record label:first-child{margin-top:0}#client-record textarea{min-height:108px}
#client-record .pen-note{background:#faf9f6;padding:13px;margin:16px 0}#client-record .pen-note:not([open]){margin-bottom:0}
#client-record .pen-note canvas{max-height:350px}#client-record .pen-note .actions{gap:8px}#client-record .pen-note .actions button{font-size:12px;padding:8px 10px;min-height:38px}
#client-record .pen-note .actions label{font-size:12px}#client-record .pen-note select{max-width:100%;font:inherit;border:1px solid var(--line);border-radius:6px;background:white;padding:4px}
#visit-history .visit{padding:15px 0}#visit-history .visit>strong{font-size:14px}#visit-history .visit>p{font-size:13px;margin:8px 0}#visit-history .visit>button{font-size:12px;min-height:36px;padding:7px 10px;margin-right:5px}#visit-history .visit>details{margin:9px 0}
.visit-archive{padding:10px;background:#faf9f6}.visit-archive summary{font-size:12px;color:#775f35}
#detail-panel-usage{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}#detail-panel-usage .card{margin:0}#client-visit-summary{grid-column:1/-1}
#detail-panel-info{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}#detail-panel-info .card{margin:0}#client-management,#evidence-report{grid-column:1/-1}
#client-management .full{width:auto;max-width:100%;margin:8px 8px 0 0;font-size:13px}#client-management>.actions{padding-top:16px;border-top:1px solid var(--line);margin-top:18px}#client-management button.danger{font-size:12px}
#detail-panel-photos select{max-width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);font:inherit;font-size:13px}
#detail-panel-photos input[type=file]{font-size:13px;padding:10px;background:#faf9f6}#photo-upload>div+div{border-top:1px solid var(--line);padding-top:22px;margin-top:24px}#photo-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}#photo-list button{font-size:12px;text-align:left;margin-top:0}
@media(max-width:900px){#detail-panel-record{grid-template-columns:1fr}#detail-panel-usage,#detail-panel-info{grid-template-columns:1fr}}
@media(max-width:720px){.customer-detail{padding-top:18px}.customer-detail .detail-subscription{margin-bottom:16px}.client-detail-header{gap:11px;margin-bottom:18px}.client-avatar{width:46px;height:46px;border-radius:15px;font-size:20px}.client-identity h1{font-size:24px}.client-stage{padding:6px 8px;font-size:11px}.client-identity p{font-size:11px}.client-highlights{padding:16px 0;margin-bottom:16px;grid-template-columns:.7fr 1.2fr 1fr}.client-highlights>div{padding:0 10px}.client-highlights span{font-size:11px;margin-bottom:7px}.client-highlights strong{font-size:16px}.client-highlights>div:last-child strong{font-size:13px;padding-top:3px}.client-detail-tabs{margin-bottom:18px;gap:0}.client-detail-tabs button{font-size:13px;padding:12px 2px}.detail-panel .card{padding:18px}#photo-list{grid-template-columns:1fr}#client-management .full{width:100%;margin-right:0}.client-identity{overflow-wrap:anywhere}}
@media print{body.printing-evidence .content>#detail-panel-info{display:block!important}body.printing-evidence #detail-panel-info>:not(#evidence-report){display:none!important}body.printing-evidence #evidence-report{padding:0}}
@media(max-width:720px){.customer-workspace .sidebar{flex-wrap:nowrap;overflow-x:auto;align-items:center;padding:10px 16px;scrollbar-width:thin}.customer-workspace .sidebar .brand{display:none}.customer-workspace .sidebar>button{flex:none;white-space:nowrap;font-size:12px;min-height:38px;padding:7px 10px}}


.pen-recognition{margin-top:14px;border-top:1px solid var(--line);padding-top:14px}.pen-recognition textarea{width:100%;box-sizing:border-box}.pen-recognition [hidden]{display:none!important}

.forecast-customer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0;border-top:1px solid var(--line)}.forecast-customer>div{min-width:0}.forecast-customer b{overflow-wrap:anywhere}.forecast-customer small{display:block;margin-top:5px}.forecast-customer p{font-size:13px;margin:10px 0}.forecast-customer .actions{margin:0;flex-shrink:0}.forecast-consent{font-size:12px;color:#625b4d}.forecast-customer button{font-size:13px}#forecast-composer[hidden]{display:none}#forecast-composer textarea{resize:vertical}@media(max-width:720px){.forecast-customer{align-items:flex-start;flex-direction:column}.forecast-customer .actions{width:100%}.forecast-customer .actions button{flex:1}}

/* Customer file shelves: one repeated sleeve per customer, every tenth darker. */
:root{--paper:#f7f8fa;--ink:#172332;--muted:#536173;--line:#dce2e8}
.development{background:#edf0f4;color:#465365}.sidebar{background:#fcfcfc}.sidebar button.active{background:linear-gradient(110deg,#eee7d8,#f7f4ed);box-shadow:inset 3px 0 #b18b49}
.card{box-shadow:0 6px 24px #263a4f05}.bookshelf-layout{max-width:1440px;grid-template-columns:210px minmax(0,1fr)}.bookshelf-content{padding:26px 36px}.bookshelf-heading{margin:8px 0 18px}.bookshelf-heading>div>p:first-child{display:none}.bookshelf-heading h1{font-size:32px;letter-spacing:-.05em}.bookshelf-heading p{margin:5px 0}
.bookshelf-subscription{margin:0 0 18px;padding:9px 13px;background:#f3f0e9;border:1px solid #e5ddce}.bookshelf-subscription summary{font-size:12px;color:#715522}.bookshelf-subscription p{margin:8px 0;font-size:12px}.bookshelf-subscription>strong{display:block;margin-top:12px}
.shelf-board{--stage:#1976d2;--sleeve:#699ed0;--tenth:#2766a3;--edge:#d3e5f4;margin-bottom:30px}.shelf-board-heading{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:30px;margin-bottom:8px}.shelf-board-heading h2{font-size:19px;margin:0}.forecast-condition{font-size:11px;line-height:1.7;color:#536173;margin:6px 0 0}.shelf-line{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:30px;min-height:112px;position:relative}
.shelf-line[data-shelf=yellow]{--stage:#a77a12;--sleeve:#e9c463;--tenth:#bd8d24;--edge:#fff1bd}.shelf-line[data-shelf=green]{--stage:#355a40;--sleeve:#bdd7bf;--tenth:#9cbd9f;--edge:#e4f0e5}.shelf-line[data-shelf=red]{--stage:#b53e3e;--sleeve:#ce8985;--tenth:#a54945;--edge:#f1d3d0}.shelf-line[data-shelf=gray]{--stage:#606973;--sleeve:#a6aab0;--tenth:#69717b;--edge:#dfe2e6}
button.shelf-current{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:end;gap:16px;position:relative;width:100%;padding:8px 0 22px;background:transparent;color:#172332;border-radius:8px;text-align:left;min-width:0;font-weight:400}.shelf-label{display:flex;flex-direction:column;gap:7px;align-self:center;min-width:0}.shelf-label b{color:var(--stage);font-size:17px;word-break:keep-all}.shelf-label strong{font-size:30px;font-weight:750;letter-spacing:-.045em;line-height:1.1;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.shelf-label strong small{font-size:17px;color:inherit;margin-left:3px}.shelf-label>span{font-size:11px;line-height:1.6;color:#536173;word-break:keep-all}.shelf-scene{display:block;position:relative;min-width:0;height:82px}.shelf-holders{display:block;width:100%;height:82px;filter:drop-shadow(2px 2px 1px #24344818)}.sleeve{fill:var(--sleeve)}.sleeve-tenth{fill:var(--tenth)}.sleeve-edge{stroke:var(--edge);stroke-width:.55;fill:none}.shelf-plank{position:absolute;display:block;left:-8px;right:0;bottom:-10px;height:10px;border-radius:2px;background:linear-gradient(#faf9f5,#e0ddd6);border-top:1px solid #fff;border-bottom:1px solid #c8c5bd;box-shadow:0 7px 10px -5px #5b51452b}.shelf-empty{position:absolute;left:12px;bottom:24px;font-size:12px;color:#7a838c}
button.shelf-current:hover .shelf-scene{filter:brightness(1.025)}button.shelf-current[aria-pressed=true]{box-shadow:inset 0 0 0 2px var(--stage);background:#ffffff80}button.shelf-current:focus-visible,.shelf-transfer button:focus-visible,.shelf-unknown:focus-visible{outline:3px solid #876a35;outline-offset:3px}
.shelf-transfer{position:relative;align-self:center;transform:translateY(58px);padding:8px 0 8px 27px;min-width:0;background:transparent;border:0;border-top:1px solid #e3e5e8;border-radius:0;z-index:1}.shelf-transfer>div{min-width:0}.shelf-down{position:absolute;left:-7px;top:-8px;width:23px;height:72px;fill:none;stroke:#87909a;stroke-width:1.1}.shelf-transition{display:flex;align-items:center;gap:5px;margin:0;font-size:11px;line-height:1.5;flex-wrap:wrap}.shelf-transition>span:last-child{margin-left:3px}.shelf-transition .dot{width:11px;height:11px}.shelf-transfer button.forecast-count{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;min-height:42px;width:100%;min-width:0;padding:7px 0;background:transparent;color:#172332;border:0;border-radius:4px;box-shadow:none}.shelf-transfer .forecast-count strong{font-size:27px;font-weight:750;letter-spacing:-.04em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.shelf-expected{font-size:12px;font-weight:400}.shelf-transfer .forecast-count small{font-size:11px;color:#775a19;white-space:nowrap}.shelf-transfer button:hover small{text-decoration:underline}.shelf-threshold{font-size:10px;color:#647182}.shelf-zero{display:block;font-size:10px;color:#647182;margin-top:3px}
.shelf-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding-top:16px}.shelf-footer p{margin:0;font-size:11px;color:#647182;line-height:1.7}.shelf-footer p span{display:block}.shelf-unknown{font-size:12px}.shelf-unknown strong{margin-left:8px}.shelf-unknown[aria-pressed=true]{text-decoration:underline}
.client-row.client-card{background:linear-gradient(110deg,#fff,#f8fafc);border-radius:0;padding:18px 16px}.client-title{align-items:center;gap:8px 12px}.client-title>strong{font-size:18px}.holder-label{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:20px;background:#edf1f5;color:#354456;font-size:12px;font-weight:600}.holder-label .dot{width:9px;height:9px}.client-card .grow>small{line-height:1.85;color:#536173}
@media(max-width:1100px){.bookshelf-content{padding:24px}.shelf-board-heading,.shelf-line{grid-template-columns:minmax(0,1fr) 215px;gap:22px}button.shelf-current{grid-template-columns:92px minmax(0,1fr);gap:10px}.shelf-label strong{font-size:27px}.shelf-transfer .forecast-count{flex-wrap:wrap}}
@media(max-width:800px){.shelf-board-heading{display:block}.shelf-board-heading>div{margin:16px 0}.shelf-line{display:block;min-height:0;margin-bottom:14px}button.shelf-current{padding:8px 0 22px}.shelf-transfer{transform:none;margin:8px 0 8px 92px;padding:10px 0 10px 28px;max-width:370px}.shelf-down{height:54px;top:3px}.shelf-transfer .forecast-count{justify-content:flex-start;gap:22px}.shelf-transfer .forecast-count strong{font-size:24px}.shelf-board-heading h2{font-size:18px}.shelf-footer{margin-top:24px}.bookshelf-heading h1{font-size:27px}}
@media(max-width:480px){.bookshelf-content{padding:20px 16px}.shelf-label b{font-size:15px}.shelf-label strong{font-size:25px}.shelf-label>span{font-size:10px}button.shelf-current{grid-template-columns:82px minmax(0,1fr);gap:10px}.shelf-transfer{margin-left:82px}.shelf-scene,.shelf-holders{height:100px}.shelf-transfer .forecast-count small{font-size:11px}}

/* Keep customer signatures legible when a browser transforms page colors. */
.registration #signature{color-scheme:only light;background:#fff;border:2px solid #8b9199}

/* Make required and optional registration consent states easy to distinguish. */
.registration .consent input[type=checkbox]{appearance:none;-webkit-appearance:none;color-scheme:only light;width:28px;height:28px;min-width:28px;padding:0;margin:0;border:2px solid #334155;border-radius:4px;background:#fff;cursor:pointer;align-self:center}
.registration .consent input[type=checkbox]:checked{border-color:#155db5;background:#155db5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l4 4L19 6' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/24px 24px no-repeat}
.registration .consent input[type=checkbox]:focus-visible{outline:3px solid #a66b12;outline-offset:3px}
.registration .consent label{display:flex;align-items:center;min-height:44px;cursor:pointer}
@media(forced-colors:active){.registration .consent input[type=checkbox]{appearance:auto;-webkit-appearance:auto;background:none;border-color:ButtonText}}

/* Show consent state in words as well as color on mobile browsers. */
.registration .consent{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:12px;padding:12px;border:2px solid #94a3b8;border-radius:10px}
.registration .consent input[type=checkbox]{width:32px;height:32px;min-width:32px;border-width:3px}
.registration .consent label{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;min-width:0;min-height:48px;font-size:16px;line-height:1.6;font-weight:600}
.registration .consent label::after{content:"선택 안 됨";display:block;font-size:16px;line-height:1.5;font-weight:700}
.registration .consent input[type=checkbox]:checked+label::after{content:"✓ 동의함"}


.referral-tree-list{list-style:none;padding:0;margin:1rem 0}.referral-tree-node{border:1px solid #cbd5e1;border-radius:10px;padding:12px;margin-block:10px;overflow-wrap:anywhere;min-width:0}.referral-tree-node p{margin:6px 0}.referral-stage{display:inline-block;margin-inline-start:8px;padding:3px 8px;border-radius:6px;color:#111827;background:#eee}.referral-stage-blue{background:#bfdbfe}.referral-stage-yellow{background:#fef08a}.referral-stage-green{background:#eaf6e9}.referral-stage-red{background:#fecaca}.referral-stage-gray{background:#d1d5db}#referral-tree-panel select{max-width:100%;min-width:0}

/* Keep the same canvas and aspect ratio while the visit draft is expanded. */
#client-record .pen-note.pen-expanded{position:fixed;inset:0;z-index:1000;margin:0;padding:16px;background:white;border-radius:0;overflow:auto;display:flex;flex-direction:column;align-items:center;gap:8px}
#client-record .pen-note.pen-expanded>summary{display:none}
#client-record .pen-note.pen-expanded .actions{flex-shrink:0;justify-content:center}
#client-record .pen-note.pen-expanded canvas{width:min(100%,calc((100dvh - 240px) * var(--pen-aspect)));height:auto;aspect-ratio:var(--pen-aspect);max-height:none;flex-shrink:0}
#client-record .pen-note.pen-expanded>button{align-self:flex-end;flex-shrink:0}
@media(max-height:500px){#client-record .pen-note.pen-expanded canvas{width:100%}}
/* One visit sheet, with the previous visit beside today's draft. */
.client-detail-header{display:grid;grid-template-columns:auto 1fr auto;padding:20px;border:1px solid #d5dde6;border-radius:18px;gap:16px;margin-bottom:22px;background:var(--customer-fill,#f1f3f5)}
[data-holder-status=blue]{--customer-fill:#e1efff}[data-holder-status=yellow]{--customer-fill:#fff3cc}[data-holder-status=green]{--customer-fill:#eaf6e9}[data-holder-status=red]{--customer-fill:#ffe2e4}[data-holder-status=gray]{--customer-fill:#e8eaee}[data-holder-status=unknown]{--customer-fill:#f3f4f6}
.client-detail-header .client-highlights{grid-column:1/-1;background:transparent;margin:0;border:0;padding:14px 0 0;border-top:1px solid #bac5cf}
#detail-panel-record{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px;align-items:start}
#detail-panel-record[hidden]{display:none}#detail-panel-record #client-record,#detail-panel-record #visit-history{min-width:0;margin:0}
#detail-panel-record .photo-archive{grid-column:1/-1;margin:0}#detail-panel-record #photo-upload{margin-top:16px}
.service-options{display:flex;flex-wrap:wrap;gap:8px}.service-options label{display:flex;align-items:center;gap:7px;margin:0;padding:9px 13px;background:#f5f3ed;border:1px solid #ded8c9;border-radius:8px}.service-options label:has(input:checked){background:#e1efff;border-color:#7ba6d0}.visit-card-fields fieldset{margin:16px 0;border:0;padding:0}.visit-card-fields legend{font-weight:600;margin-bottom:10px;font-size:14px}
.card-photo-drafts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.card-photo-drafts img{width:100%;height:130px;object-fit:contain;background:#f7f7f7;border-radius:10px}.card-photo-drafts button{font-size:12px;padding:8px}
.visit-date-list{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.visit-date-list button{font-size:13px;min-height:38px;padding:8px 10px}.visit-date-list button[aria-pressed=true]{background:#172638;color:#fff}.visit-comparison .visit{border-top:0;padding-top:10px}.visit-comparison .visit[hidden]{display:none}.visit-card-extras{border-top:1px solid #dde3e8;padding-top:10px;margin-top:14px}
@media(max-width:1050px){.customer-workspace{max-width:1400px}.customer-detail{padding:22px}#detail-panel-record{grid-template-columns:minmax(0,1fr)}.client-detail-header{grid-template-columns:auto 1fr}.client-detail-header .client-stage{grid-column:2}.client-detail-header .client-highlights{grid-column:1/-1}}
/* Separate root lists deliberately have no shared connector. */
/* Referral cards follow the approved vertical list and right inspector. */
.referral-workspace{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start;margin-top:20px}
.referral-workspace [data-results]{overflow:auto;max-height:75vh;padding:18px;min-width:0;border:1px solid #dedbd3;border-radius:12px;background:#fffdf9}
.referral-forest{display:flex;flex-direction:column;gap:16px;min-width:0;padding:2px 2px 12px}
.referral-root,.referral-children{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0}
.referral-branch{display:flex;flex-direction:column;align-items:stretch;min-width:0;padding:0;gap:12px}
.referral-children{margin-left:20px}
.referral-tree-node{display:grid;grid-template-columns:minmax(96px,.8fr) minmax(0,1.6fr) auto;column-gap:12px;align-items:center;width:100%;max-width:none;min-height:0;margin:0;padding:12px 14px;border:1px solid #dedbd3;border-left:5px solid #969696;background:#fff;border-radius:9px;color:#242424;font-size:13px;box-shadow:0 2px 5px #24242405}
.referral-tree-node[data-holder-status=blue]{border-left-color:#1976d2}.referral-tree-node[data-holder-status=yellow]{border-left-color:#b58a13}.referral-tree-node[data-holder-status=green]{border-left-color:#9ac7a5}.referral-tree-node[data-holder-status=red]{border-left-color:#ba1a1a}
.referral-tree-node p{margin:4px 0;line-height:1.6}.referral-tree-node small{display:block;color:#536173;font-size:13px}.referral-customer-name{display:block;background:transparent;color:#242424;padding:0;min-height:32px;font-size:17px;text-align:left;width:100%;border-radius:4px}.referral-customer-name[aria-pressed=true]{text-decoration:underline;text-underline-offset:5px}.referral-tree-node:has([aria-pressed=true]){outline:2px solid #80652f;outline-offset:2px;background:#faf8f1}
.referral-expand{background:#f3f0e8;color:#62502b;font-size:13px;min-height:36px;padding:6px 12px;margin-top:6px}
/* Two compact rows retain all existing visit information. */
.referral-tree-node>.referral-customer-name{grid-column:1;grid-row:1}
.referral-tree-node>small{grid-column:1;grid-row:2}
.referral-tree-node>p:nth-of-type(1){grid-column:2;grid-row:1}
.referral-tree-node>p:nth-of-type(2){grid-column:2;grid-row:2}
.referral-tree-node>p:nth-of-type(3){grid-column:3;grid-row:1}
.referral-tree-node>.referral-expand{grid-column:3;grid-row:2;margin:0;white-space:nowrap}
.referral-tree-node p{min-width:0;margin:1px 0;font-size:12px}
.referral-inspector [data-selection]{border-top:4px solid var(--customer-accent,#969696);padding-top:14px}
[data-holder-status=blue]{--customer-accent:#1976d2}[data-holder-status=yellow]{--customer-accent:#b58a13}[data-holder-status=green]{--customer-accent:#9ac7a5}[data-holder-status=red]{--customer-accent:#ba1a1a}[data-holder-status=gray],[data-holder-status=unknown]{--customer-accent:#969696}
.referral-tree-node{border-left-color:var(--customer-accent,#969696)}
@media(max-width:720px){.referral-tree-node{grid-template-columns:minmax(0,1fr) auto;column-gap:8px}.referral-tree-node>.referral-customer-name{grid-column:1;grid-row:1}.referral-tree-node>small{grid-column:1;grid-row:2}.referral-tree-node>p:nth-of-type(1){grid-column:1/-1;grid-row:3}.referral-tree-node>p:nth-of-type(2){grid-column:1/-1;grid-row:4}.referral-tree-node>p:nth-of-type(3){grid-column:2;grid-row:1}.referral-tree-node>.referral-expand{grid-column:2;grid-row:2}}
.referral-inspector{min-width:0;position:sticky;top:16px;padding:20px;border:1px solid #dedbd3;border-radius:12px;background:white}.referral-inspector dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;font-size:14px}.referral-inspector dt{color:#637182}.referral-inspector dd{margin:0;overflow-wrap:anywhere}.referral-inspector button{margin:6px 4px 0 0;font-size:14px}.referral-inspector article{margin-top:20px;border-top:1px solid #dde3e8;padding-top:12px}
#referral-tree-panel>button{font-size:14px;margin:4px 6px 4px 0}
#referral-tree-panel>label{max-width:540px}#referral-tree-panel select{font:inherit;padding:9px;border:1px solid #dedbd3;border-radius:8px;background:#fff}
@media(max-width:1000px){.referral-workspace{grid-template-columns:minmax(0,1fr)}.referral-inspector{position:static}.referral-workspace [data-results]{max-height:60vh}.referral-children{margin-left:14px}.referral-tree-node{max-width:none}}
.customer-detail .client-detail-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}

/* A paper-like visit sheet: every field is edited in its displayed position. */
.customer-workspace{max-width:1920px;grid-template-columns:190px minmax(0,1fr)}
.customer-detail{padding:24px}.customer-detail .client-detail-header{margin-bottom:14px;padding:16px;grid-template-columns:auto minmax(200px,1fr) auto}.customer-detail .client-highlights{grid-template-columns:repeat(3,minmax(0,1fr));padding-top:10px}.customer-detail .client-highlights span{margin-bottom:4px}.customer-detail .client-detail-tabs{margin-bottom:16px;padding-top:0}
#detail-panel-record{grid-template-columns:210px minmax(0,1fr);gap:16px;align-items:start}
#detail-panel-record #visit-history{grid-column:1;grid-row:1 / span 2;padding:14px;background:transparent;border:0;box-shadow:none}
#detail-panel-record #client-record,#detail-panel-record .visit-sheet-preview{grid-column:2;grid-row:1;padding:18px}
#detail-panel-record #client-record[hidden],#detail-panel-record .visit-sheet-preview[hidden]{display:none!important}
#detail-panel-record .photo-archive{grid-column:1/-1;grid-row:3}
.visit-date-list{display:flex;flex-direction:column;gap:10px}.visit-date-list button{text-align:left;background:white;border:1px solid var(--line);padding:14px;min-height:70px}.visit-date-list strong,.visit-date-list small{display:block;color:inherit;white-space:normal;overflow-wrap:anywhere}.visit-date-list small{margin-top:8px;font-size:11px}.visit-date-list button[aria-pressed=true]{background:#fff8e9;color:var(--ink);border-color:#b49a61}.visit-date-rail .full{font-size:14px}
#client-record>h2{font-size:22px;margin:0 0 12px}.visit-sheet-top{display:grid;grid-template-columns:170px minmax(0,1fr) 175px;align-items:end;gap:14px;padding-bottom:16px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.visit-sheet-top label,.visit-sheet-top fieldset{margin:0}.visit-sheet-top legend{font-size:12px;margin-bottom:6px}.visit-sheet-top .sheet-date label{margin:0 0 6px}.visit-sheet-top input{padding:10px;min-height:42px}.visit-sheet-top .service-options{gap:5px}.visit-sheet-top .service-options label{padding:8px;font-size:13px;min-height:42px;gap:5px}.visit-sheet-top .service-options input{width:17px;height:17px;min-height:0}.sheet-amount input{margin-top:6px}
.visit-sheet-body{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:12px;align-items:stretch}.sheet-diagram,.sheet-memos,.sheet-photos{min-width:0;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff}.sheet-right{display:flex;flex-direction:column;gap:12px;min-width:0}.sheet-photos{flex:1}
#client-record .sheet-diagram .pen-note{border:0;padding:0;background:white;margin:0}#client-record .sheet-diagram .pen-note>summary{font-size:17px;cursor:default;list-style:none;margin-bottom:8px}#client-record .sheet-diagram .pen-note>summary::-webkit-details-marker{display:none}
#client-record .sheet-diagram .pen-note:not(.pen-expanded) canvas{aspect-ratio:5/3;max-height:none;border:1px solid #dce2e8;background:#fcfbf8}
#client-record .sheet-diagram .pen-note:not(.pen-expanded)>.field-note{font-size:11px;margin:7px 0}#client-record .sheet-diagram .pen-note:not(.pen-expanded) .actions{margin:9px 0;gap:5px}#client-record .sheet-diagram .pen-note:not(.pen-expanded) .actions button{font-size:11px;min-height:30px;padding:5px 7px}#client-record .sheet-diagram .pen-note:not(.pen-expanded)>button{font-size:12px;min-height:34px;padding:6px 10px}
#client-record .sheet-right textarea{min-height:54px;padding:9px;resize:vertical;font-size:14px}.sheet-memos h3,.sheet-photos h3{font-size:17px;margin-bottom:9px}.sheet-memo-label{margin:8px 0 5px;font-size:12px;font-weight:700}.memo-0{color:#242424}.memo-1{color:#1262b7}.memo-2{color:#bd2929}#sheet-memo-1{color:#1262b7}#sheet-memo-2{color:#bd2929}
.sheet-photo-heading{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.sheet-photo-heading h3{margin-right:auto}.photo-picker{display:inline-flex;align-items:center;position:relative;overflow:hidden;border:1px solid var(--line);border-radius:8px;padding:7px 9px;font-size:12px;margin:0;cursor:pointer;background:#faf9f6}.photo-picker input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0}.photo-picker:focus-within{outline:2px solid var(--gold)}.photo-picker:has(input:disabled){opacity:.5;cursor:not-allowed}.card-photo-drafts img{height:150px;object-fit:contain}.card-photo-drafts:empty:after{content:'시술 전·후 사진을 추가하세요';grid-column:1/-1;display:grid;place-items:center;min-height:120px;color:var(--muted);font-size:12px;background:#faf9f6;border-radius:8px}.sheet-diagram .pen-recognition{display:none}
#visit>[type=submit]{display:block;max-width:620px;margin:16px auto 0}#visit>.field-note{text-align:center;margin:7px 0;font-size:11px}#discard-visit-draft{font-size:12px}.saved-sheet-top{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:8px 0 16px}.visit-sheet-preview .visit-card-extras{border:0;margin:0;padding:0}.visit-sheet-preview .sheet-memos p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;margin:4px 0 12px}.visit-sheet-preview .pen-history svg{aspect-ratio:5/3;object-fit:contain}.visit-sheet-preview>details{font-size:12px;margin-bottom:0}
@media(min-width:1200px){.customer-detail .client-detail-header{grid-template-columns:auto minmax(160px,1fr) auto minmax(420px,1.2fr)}.customer-detail .client-detail-header .client-highlights{grid-column:4;grid-row:1;border-top:0;padding:0;border-left:1px solid #bac5cf}.customer-detail .client-detail-header .client-highlights strong{font-size:20px}}
@media(max-width:1250px){.customer-workspace{grid-template-columns:155px minmax(0,1fr)}.customer-detail{padding:16px}.customer-workspace .sidebar{padding:24px 10px}#detail-panel-record{grid-template-columns:165px minmax(0,1fr);gap:10px}.visit-sheet-top{grid-template-columns:150px minmax(0,1fr)}.sheet-amount{grid-column:1/-1;display:flex;align-items:center;gap:12px}.sheet-amount input{width:180px;margin:0}.visit-sheet-body{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}#detail-panel-record #client-record,#detail-panel-record .visit-sheet-preview{padding:12px}}
@media(max-width:850px){.customer-workspace{display:block}.customer-workspace .sidebar{display:flex;flex-direction:row;overflow:auto;padding:8px;gap:4px}.customer-workspace .sidebar .brand,.customer-workspace .sidebar .account{display:none}.customer-workspace .sidebar button{flex:none;white-space:nowrap;font-size:12px;padding:7px 10px}#detail-panel-record{grid-template-columns:1fr}#detail-panel-record #visit-history{grid-column:1;grid-row:1;padding:0}#detail-panel-record #client-record,#detail-panel-record .visit-sheet-preview{grid-column:1;grid-row:2}.visit-date-list{flex-direction:row;overflow-x:auto;flex-wrap:nowrap;margin:8px 0}.visit-date-list button{flex:0 0 150px;min-height:62px;padding:10px}.visit-date-rail .full{margin:0;min-height:38px}.visit-sheet-top{grid-template-columns:150px minmax(0,1fr)}.visit-sheet-body{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}}
@media(max-width:600px){.customer-detail{padding:12px}.visit-sheet-top{grid-template-columns:1fr}.sheet-amount{grid-column:auto}.sheet-amount input{width:100%;min-width:0}.visit-sheet-body{grid-template-columns:1fr}.sheet-photo-heading h3{width:100%}.card-photo-drafts img{height:130px}.customer-detail .client-detail-header{grid-template-columns:auto minmax(0,1fr);padding:12px;gap:9px}.customer-detail .client-detail-header .client-stage{grid-column:2}.customer-detail .client-detail-header .client-highlights{grid-column:1/-1}.client-identity h1{font-size:22px}.sheet-date input{width:100%}}

.sheet-pen-tools{display:flex;gap:9px;align-items:center;margin:8px 0}.sheet-pen-tools .pen-swatch{width:28px;height:28px;min-height:28px;border-radius:50%;border:3px solid white;padding:0;box-shadow:0 0 0 1px #cad2db}.pen-swatch[data-color=black]{background:#242424}.pen-swatch[data-color=blue]{background:#1262b7}.pen-swatch[data-color=red]{background:#bd2929}.pen-swatch[aria-pressed=true]{outline:2px solid #8c7447;outline-offset:2px}#client-record .sheet-pen-settings{margin:8px 0;padding:8px}.sheet-pen-settings>summary{font-size:12px}.sheet-diagram .pen-note:not(.pen-expanded)>.field-note:first-of-type{display:none}.sheet-diagram .pen-note.pen-expanded .sheet-pen-tools{flex-shrink:0}.visit-sheet-preview .sheet-diagram{align-self:start}.visit-sheet-preview .sheet-diagram svg{max-height:none}

.customer-workspace .sidebar>button{font-size:14px;padding:10px 12px}.visit-sheet-preview .sheet-memos p.memo-1{color:#1262b7}.visit-sheet-preview .sheet-memos p.memo-2{color:#bd2929}

.sheet-memo-row{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:start;gap:6px;margin:10px 0}.sheet-memo-row label{margin:8px 0 0!important}#client-record .sheet-memo-row textarea{height:54px;min-height:54px}.sheet-photos [data-card-status]{font-size:11px;margin:4px 0}.sheet-photos .card-photo-drafts img{height:110px}.sheet-photos .card-photo-drafts button{min-height:30px;font-size:11px;padding:5px 8px}.sheet-photos .card-photo-drafts:empty:after{min-height:100px}

/* Approved C&K paper-card composition. */
.customer-workspace{display:block;max-width:1920px;background:#fff}.customer-workspace>.sidebar{display:none}.customer-detail{padding:18px 24px 24px;background:linear-gradient(120deg,#fff,#fcfbf8);min-height:100vh}.workspace-brand{display:flex;align-items:center;gap:24px;margin:-18px -24px 18px;padding:12px 34px;min-height:82px;background:linear-gradient(115deg,#152536,#2e4157);color:#f5e2b6}.workspace-brand strong{font:54px Georgia,serif;letter-spacing:-4px;line-height:1}.workspace-brand>span{font-size:14px;letter-spacing:7px}.workspace-brand small{border-left:1px solid #dfd4b9;padding-left:26px;margin-left:8px;color:#f9f3e7;font-size:13px;line-height:1.7;letter-spacing:1px}.customer-detail .detail-subscription{display:none}.customer-detail #back{margin-bottom:14px}.customer-detail .client-detail-header{display:grid;grid-template-columns:minmax(240px,1fr) auto minmax(400px,1.15fr);gap:16px;padding:18px 22px;border:0;border-radius:14px;margin:0 0 10px;box-shadow:none}.client-detail-header .client-avatar{display:none}.client-identity h1{font-size:30px;letter-spacing:-1px}.customer-detail .client-detail-header .client-stage{grid-column:2;grid-row:1;align-self:center;white-space:nowrap}.customer-detail .client-detail-header .client-highlights{grid-column:3;grid-row:1;margin:0;padding:0;border-top:0;border-left:1px solid #b9cadd;border-radius:0}.client-highlights>div{padding:0 16px}.client-highlights strong{font-size:21px}.customer-detail .client-detail-tabs{position:static;margin:0 0 12px;padding:0;background:transparent}.client-detail-tabs button{min-height:34px;padding:7px 5px;font-size:12px}
#detail-panel-record{grid-template-columns:230px minmax(0,1fr);gap:20px}#detail-panel-record #visit-history{padding:12px 4px}#visit-history h2{font-size:20px;letter-spacing:-.7px}#visit-history .visit-date-list{gap:12px}#visit-history .visit-date-list button{min-height:96px;padding:15px 17px;border-radius:12px;border-color:#e4e1db;box-shadow:0 3px 12px #17263805;background:linear-gradient(120deg,#fff,#faf9f7)}#visit-history .visit-date-list button[aria-pressed=true]{border-color:#bda069;background:#faf8f1}#visit-history .visit-date-list strong{font-size:17px;letter-spacing:-.3px}#visit-history .visit-date-list small{font-size:12px;font-weight:500;line-height:1.6}.visit-date-rail .full{background:linear-gradient(110deg,#172638,#2d4056);min-height:54px;font-size:16px;box-shadow:0 5px 12px #17263812}
#detail-panel-record #client-record,#detail-panel-record .visit-sheet-preview{padding:18px;border-radius:14px;border-color:#e5e5e5;box-shadow:0 4px 20px #293e5404}#client-record>h2{display:none}.visit-sheet-top{grid-template-columns:200px minmax(0,1fr) 180px;align-items:center;border:0;margin:0;padding-bottom:14px}.visit-sheet-top .sheet-date label{font-size:13px}.visit-sheet-top input{border-color:#e0e4eb}.visit-sheet-top .sheet-date input{font-size:19px;font-weight:700;padding:10px;min-width:0}.visit-sheet-top .sheet-amount{display:block;grid-column:auto;font-size:12px}.visit-sheet-top .sheet-amount input{width:100%;font-size:19px;font-weight:700;margin-top:5px}.visit-sheet-top .service-options label{background:#fff;min-height:42px;border-radius:8px}.visit-sheet-top .service-options label:has(input:checked){background:linear-gradient(#f8fbff,#e0edff);border-color:#2863ac;box-shadow:inset 0 0 0 1px #fff}.visit-sheet-body{grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);gap:12px}.sheet-diagram,.sheet-memos,.sheet-photos{border-color:#e7e9ed;border-radius:10px;padding:12px;background:#fff}#client-record .sheet-memos.pen-note{margin:0;padding:12px;border:1px solid #e7e9ed;background:#fff}.sheet-right{gap:10px}.sheet-memos h3,.sheet-photos h3{font-size:18px;letter-spacing:-.5px}.sheet-memos>.field-note{margin:4px 0 9px;font-size:11px}
#client-record .pen-note:not(.pen-expanded)>summary{font-size:18px}.sheet-diagram .pen-note:not(.pen-expanded)>.field-note{display:none}#client-record .sheet-diagram .pen-note:not(.pen-expanded) canvas{aspect-ratio:5/4;background:#fff;border:0;border-radius:0;min-height:360px}.shared-pen-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:linear-gradient(#fff,#f5f7fb);border:1px solid #d8e0eb;border-radius:10px;padding:8px 12px;margin:0 0 12px}.shared-pen-toolbar>button.secondary{min-height:34px;padding:6px 11px;font-size:12px;background:white;border:1px solid #e4e6ea}.shared-pen-toolbar>button.secondary[aria-pressed=true]{background:#dfebff;color:#123a70;border-color:#acc7ea}.shared-pen-toolbar .pen-swatch{width:26px;height:26px;min-height:26px;flex:none}.shared-pen-toolbar>small{font-size:10px;margin-left:auto;max-width:245px}.shared-pen-toolbar>label{display:flex;align-items:center;gap:6px;font-size:12px;margin:0}.shared-pen-toolbar select{background:white;border:1px solid #d8e0eb;border-radius:6px;font:inherit;padding:5px}.shared-pen-toolbar .sheet-pen-settings{margin:0!important;padding:6px 9px!important;font-size:11px}.shared-pen-toolbar .actions{margin-top:8px}.shared-pen-toolbar #pen-redo{display:none}
#client-record .memo-note:not(.pen-expanded) canvas{aspect-ratio:5/3;height:auto;min-height:180px;background:#fff;border:0;border-radius:0}.typed-memos{margin:8px 0 0;padding:7px;border-color:#edf0f4}.typed-memos>summary{font-size:11px;font-weight:400;color:#66788c}#client-record .sheet-memos .sheet-memo-row textarea{height:44px;min-height:44px}.sheet-diagram .pen-note:not(.pen-expanded)>button,.memo-note:not(.pen-expanded)>button{float:right;min-height:28px!important;padding:4px 8px!important;font-size:10px!important;margin:0 0 6px;background:#f1f4f8}#client-record .pen-note.pen-expanded>button{float:none}.sheet-diagram .pen-note:not(.pen-expanded)>summary{clear:both}
.sheet-photos .field-note{font-size:10px;margin:4px 0}.sheet-photos .card-photo-drafts{gap:8px;margin-top:6px}.sheet-photos .card-photo-drafts img{height:145px;object-fit:cover;background:#f6f6f6;border-radius:8px}.sheet-photos .card-photo-drafts:empty:after{min-height:120px}.sheet-photo-heading h3{margin:0 auto 0 0}.photo-picker{background:white;padding:6px 8px}.photo-picker:has([data-card-camera]){font-size:10px}.sheet-photos [data-card-status]:empty{display:none}#visit>[type=submit]{margin-top:14px;max-width:620px;min-height:46px;border-radius:8px;background:linear-gradient(115deg,#172638,#2d4056);box-shadow:0 5px 14px #1f30451a}.visit-sheet-preview .sheet-memos .saved-handwriting svg{border:0}.visit-sheet-preview .sheet-diagram svg{background:white;border:0;min-height:330px}.visit-sheet-preview .sheet-memos h4{margin:9px 0 3px}.visit-sheet-preview .sheet-memos p{margin-bottom:7px}.visit-sheet-preview>h2{font-size:25px}.saved-sheet-top{font-size:16px}.pen-note.pen-expanded .shared-pen-toolbar{width:100%;max-width:1100px;order:0}.pen-note.pen-expanded canvas{order:1}.pen-note.pen-expanded>.field-note,.pen-note.pen-expanded>.typed-memos{display:none}.memo-note.pen-expanded>h3{display:none}
@media(max-width:1150px){#detail-panel-record{grid-template-columns:190px minmax(0,1fr);gap:14px}.visit-sheet-top{grid-template-columns:180px minmax(0,1fr)}.visit-sheet-top .sheet-amount{grid-column:1/-1;display:flex;align-items:center;gap:12px}.visit-sheet-top .sheet-amount input{width:180px;margin:0}.customer-detail .client-detail-header{grid-template-columns:minmax(200px,1fr) minmax(0,1.25fr);gap:12px}.customer-detail .client-detail-header .client-stage{display:none}.customer-detail .client-detail-header .client-highlights{grid-column:2;grid-row:1}.client-identity h1{font-size:25px}.client-highlights strong{font-size:17px}.shared-pen-toolbar>small{display:none}#client-record .sheet-diagram .pen-note:not(.pen-expanded) canvas{min-height:300px}.shared-pen-toolbar{gap:7px}.shared-pen-toolbar>button.secondary{padding:5px 7px}}
@media(max-width:850px){.customer-detail{padding:12px}.workspace-brand{margin:-12px -12px 12px;padding:12px 18px;min-height:65px;gap:16px}.workspace-brand strong{font-size:40px}.workspace-brand>span{font-size:11px;letter-spacing:4px}.workspace-brand small{font-size:10px;padding-left:12px;margin:0}.customer-detail .client-detail-header{grid-template-columns:1fr;padding:14px}.customer-detail .client-detail-header .client-highlights{grid-column:1;grid-row:2;border-left:0;border-top:1px solid #cbd5df;padding-top:12px}.customer-detail .client-identity h1{font-size:25px}#detail-panel-record{grid-template-columns:1fr}#detail-panel-record #visit-history{padding:0}#visit-history .visit-date-list button{min-height:70px}#visit-history #back{margin-bottom:7px}.visit-date-rail .full{min-height:42px}.visit-sheet-body{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}#detail-panel-record #client-record,#detail-panel-record .visit-sheet-preview{padding:12px}.shared-pen-toolbar .sheet-pen-settings{font-size:10px}.sheet-photo-heading h3{width:100%}}
@media(max-width:600px){.visit-sheet-top{grid-template-columns:1fr}.visit-sheet-top .sheet-amount{grid-column:1;display:flex}.visit-sheet-top .sheet-amount input{width:100%;min-width:0}.visit-sheet-body{grid-template-columns:1fr}.workspace-brand small{display:none}.shared-pen-toolbar{gap:8px}.shared-pen-toolbar #pen-undo{margin-left:auto}#client-record .sheet-diagram .pen-note:not(.pen-expanded) canvas{min-height:280px}#client-record .memo-note:not(.pen-expanded) canvas{min-height:200px}.sheet-photos .card-photo-drafts img{height:140px}.client-highlights>div{padding:0 10px}.client-highlights>div:last-child strong{font-size:13px}}

#client-record .memo-note:not(.pen-expanded) canvas{height:210px;min-height:200px;aspect-ratio:auto}.saved-handwriting svg{height:210px;object-fit:fill}.workspace-brand{min-height:70px;padding-top:10px;padding-bottom:10px}.customer-detail .client-detail-header{padding-top:12px;padding-bottom:12px}.sheet-photos .card-photo-drafts img{height:125px}


:root{font-family:'Malgun Gothic','Noto Sans CJK KR','Malgun Gothic',sans-serif}button,input,textarea,select{font-family:inherit}.customer-detail h1,.customer-detail h2,.customer-detail h3{font-family:'Malgun Gothic','Noto Sans CJK KR',sans-serif;font-weight:700}.customer-detail h1{letter-spacing:-1px}.workspace-brand strong{font-family:Georgia,serif}.workspace-brand small{font-family:'Malgun Gothic','Noto Sans CJK KR',sans-serif}.memo-paper{position:relative;min-width:0}.memo-paper-labels{position:absolute;inset:0;z-index:1;pointer-events:none;display:grid;grid-template-rows:repeat(3,1fr)}.memo-paper-labels strong{font:700 16px/1.4 'Malgun Gothic','Noto Sans CJK KR',sans-serif;padding:2px 9px;background:linear-gradient(white 0 27px,transparent 27px);align-self:start}.memo-paper-labels .memo-0{color:#242424}.memo-paper-labels .memo-1{color:#2457c5}.memo-paper-labels .memo-2{color:#c52d37}.memo-paper canvas,.memo-paper svg{position:relative;z-index:0}.memo-note.pen-expanded .memo-paper{width:min(100%,calc((100dvh - 220px) * var(--pen-aspect)));order:1;flex-shrink:0}.memo-note.pen-expanded .memo-paper canvas{width:100%!important}.memo-note.pen-expanded .memo-paper-labels strong{font-size:20px;padding:5px 14px}.saved-handwriting.memo-paper svg{display:block;width:100%;height:210px}.visit-sheet-preview svg[data-diagram=head-v3]{aspect-ratio:5/4;min-height:0;height:auto}.sheet-diagram .pen-history:has(svg[data-diagram=head-v3]){background:#fff}.customer-detail .sheet-memo-label{font-size:16px;font-weight:700}
.memo-paper-labels strong{justify-self:start;background:white;min-width:48px}.diagram-picker{display:flex;align-items:center;gap:10px;margin:10px 0;font-size:14px;font-weight:600;clear:both}.diagram-picker select{font:inherit;padding:7px 10px;border:1px solid #d8e0eb;border-radius:7px;background:#fff;min-width:140px}.visit-sheet-preview svg[data-diagram=head-short-v1],.visit-sheet-preview svg[data-diagram=head-long-v1]{aspect-ratio:5/4;min-height:0;height:auto}.memo-note.pen-expanded .memo-paper-labels strong{font-size:20px}.customer-detail .sheet-memos .memo-paper-labels strong{font-size:16px;font-weight:700}.customer-detail .sheet-memos.pen-expanded .memo-paper-labels strong{font-size:20px}


/* Length choices sit to the left of the same canvas in card and expanded views. */
.diagram-stage{display:grid;grid-template-columns:70px minmax(0,1fr);gap:10px;align-items:start;clear:both;min-width:0}.diagram-thumbnails{display:flex;flex-direction:column;gap:10px}.diagram-thumbnails button{padding:4px;border:1px solid #dce2e9;border-radius:9px;background:#fff;color:#48596c;min-width:0;min-height:0;box-shadow:none}.diagram-thumbnails button[aria-pressed=true]{border:2px solid #357cff;padding:3px;background:#f0f6ff;color:#1853ad}.diagram-thumbnails img{display:block;width:100%;aspect-ratio:5/4;object-fit:contain;border-radius:5px}.diagram-thumbnails span{display:block;font-size:13px;font-weight:600;line-height:1.5;margin-top:3px}.diagram-thumbnails button:focus-visible{outline:3px solid #86afff;outline-offset:2px}.diagram-picker[hidden]{display:none}.pen-note.pen-expanded .diagram-stage{width:min(100%,1100px);order:1;grid-template-columns:80px minmax(0,1fr)}.pen-note.pen-expanded .diagram-stage canvas{width:100%!important;max-width:100%;min-width:0}.diagram-stage canvas{min-width:0;width:100%}.diagram-thumbnails button:disabled{opacity:.6}
@media(max-width:600px){.diagram-stage{grid-template-columns:58px minmax(0,1fr);gap:6px}.diagram-thumbnails{gap:8px}.diagram-thumbnails span{font-size:12px}.pen-note.pen-expanded .diagram-stage{grid-template-columns:58px minmax(0,1fr)}}

/* Preserve shelves; group each stage name, count and period in a colored rectangle. */
.shelf-line{--label-bg:#edf5ff;--label-border:#8db7e8;margin-bottom:10px}.shelf-line[data-shelf=yellow]{--label-bg:#fff7df;--label-border:#d6b25a}.shelf-line[data-shelf=green]{--label-bg:#eaf6e9;--label-border:#9cbd9f}.shelf-line[data-shelf=red]{--label-bg:#fff0ee;--label-border:#dba29e}.shelf-line[data-shelf=gray]{--label-bg:#f0f2f5;--label-border:#aeb5be}.shelf-label{box-sizing:border-box;align-self:stretch;justify-content:center;padding:12px 10px;border:2px solid var(--label-border);border-radius:8px;background:var(--label-bg);min-height:112px}.shelf-label b{font-size:16px;line-height:1.45;overflow-wrap:anywhere}.shelf-label>span{font-size:12px;color:#394b60}.shelf-label strong{color:#172332}.shelf-transfer .forecast-count small{font-size:12px;font-weight:600}
@media(max-width:1100px){button.shelf-current{grid-template-columns:128px minmax(0,1fr)}}
@media(min-width:1101px){button.shelf-current{grid-template-columns:142px minmax(0,1fr)}}
@media(max-width:480px){button.shelf-current{grid-template-columns:120px minmax(0,1fr)}.shelf-label{padding:10px 8px;min-height:116px}.shelf-label b{font-size:15px}.shelf-label>span{font-size:11px}.shelf-transfer{margin-left:120px}}

/* TEAM uses the approved personal date-rail / single visit sheet layout. */
.customer-detail #team-customers-panel:has(.team-card-workspace),.customer-detail #team-visit-panel{padding:0;border:0;box-shadow:none;background:transparent}
#team-customers-panel:has(.team-card-workspace)>:not([data-team-history]){display:none}
.team-card-workspace{min-width:0}.team-card-workspace .client-detail-header{grid-template-columns:minmax(220px,1fr) minmax(360px,1.2fr)}
.team-card-workspace .client-detail-header .client-highlights{grid-column:2;grid-row:1}.team-card-workspace .client-identity p{font-size:13px;margin:7px 0 0}
.team-card-grid{display:grid;grid-template-columns:230px minmax(0,1fr);gap:20px;align-items:start}.team-card-grid>*{min-width:0}
.team-card-grid>.visit-date-rail{padding:12px 4px}.team-card-grid>.visit-date-rail>p{font-size:12px;color:var(--muted)}.team-card-grid .visit-date-list button{min-height:92px;border-radius:12px;padding:15px 17px}.team-card-grid .visit-date-list strong{font-size:17px}.team-card-grid .visit-date-list small{font-size:12px;line-height:1.6}
.team-card-grid>.visit-sheet-preview,.team-card-grid>.team-card-editor{grid-column:2;grid-row:1;padding:18px;background:#fff;border:1px solid #e5e5e5;border-radius:14px;box-shadow:0 4px 20px #293e5404}.team-card-grid>[hidden]{display:none!important}
.team-card-attribution{display:flex;flex-wrap:wrap;gap:8px 22px;font-size:13px;color:var(--muted);margin:0 0 14px}.team-card-editor>p{font-size:12px;color:var(--muted)}.team-card-editor form>label:first-child{display:flex;align-items:center;gap:10px;font-size:13px}.team-card-editor form>label:first-child select{max-width:240px}
.team-card-editor form>[type=submit]{display:block;max-width:620px;margin:16px auto 0;background:linear-gradient(115deg,#172638,#2d4056)}.team-date-paging{display:flex;flex-wrap:wrap;gap:5px;margin-top:14px}.team-date-paging button{font-size:12px;padding:7px 10px;min-height:34px}
.team-card-workspace .sheet-photos .card-photo-drafts img{width:100%;height:180px;object-fit:contain;background:#faf9f6}.team-card-workspace .sheet-photos .card-photo-drafts button{font-size:12px;max-width:100%}
@media(max-width:1150px){.team-card-grid{grid-template-columns:190px minmax(0,1fr);gap:14px}.team-card-workspace .client-detail-header{grid-template-columns:1fr}.team-card-workspace .client-detail-header .client-highlights{grid-column:1;grid-row:2;border-left:0}.team-card-grid>.visit-sheet-preview,.team-card-grid>.team-card-editor{padding:12px}}
@media(max-width:850px){.team-card-grid{grid-template-columns:1fr}.team-card-grid>.visit-date-rail{grid-column:1;grid-row:1}.team-card-grid>.visit-sheet-preview,.team-card-grid>.team-card-editor{grid-column:1;grid-row:2}.team-card-grid .visit-date-list{flex-direction:row;flex-wrap:nowrap;overflow:auto}.team-card-grid .visit-date-list button{flex:0 0 160px;min-height:70px}.team-card-grid .visit-date-rail .full{min-height:42px}.team-card-workspace .client-highlights strong{font-size:16px}.team-card-workspace .client-highlights>div{padding:0 8px}}

.team-card-workspace .saved-handwriting.memo-paper svg{height:210px;aspect-ratio:auto;min-height:0}
.team-card-workspace .sheet-photos{flex:initial}.team-card-workspace .visit-sheet-body{align-items:start}

/* Match the approved reference: rail at left, blue identity strip above the sheet. */
.team-card-workspace{display:grid;grid-template-columns:210px minmax(0,1fr);column-gap:16px;align-items:start}
.team-card-workspace>.workspace-brand{grid-column:1/-1;margin-bottom:12px;min-height:64px}.team-card-workspace>.workspace-brand strong{font-size:44px}
.team-card-workspace>.client-detail-header{grid-column:2;grid-row:2;display:grid;grid-template-columns:minmax(170px,1fr) minmax(280px,1.15fr);gap:10px;background:linear-gradient(110deg,#e5efff,#dfecff);border-radius:10px;padding:12px 14px;margin-bottom:10px}
.team-card-workspace .client-identity h1{font-size:24px;line-height:1.2;margin:0;overflow-wrap:anywhere}.team-card-workspace .client-identity p{font-size:11px;margin:5px 0 0}
.team-card-workspace .client-detail-header .client-highlights{grid-column:2;grid-row:1;border:0}.team-card-workspace .client-highlights>div{border-left:1px solid #b7cbe5;padding:0 12px}.team-card-workspace .client-highlights span{font-size:11px}.team-card-workspace .client-highlights strong{font-size:16px}
.team-card-grid{display:contents}.team-card-grid>.visit-date-rail{grid-column:1;grid-row:2/span 2;padding:4px 0}.team-card-grid>.visit-sheet-preview,.team-card-grid>.team-card-editor{grid-column:2;grid-row:3;padding:14px;border-radius:10px}.team-card-grid>.visit-date-rail>h2{font-size:20px;margin:12px 0 6px}.team-card-grid>.visit-date-rail>p{font-size:11px;margin:0 0 16px}.team-card-grid .visit-date-list button{min-height:76px;padding:12px 14px;border-radius:8px}.team-card-grid .visit-date-list strong{font-size:15px}.team-card-grid .visit-date-list small{font-size:11px;margin-top:4px}.team-card-grid .visit-date-rail .full{min-height:48px;font-size:15px;border-radius:6px}.team-date-paging:has(button:disabled:first-child):has(button:disabled:last-child){display:none}
.team-card-workspace .saved-sheet-top{display:flex;align-items:center;gap:12px;margin:0;padding:0 0 12px;flex-wrap:wrap}.team-card-workspace .saved-sheet-top h2{font-size:23px;margin:0 auto 0 0}.team-card-workspace .saved-sheet-top>strong:last-child{font-size:13px;white-space:nowrap}.saved-service-list{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:12px}.saved-service-list small{font-size:10px;margin-right:4px}.saved-service-chip{display:inline-block;border:1px solid #e1e4e8;border-radius:5px;padding:8px 10px;background:white;font-weight:500;white-space:nowrap}.saved-service-chip[data-selected=true]{background:linear-gradient(#f8fbff,#dfecff);border-color:#4a79b7;color:#153d75}.team-card-attribution{font-size:11px;margin:0 0 10px}
.team-card-workspace .visit-sheet-body{grid-template-columns:minmax(0,1.28fr) minmax(0,1fr);gap:10px}.team-card-workspace .sheet-diagram,.team-card-workspace .sheet-memos,.team-card-workspace .sheet-photos{padding:10px;border-radius:7px}.team-card-workspace .sheet-memos h3,.team-card-workspace .sheet-photos h3,.team-card-workspace .sheet-diagram h3{font-size:16px;margin-bottom:8px}.team-card-workspace .sheet-right{gap:8px}.team-card-workspace .saved-handwriting.memo-paper svg{height:160px;background:white}.team-card-workspace .memo-paper-labels strong{font-size:14px;border:1px solid #e5e7eb;border-radius:5px;padding:4px 8px}.team-card-workspace .sheet-photos .card-photo-drafts img{height:160px;border-radius:6px}.team-card-workspace .card-photo-drafts:empty:after{min-height:150px}.team-card-workspace .sheet-diagram .pen-history svg{min-height:0}.team-card-workspace .sheet-diagram{background:#fff}.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(min-width:1200px){.team-card-workspace>.client-detail-header{grid-template-columns:minmax(250px,1fr) minmax(380px,1fr)}.team-card-workspace .saved-sheet-top{flex-wrap:nowrap}.team-card-workspace .saved-sheet-top h2{font-size:24px}.team-card-workspace .saved-handwriting.memo-paper svg{height:180px}}
@media(max-width:850px){.team-card-workspace{grid-template-columns:170px minmax(0,1fr);gap:10px}.team-card-workspace>.client-detail-header{grid-template-columns:1fr}.team-card-workspace .client-detail-header .client-highlights{grid-column:1;grid-row:2}.team-card-workspace .client-highlights>div{padding:0 7px}.team-card-workspace .client-identity h1{font-size:21px}.team-card-grid .visit-date-list{flex-direction:column;flex-wrap:wrap;overflow:visible}.team-card-grid .visit-date-list button{flex:auto}.team-card-workspace .visit-sheet-body{grid-template-columns:1fr}}
@media(max-width:600px){.team-card-workspace{display:block}.team-card-workspace .visit-date-list{flex-direction:row;flex-wrap:nowrap;overflow:auto}.team-card-workspace .visit-date-list button{flex:0 0 150px}.team-card-grid>.visit-date-rail{margin-bottom:12px}.team-card-workspace .saved-sheet-top h2{font-size:21px}.team-card-workspace .visit-sheet-body{grid-template-columns:1fr}.team-card-workspace .workspace-brand{margin-bottom:12px}}
/* Verify the actual 963px PC width, not only a wide desktop fixture. */
.team-card-workspace .client-identity{min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.team-card-workspace .client-identity h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:20px;flex:1 1 auto;min-width:0}.team-card-workspace .client-identity p{flex-basis:100%;margin-top:0}.team-holder-badge{display:inline-flex;align-items:center;gap:5px;border:1px solid #b9cdea;border-radius:5px;padding:4px 6px;font-size:10px;white-space:nowrap}.team-holder-badge:before{content:'';width:10px;height:10px;border-radius:50%;background:#999}.team-holder-badge[data-holder=blue]:before{background:#1976ed}.team-holder-badge[data-holder=yellow]:before{background:#d6aa18}.team-holder-badge[data-holder=green]:before{background:#a2cfac}.team-holder-badge[data-holder=red]:before{background:#c52d37}
@media(min-width:851px){.team-card-workspace{grid-template-columns:190px minmax(0,1fr);column-gap:14px}.team-card-workspace>.client-detail-header{grid-template-columns:minmax(0,1fr) minmax(270px,1fr)}.team-card-workspace .saved-sheet-top{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:9px;flex-wrap:nowrap}.team-card-workspace .saved-sheet-top h2{font-size:clamp(16px,1.65vw,24px);white-space:nowrap;letter-spacing:-.8px}.team-card-workspace .saved-sheet-top>strong:last-child{font-size:11px}.team-card-workspace .saved-service-list{gap:4px;flex-wrap:nowrap}.team-card-workspace .saved-service-list small{display:none}.team-card-workspace .saved-service-chip{padding:7px 8px;font-size:11px}.team-card-workspace .client-highlights>div{padding:0 9px}.team-card-workspace .client-highlights strong{font-size:14px}.team-card-workspace .visit-sheet-preview .sheet-diagram{align-self:stretch}.team-card-workspace .visit-sheet-preview .card-photo-drafts:empty:after{min-height:105px}}

/* TEAM editing and viewing share the approved compact paper-card proportions. */
.team-card-workspace .team-editor-help{font-size:10px;margin:8px 0 0;text-align:center}
.team-card-workspace .team-practitioner{display:flex;align-items:center;gap:8px;font-size:11px;margin:0 0 10px}
.team-card-workspace .team-practitioner select{font:inherit;max-width:200px;border:1px solid #dce3ed;border-radius:5px;padding:5px;background:#fff}
.team-card-workspace .sheet-diagram .shared-pen-toolbar{border:0;background:transparent;padding:0;margin:8px 0;gap:6px}
.team-card-workspace .sheet-diagram .shared-pen-toolbar>small{display:none}
.team-card-workspace .sheet-diagram .shared-pen-toolbar .sheet-pen-settings{padding:4px!important;margin-left:auto!important;border:1px solid #e3e7ec}
.team-card-workspace .sheet-pen-settings[open]{flex-basis:100%}
.team-card-workspace .sheet-pen-settings .actions{align-items:center}
.team-card-workspace .sheet-diagram .pen-note:not(.pen-expanded){margin:0;padding:0;border:0}
.team-card-workspace .sheet-diagram .pen-note:not(.pen-expanded)>summary{font-size:16px!important;clear:none}
.team-card-workspace .sheet-diagram .pen-note:not(.pen-expanded)>button{margin:0!important}
.team-card-workspace .sheet-memos:not(.pen-expanded)>h3{display:inline-block;margin:0 0 6px}
.team-card-workspace .sheet-memos:not(.pen-expanded)>.field-note{font-size:10px;line-height:1.4;margin:0 0 6px}
.team-card-workspace .sheet-memos:not(.pen-expanded) .memo-paper-labels strong{font-size:12px;padding:2px 6px;min-width:36px}
.team-card-workspace .visit-sheet-preview .sheet-diagram{align-self:start}
.team-card-workspace .visit-sheet-preview .saved-handwriting.memo-paper svg{height:126px}
.team-card-workspace .sheet-photos .card-photo-drafts img{height:105px;object-fit:contain}
.team-card-workspace .card-photo-drafts:empty:after{min-height:90px}
.team-card-workspace .visit-sheet-preview .card-photo-drafts:empty:after{min-height:90px}
.team-card-workspace .sheet-photos .card-photo-drafts button{font-size:10px;min-height:28px;padding:4px 6px}
.team-card-workspace .sheet-photos .sheet-photo-heading{gap:5px}
.team-card-workspace .sheet-photo-heading h3{font-size:15px}
.team-card-workspace .sheet-photos .photo-picker{font-size:10px;padding:5px;margin:0;min-height:28px}
.team-card-workspace .sheet-photos [data-card-status]{font-size:10px}
@media(min-width:851px){
 .team-card-workspace #client-record .visit-sheet-top{grid-template-columns:minmax(145px,1fr) auto minmax(110px,.7fr);gap:10px;padding-bottom:8px}
 .team-card-workspace .visit-sheet-top fieldset{min-width:0;padding:0;border:0}
 .team-card-workspace .visit-sheet-top legend,.team-card-workspace .sheet-date label{font-size:10px;margin:0 0 4px}
 .team-card-workspace .visit-sheet-top .sheet-date input{font-size:17px;padding:8px;min-height:38px;height:38px;width:100%}
 .team-card-workspace .visit-sheet-top .sheet-amount{display:block;grid-column:auto;font-size:10px;min-width:0}
 .team-card-workspace .visit-sheet-top .sheet-amount input{width:100%;font-size:17px;padding:8px;height:38px;margin-top:4px}
 .team-card-workspace .visit-sheet-top .service-options{gap:4px;flex-wrap:nowrap}
 .team-card-workspace .visit-sheet-top .service-options label{font-size:11px;padding:7px 6px;min-height:38px;gap:4px;white-space:nowrap}
 .team-card-workspace .service-options input{width:13px;height:13px}
 .team-card-workspace #client-record .sheet-diagram .pen-note:not(.pen-expanded) canvas{height:auto;min-height:0;max-height:none;aspect-ratio:5/4}
 .team-card-workspace .pen-note:not(.pen-expanded) .diagram-stage{grid-template-columns:46px minmax(0,1fr);gap:6px;align-items:center}
 .team-card-workspace .pen-note:not(.pen-expanded) .diagram-thumbnails{gap:6px}
 .team-card-workspace .pen-note:not(.pen-expanded) .diagram-thumbnails span{font-size:10px}
 .team-card-workspace #client-record .memo-note:not(.pen-expanded) canvas{height:126px;min-height:0;aspect-ratio:auto}
 .team-card-workspace .typed-memos{margin-top:5px;padding:4px}
 .team-card-workspace .sheet-photos .sheet-photo-heading{flex-wrap:wrap}
 .team-card-workspace .sheet-photo-heading h3{width:auto}
 .team-card-workspace .client-identity{gap:4px}
}
@media(max-width:600px){
 .team-card-workspace .visit-sheet-top{gap:10px}
 .team-card-workspace .sheet-diagram .shared-pen-toolbar{gap:7px}
 .team-card-workspace .visit-sheet-preview .saved-handwriting.memo-paper svg{height:180px}
 .team-card-workspace .sheet-photos .card-photo-drafts img{height:140px}
}
@media(max-width:600px){.team-card-workspace #client-record .sheet-diagram .pen-note:not(.pen-expanded)>button:not([hidden]){float:none;display:block;margin:0 0 6px auto!important}.team-card-workspace .sheet-diagram .shared-pen-toolbar .pen-swatch{flex:none}}

.team-card-workspace .client-highlights .team-amount-missing{display:block;white-space:nowrap;font-size:11px;line-height:1.5;margin-top:3px;color:#536173}

/* Direct keyboard entry beside the paper's three memo headings. */
.memo-paper:has(>.direct-memo-fields)>.memo-paper-labels{display:none}
.direct-memo-fields{position:absolute;inset:0;z-index:2;display:grid;grid-template-rows:repeat(3,minmax(0,1fr));pointer-events:none}
#client-record .direct-memo-fields .sheet-memo-row{display:grid;grid-template-columns:42px minmax(0,1fr);gap:4px;align-content:start;margin:0;padding:0 8px;min-width:0}
#client-record .direct-memo-fields .sheet-memo-row label{pointer-events:auto;margin:6px 0 0!important;font-size:16px;line-height:24px;background:#fff}
#client-record .direct-memo-fields .sheet-memo-row textarea{pointer-events:auto;box-sizing:border-box;width:100%;height:48px;min-height:48px;max-height:48px;resize:none;margin:0;padding:5px 6px;border:1px solid #d8e0eb;border-radius:5px;background:#fffffff2;font-size:16px;line-height:18px;touch-action:auto}
#client-record .direct-memo-fields .sheet-memo-row textarea:focus{outline:2px solid #5578a0;outline-offset:-2px}
#client-record .memo-note:not(.pen-expanded):has(.direct-memo-fields) canvas{min-height:270px}
#client-record .memo-note.pen-expanded .direct-memo-fields{order:0}

/* Mobile navigation follows the original Stitch header and bottom navigation. */
.mobile-menu-toggle,.mobile-primary-nav{display:none}
@media(max-width:720px){
.layout:not(.customer-workspace){padding-bottom:calc(76px + env(safe-area-inset-bottom,0px));background:#faf8f5}
.layout:not(.customer-workspace)>.sidebar{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;padding:12px 16px;background:#fffdf9;align-items:center}
.layout:not(.customer-workspace)>.sidebar>.brand{width:auto;margin:0 auto 0 0;font-size:13px;letter-spacing:1.1px}
.layout:not(.customer-workspace)>.sidebar>.mobile-menu-toggle{display:block;min-height:44px;padding:8px 14px;border:1px solid #dfddd8;border-radius:10px;font-size:14px}
.layout:not(.customer-workspace)>.sidebar:not(.mobile-menu-open)>button:not(.mobile-menu-toggle),.layout:not(.customer-workspace)>.sidebar:not(.mobile-menu-open)>a{display:none}
.layout:not(.customer-workspace)>.sidebar.mobile-menu-open>button:not(.mobile-menu-toggle),.layout:not(.customer-workspace)>.sidebar.mobile-menu-open>a{display:flex;align-items:center;flex:0 0 calc(50% - 4px);min-height:46px;margin:0;padding:10px 12px;font-size:14px;color:#242424;text-decoration:none;border:1px solid #dfddd8;border-radius:10px}
.layout:not(.customer-workspace)>.sidebar>.account{display:none}
.layout:not(.customer-workspace)>.mobile-primary-nav{position:fixed;bottom:0;left:0;right:0;z-index:30;display:flex;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));background:#fffdf9;border-top:1px solid #dfddd8;box-shadow:0 -4px 16px #24242408}
.mobile-primary-nav>button{flex:1;min-width:0;min-height:52px;padding:8px 4px;border-radius:10px;font-size:13px;background:transparent;color:#625b4d}
.mobile-primary-nav>button[aria-current=page]{background:#f2ead9;color:#775a19}
.bookshelf-content{padding:16px;background:#faf8f5}
.bookshelf-heading h1{font-size:24px}.bookshelf-heading p{font-size:13px}
.bookshelf-subscription{padding:10px 12px;margin:0 0 16px}.bookshelf-subscription summary{font-size:12px}
.bookshelf-content .shelf-board{display:flex;flex-direction:column;gap:12px;margin:14px 0 20px}
.shelf-board-heading{margin:0}.shelf-board-heading>div{margin:4px 0}.shelf-board-heading h2{font-size:16px}.shelf-board-heading>div h2{font-size:13px}.forecast-condition{margin:2px 0;font-size:11px}
.bookshelf-content .shelf-line{display:block;min-width:0;margin:0;padding:10px;border:1px solid #dfddd8;border-radius:12px;background:white}
.bookshelf-content button.shelf-current{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:10px;padding:0;min-height:86px}
.bookshelf-content .shelf-label{min-height:84px;padding:8px;gap:3px}.bookshelf-content .shelf-label b{font-size:13px}.bookshelf-content .shelf-label strong{font-size:24px}.bookshelf-content .shelf-label>span{font-size:10px}
.bookshelf-content .shelf-scene{display:block;height:86px;overflow-x:auto;overflow-y:hidden;touch-action:pan-x pan-y;border-bottom:7px solid #dfd9cc;border-radius:0 0 3px 3px;background:linear-gradient(to top,#f0ece5,transparent 24px)}
.bookshelf-content .shelf-holders{display:block;width:max(100%,var(--shelf-mobile-width));height:70px;margin-top:4px;max-width:none;filter:drop-shadow(2px 2px 1px #24344818)}
.bookshelf-content .shelf-plank{display:none}.bookshelf-content .shelf-empty{left:8px;bottom:25px;font-size:11px}
.bookshelf-content .shelf-transfer{margin:6px 0 0;padding:6px 0 0;max-width:none;transform:none}.bookshelf-content .shelf-down{display:none}.bookshelf-content .shelf-transfer>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bookshelf-content .shelf-transition{font-size:10px;gap:3px;flex:1;min-width:0}.bookshelf-content .shelf-transition>span:last-child{margin:0}.bookshelf-content .shelf-transfer button.forecast-count{width:auto;min-height:36px;gap:8px;padding:2px 0;flex-wrap:nowrap}.bookshelf-content .shelf-transfer .forecast-count strong{font-size:18px}.bookshelf-content .shelf-transfer .forecast-count small{font-size:11px}.bookshelf-content .shelf-expected{font-size:10px}.bookshelf-content .shelf-threshold,.bookshelf-content .shelf-zero{display:none}
.bookshelf-content .shelf-footer{margin-top:0}.bookshelf-content .shelf-footer p{font-size:10px;margin:4px 0}.bookshelf-content .shelf-footer p span{display:none}
.bookshelf-content .card{padding:16px}.bookshelf-content #search{display:flex;gap:8px}.bookshelf-content #search input{min-width:0}.bookshelf-content #search button{width:auto;margin:0;white-space:nowrap}
}

/* Desktop follows the verified Stitch palette; mobile shelves stay unchanged. */
@media(min-width:721px){
.layout:not(.customer-workspace){--paper:#faf8f5;--ink:#242424;--muted:#706c64;--line:#d9d8d4;background:var(--paper);color:var(--ink)}
.layout:not(.customer-workspace)>.sidebar{background:#fffdf9;border-right:1px solid #dedbd3;gap:8px;padding:26px 18px}
.layout:not(.customer-workspace)>.sidebar>.brand{font-size:13px;letter-spacing:1.5px;line-height:1.7;color:#80652f;margin:0 10px 20px}
.layout:not(.customer-workspace)>.sidebar>button,.layout:not(.customer-workspace)>.sidebar>a{display:flex;align-items:center;min-height:46px;padding:10px 12px;border-radius:10px;color:#242424;text-decoration:none;font-size:14px;line-height:1.5;text-align:left;overflow-wrap:anywhere}
.layout:not(.customer-workspace)>.sidebar>.mobile-menu-toggle{display:none}
.layout:not(.customer-workspace)>.sidebar>button.active{background:#f0e9d9;box-shadow:inset 3px 0 #c5a059;color:#715522}
.layout:not(.customer-workspace)>.sidebar>button:hover,.layout:not(.customer-workspace)>.sidebar>a:hover{background:#f4f0e8}
.layout:not(.customer-workspace)>.sidebar>button:focus-visible,.layout:not(.customer-workspace)>.sidebar>a:focus-visible{outline:2px solid #a88743;outline-offset:2px}
.layout:not(.customer-workspace)>.content{background:#faf8f5}
.bookshelf-heading h1{color:#242424;font-size:30px;line-height:1.3}.bookshelf-heading p{color:#706c64;font-size:14px}
.bookshelf-content .card{border-color:#dedbd3;background:#fff;box-shadow:0 3px 14px #24242404}
.bookshelf-content .client-row.client-card{background:#fffdf9;color:#242424}
.bookshelf-content .shelf-transfer{transform:none;align-self:center}
}

/* Keep the desktop customer search above the shelves without moving mobile content. */
.desktop-bookshelf-search{display:none}
@media(min-width:721px){
.bookshelf-content .desktop-bookshelf-search{display:flex;align-items:center;gap:14px;margin:0 0 18px;padding:10px 12px;background:#fffdf9;border:1px solid #dedbd3;border-radius:12px}
.desktop-bookshelf-search label{flex:none;margin:0;font-size:15px;color:#242424}
.desktop-bookshelf-search>div{display:flex;flex:1;min-width:0;gap:10px}.desktop-bookshelf-search input{min-width:0;min-height:46px;font-size:16px}.desktop-bookshelf-search button{flex:none;min-width:88px;min-height:46px;background:#242424}
.bookshelf-content #search{display:none}
.bookshelf-content .forecast-condition,.bookshelf-content .shelf-label>span,.bookshelf-content .shelf-transfer .forecast-count small{font-size:13px;line-height:1.6}
.bookshelf-content .shelf-transition{font-size:14px;line-height:1.6}.bookshelf-content .shelf-threshold,.bookshelf-content .shelf-zero{font-size:13px;line-height:1.6;color:#536173}.bookshelf-content .shelf-expected{font-size:14px}
.bookshelf-content .shelf-transfer .forecast-count small{font-size:14px}
.bookshelf-content .shelf-transfer button.forecast-count{flex-wrap:wrap;column-gap:12px;row-gap:2px}
.bookshelf-content .shelf-transfer .forecast-count strong{font-size:30px}
.bookshelf-content .bookshelf-heading{margin:4px 0 14px}
.bookshelf-content .forecast-condition{font-size:14px}
}

/* Keep the forecast readable alongside the book shelves on desktop. */
@media(min-width:1001px){
.bookshelf-content .shelf-board-heading,.bookshelf-content .shelf-line{grid-template-columns:minmax(0,1fr) 300px;gap:24px}
}

/* Paper visit card: readable essentials, diagram left and notes/photos right. */
@media(min-width:851px){
.customer-workspace .sheet-right{gap:10px}
.customer-workspace .sheet-memos,.customer-workspace .sheet-photos{background:#fffdf9;border-color:#dedbd3}
.customer-workspace .sheet-memos h3,.customer-workspace .sheet-photos h3{color:#242424;font-size:17px}
.team-card-workspace .client-identity h1{font-size:23px}
.team-card-workspace .client-identity p,.team-card-workspace .team-holder-badge{font-size:12px}
.team-card-workspace .client-highlights span{font-size:12px}
.team-card-workspace .client-highlights strong{font-size:17px}
.team-card-workspace .visit-date-list strong{font-size:16px}
.team-card-workspace .visit-date-list small,.team-card-workspace .team-card-attribution,.team-card-workspace .team-practitioner{font-size:12px}
.team-card-workspace .visit-sheet-top legend,.team-card-workspace .sheet-date label,.team-card-workspace .visit-sheet-top .sheet-amount{font-size:13px}
.team-card-workspace .sheet-photos .photo-picker{font-size:12px;min-height:36px;padding:7px 9px}
.team-card-workspace .sheet-photos .card-photo-drafts button{font-size:12px;min-height:34px}
.team-card-workspace .sheet-photos [data-card-status],.team-card-workspace .sheet-photos .field-note,.team-card-workspace .team-editor-help{font-size:12px;line-height:1.6}
.team-card-workspace .sheet-photos .sheet-photo-heading{flex-wrap:wrap;gap:8px}
.team-card-workspace .sheet-photo-heading h3{flex:1 0 100%;margin-bottom:2px}
.team-card-workspace .saved-service-chip{font-size:12px}
.team-card-workspace .saved-sheet-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.team-card-workspace .saved-sheet-top h2{font-size:22px;white-space:normal}
.team-card-workspace .saved-sheet-top>strong:last-child{font-size:13px;white-space:normal}
}

/* Official C&K artwork retains its original pixels and proportions. */
.customer-detail .workspace-brand,.team-card-workspace>.workspace-brand{width:100%;max-width:none;justify-content:flex-start;border-radius:0;background:#fff;color:#355a2a;border-bottom:1px solid #dce4d6;box-shadow:none;padding:8px 24px;gap:18px;margin:0 0 16px;min-height:96px;text-align:left}
.workspace-brand .official-ck-logo{display:block;width:88px;height:88px;object-fit:contain;flex:none}
.customer-detail .workspace-brand>span,.team-card-workspace>.workspace-brand>span{font-size:16px;letter-spacing:4px;color:#355a2a}
.customer-detail .workspace-brand small,.team-card-workspace>.workspace-brand small{border-color:#c4d5bb;color:#53644c}
@media(max-width:600px){.customer-detail .workspace-brand,.team-card-workspace>.workspace-brand{padding:6px 12px;gap:12px;min-height:76px}.workspace-brand .official-ck-logo{width:68px;height:68px}.customer-detail .workspace-brand>span,.team-card-workspace>.workspace-brand>span{font-size:13px;letter-spacing:2px}}

/* The official brand is shared by navigation, sign-in and registration. */
.official-brand{display:flex;align-items:center;gap:12px;min-width:0;color:#355a2a;background:#fff;letter-spacing:2px}
.official-brand-logo{display:block;width:64px;height:64px;object-fit:contain;flex:none}
.sidebar>.brand.official-brand{padding:4px 6px;margin:0 0 16px;gap:8px;border-radius:10px;letter-spacing:1.2px;font-size:12px;line-height:1.5}
.sidebar>.official-brand .official-brand-logo{width:52px;height:52px}
.auth>.official-brand,.registration>.official-brand{padding:4px 12px;border-radius:12px;margin-bottom:16px}
.auth>.official-brand .official-brand-logo{width:84px;height:84px}
@media(max-width:720px){.layout:not(.customer-workspace)>.sidebar>.brand.official-brand{width:auto;margin:0 auto 0 0;padding:0 4px;font-size:12px;letter-spacing:1px}.sidebar>.official-brand .official-brand-logo{width:46px;height:46px}}
