:root{color-scheme:light only;--bg:#f6f5f1;--paper:#fff;--ink:#272827;--muted:#85837d;--line:#e9e6df;--brown:#8a6b53;--soft:#eee7de;font:14px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--bg);color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}[hidden]{display:none!important}button,input,textarea,select{font:inherit}button{cursor:pointer;border:0;border-radius:10px;padding:11px 15px;color:var(--ink);background:var(--soft);min-height:44px}button:disabled{opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--brown);outline-offset:3px}a{color:var(--brown);text-decoration:none}h1,h2,h3,p{margin:0}h2{font-size:25px;letter-spacing:-1px}h3{font-size:16px}p{line-height:1.65;margin:8px 0}hr{border:0;border-top:1px solid var(--line);margin:24px 0}.muted,.meta,.phone,.optional,.field-hint{color:var(--muted);font-size:12px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--brown);display:block;margin-bottom:9px}.wrap{max-width:1220px;margin:auto;padding:8px 28px 110px}.identity{margin:28px auto 12px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}.identity h1{font-size:15px;letter-spacing:5px;font-weight:500}.identity p{font-size:10px;color:var(--muted);margin:8px 0}.logo-mark{font:52px/1 Georgia,serif;position:relative;padding-right:15px}.logo-mark span{font-size:40px;position:absolute;left:22px;top:15px}.workspace-header{position:absolute;top:23px;right:max(22px,calc((100vw - 1170px)/2))}.icon-button{background:transparent;font-size:23px;padding:7px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:22px 0}.page-heading p{margin-bottom:0}.greeting{color:var(--brown)}.card{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:22px;min-width:0}.primary{background:var(--brown);color:#fff}.ghost{background:#f7f6f3;border:1px solid var(--line)}.text-button{background:transparent;color:var(--brown);padding:8px 3px}.danger{color:#ae5148;background:transparent;font-size:12px}.full-width{width:100%}.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:16px}.list-heading,.card-heading,.photo-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.card-heading{justify-content:flex-start}.step{display:none}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.stat{padding:18px 20px}.stat b{display:block;font-size:26px;font-weight:600;margin-top:5px}.home-columns{display:grid;grid-template-columns:1.1fr 1fr;gap:18px}.recent-client{display:flex;align-items:center;gap:12px;text-align:left;width:100%;background:transparent;border-radius:0;padding:12px 0;border-bottom:1px solid #f3f1ed}.recent-client:last-child{border-bottom:0}.avatar{width:48px;height:54px;flex:0 0 48px;display:grid;place-items:center;border-radius:12px;background:#eee8e0;color:var(--brown);font:23px Georgia;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}.client-info{flex:1;min-width:0}.client-info>span,.client-info>b{display:block}.client-info .muted{margin-top:5px}.date-switch{display:flex;justify-content:space-between;gap:5px;margin-bottom:15px}.date-switch button{background:transparent;padding:7px}.home-appointment{display:flex;width:100%;align-items:center;gap:18px;text-align:left;background:#f8f6f2;padding:16px 12px;margin:9px 0}.home-appointment b{color:var(--brown)}.home-appointment span:nth-child(2){flex:1}.empty-note{padding:28px 0;text-align:center;color:var(--muted)}.search-bar{display:flex;gap:10px;margin:20px 0}.search-input{display:flex;align-items:center;gap:9px;background:#eeede9;border-radius:12px;flex:1;padding:0 12px}.search-input input{border:0;background:transparent}.icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}.icon-definitions{display:none}input,select,textarea{width:100%;min-width:0;border:1px solid var(--line);border-radius:9px;padding:12px;background:#faf9f6;color:var(--ink);min-height:44px}textarea{resize:vertical;min-height:86px;line-height:1.6}.field{display:flex;flex-direction:column;gap:7px;margin:16px 0;font-size:12px;font-weight:500}.row,.profile-fields{display:grid;grid-template-columns:1fr 1fr;gap:13px}#clients{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.client{display:flex;align-items:center;gap:12px;padding:17px;background:#fff;border:1px solid var(--line);border-radius:13px;cursor:pointer}.client .name{font-weight:600;margin-bottom:4px}.client .meta{margin-top:5px;font-size:11px}.client-summary{display:inline-block;background:var(--soft);color:var(--brown);font-size:10px;padding:3px 9px;border-radius:10px;margin-top:5px}.client>button{font-size:11px;padding:7px}.editor-grid{display:grid;grid-template-columns:.85fr 1.15fr;gap:18px;align-items:start}.profile-card{grid-column:1}.record-editor{grid-column:2;grid-row:1/3}.history-card{grid-column:1}.profile-hero{text-align:center;margin:0 0 24px}.profile-avatar{width:84px;height:84px;border-radius:50%;margin:0 auto 10px;font-size:35px}.profile-hero h3{font-size:19px}.profile-footnote{font-size:10px;color:var(--muted);text-align:center;margin-top:10px}.photo-pickers{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:15px}.photo-picker{border:1px dashed #d8cfc3;border-radius:11px;min-width:0;margin:0;padding:10px;text-align:center;background:#faf8f4}.photo-picker legend{font-size:11px;color:var(--brown)}.photo-add{font-size:26px;background:transparent;width:100%;height:48px;padding:0}.photo-help{font-size:10px;margin:13px 0}.photo-help summary{cursor:pointer}.photo-heading{margin-top:24px}.photo-heading a{font-size:11px}.photoGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.photoTile{min-width:0}.photoTile button{font-size:10px;padding:5px;width:100%}.photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:9px;cursor:pointer}.photoTile .photo{aspect-ratio:1;height:auto}.sectionTitle{font-size:11px;color:var(--brown);margin:15px 0 8px}.compact-record{border-bottom:1px solid var(--line);padding:12px 0}.record-line{width:100%;display:flex;gap:10px;align-items:center;padding:5px 0;background:transparent;text-align:left;font-size:12px}.record-line>b{flex:1}.record-line>span:last-child{font-size:20px;color:var(--muted)}.one-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:11px}.history-thumbs{display:flex;gap:5px;flex-wrap:wrap}.history-thumb{width:44px;height:48px;overflow:hidden;border-radius:6px;background:#f4f1ec;font-size:9px}.compact-record>.danger{min-height:28px;padding:3px}.recordText{white-space:pre-wrap;overflow-wrap:anywhere}.delete-row{display:flex;justify-content:space-between;align-items:center;margin-top:20px}.delete-row .muted{font-size:10px}.schedule-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.appointment{padding:17px 0;border-bottom:1px solid var(--line);cursor:pointer}.appointment-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.appointment-head>b{color:var(--brown)}.pill{font-size:10px;padding:4px 10px;background:#eee8df;border-radius:12px;color:var(--brown)}.pill.completed{background:#eaf2ed;color:#608671}.pill.cancelled{background:#f4e8e5;color:#ae5148}.time-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.time-button{min-height:38px;font-size:12px;padding:7px;background:#f5f2ed}.selected{background:var(--brown)!important;color:white!important}.filter-bar{display:flex;gap:8px;margin:18px 0}.filter{border-radius:24px;padding:8px 17px;min-height:36px;background:white;font-size:12px}.gallery-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.gallery-tile{aspect-ratio:3/4;position:relative;padding:0;overflow:hidden;background:#eae5de}.gallery-tile .photo{border-radius:0}.gallery-caption{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#0008);color:white;text-align:left;padding:22px 10px 9px;font-size:11px}.stat-line{display:flex;justify-content:space-between;font-size:12px;margin:18px 0 8px}.stat-track{height:5px;background:#f2eee8;border-radius:3px}.stat-track>div{height:100%;background:var(--brown);border-radius:3px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.settings-grid .card:last-child{grid-column:1/-1}.notice{border-radius:10px;background:#ece7de;padding:14px;margin:12px 0;white-space:pre-wrap;line-height:1.6;font-size:12px}.notice.error,.photoError{background:#f8eae6;color:#a34437}.status{text-align:center;color:#a5a198;font-size:10px;margin-top:25px}.dock{position:fixed;bottom:0;left:0;right:0;background:#fffefbf5;backdrop-filter:blur(18px);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);padding:8px max(10px,calc((100vw - 660px)/2)) calc(8px + env(safe-area-inset-bottom));z-index:20}.nav-button{display:flex;align-items:center;flex-direction:column;gap:5px;background:transparent;color:#a6a39b;padding:4px;font-size:10px;border-radius:0;min-width:45px}.nav-button>span{font-size:23px;line-height:1}.nav-button[aria-current=page]{color:var(--ink);font-weight:700}.nav-button[aria-current=page]::after{content:'';height:3px;width:15px;background:var(--brown);border-radius:3px}footer{color:var(--muted);font-size:10px;text-align:center;margin-top:30px;letter-spacing:1px}footer span{display:block;margin-top:5px}.login{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:70px;max-width:850px;margin:50px auto}.login-intro{text-align:center}.hero-monogram{font:120px/1 Georgia;position:relative;display:inline-block;padding-right:30px;margin-bottom:35px}.hero-monogram span{position:absolute;left:55px;top:40px;font-size:90px}.wordmark{letter-spacing:7px;margin:20px 0;font-size:18px}.login-intro h2{font-size:22px;font-weight:400;line-height:1.6}.login-intro p{color:var(--muted);font-size:12px}.login-form{padding:30px}.login-form .primary{width:100%;margin-top:8px}.login-help{font-size:10px;margin-top:16px}.empty-state{padding:35px;text-align:center;grid-column:1/-1}.empty-icon{font-size:30px;color:var(--brown);margin-bottom:12px}dialog{border:1px solid var(--line);border-radius:18px;padding:22px;background:#fff;color:var(--ink);max-width:calc(100vw - 24px);max-height:90dvh;overflow:auto}dialog::backdrop{background:#292620aa;backdrop-filter:blur(5px)}#pickerDialog{width:390px}#pickerDialog>button{display:block;width:100%;margin:10px 0}#pickerDialog .gallery-grid{grid-template-columns:repeat(3,1fr)}#photoDialog{width:min(950px,100vw);padding:15px}.viewer-stage{display:flex;align-items:center;justify-content:center;gap:8px}.viewer-stage img{max-width:calc(100% - 85px);width:auto;height:65dvh;object-fit:contain;touch-action:pan-y}.viewer-stage button{padding:8px;font-size:25px;background:transparent}#viewerInfo{font-size:12px;margin:10px 0;color:var(--brown)}#todaySummary{display:none}#loading{text-align:center;margin:50px}.save-actions>.primary{flex:1}.transfer-row{border-bottom:1px solid var(--line)}
#homeStats{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0 18px}#homeStats .stat{padding:11px 13px;border-radius:11px}#homeStats .stat b{font-size:21px;margin-top:4px}#homeStats .muted{font-size:10px}
@media(max-width:650px){#homeStats{gap:6px}#homeStats .stat{padding:10px 8px}#homeStats .stat b{font-size:20px}#homeStats .muted{font-size:9px;white-space:nowrap}}
@media(max-width:1000px){.gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.wrap{padding-left:24px;padding-right:24px}.editor-grid{grid-template-columns:.9fr 1.1fr}.profile-fields{grid-template-columns:1fr}}
@media(max-width:650px){.wrap{padding:2px 18px 100px}.identity{margin-top:22px;margin-bottom:15px}.identity h1{font-size:13px}.identity p{font-size:9px}.logo-mark{font-size:40px}.logo-mark span{font-size:32px;left:18px;top:12px}.workspace-header{right:13px;top:17px}.page-heading h2{font-size:23px}.page-heading>.primary{font-size:11px;padding:9px 12px}.stat-grid{grid-template-columns:repeat(2,1fr);gap:9px}.stat{padding:14px 16px;border-radius:12px}.stat b{font-size:24px}.home-columns,.editor-grid,.schedule-grid,.settings-grid{grid-template-columns:1fr;gap:15px}.card{padding:18px;border-radius:14px}.profile-card,.record-editor,.history-card{grid-column:1;grid-row:auto}.record-editor{order:2}.history-card{order:3}.profile-fields{grid-template-columns:1fr 1fr}#clients{grid-template-columns:1fr;gap:0;background:#fff;border-radius:14px;border:1px solid var(--line);padding:0 14px}.client{padding:15px 0;border:0;border-bottom:1px solid #f0ede7;border-radius:0}.client:last-child{border-bottom:0}.client .meta{font-size:10px}.client .avatar{width:43px;flex-basis:43px;height:49px}.client>button{background:transparent;padding:5px;min-width:30px}.client-summary{font-size:9px}.search-bar{gap:7px}.search-bar>button{padding:9px}.search-bar>button span{display:none}.gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.gallery-caption{font-size:9px;padding:18px 6px 7px}.filter-bar{gap:6px}.filter{padding:7px 13px}.login{display:block;margin:25px auto}.login-intro h2,.login-intro p{display:none}.login-intro .wordmark{margin-top:5px;font-size:15px}.hero-monogram{font-size:95px;margin-bottom:20px}.hero-monogram span{font-size:72px;left:42px;top:32px}.login-form{margin-top:35px;border:0;background:transparent;padding:0 10px}.login-form>.eyebrow,.login-form>h2,.login-form>p.muted{display:none}body[data-auth=false]>.identity{display:none}.delete-row{display:block}.viewer-stage img{height:60dvh}.photo-heading h3{font-size:14px}.photo-heading a{font-size:10px}.settings-grid .card:last-child{grid-column:1}.date-switch{gap:0}.date-switch button{font-size:12px}}

:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Malgun Gothic',Arial,sans-serif}.photo-picker{position:relative;overflow:hidden}.picker-thumb{position:absolute;inset:7px;width:calc(100% - 14px);height:calc(100% - 14px);object-fit:cover;border-radius:7px;pointer-events:none;opacity:.8}.photo-add{position:relative;z-index:2;text-shadow:0 1px 4px white}.picker-count{position:absolute;bottom:6px;right:6px;border-radius:10px;background:#302c26cc;color:#fff;padding:3px 6px;font-size:10px;pointer-events:none}.photo-picker legend{position:relative;z-index:3;background:#faf8f4}.recent-client .avatar{font-family:inherit}body[data-view=edit] .identity{margin-bottom:0}body[data-view=edit] .identity .logo-mark{display:none}

.nav-icon{width:22px;height:22px;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;fill:none}.nav-button>.nav-text{font-size:10px;line-height:1.3}.nav-button{gap:5px;color:#aaa69f}.nav-button[aria-current=page]{color:var(--brown)}.nav-button[aria-current=page]::after{display:none}.icon-button .nav-icon{width:21px;height:21px}.dock{padding-top:10px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}

/* Focused v0.6 usability update; existing palette and typography retained. */
.home-booking-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;touch-action:pan-y;min-height:40px}.home-booking-grid .home-appointment{display:flex;flex-direction:column;align-items:flex-start;gap:3px;margin:0;padding:10px;min-height:72px;min-width:0}.home-appointment strong,.home-appointment span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-appointment span{font-size:12px}.date-switch{touch-action:pan-y}.page-dots{display:flex;justify-content:center;gap:4px}.page-dots button{min-width:36px;min-height:36px;padding:4px}.compact-appointment{width:100%;display:grid;grid-template-columns:30px 42px minmax(40px,1fr) minmax(35px,1fr) auto 8px;align-items:center;gap:6px;padding:9px 0;border-radius:0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left;font-size:12px}.compact-appointment .avatar{width:30px;height:30px}.compact-appointment strong,.compact-service{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-appointment .pill{font-size:10px;padding:4px}.reservation-identity{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin-bottom:16px}.reservation-line{display:grid;grid-template-columns:80px minmax(0,1fr);gap:12px;padding:14px 0;white-space:pre-wrap;overflow-wrap:anywhere}.reservation-line b{font-size:13px}#appointmentContent>.primary{width:100%;margin:18px 0}#recentClients .recent-client{padding:8px 0}#scheduleView .page-heading{margin-bottom:12px}#scheduleDate{padding:8px}

#cropDialog{max-width:360px;width:calc(100% - 24px)}.crop-stage{position:relative;width:280px;max-width:100%;margin:16px auto;overflow:hidden;aspect-ratio:1}.crop-stage canvas{width:100%;height:100%;touch-action:none;display:block}.crop-guide{position:absolute;inset:0;border-radius:50%;border:2px solid white;box-shadow:0 0 0 100px #0008;pointer-events:none}
.compact-appointment .avatar{border-radius:50%;font-size:15px;flex-basis:30px}.home-booking-grid .home-appointment span{flex:none}.date-switch button:nth-child(2){flex:1}#appointmentView{max-width:720px;margin:auto}
.account-actions{display:grid;gap:12px;margin-top:16px}#passwordDialog{width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box}#passwordDialog input{width:100%;box-sizing:border-box}#passwordDialog::backdrop{background:rgba(0,0,0,.3)}#transferClient{min-height:160px}

.profile-phone{margin:0;word-break:break-word}.photo-check{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}.photo-check input{width:22px;height:22px}#sharePhotosDialog{width:min(440px,calc(100vw - 32px));box-sizing:border-box}#downloadPhotoZip{display:inline-block;text-decoration:none}#downloadPhotoZip[hidden]{display:none}

.transfer-selection{border:0;padding:0;margin:16px 0}.transfer-client-list{max-height:260px;overflow:auto;border:1px solid #ddd;border-radius:10px}.transfer-client-option{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 12px;cursor:pointer}.transfer-client-option input{flex:0 0 22px;width:22px;height:22px}.transfer-client-option span{min-width:0;overflow-wrap:anywhere}

/* Mobile-tested final adjustments */
body{font-family:"Pretendard","Noto Sans KR","Malgun Gothic",system-ui,sans-serif}.brand-name,.wordmark{font-weight:800;letter-spacing:.08em}.new-badge{display:inline-block;margin-inline-start:5px;padding:2px 5px;border-radius:6px;background:#efe5d8;color:#71533b;font-size:10px;vertical-align:middle}.home-appointment{padding:12px 14px!important;text-align:center!important;align-items:center!important;gap:5px!important}.home-appointment strong{max-width:100%;white-space:normal}.home-booking-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.customer-results{display:grid;gap:4px;max-height:220px;overflow:auto;margin-bottom:12px}.customer-result{text-align:left;padding:9px 12px;background:#faf7f1;color:#614d3c;border:1px solid #e8dfd3;border-radius:8px}.customer-results p{font-size:12px}.compact-appointment strong{min-width:0;overflow:hidden;text-overflow:ellipsis}.compact-appointment .pill{font-size:10px;white-space:nowrap}textarea{min-height:48px!important;resize:none;overflow:hidden}.appointment-context{font-size:13px;background:#f7f1e7;padding:10px;border-radius:8px}.save-actions{display:flex;gap:10px}.save-actions button{flex:1}[hidden]{display:none!important}

.identity h1{font-family:Georgia,"Times New Roman",serif;font-size:30px!important;letter-spacing:6px;font-weight:500!important;color:#796754}.identity .logo-mark{display:none}.identity p{font-family:Georgia,serif;font-size:9px!important;letter-spacing:3px}.identity{margin:26px auto 24px}.home-appointment{text-align:center!important;align-items:center!important;padding:12px!important;gap:6px!important}.home-appointment>strong{width:100%;text-align:center}.home-appointment>b,.home-appointment>span{width:100%;text-align:center}@media(max-width:650px){.identity h1{font-size:26px!important;letter-spacing:5px}.identity{margin:24px auto 20px}.identity p{font-size:8px!important;letter-spacing:2.5px}}
.home-booking-grid .home-appointment{padding:8px 10px!important;gap:3px!important;min-height:72px}.home-appointment>b{font-size:13px}.home-appointment>strong{font-size:14px;line-height:1.3}.home-appointment>span{font-size:11px}.new-badge{line-height:1.3}
.settings-grid{align-items:start}.account-actions #logout{background:#f6ede4;color:#845334;border:1px solid #e5d6c6;font-weight:600;font-size:14px}.identity h1{max-width:calc(100vw - 100px)}

/* Final 1–20 scoped corrections */
.profile-fields{align-items:start}.profile-fields>.field{display:flex;flex-direction:column;position:relative}.profile-fields .optional{display:inline;position:absolute;right:0;top:0}.profile-fields input{margin-top:auto;height:44px}.profile-hero{position:relative;padding-top:6px}.profile-reserve{position:absolute;right:0;top:6px;padding:8px 12px;font-size:12px}.customer-results{border:1px solid var(--line);border-radius:12px}#newBtn{display:inline-flex;align-items:center;justify-content:center;gap:5px}#newBtn .icon{flex:none}.transfer-pending{border-top:1px solid var(--line);margin-top:24px;padding-top:18px}.transfer-pending .list-heading{margin-bottom:8px}.transfer-pending .text-button{font-size:12px}.identity .official-logo{width:180px;height:auto;display:block;mix-blend-mode:multiply}.identity{margin:12px auto 10px;gap:0}.record-client-context{padding:10px 12px;border:1px solid var(--line);border-radius:10px;margin-bottom:16px}.record-client-context strong,.record-client-context span,.record-client-context small{display:block}.record-client-context span{font-size:12px;margin-top:4px}.home-appointment>strong,.compact-appointment>strong{position:relative;overflow:visible!important}.home-appointment .new-badge{position:absolute;right:calc(50% + 2.4em);top:50%;transform:translateY(-50%);margin:0;font-size:9px;padding:2px 4px}.compact-appointment>strong{padding-left:28px}.compact-appointment .new-badge{position:absolute;left:0;top:50%;transform:translateY(-50%);margin:0;font-size:9px;padding:2px 4px}.swipe-date{touch-action:pan-y;cursor:pointer}.swipe-date::-webkit-calendar-picker-indicator{pointer-events:none}.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.calendar-weekdays{text-align:center;font-size:11px;color:var(--muted);margin-bottom:8px}.calendar-day{padding:4px;min-width:0;min-height:38px;background:transparent}.calendar-day.selected{background:var(--brown);color:#fff}.calendar-day.outside-month{opacity:.4}#calendarDialog{width:min(350px,calc(100vw - 28px));padding:18px}@media(max-width:650px){.identity .official-logo{width:150px}.identity{margin:8px auto 6px}.profile-reserve{font-size:11px}.home-appointment .new-badge{right:calc(50% + 2.4em)}}

.home-appointment .booking-name{position:relative;display:inline-block;overflow:visible;max-width:calc(100% - 30px);font-size:inherit;white-space:normal}.home-appointment .booking-name .new-badge{right:calc(100% + 5px);left:auto;top:50%;transform:translateY(-50%)}.compact-appointment>strong{padding-left:28px}.compact-appointment .booking-name{position:relative;display:inline-block;max-width:100%;font-size:inherit;overflow:visible}.compact-appointment .booking-name .new-badge{right:calc(100% + 4px);left:auto}.profile-fields>.field{padding-top:0}.profile-fields input{margin-top:7px}.profile-fields>.field>.optional{line-height:20px}@media(max-width:350px){.profile-fields>.field>.optional{font-size:10px}.profile-reserve{padding:7px 9px}}
.identity .official-logo{mix-blend-mode:normal}#homeView>.page-heading{margin-top:12px}

.identity{margin:2px auto 0!important;gap:0;padding:0}.official-logo-lockup{display:flex;flex-direction:column;align-items:center;gap:2px;max-width:calc(100vw - 120px);background:transparent}.official-logo-lockup img{display:block;object-fit:contain;max-width:100%;background:transparent}.official-symbol{width:62px;height:52px}.official-wordmark{width:200px;height:25px}.official-tagline{width:174px;height:12px}#homeView>.page-heading{margin-top:4px;margin-bottom:16px}.identity+.wrap{padding-top:0}@media(min-width:651px){.official-symbol{width:72px;height:60px}.official-wordmark{width:230px;height:28px}.official-tagline{width:198px;height:14px}}@media(max-width:350px){.official-wordmark{width:185px;height:23px}.official-tagline{width:162px;height:11px}.official-symbol{height:48px;width:57px}}

/* Mobile home greeting spacing only */
@media(max-width:650px){#homeView>.page-heading{margin-top:20px}#homeView>.page-heading p{margin-top:3px}}
@media(max-width:650px){#appointmentResults{padding:8px;gap:6px}#appointmentResults .customer-result{font-size:13px;padding:7px 10px;min-height:44px}}
@media(max-width:650px){#appointmentResults{gap:4px}#appointmentResults .customer-result{min-height:32px;padding:5px 10px;font-size:13px}}

.record-actions{display:flex;align-items:center;gap:18px;margin-top:8px}.record-actions .record-edit{font-size:12px}.record-actions .danger{margin:0}
#statsDay{text-align:center}#statsDay::-webkit-date-and-time-value{text-align:center}#statsDay::-webkit-datetime-edit{display:block;text-align:center}#statsDay::-webkit-calendar-picker-indicator{display:none}
#appointmentForm>.row{grid-template-columns:repeat(2,minmax(0,1fr))}#appointmentForm>.row>.field{min-width:0}#appointmentDate,#appointmentTime{max-width:100%;box-sizing:border-box}#appointmentResults{grid-auto-rows:max-content;min-height:0}.home-appointment[data-state="in_progress"]{background:#f1e9de}.home-appointment[data-state="completed"]{background:#eeefed}
.record-editor>.row{grid-template-columns:repeat(2,minmax(0,1fr))}.record-editor>.row>.field{min-width:0}.record-editor>.row input,.record-editor>.row select{max-width:100%;box-sizing:border-box}
.swipe-date{text-align:center!important;-webkit-appearance:none;appearance:none}#appointmentForm>.row,.record-editor>.row{display:flex;gap:14px}#appointmentForm>.row>.field,.record-editor>.row>.field{flex:1 1 0;width:0;min-width:0}#appointmentResults{display:flex;flex-direction:column;overflow-y:auto}#appointmentResults>*{flex-shrink:0}
#newBtn,.profile-reserve{background:#f4efe7;color:#795c43;border:1px solid #e7dccd}
.new-badge{white-space:nowrap;word-break:keep-all;width:max-content;writing-mode:horizontal-tb;line-height:1.3}
.home-appointment .new-badge{right:calc(50% + 2.4em + 18px)}
@media(min-width:651px) and (max-width:1366px){#appointmentResults{padding:8px;gap:4px;max-height:230px}#appointmentResults .customer-result{height:32px;min-height:32px;padding:5px 10px;font-size:13px}}
#completeRecord{background:#8a6b53;color:#fff;border:1px solid #8a6b53}.save-actions{flex-wrap:nowrap}.save-actions button{min-width:0;padding-inline:8px;white-space:nowrap}@media(max-width:400px){.save-actions{gap:6px}.save-actions button{font-size:12px}}
.reservation-delete{border:1px solid #ecd8d2;background:#f8eeeb;color:#a36458;border-radius:10px;padding:10px 14px}
#editHomeGreeting{cursor:pointer}#editHomeGreeting:focus-visible{outline:2px solid var(--brown);outline-offset:5px;border-radius:4px}#greetingDialog{width:min(430px,calc(100vw - 28px))}#saveGreeting{background:var(--brown);color:white}
#saveAppointment{background:var(--brown);color:#fff}#appointmentForm>.toolbar{justify-content:center}

/* Final22: inline monthly schedule, stable columns, compact tablet search. */
.schedule-date-actions{display:flex;gap:6px;flex-shrink:0}.schedule-date-actions button{padding:8px 12px;font-size:12px}
.schedule-month-panel{max-width:420px;margin:0 0 16px;padding:16px}.schedule-month-panel .calendar-toolbar{margin-bottom:10px}.schedule-month-panel .calendar-toolbar button{background:transparent;font-size:24px;padding:2px 12px}.schedule-month-panel h3{font-size:15px}
.schedule-month-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;border-radius:10px}.month-booking-count{font-size:10px;line-height:12px;min-height:12px;color:var(--brown)}.schedule-month-day.selected .month-booking-count{color:inherit}.schedule-month-day.is-today:not(.selected){box-shadow:inset 0 0 0 1px var(--brown)}
#appointments .compact-appointment{grid-template-columns:30px 40px minmax(0,1.2fr) minmax(0,1fr) 50px 8px;gap:5px}
#appointments .compact-appointment>*{min-width:0}#appointments .compact-appointment>b{white-space:nowrap;font-variant-numeric:tabular-nums}
#appointments .compact-appointment>strong{padding-left:0;overflow:hidden!important;white-space:nowrap;text-align:left}
#appointments .compact-appointment>strong.guest-booking-name{padding-left:27px}
#appointments .compact-appointment .booking-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;position:static}
#appointments .compact-appointment .new-badge{left:0;right:auto}
#appointments .compact-service{text-align:center;display:block}
#appointments .compact-appointment .pill{width:50px;min-width:50px;text-align:center;padding:4px 0;justify-self:center}
@media(min-width:651px){#appointmentResults{display:flex;flex-direction:column;gap:4px;padding:8px;max-height:228px;overflow-y:auto;overscroll-behavior:contain}#appointmentResults .customer-result{height:32px;min-height:32px;max-height:32px;flex:0 0 32px;padding:5px 10px;font-size:13px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* Final23: customer reservations share the existing appointment data. */
@media(min-width:651px){#scheduleMonthPanel{margin-inline:auto}}
.client-upcoming-section{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}.client-upcoming-section .list-heading{margin-bottom:8px}.client-upcoming-section h3{font-size:15px}
.client-upcoming-appointment{width:100%;display:grid;grid-template-columns:minmax(0,1fr) 50px 8px;gap:8px;align-items:center;text-align:left;background:transparent;border-radius:0;border-bottom:1px solid var(--line);padding:12px 0}.client-upcoming-appointment:last-child{border-bottom:0}.client-upcoming-info{min-width:0}.client-upcoming-info>b,.client-upcoming-service{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.client-upcoming-info>b{font-size:12px;line-height:1.5}.client-upcoming-service{font-size:12px;color:var(--muted);margin-top:4px}.client-upcoming-appointment .pill{width:50px;padding:4px 0;text-align:center;white-space:nowrap}.client-upcoming-arrow{color:var(--muted);font-size:18px}

/* Final26: restore visible photo labels and dashed frames without clipping. */
.photo-picker{overflow:visible;padding-top:12px}.photo-picker legend{padding:0 6px;line-height:1.5;max-width:100%;white-space:nowrap}.picker-thumb{border-radius:7px}.photo-picker .photo-add{border-radius:7px}
.payment-field{border:0;padding:0;margin:16px 0}.payment-field legend{font-size:12px;margin-bottom:8px}.payment-methods{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.payment-methods button{font-size:12px;padding:8px 3px;min-width:0;background:var(--soft);white-space:nowrap}.payment-field p{margin:8px 0 0}.stats-month-controls{max-width:440px;margin-top:16px}.stats-month-controls .calendar-toolbar button{font-size:24px;background:transparent;padding:3px 14px}.stats-month-controls input{text-align:center}.payment-stats,.monthly-revenue,.service-stats{margin-top:16px}.payment-total{border-top:1px solid var(--line);padding-top:14px}.daily-revenue-row{display:grid;grid-template-columns:80px minmax(0,1fr) 40px 8px;gap:8px;width:100%;border-radius:0;border-bottom:1px solid var(--line);background:transparent;padding:13px 0;text-align:left;font-size:13px}.daily-revenue-row>b{text-align:right;font-variant-numeric:tabular-nums}.daily-revenue-row>span:nth-child(3){text-align:right}.daily-revenue-row:last-child{border-bottom:0}
@media(max-width:350px){.payment-methods{gap:4px}.payment-methods button{font-size:11px}.daily-revenue-row{grid-template-columns:65px minmax(0,1fr) 32px 8px;gap:5px}}

/* Final28: keep the brand footer near the dock on short pages, in flow on long pages. */
body{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
body>.identity{flex-shrink:0}
main.wrap{width:100%;flex:1 0 auto;display:flex;flex-direction:column;padding-bottom:calc(80px + env(safe-area-inset-bottom))}
main.wrap>footer{flex-shrink:0;margin-top:auto;padding-top:30px}

/* Final29: centered statistics controls and consistent home heading spacing. */
#statsView>.toolbar{justify-content:center}
#statsDayField,#statsMonthlyFields,#statsPeriodFields{width:100%;max-width:440px;margin-inline:auto;min-width:0}
#statsMonthlyFields>.field{width:100%;min-width:0;max-width:100%}
#statsMonthInput{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-inline-size:0;-webkit-appearance:none;appearance:none}
#statsMonthInput::-webkit-date-and-time-value{text-align:center;min-width:0}
#statsPeriodFields .row{grid-template-columns:repeat(2,minmax(0,1fr))}
#homeView>.page-heading{margin-top:22px;margin-bottom:22px;padding-top:19px}

/* Final30: amount and payment share one compact row; storage rules unchanged. */
.amount-payment-row{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:10px;align-items:end;margin:16px 0 7px}
.amount-payment-row>.amount-field{margin:0;min-width:0}
.payment-selector{position:relative;display:flex;flex-direction:column;gap:7px;min-width:0}
.payment-label{font-size:12px;font-weight:500}
#paymentToggle{width:100%;min-height:44px;padding:12px 8px;white-space:nowrap;background:#faf9f6;border:1px solid var(--line)}
#paymentMethods.payment-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:10;width:140px;display:grid;grid-template-columns:1fr;gap:4px;padding:6px;background:var(--paper);border:1px solid var(--line);border-radius:11px;box-shadow:0 8px 24px #27282718}
#paymentMethods.payment-menu button{min-height:40px;text-align:left;padding:9px 12px;background:transparent}
.compact-payment-hint{margin:4px 0;font-size:11px}.compact-payment-hint:empty{display:none}
@media(max-width:350px){.amount-payment-row{grid-template-columns:minmax(0,1fr) 100px;gap:7px}}

/* Final31: the same local brand launch screen on phones and tablets. */
.startup-screen{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:#f7f6f3;padding:24px;opacity:1;transition:opacity .2s ease;touch-action:none}
.startup-logo{display:flex;flex-direction:column;align-items:center;gap:28px;max-width:100%}
.startup-symbol{display:block;width:92px;height:92px;object-fit:contain}
.startup-wordmark{display:block;width:220px;max-width:70vw;height:auto;object-fit:contain}
.startup-screen.startup-leaving{opacity:0}
@media(prefers-reduced-motion:reduce){.startup-screen{transition:none}}

/* Final33: horizontal month gestures retain vertical page scrolling. */
#scheduleMonthPanel,#statsMonthlyFields{touch-action:pan-y}

/* Final34: viewer close at top right, delete centered, record link bottom right. */
#closePhoto{display:block;margin-left:auto}
#viewerActions{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:center}
#viewerActions>.ghost{grid-column:3;grid-row:1;justify-self:end;min-width:0;max-width:100%;white-space:normal}
#viewerActions>.danger{grid-column:2;grid-row:1;justify-self:center;white-space:nowrap}
@media(max-width:650px){#viewerActions>.ghost{font-size:11px;padding:8px}#viewerActions>.danger{padding-inline:8px}}

/* Final36: calendar footer actions aligned right. */
#calendarDialog>.toolbar{justify-content:flex-end}

/* Final37: device-local handedness for viewer and date calendar actions. */
.hand-mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:300px;margin:14px 0 10px}
.hand-mode-card .field-hint{line-height:1.6}
body[data-hand-mode=left] #closePhoto{margin-left:0;margin-right:auto}
body[data-hand-mode=left] #viewerActions>.ghost{grid-column:1;justify-self:start}
body[data-hand-mode=left] #calendarDialog>.toolbar{justify-content:flex-start}

/* Final38: daily service records with customer names and existing payment data. */
.daily-service-list{margin-top:16px}.daily-service-list .list-heading{margin-bottom:6px}
.daily-service-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}
.daily-service-item:last-child{border-bottom:0}.daily-service-info,.daily-service-price{min-width:0}
.daily-service-info>b,.daily-service-info>span,.daily-service-price>b,.daily-service-price>span{display:block}
.daily-service-info>b{overflow-wrap:anywhere;font-size:14px}.daily-service-info>span,.daily-service-price>span{margin-top:5px}
.daily-service-price{text-align:right}.daily-service-price>b{font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
/* Final39: contact actions and SMS composer */
.contact-heading-actions{display:flex;gap:8px;align-items:center}.contact-profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin:16px 0}.contact-profile-actions button{min-width:0;min-height:42px;font-size:12px;padding:9px 5px}.contact-quick{flex:none;width:34px;height:38px;padding:0;background:transparent;border:1px solid var(--line);border-radius:10px;font-size:21px;color:var(--brown)}.client .contact-quick{align-self:center}.client-info{min-width:0}.contact-check{flex:none;display:flex;align-items:center;padding:7px}.contact-check input{width:20px;height:20px;accent-color:var(--brown);margin:0}.contact-selecting .avatar{display:none}.contact-selection-bar{position:sticky;bottom:calc(85px + env(safe-area-inset-bottom));z-index:15;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 14px;background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:0 5px 24px #0001;margin-top:16px}.contact-selection-bar[hidden]{display:none}.contact-selection-bar b{margin-right:auto}.contact-selection-bar button{font-size:12px;padding:9px}.appointment-contact-row{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;gap:5px}.appointment-contact-row>.contact-quick{width:30px;border:0}.appointment-contact-row .compact-appointment{min-width:0}#contactDialog{width:min(520px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;padding:22px;border-radius:20px}#contactDialog .list-heading{gap:12px}#contactContent{display:flex;flex-direction:column;gap:12px}#contactContent>.field{margin:0}#contactContent textarea{width:100%;resize:vertical;min-height:60px;font:inherit;line-height:1.6}#contactContent .contact-recipient-summary textarea{font-size:12px;background:var(--bg);max-height:130px}#contactContent p{margin:0}.contact-template-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.contact-template-grid button{min-height:50px}.contact-copy-actions{display:flex;gap:8px}.contact-copy-actions>*{flex:1}.contact-booking-context{background:var(--soft);border-radius:10px;padding:12px;font-size:12px;overflow-wrap:anywhere}body[data-hand-mode=left] #contactDialog>.list-heading{flex-direction:row-reverse}@media(max-width:400px){.contact-heading-actions{gap:5px}.contact-heading-actions button{padding:8px;font-size:11px}.contact-selection-bar{gap:6px}.contact-selection-bar b{flex-basis:100%}#contactDialog{padding:17px}.client .contact-quick{min-width:30px;padding:0}.contact-selecting .client-info{padding:0}}

.contact-profile-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.contact-profile-actions button{font-size:11px;padding:8px 3px;line-height:1.5;white-space:normal}@media(max-width:350px){.contact-profile-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Final41: consistent vector icons, independent of device fonts */
.contact-profile-actions{gap:8px}.contact-profile-actions button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-height:62px;padding:10px 4px;border:1px solid var(--line);background:#faf8f5;border-radius:12px;font-size:11px;font-weight:500;line-height:1.3}.contact-action-icon{display:inline-flex;width:20px;height:20px;flex:none;color:var(--brown)}.contact-action-icon svg{display:block;width:100%;height:100%}.contact-action-label{white-space:nowrap}.contact-quick{display:flex;align-items:center;justify-content:center}.contact-quick .contact-action-icon{width:19px;height:19px}
/* Final42: customer classification and wedding notes */
.client-type-badge{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;padding:3px 8px;border-radius:999px;font-size:10px;line-height:1.4;font-weight:500;white-space:nowrap;border:1px solid transparent}.client-type-badge.type-general{background:#eee7de;color:#806750}.client-type-badge.type-bride{background:#f8e9ed;color:#ad637b;border-color:#eed9df}.client-type-badge.type-groom{background:#e9eff6;color:#607fa3;border-color:#d8e3ef}.client-info>.client-type-badge{float:right;margin-left:8px}.profile-hero h3 .client-type-badge{margin-left:8px}.wedding-list-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:12px 0 16px;flex-wrap:wrap}.wedding-list-tools .filter-bar{margin:0}.wedding-list-tools>button{font-size:12px}.wedding-details{padding:16px;background:#faf8f5;border:1px solid var(--line);border-radius:12px;margin-bottom:16px}.wedding-details h3{font-size:14px;margin-bottom:12px}.wedding-clear-date{font-size:10px;min-height:28px;padding:5px 0;align-self:flex-end}.classified-booking .client-type-badge{display:block;width:max-content;max-width:100%;margin-top:3px;font-size:8px;padding:1px 5px}.classified-booking{min-width:0}.booking-type-dots{display:flex;justify-content:center;align-items:center;gap:4px;min-height:12px}.booking-type-dot{width:5px;height:5px;border-radius:50%;display:block;flex:none}.booking-type-dot.type-general{background:#8a6b53}.booking-type-dot.type-bride{background:#c77d96}.booking-type-dot.type-groom{background:#7194bd}.schedule-month-day.selected .booking-type-dots{background:#ffffffd9;border-radius:8px;width:max-content;padding:0 5px;margin:auto}#scheduleTypeFilters{gap:5px;margin:10px 0}#scheduleTypeFilters button{font-size:10px;padding:6px 10px;min-height:30px}#brideNotesDialog{width:min(700px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;border-radius:20px;padding:22px}#brideNotesList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.bride-note-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;text-align:left;min-width:0}.bride-note-card b{overflow-wrap:anywhere}.bride-note-summary{white-space:pre-line;overflow-wrap:anywhere;font-size:12px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;margin-top:10px}.bride-note-card:focus-visible{outline:2px solid var(--brown)}@media(max-width:650px){#brideNotesList{grid-template-columns:1fr}.wedding-list-tools>button{font-size:11px;padding:8px 10px}.wedding-list-tools .filter{font-size:11px;padding:7px 11px}#brideNotesDialog{padding:17px}.wedding-details{padding:12px}}

.booking-dot-legend{display:flex;justify-content:center;gap:16px;margin-top:14px;color:var(--muted);font-size:10px}.booking-dot-legend>span{display:inline-flex;gap:5px;align-items:center}#brideNoteFilters{flex-wrap:wrap;gap:6px}#brideNoteFilters .filter{padding:7px 12px;font-size:11px}

/* Final43: selected date breakdown above its existing appointment list */
.schedule-day-summary{margin-top:18px;padding:16px;background:#faf8f5;border:1px solid var(--line);border-radius:12px;scroll-margin-top:18px}.schedule-day-summary .list-heading{margin-bottom:10px;gap:10px}.schedule-day-summary .list-heading b{font-size:13px}.schedule-day-counts{display:flex;gap:8px;flex-wrap:wrap}.schedule-day-counts .client-type-badge{padding:5px 10px;font-size:11px}.schedule-day-summary p{margin:10px 0 0}.schedule-day-summary:focus{outline:none}

/* Final44: piece fees belong to customer revenue, never double counted */
.piece-amount-field{margin-top:12px}.charge-total{padding:11px 13px;background:var(--soft);color:var(--brown);border-radius:10px;font-size:12px;font-weight:600;margin:8px 0 12px}.revenue-subtotal{padding-left:12px;color:var(--muted);font-size:12px}.payment-stats .field-hint{margin-top:12px}.piece-breakdown{white-space:normal;max-width:180px;font-size:10px!important;line-height:1.5}

.empty-add-client{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;background:transparent;border-radius:12px;line-height:1}


/* Stable columns for a second bridal time line. */
#appointments .compact-appointment{grid-template-columns:30px 56px minmax(0,1.2fr) minmax(0,1fr) 50px 8px}
.booking-time{display:flex;flex-direction:column;gap:3px;line-height:1.3;font-variant-numeric:tabular-nums}.booking-out-time{display:block;font-size:9px;font-weight:500;color:var(--brown);white-space:nowrap}.home-appointment .booking-time{align-items:center;font-size:12px}.home-appointment .booking-out-time{font-size:9px}#brideOutTimeFields .field{margin-top:12px}#brideOutTimeFields .field-hint{margin-bottom:12px}

/* Final53: direct bridal in/out entry, same fixed list columns. */
.appointment-time-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.appointment-time-inputs .field{min-width:0}.appointment-time-inputs input{min-width:0;width:100%}.appointment-time-inputs .field[hidden]{display:none}.booking-out-time{font-size:10px;font-weight:600}#timeButtons[hidden]{display:none}

/* Final54: choose new customer type before entering profile fields. */
.new-client-type-tabs{display:flex;justify-content:center;gap:8px;margin:0 0 22px}.new-client-type-tabs[hidden]{display:none}.new-client-type-tabs button{min-width:120px;min-height:44px;border-radius:12px}.new-client-type-tabs button.selected{background:var(--brown);color:#fff;border-color:var(--brown)}

/* Final55: closer home page dots and bridal photo kinds. */
.page-dots{gap:0}.page-dots button{min-width:24px;width:24px;min-height:36px;padding:4px 0}
/* Final57: reservation summary is also an edit shortcut. */
button.appointment-context{display:block;width:100%;white-space:normal;line-height:1.6;text-align:center;border:1px solid transparent}button.appointment-context:hover{border-color:var(--brown)}

/* Final58: stage, date and times; optional ceremony after rehearsal. */
.wedding-time-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wedding-time-row .field,.wedding-time-row input{min-width:0}.wedding-ceremony-fields{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fff}#weddingTimeDialog{width:min(480px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;padding:20px;border-radius:20px}.wedding-time-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;max-height:38dvh;overflow-y:auto;margin-bottom:14px}.wedding-time-choices button{padding:9px 3px;min-width:0}.wedding-time-choices button.selected{background:var(--brown);color:#fff}#weddingTimeDialog .toolbar{justify-content:flex-end}

.profile-type-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:36px;padding:7px 12px;vertical-align:middle;cursor:pointer;white-space:nowrap}.profile-type-toggle:hover{box-shadow:0 0 0 1px currentColor}.profile-type-toggle:disabled{cursor:default}

#profileTypeDialog{width:min(380px,calc(100vw - 28px));padding:22px;border-radius:20px}#profileTypeChoices{display:grid;gap:10px}#profileTypeChoices button.selected{background:var(--brown);color:#fff}#profileTypeDialog .field-hint{margin-top:16px}

#appointments .booking-out-time{font-size:inherit;font-weight:inherit;color:inherit}

#appointmentKindPicker{text-align:left;width:100%;padding:12px;background:#faf9f6}

.booking-kind-field{position:relative}.booking-kind-menu{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:40;display:grid;gap:5px;max-height:min(240px,45dvh);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:8px;background:var(--paper);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 26px #0002}.booking-kind-menu button{text-align:left;padding:12px;min-height:44px;flex-shrink:0}.booking-kind-menu button.selected{background:var(--brown);color:white}

.inline-choice-menu{position:fixed;z-index:1000;display:grid;gap:4px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:7px;box-shadow:0 8px 26px #0002}.inline-choice-menu button{min-height:44px;padding:12px;text-align:left;border-radius:8px;background:#faf9f6}.inline-choice-menu button.selected{background:var(--brown);color:#fff}

.profile-hero h3{display:flex;align-items:center;justify-content:center;gap:8px;line-height:1.4;margin:0 auto;text-align:center}.profile-hero h3 .profile-type-toggle{margin-left:0;flex-shrink:0;min-height:32px;padding:5px 10px}

.profile-hero h3{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;width:100%}.profile-hero h3 .profile-name{grid-column:2;max-width:min(240px,50vw);overflow-wrap:anywhere;text-align:center}.profile-hero h3 .profile-type-toggle{grid-column:3;justify-self:start;margin-left:0}

#homeSchedule>.list-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px}#homeSchedule>.list-heading>h3{grid-column:2;text-align:center;margin:0}#homeSchedule>.list-heading>.text-button{grid-column:3;justify-self:end;white-space:nowrap}

/* Keep modal scrolling within the open panel. */
dialog{overscroll-behavior:contain}dialog::backdrop{touch-action:none}

.profile-hero h3 .profile-type-toggle{min-width:60px;height:28px;min-height:28px;box-sizing:border-box;padding:3px 16px;border-radius:999px;line-height:1.2}

#brideNotesList{grid-template-columns:minmax(0,1fr)}.bride-note-summary{display:block;-webkit-line-clamp:unset;overflow:visible}#weddingProfileFields textarea{overflow:hidden;resize:vertical;min-height:96px}

#piecePaymentMethods.payment-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:10;width:140px;display:grid;grid-template-columns:1fr;gap:4px;padding:6px;background:var(--paper);border:1px solid var(--line);border-radius:11px;box-shadow:0 8px 24px #27282718}#piecePaymentMethods.payment-menu button{min-height:40px;text-align:left;padding:9px 12px;background:transparent}#piecePaymentMethods button.selected{background:var(--brown);color:#fff}

#piecePaymentToggle{width:100%;min-height:44px;padding:12px 8px;white-space:nowrap;background:#faf9f6;border:1px solid var(--line);font-size:12px}

/* Final81: statistics rows open existing customer details. */
button.daily-service-item{width:100%;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:inherit;font:inherit;text-align:left;box-shadow:none;cursor:pointer}button.daily-service-item:last-child{border-bottom:0}button.daily-service-item:hover{background:var(--soft)}button.daily-service-item:focus-visible{outline:2px solid var(--brown);outline-offset:2px}button.daily-service-item .daily-service-info>b::after{content:" ›";color:var(--brown)}

/* Final82: independently stacked settings columns. */
.settings-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:18px}.settings-sidebar{display:flex;flex-direction:column;gap:16px;min-width:0}.settings-sidebar>.card{width:100%}.settings-grid>.settings-transfer{grid-column:auto}.settings-grid .settings-about{grid-column:auto}
@media(max-width:650px){.settings-grid{display:flex;flex-direction:column;gap:15px}.settings-sidebar{display:contents}.settings-grid .card{width:100%}.settings-account{order:1}.settings-transfer{order:2}.settings-templates{order:3}.settings-hand{order:4}.settings-about{order:5}}

/* Final83: prevent browser pull-to-refresh without changing regular scrolling. */
html,body{overscroll-behavior-y:none}

/* Final84: center the complete settings column on wide screens. */
#settingsView{width:100%;max-width:720px;margin-inline:auto}#settingsView .settings-grid{display:flex;flex-direction:column;gap:16px}#settingsView .settings-sidebar{display:contents}#settingsView .settings-grid .card{width:100%;grid-column:auto}#settingsView .settings-account{order:1}#settingsView .settings-templates{order:2}#settingsView .settings-hand{order:3}#settingsView .settings-about{order:4}#settingsView .settings-transfer{order:5}
@media(max-width:650px){#settingsView .settings-account{order:1}#settingsView .settings-transfer{order:2}#settingsView .settings-templates{order:3}#settingsView .settings-hand{order:4}#settingsView .settings-about{order:5}}

/* Final85: home alignment, reservation types and a complete time selector. */
#homeStats .stat{text-align:center}#homeSchedule .home-today-title{background:transparent;padding:0;min-height:36px;font-size:18px;font-weight:700;color:var(--ink);justify-self:center;grid-column:2}#homeSchedule .home-today-title:focus-visible{outline-offset:4px}
#weddingTimeDialog{width:min(560px,calc(100vw - 24px));padding:18px;max-height:calc(100dvh - 24px)}#weddingTimeDialog .list-heading{margin-bottom:10px}.wedding-time-choices{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;max-height:none;overflow:visible;margin-bottom:10px}.wedding-time-choices button{min-height:40px;padding:7px 2px;font-size:13px}#weddingTimeDialog .field{margin:10px 0}#weddingTimeDialog .toolbar{margin-top:10px}#weddingTimeDialog .list-heading button{min-height:36px;padding:7px 12px}
.calendar-booking-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.calendar-booking-day .booking-type-dots{min-height:5px}.revenue-breakdown{margin-top:16px}
@media(max-height:620px){#weddingTimeDialog{padding:12px}.wedding-time-choices{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.wedding-time-choices button{min-height:34px;font-size:12px}#weddingTimeDialog input{min-height:36px;padding:7px}#weddingTimeDialog .toolbar button{min-height:36px;padding:7px 12px}}
/* Final85: bridal appointments and readable status colors */


.home-appointment .home-booking-status{display:inline-block;width:auto;align-self:center;border-radius:999px;padding:3px 9px;font-size:10px;font-weight:600;color:#75583e;background:#e9ddca;line-height:1.5}
.home-appointment[data-state="in_progress"] .home-booking-status,.pill.in_progress{background:#f3d8b7;color:#8b5624}
.home-appointment[data-state="completed"] .home-booking-status,.pill.completed{background:#cfe4d7;color:#3e6d53}
.pill.scheduled{background:#e9ddca;color:#75583e}
.home-appointment[data-state="in_progress"]{background:#faf0e1}
.home-appointment[data-state="completed"]{background:#edf4ef}
.prepaid-card{background:#faf8f4;border:1px solid var(--line);padding:16px;border-radius:13px;margin:18px 0}
.prepaid-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;text-align:center}
.prepaid-summary span{display:block;font-size:11px;color:var(--muted);margin-bottom:7px}.prepaid-summary b{font-size:15px;white-space:nowrap}.prepaid-summary>div:last-child b{color:#8a6b53}
.prepaid-lifetime{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding-top:12px;margin-top:14px;font-size:12px}.prepaid-topup{display:flex;align-items:center;gap:8px;font-size:11px;padding:8px 0}.prepaid-topup>span{flex:1}.prepaid-card summary{font-size:11px;color:var(--brown);cursor:pointer}
@media(max-width:400px){.prepaid-card{padding:12px}.prepaid-summary b{font-size:13px}}
/* User-selected status palette: beige → green → dark brown */
.home-appointment[data-state="in_progress"] .home-booking-status,.pill.in_progress{background:#d5e6d9;color:#356447}
.home-appointment[data-state="completed"] .home-booking-status,.pill.completed{background:#655c54;color:#fffaf4}
.home-appointment[data-state="in_progress"]{background:#eef5ef}
.home-appointment[data-state="completed"]{background:#e7e3de}
.prepaid-split{background:#f5f1e9;border-radius:12px;padding:12px;margin:10px 0}.prepaid-split .field{margin:8px 0}.prepaid-split .text-button{font-size:12px}
/* Final85 client detail: one quiet overview with progressive disclosure. */
#editView .editor-grid{display:block;max-width:900px;margin:0 auto}
#editView .profile-card,#editView .record-editor,#editView .history-card{width:100%;margin-bottom:18px}
.client-detail-card{padding:24px}.client-detail-card .profile-hero{position:relative;padding-top:4px;margin-bottom:22px}
.client-detail-card .profile-avatar{width:78px;height:78px;margin-bottom:12px;cursor:pointer}
.client-detail-card .profile-hero h3{font-size:21px}.profile-staff{font-size:11px;color:var(--muted);margin:3px 0}
.client-edit-button{position:absolute;right:0;top:0;font-size:10px;padding:8px 10px;min-height:34px}
.client-contact-icons{display:flex;justify-content:center;gap:8px;margin-top:12px}.client-contact-icons button{width:40px;min-height:38px;padding:9px;background:#f8f6f1;border:1px solid var(--line)}.client-contact-icons .contact-action-label{display:none}.client-contact-icons .contact-action-icon{display:block;width:18px;height:18px;margin:auto}.client-contact-icons svg{width:18px;height:18px}
.client-summary-card{background:#f8f5ef;border:1px solid #eee7dc;border-radius:14px;overflow:hidden;margin-bottom:16px}
.client-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.client-summary-metric{padding:17px 8px;min-height:85px;background:transparent;border-radius:0;border-right:1px solid #e9e1d5;text-align:center}.client-summary-metric:last-child{border-right:0}.client-summary-metric>span{display:block;color:#8b8176;font-size:11px;margin-bottom:9px}.client-summary-metric>b{font-size:16px;letter-spacing:-.4px}.client-summary-footnote{border-top:1px solid #e9e1d5;text-align:center;margin:0;padding:9px;font-size:10px;color:#948b80}
.client-latest-card{border:1px solid var(--line);border-radius:14px;padding:17px;margin-bottom:14px}.client-latest-card h3,.client-next-card h3{font-size:14px}.client-latest-card .list-heading{margin-bottom:10px}.client-latest-card .text-button{font-size:11px;min-height:28px;padding:0 3px}
.client-latest-link{background:transparent;display:flex;justify-content:space-between;align-items:center;gap:14px;text-align:left;padding:0;width:100%;border-radius:0}.client-latest-link>div{display:flex;flex-direction:column;gap:5px}.client-latest-link .eyebrow{letter-spacing:0;font-size:11px;margin:0}.client-latest-link>div>b{font-size:16px}.client-latest-link>div>.muted{font-size:10px}.client-latest-link>b{font-size:15px;color:var(--brown)}.client-recent-memo{font-size:12px;color:#7b756d;overflow-wrap:anywhere;margin:12px 0 0;line-height:1.6}
.client-recent-thumbs{display:flex;gap:8px;margin-top:12px}.client-recent-thumb{width:64px;height:64px;min-height:64px;padding:0;overflow:hidden;border-radius:9px}.client-recent-thumb .photo{width:64px;height:64px;object-fit:cover}
.client-next-card{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:13px 0 22px;font-size:11px}.client-next-card .text-button{font-size:11px;min-height:28px}.client-next-card.has-booking{display:block;background:#f5eee3;border:1px solid #eee0cd;border-radius:14px;padding:15px}.client-next-link{display:grid;grid-template-columns:1fr auto;gap:7px;width:100%;text-align:left;padding:10px 0 0;background:transparent}.client-next-link>b{font-size:13px;grid-column:1}.client-next-link>span{font-size:12px}.client-next-link>span:last-child{grid-column:2;grid-row:1/3;font-size:20px;color:var(--brown)}
.client-detail-accordion{border-top:1px solid var(--line);padding:0;background:transparent}.client-detail-accordion>summary{list-style:none;cursor:pointer;padding:17px 0;font-size:13px;font-weight:600;position:relative;min-height:50px}.client-detail-accordion>summary::-webkit-details-marker{display:none}.client-detail-accordion>summary::after{content:'⌄';position:absolute;right:4px;color:#9c8e7c;font-size:16px}.client-detail-accordion[open]>summary::after{content:'⌃'}.client-detail-accordion[open]{padding-bottom:16px}
.client-detail-pair{display:flex;justify-content:space-between;gap:16px;padding:10px 0;font-size:12px}.client-detail-pair>span{color:var(--muted)}.client-detail-pair>b{font-weight:500;text-align:right}.client-detail-accordion .prepaid-card{margin:0 0 12px}.client-edit-title{font-size:13px;color:var(--brown);margin:7px 0}.client-detail-accordion .delete-row{padding-top:20px;margin-top:22px;border-top:1px solid var(--line);display:flex;flex-direction:column;align-items:flex-start;gap:8px}.client-prepaid-use{display:flex;justify-content:space-between;gap:12px;width:100%;background:transparent;border-bottom:1px solid var(--line);padding:12px 0;font-size:11px;border-radius:0}.prepaid-usage-details>summary{font-size:12px;color:var(--brown);cursor:pointer;padding:9px 0}
.client-detail-actions{display:grid;grid-template-columns:1.5fr 1fr;gap:10px;border-top:1px solid var(--line);margin-top:8px;padding-top:22px;padding-bottom:env(safe-area-inset-bottom)}.client-detail-actions button{min-height:48px}.client-detail-actions .primary{background:var(--brown)}
@media(max-width:650px){.client-detail-card{padding:18px}.client-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.client-summary-metric{min-height:80px;padding:14px 8px}.client-summary-metric:nth-child(2){border-right:0}.client-summary-metric:nth-child(-n+2){border-bottom:1px solid #e9e1d5}.client-summary-metric>b{font-size:17px}.client-edit-button{font-size:9px;max-width:88px}.client-detail-card .profile-hero h3{font-size:20px}#editView{padding-bottom:calc(20px + env(safe-area-inset-bottom))}}
body[data-client-mode="edit"] #clientSummary,body[data-client-mode="edit"] #clientLatest,body[data-client-mode="edit"] #clientNext,body[data-client-mode="edit"] .client-detail-accordion:not(#clientManagement),body[data-client-mode="edit"] .client-detail-actions,body[data-client-mode="edit"] .client-edit-button{display:none!important}
body[data-client-mode="edit"] #clientManagement>summary{display:none}body[data-client-mode="edit"] .client-edit-title{font-size:16px;margin:12px 0}

/* Final86: four labelled customer actions */
.client-contact-icons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-width:440px;margin:18px auto 0;width:100%}.client-contact-icons button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;min-height:70px;padding:10px 4px;border-radius:12px;color:var(--brown)}.client-contact-icons .contact-action-label{display:block;font-size:11px;white-space:nowrap;color:var(--ink)}.client-contact-icons .contact-action-icon,.client-contact-icons svg{width:23px;height:23px}.client-contact-icons .contact-action-icon{margin:0}

/* Final87: compact navigation and clearer phone number */
#editView .page-heading #back{min-height:40px;padding:10px 13px;font-size:12px;flex-shrink:0}
.client-detail-card .profile-phone{font-size:15px;font-weight:500;color:#51483e;letter-spacing:.2px}

/* Final88: booking bar directly below profile actions */
.client-detail-card .profile-hero{margin-bottom:14px}
.client-next-card{margin:0 0 16px}
.client-next-card.has-booking{padding:0;min-height:66px}
.client-next-card .client-next-link{display:flex;align-items:center;gap:10px;min-height:66px;padding:12px 14px;border-radius:14px}
.client-booking-info{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.client-booking-label{font-size:11px;color:var(--brown)}
.client-booking-info>b{font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.client-next-link>.pill{font-size:10px;flex-shrink:0;padding:5px 8px}
.client-next-link>.client-booking-arrow{font-size:20px;color:var(--brown);flex-shrink:0}

/* Final89: consolidated inline customer info and muted wedding states */
#clientInfoEditor[hidden],#clientPersonal[hidden]{display:none!important}
.booking-validation{color:#965c4e;font-size:12px;line-height:1.5;margin:8px 0;padding:10px 12px;background:#f7eee9;border-radius:10px}
.booking-validation[hidden]{display:none}
#appointmentForm [aria-invalid="true"]{border-color:#b38b7b}




#statsView .stat{text-align:center}
#statsView .stat .muted,#statsView .stat b{display:block;text-align:center}

/* Final90: all customers share status colors; wedding uses a small badge */
.home-booking-grid .home-appointment[data-state="scheduled"]{background:#f5efe5;border:1px solid #ebe3d7}
.home-booking-grid .home-appointment[data-state="in_progress"]{background:#eef5ef;border:1px solid #dfe9e1}
.home-booking-grid .home-appointment[data-state="completed"]{background:#e7e3de;border:1px solid #dcd6cf}
.home-booking-grid .home-appointment b{color:var(--brown)}
.home-appointment .home-bride-badge{display:inline-block;vertical-align:middle;margin-left:5px;padding:2px 5px;font-size:9px;font-weight:500;line-height:1.2;border-radius:999px;background:#eee2e6;color:#886975;border:1px solid #e3d4da;width:auto;flex:none}

/* Final91: wedding uses muted pink, completed color shared with general */
.home-booking-grid .home-appointment[data-wedding="true"][data-state="scheduled"]{background:#f3e9eb;border-color:#e7dadd}
.home-booking-grid .home-appointment[data-wedding="true"][data-state="in_progress"]{background:#eef5ef;border-color:#dfe9e1}
.home-booking-grid .home-appointment[data-wedding="true"][data-state="completed"]{background:#e7e3de;border-color:#dcd6cf}

/* Final94: subtle bridal customer tint in reservation search results. */
#appointmentResults .customer-result[data-client-type="bride"]{background:#faf4f5;border-color:#eee5e7;color:#614d3c}

/* Button anchors keep iPad/iPhone from reopening a native select picker. */
.select-choice-picker{width:100%;text-align:left;background:#faf8f4;border:1px solid var(--line);border-radius:10px;padding:11px 15px;font:inherit;color:var(--ink)}

/* Customer directory: keep tools visible and scroll only the results. */
body[data-view=list]{position:fixed;inset:0;width:100%;height:100dvh;overflow:hidden}
body[data-view=list] main.wrap{flex:0 1 auto;margin:0 auto;padding-bottom:0;min-height:0}
body[data-view=list] main.wrap>footer,body[data-view=list] #status{display:none}
body[data-view=list] #clients{overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;align-content:start;scrollbar-width:thin;scrollbar-color:#c9b8a7 transparent}
body[data-view=list] .contact-selection-bar{position:relative;bottom:auto;margin-top:12px;box-shadow:none}
#saveAndNewClient{margin-top:10px}
@media(max-height:650px){body[data-view=list] .identity{display:none}body[data-view=list] .page-heading{margin:10px 0}body[data-view=list] .search-bar{margin:10px 0}body[data-view=list] .filter-bar{margin:8px 0}}

/* v0.9 profile and synchronization details */
.client-detail-card{position:relative;padding-top:50px}
.profile-delete-button{position:absolute;top:12px;right:16px;min-height:30px;padding:5px 9px;background:#f7f1ee;border:1px solid #eaded8;color:#9b7163;font-size:11px}
.client-next-card.empty-booking{min-height:54px;justify-content:center;padding:12px 14px;background:#f5eee3;border:1px solid #eee0cd;border-radius:14px}
.client-detail-actions{grid-template-columns:1fr}
.sync-state{font-size:12px;color:var(--brown)}.sync-state::before{content:'● ';font-size:9px}.sync-conflict{background:#f4eee4;border:1px solid #e7d8c4;border-radius:10px;padding:10px;font-size:11px;margin-bottom:14px}.sync-conflict button{display:block;font-size:11px}
.transfer-client-option{min-height:56px;padding:7px 12px;border-bottom:1px solid var(--line)}.transfer-client-option:last-child{border-bottom:0}.transfer-client-option span{font-size:12px;font-weight:500;line-height:1.4}.transfer-client-list{max-height:360px;overscroll-behavior:contain}

#syncConflict{position:fixed;bottom:calc(85px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(440px,calc(100vw - 32px));z-index:19;box-shadow:0 4px 16px #8a6b5318}
.transfer-client-option input{min-height:20px;height:20px;width:20px;flex-basis:20px;padding:0;accent-color:var(--brown)}
/* Unified notes: fixed compact controls, only the collection scrolls. */
#brideNotesDialog{padding:0;overflow:hidden;width:min(760px,calc(100vw - 28px));height:min(680px,calc(100dvh - 40px));max-height:calc(100dvh - 40px)}
#brideNotesDialog[open]{display:flex;flex-direction:column}.notes-header{flex:none;padding:16px 18px 8px;border-bottom:1px solid var(--line);background:#fff}.notes-header h3{font-size:17px;margin:0}.notes-header .list-heading{margin-bottom:10px}.notes-header .filter-bar{margin:6px 0;gap:6px}.notes-header .filter{min-height:32px;padding:6px 12px;font-size:12px}.notes-search{display:flex;align-items:center;gap:8px;background:#f5f2ed;border:1px solid var(--line);border-radius:12px;padding:0 10px}.notes-search input{background:transparent;border:0;min-height:42px;padding:10px 0;min-width:0;width:100%;font-size:13px;box-shadow:none}.notes-search .icon{width:18px;height:18px}.notes-controls{display:flex;align-items:center;justify-content:space-between;gap:8px}.notes-controls .text-button{font-size:11px;white-space:nowrap;padding:5px}.notes-header .field-hint{margin:5px 0;font-size:11px}#notesScroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 18px 18px;-webkit-overflow-scrolling:touch}#brideNotesList{gap:10px}.bride-note-card{padding:12px;border-radius:12px}.bride-note-card .list-heading{gap:8px;margin:0}.memo-client-link{padding:0;min-height:30px;font-size:15px;font-weight:600;text-align:left;overflow-wrap:anywhere}.bride-note-card .field-hint{margin:3px 0;font-size:11px}.bride-note-card small{font-size:10px}.memo-preview{white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.6;margin:7px 0 0}.memo-preview.expanded{display:block}.memo-expand{font-size:11px;padding:4px 0;min-height:28px}#notesMore{margin-top:12px;font-size:12px}.notes-empty{grid-column:1/-1;padding:18px 0}.memo-entry{display:flex;align-items:center;gap:8px}.memo-entry span{display:flex;flex-direction:column;gap:2px}.memo-entry small{font-size:9px;font-weight:400;color:var(--muted)}.memo-entry .icon{width:20px;height:20px}.avatar img{animation:sl-photo-in .15s ease-out}@keyframes sl-photo-in{from{opacity:.5}to{opacity:1}}@media(prefers-reduced-motion:reduce){.avatar img{animation:none}}@media(max-width:650px){.notes-header{padding:12px 14px 6px}#notesScroller{padding:10px 14px 14px}.notes-header .filter{padding:5px 9px;font-size:11px}.notes-header .filter-bar{gap:4px}}
.notes-controls #notesSort{margin-left:auto}@media(min-width:651px){#brideNotesList{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
.calendar-day.selected .booking-type-dot.type-general{background:#f7eee3}.calendar-day.selected .booking-type-dot.type-bride{background:#efbfcf}

/* Matching customer actions; a compact viewing button rather than an editing widget. */
#listView #contactSelect,#listView #newBtn,#listView #openBrideNotes{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:7px;height:44px;min-height:44px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;font-size:12px;line-height:1;white-space:nowrap}
#listView #openBrideNotes{background:#f7f6f3;color:var(--brown)}#listView #openBrideNotes>span{display:inline;line-height:1}#listView #openBrideNotes .icon{width:22px;height:22px;flex:none}#listView #newBtn .icon{width:18px;height:18px;flex:none}
/* Phone selection actions reserve less height and keep deletion beside messaging. */
@media(max-width:650px){
 body[data-view=list] #contactSelectionBar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px 7px;padding:8px 10px;margin-top:8px;border-radius:12px}
 #contactSelectionBar #contactSelectedCount{grid-column:1;grid-row:1;margin:0;flex-basis:auto;font-size:12px;white-space:nowrap}
 #contactSelectionBar>button{min-height:32px;padding:5px 8px;font-size:11px;line-height:1.2;white-space:nowrap;border-radius:9px}
 #contactSelectionBar>button:nth-child(2){grid-column:2;grid-row:1}
 #contactSelectionBar>button:nth-child(3){grid-column:3;grid-row:1}
 #contactSelectionBar #contactBulk{grid-column:1/3;grid-row:2;min-height:38px}
 #contactSelectionBar #contactDelete{grid-column:3;grid-row:2;min-height:38px;background:#faf3ef;border:1px solid #eaded8;color:#9b7163}
}
/* Tablet notes keep an even card grid; the preview collapses whitespace only visually. */
@media(min-width:651px){
 #brideNotesList{align-items:stretch}
 #brideNotesList .bride-note-card{display:flex;flex-direction:column}
 #brideNotesList .memo-preview:not(.expanded){white-space:normal}
 #brideNotesList .memo-expand{align-self:flex-start;margin-top:auto}
}

/* Final107: app controls do not trigger native text selection. */
button,[role="button"],#clients .client{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
input,textarea{-webkit-user-select:text;user-select:text}
#appConfirmDialog{width:min(420px,calc(100vw - 36px));padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--paper);color:var(--ink)}
#appConfirmDialog h3{margin:0 0 14px;color:var(--brown);font-size:18px}
#appConfirmMessage{margin:0;white-space:pre-wrap;line-height:1.65;font-size:14px;max-height:45vh;overflow:auto}
.confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
.confirm-actions button{min-width:84px;min-height:44px;border-radius:12px}

/* Final109: compact registration, existing customer detail unchanged. */
body[data-view="edit"][data-new-client="true"] #profileHero,
body[data-view="edit"][data-new-client="true"] #clientNext,
body[data-view="edit"][data-new-client="true"] #clientSummary,
body[data-view="edit"][data-new-client="true"] #clientLatest,
body[data-view="edit"][data-new-client="true"] .client-detail-accordion:not(#clientManagement),
body[data-view="edit"][data-new-client="true"] .client-detail-actions,
body[data-view="edit"][data-new-client="true"] #clientManagement>summary,
body[data-view="edit"][data-new-client="true"] .client-edit-title,
body[data-view="edit"][data-new-client="true"] .delete-row,
body[data-view="edit"][data-new-client="true"] .profile-footnote{display:none!important}
body[data-view="edit"][data-new-client="true"] #clientManagement{border:0;margin:0;padding:0}
body[data-view="edit"][data-new-client="true"] .profile-card{padding:22px}
body[data-view="edit"][data-new-client="true"] #clientInfoEditor>.field{margin-top:18px}
body[data-view="edit"][data-new-client="true"] #clientSaveActions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
body[data-view="edit"][data-new-client="true"] #clientSaveActions button{margin:0;padding:12px 8px;min-width:0;min-height:46px;font-size:13px;border:1px solid var(--line)}
body[data-view="edit"][data-new-client="true"] #saveProfile{background:var(--brown);color:#fff;border-color:var(--brown)}
body[data-view="edit"][data-new-client="true"] #saveAndNewClient{background:#f8f5ef;color:var(--brown)}

/* Final110: registration-only compact type and optional bridal fields. */
body[data-view="edit"][data-new-client="true"] #clientTypeField{max-width:180px;margin:0 0 20px}
body[data-view="edit"][data-new-client="true"] #clientTypePicker::after{content:'⌄';float:right;color:var(--brown)}
.registration-wedding{margin-top:20px;padding:16px;background:#fcf9f8;border:1px solid #eee4e4;border-radius:12px}
.registration-wedding h3{font-size:14px;color:var(--brown);margin-bottom:14px}
.registration-wedding label.field{margin:14px 0 0}
.registration-wedding textarea{min-height:72px}
body[data-new-client="true"] .registration-wedding .wedding-clear-date{padding:3px 0;min-height:28px;font-size:11px}

body[data-view="edit"][data-new-client="true"] .profile-card{width:100%;max-width:780px;margin:0 auto;padding:28px;border-radius:20px;box-shadow:0 6px 22px rgba(91,71,54,.025)}
body[data-view="edit"][data-new-client="true"] #clientInfoEditor>.profile-fields{gap:18px}
body[data-view="edit"][data-new-client="true"] #clientInfoEditor>.field{margin-top:22px}
body[data-view="edit"][data-new-client="true"] #clientTypeField{max-width:164px;margin:0 0 22px}
body[data-view="edit"][data-new-client="true"] #clientTypePicker{background:#f7f3ed;border-radius:12px;color:var(--brown);font-weight:600}
body[data-view="edit"][data-new-client="true"] .registration-wedding{background:#faf7f5;border-color:#ece4df;border-radius:16px;padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
.registration-wedding h3{grid-column:1/-1;letter-spacing:.3px}
.registration-stage{min-width:0}
.registration-stage h4{font-size:14px;color:var(--brown);margin:0 0 6px;font-weight:600}
.registration-time-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.registration-time-row input{min-width:0;width:100%;font-variant-numeric:tabular-nums}
@media(max-width:650px){body[data-view="edit"][data-new-client="true"] .profile-card{padding:22px}body[data-view="edit"][data-new-client="true"] .registration-wedding{display:block;padding:16px}}

@media(max-width:650px){.registration-stage+.registration-stage{margin-top:24px;padding-top:20px;border-top:1px solid #ece4df}}

/* Folded wedding reference photos, independent of service before/after picks. */
.wedding-reference-photos{grid-column:1/-1;margin-top:20px;border:1px solid #e8ded5;border-radius:14px;background:#fff;padding:0 16px}
.wedding-reference-photos>summary{cursor:pointer;padding:16px 0;font-size:14px;font-weight:600;color:var(--brown);list-style:none;display:flex;justify-content:space-between}
.wedding-reference-photos>summary::-webkit-details-marker{display:none}
.wedding-reference-photos>summary:after{content:'＋';font-size:18px;font-weight:400}
.wedding-reference-photos[open]>summary:after{content:'−'}
.wedding-photo-actions{display:flex;gap:10px;margin-bottom:10px}
.wedding-photo-actions button{flex:1;min-height:44px;font-size:13px}
.wedding-reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:12px 0}
.wedding-reference-tile{min-width:0;text-align:center}
.wedding-reference-view{padding:0;width:100%;height:auto;border-radius:10px;background:#f8f5f1;overflow:hidden;aspect-ratio:1}
.wedding-reference-tile img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px}
.wedding-reference-tile .text-button{font-size:11px;padding:7px 2px;min-height:32px}
#saveWeddingPhotos{width:100%;margin:10px 0 16px}
@media(max-width:650px){.wedding-reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Final113: common press response, page zoom guard and photo picker labels. */
html{touch-action:pan-x pan-y}
input,select,textarea{font-size:16px!important}
:is(button,a[href],summary,[role="button"]){transition:scale 120ms ease,filter 120ms ease,box-shadow 120ms ease;-webkit-tap-highlight-color:transparent}
:is(button,a[href],summary,[role="button"]).is-pressed:not(:disabled){scale:.985;filter:brightness(.97);box-shadow:0 1px 3px #8a6b5314}
@media(prefers-reduced-motion:reduce){:is(button,a[href],summary,[role="button"]){transition:none}.is-pressed{scale:1!important}}
.photo-picker-group{min-width:0;display:flex;flex-direction:column}
.photo-picker-label{height:24px;display:flex;align-items:center;justify-content:center;font-size:12px;line-height:18px;color:var(--brown);white-space:nowrap;margin-bottom:10px;gap:4px}
.photo-picker-label span{font-size:10px;color:var(--muted)}
.photo-picker-group .photo-picker{width:100%;min-height:80px;padding:10px;border:1px dashed #d8cfc3;overflow:hidden}
.photo-picker-group .photo-add{height:58px;min-height:58px}
.save-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.save-actions .record-state-button{width:100%;min-height:48px;padding:12px 8px;background:#f8f5f0;border:1px solid #e4dbd0;color:var(--brown);font-size:15px;font-weight:600}
#reserveRecord.state-selected{background:#ece3d5;border-color:#cbb598}
#save.state-selected{background:#e4eee7;border-color:#a9c0af;color:#54705d}
#completeRecord.state-selected{background:#ddd8d0;border-color:#a89e90;color:#554e45}
.save-actions #cancelRecord{grid-column:1/-1}
.record-state-tag{font-size:11px;color:var(--brown)}
#largePhoto{touch-action:none;transform-origin:center;user-select:none;-webkit-user-select:none}
.viewer-stage{overflow:hidden}
@media(max-width:450px){.photo-picker-label{font-size:11px;overflow:hidden;text-overflow:ellipsis;display:block;line-height:24px;text-align:center}}
/* Final114: shared brand, calm touch feedback, readable IME-safe memo fields. */
*{-webkit-tap-highlight-color:transparent}
button.is-pressed,a.is-pressed,summary.is-pressed,[role="button"].is-pressed{filter:none!important;box-shadow:none!important;opacity:.94}
textarea{line-height:1.65!important;padding:14px 16px!important;min-height:88px;overflow-y:auto!important;white-space:pre-wrap;word-break:break-word;box-sizing:border-box;resize:vertical}
.login-brand-assets{display:flex;flex-direction:column;align-items:center;gap:12px;margin:0 auto 32px;max-width:360px}
.login-symbol{width:110px;height:auto}.login-wordmark{width:100%;height:auto}.login-tagline{width:88%;height:auto}
.settings-preferences,.settings-export{min-width:0}.settings-preferences{grid-column:1/-1}.preference-section{border-top:1px solid var(--line,#e9e4dc);padding:18px 0}.preference-section>summary{cursor:pointer;font-weight:600}.preferences-list,.preferences-fields{display:grid;gap:12px;margin-top:18px}.preferences-item{display:flex;gap:8px;align-items:center;background:#faf8f4;border:1px solid #e8e3dc;border-radius:14px;padding:10px}.preferences-item input[type=text]{min-width:0;flex:1;padding:10px}.preferences-item select{max-width:130px}.preference-check{display:flex;gap:5px;align-items:center;white-space:nowrap}.preference-check input{width:20px;min-height:20px}.order-handle{cursor:grab;padding:10px;border:0;background:transparent;color:#8c7159}.preferences-item.dragging{background:#eee5db;opacity:.9}.preferences-item .text-button{padding:8px;white-space:nowrap}.profile-top-editor{width:min(100%,560px);margin:22px auto;text-align:left}.profile-top-editor .delete-row,.profile-top-editor .profile-footnote,.profile-top-editor #newRegistrationWedding{display:none}.profile-top-editor #clientSaveActions{display:flex;gap:10px}.profile-top-editor #clientSaveActions button{flex:1}.booking-memo-preview{margin:8px 0 0;text-align:left;white-space:pre-wrap;line-height:1.6;color:#74665a}.booking-memo-preview .memo-lines{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.booking-memo-preview.expanded .memo-lines{display:block;overflow:visible}.booking-memo-preview .text-button{padding:5px 0}#clientTitle:not(.new-registration-title){display:none}
@media(max-width:700px){.preferences-item{display:grid;grid-template-columns:30px minmax(0,1fr) 44px 44px;gap:6px}.preferences-item input[type=text]:nth-child(2){grid-column:2/5}.preferences-item input[type=text]:nth-child(3){grid-column:2/5}.preferences-item .preference-check{grid-column:2}.preferences-item select,.preferences-item .sl-select-wrap{grid-column:2/5}.preferences-item>.danger{grid-column:2/5;justify-self:end}.login-symbol{width:90px}.login-brand-assets{max-width:280px}.profile-top-editor #clientSaveActions{flex-wrap:wrap}}
.settings-export .row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.settings-export .field{min-width:0}.settings-export input{min-width:0;width:100%}
@media(max-width:450px){.settings-export .row{grid-template-columns:1fr}}
#brideNoteFilters{flex-wrap:wrap}

/* Final115: stable IME editing, comfortable Korean input, unified profile notes. */
body[data-new-client="false"] #editView>.page-heading>div{display:none}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]){line-height:1.5;min-height:52px;padding-top:12px;padding-bottom:12px;box-sizing:border-box}
textarea{line-height:1.65!important;padding:14px 16px!important;min-height:104px;box-sizing:border-box;-webkit-appearance:none;overflow:auto!important}
textarea:focus{overflow:auto!important}
#clientAppointmentMemos{margin-top:24px;border-top:1px solid var(--border,#e7e2dc);padding-top:16px}
.client-appointment-memo{margin:12px 0;padding:14px 16px;background:#faf8f5;border:1px solid #e9e3dc;border-radius:14px}
.client-appointment-memo>b,.client-appointment-memo>small{display:block}.client-appointment-memo>small{margin-top:4px}
.client-memo-full{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;margin-bottom:0}
.client-past-memos>summary{padding:12px 0;color:#8b7057}
.profile-top-editor #profile{min-height:144px}

.compact-wedding{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 18px;background:#faf7f5;border-color:#ece4df;border-radius:16px;padding:20px}
.registration-memo-grid{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 18px;margin-top:6px}
.compact-wedding>.field{grid-column:1/-1}.compact-wedding textarea{height:112px;min-height:112px;max-height:240px;resize:vertical}
.compact-wedding .wedding-clear-date{padding:3px 0;min-height:28px;font-size:11px}
@media(max-width:650px){.compact-wedding{display:block;padding:16px}.registration-memo-grid{gap:0 12px}.registration-memo-grid textarea{padding:12px!important}.compact-wedding .registration-stage+.registration-stage{margin-top:18px;padding-top:16px}}

#homeSchedule>.list-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:6px;align-items:center}
#homeSchedule>.list-heading .home-memo-entry{justify-self:start;font-size:12px;padding:8px 10px;min-height:40px;height:40px}
#homeSchedule>.list-heading .home-today-title{position:static;transform:none;width:auto;grid-column:2;white-space:nowrap}
#homeSchedule>.list-heading>.text-button{justify-self:end;white-space:nowrap;font-size:12px}
@media(max-width:380px){#homeSchedule>.list-heading .home-memo-entry{padding:8px 5px;gap:4px}#homeSchedule>.list-heading .home-memo-entry .icon{width:16px;height:16px}#homeSchedule>.list-heading .home-today-title{font-size:15px}}

/* Final116: reservations and actual work are independent screens. */
.calendar-direct-nav{display:flex;gap:4px;align-items:center;justify-content:center;position:relative;flex-wrap:wrap}
.calendar-direct-nav>button{padding:8px;min-height:44px;font-size:16px;white-space:nowrap}
.calendar-direct-options{position:absolute;top:100%;left:50%;transform:translateX(-50%);z-index:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:min(300px,calc(100vw - 44px));padding:12px;background:#fff;border:1px solid #e5ddd3;border-radius:14px;box-shadow:0 6px 18px #614c3520;max-height:330px;overflow:auto}
.calendar-direct-options button{min-height:44px;padding:6px;font-size:14px}.calendar-direct-options button.selected{background:var(--brown);color:#fff}
#settingsView .settings-grid>.card{order:0!important;padding:22px;border-radius:16px;margin:0;box-sizing:border-box}
#settingsView .settings-grid{max-width:780px;margin:auto;gap:16px}#settingsView{max-width:780px}
#settingsView .preferences-item.dragging{opacity:.7;background:#eee5d9;border:1px solid #b69b7c}.preferences-item.drop-target{outline:2px solid #b69b7c;outline-offset:2px}.order-handle{min-width:44px;min-height:44px;cursor:grab;touch-action:none;user-select:none}
.billing-panel{padding:16px;margin:12px 0 20px;background:#faf8f5;border:1px solid #e8e1d7;border-radius:14px}.billing-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:center;margin-bottom:12px}.billing-item>*{min-width:0}.billing-panel .field{margin:16px 0}.billing-panel .stat-line:last-child{border-top:1px solid #e8e1d7;padding-top:12px;font-weight:700}.booking-wedding-common{display:grid;grid-template-columns:1fr 1fr;gap:16px}
body[data-new-client="true"] #clientPersonal{display:none!important}
@media(max-width:650px){.billing-item{grid-template-columns:minmax(0,1fr) auto}.billing-item input{grid-column:1;grid-row:2}.billing-item .text-button{grid-column:2;grid-row:1/3}.booking-wedding-common{display:block}#settingsView .settings-grid>.card{padding:18px}.preferences-item input{max-width:100%}}
/* Final117: a single service row, separate payment stage, compact optional pieces. */
.service-lines{display:grid;gap:12px;margin:16px 0}.service-lines .billing-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:end;margin:10px 0;padding:0;background:none;border:0}.service-lines .primary-service-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.service-lines .field{min-width:0;margin:0}.service-lines select,.service-lines input{width:100%;min-width:0;box-sizing:border-box}.record-date-row{display:block!important;max-width:420px}.record-payment-section{padding:18px 0;border-top:1px solid #e8e1d8;border-bottom:1px solid #e8e1d8;margin:16px 0}.record-payment-section h4{margin:0 0 12px}.record-payment-section .payment-selector{max-width:440px}.split-payment-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:center;margin:10px 0}.split-payment-row>*{min-width:0}#splitPaymentFields{margin:12px 0}#firstPaymentAmount{max-width:440px}#addPiecePayment{margin:14px 0}#piecePaymentSection{padding:16px;border:1px solid #e8e1d8;border-radius:16px;background:#faf8f4;margin:12px 0}#piecePaymentSection .amount-payment-row{margin:0}.billing-panel{padding:16px!important}#billingSummary .stat-line{gap:16px}#bookingServices{margin:0 0 18px}.booking-extra-service{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;margin:8px 0}#appointmentForm>.toolbar{justify-content:center;margin-top:22px}#bookingRecordAction{display:block;margin:12px auto 0;padding:12px 22px}#appointmentForm+p{text-align:center}.client-booking-record-action{display:block;margin:12px auto 0!important;min-height:46px;border:1px solid #d9cbbb!important;border-radius:12px!important;padding:12px 18px!important;color:#816950!important;background:#faf8f4!important}.client-next-card .booking-memo-preview{padding-bottom:12px;border-bottom:1px solid #e8e1d8}.schedule-query-card>.schedule-date-actions{display:flex;justify-content:flex-start;margin:0 0 14px;gap:10px}.schedule-query-card>.schedule-date-actions>button{min-height:44px}.settings-account{order:0!important}
@media(max-width:420px){.service-lines .billing-item,.service-lines .primary-service-item{grid-template-columns:minmax(0,1fr)}.service-lines .billing-item{padding:12px;border:1px solid #e8e1d8;border-radius:12px;background:#faf8f4}.service-lines .billing-item .danger{justify-self:end}.split-payment-row{grid-template-columns:minmax(0,1fr)}.split-payment-row .danger{justify-self:end}.record-date-row{max-width:none}#piecePaymentSection .amount-payment-row{display:block}#piecePaymentSection .payment-selector{margin-top:12px}}
.first-payment-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:end;max-width:760px}.first-payment-row .field{margin:0;min-width:0}.first-payment-row .payment-selector{min-width:0}.settings-data-management>.settings-export,.settings-data-management>.settings-transfer{margin-top:20px;padding:0;border:0;box-shadow:none}.settings-data-management h3{margin-top:0}@media(max-width:420px){.first-payment-row{grid-template-columns:minmax(0,1fr)}}
/* Final117 independent service discounts */
.service-lines .billing-item{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.4fr) minmax(80px,.8fr) auto;gap:12px;align-items:end}
.service-lines .primary-service-item{grid-template-columns:minmax(0,2fr) minmax(0,1.4fr) minmax(80px,.8fr)}
.billing-item-net{grid-column:1/-1;text-align:right;color:var(--brown,#876c54);padding:2px 0 8px}
@media(max-width:600px){.service-lines .billing-item,.service-lines .primary-service-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.service-lines .billing-item>.field:first-child{grid-column:1/-1}.service-lines .billing-item>.danger{grid-column:1/-1;justify-self:end}.billing-item-net{grid-column:1/-1}.service-lines .billing-item input{width:100%;min-width:0}}
/* Final118 appointment-only deletion and responsive date actions */
#scheduleView .schedule-date-actions{display:flex;width:100%;justify-content:center;gap:8px}
@media(max-width:650px){body[data-hand-mode=right] #scheduleView .schedule-date-actions{justify-content:flex-end}body[data-hand-mode=left] #scheduleView .schedule-date-actions{justify-content:flex-start}}
.booking-selection-head{display:flex;justify-content:flex-end;margin:10px 0}.booking-selection-head button{min-height:44px;padding:8px 16px}
.booking-selection-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px;background:var(--soft);border:1px solid var(--line);border-radius:14px;margin-top:12px}.booking-selection-bar[hidden]{display:none}.booking-selection-bar button{min-height:44px;font-size:13px;padding:8px 12px}.booking-selection-bar b{margin-right:auto}
.appointment-contact-row.booking-selecting{grid-template-columns:44px minmax(0,1fr) 30px}.booking-selection-check{display:flex;align-items:center;justify-content:center;min-height:44px}.booking-selection-check input{width:22px;height:22px;margin:0;accent-color:var(--brown)}
.client-booking-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;padding-top:12px;width:100%}.client-booking-actions button{flex:1;min-width:100px;min-height:44px;font-size:13px}.client-booking-actions .client-booking-record-action{margin:0;width:auto}.booking-delete-action{display:block;margin:14px auto 0;min-height:44px;border-color:#d7b8ad;color:#9b665c}#appConfirmMessage{white-space:pre-line;overflow-wrap:anywhere;max-height:50vh;overflow:auto}
@media(max-width:650px){.booking-selection-bar{padding:8px;gap:6px}.booking-selection-bar button{font-size:12px}.booking-selection-bar b{font-size:13px}.booking-selecting .compact-appointment{grid-template-columns:36px minmax(0,1fr) auto}.booking-selecting .compact-service{grid-column:2}.client-booking-actions button{min-width:90px}}
/* Eight-booking baseline; content can still grow. No forced mobile height. */
@media(min-width:651px){#homeView .home-columns{align-items:stretch}#homeSchedule{display:flex;flex-direction:column;min-height:620px}#homeSchedule .home-booking-grid{flex:none}#homeSchedule>.page-dots{margin-top:auto;padding-top:12px;min-height:48px;flex:none}#homeSchedule>.single-page-placeholder{visibility:hidden}}
@media(max-width:650px){#homeSchedule>.single-page-placeholder{display:none}}

/* Existing bridal profiles: readable full-width notes on phones only. */
@media(max-width:650px){#newRegistrationWedding[data-registration="false"] .registration-memo-grid{grid-template-columns:minmax(0,1fr)}#newRegistrationWedding[data-registration="false"] .registration-stage>.field{width:100%}#newRegistrationWedding[data-registration="false"] #weddingReferencePhotos{width:100%}}
/* Two aligned rows on phones. Account/payment meanings remain editable. */
@media(max-width:650px){#stylelogPreferences .preferences-item{display:grid;grid-template-columns:minmax(0,1fr) 44px 40px 40px 44px;gap:2px;padding:5px;align-items:center;border-radius:12px}#stylelogPreferences .preferences-list{gap:6px;margin-top:12px}#stylelogPreferences .preferences-item>.order-handle{grid-column:1;grid-row:1;width:44px;min-width:44px;height:44px;min-height:44px;padding:6px}#stylelogPreferences .preferences-item>.preference-name{grid-column:1/6;grid-row:1;margin-left:46px;width:calc(100% - 46px)}#stylelogPreferences .preferences-item>.preference-price{grid-column:1;grid-row:2}#stylelogPreferences .preferences-item input[type=text]{height:44px;min-height:44px;max-height:44px;padding:6px;font-size:16px;line-height:1.4}#stylelogPreferences .preferences-item>.preference-check{grid-column:2;grid-row:2;justify-content:center;gap:3px;font-size:11px;height:44px;min-height:44px;margin:0}#stylelogPreferences .preference-check input{width:16px;height:16px;min-height:16px;margin:0}#stylelogPreferences .preferences-item>.text-button:not(.danger){grid-row:2;height:44px;min-height:44px;padding:5px;font-size:13px}#stylelogPreferences .preferences-item>.text-button:nth-last-child(3){grid-column:3}#stylelogPreferences .preferences-item>.text-button:nth-last-child(2){grid-column:4}#stylelogPreferences .preferences-item>.danger{grid-column:5;grid-row:2;justify-self:stretch;height:44px;min-height:44px;padding:5px 1px;font-size:11px}#stylelogPreferences .preferences-item[data-preference-kind="payments"]>.preference-check{grid-column:2}#stylelogPreferences .preferences-item[data-preference-kind="payments"]>select,#stylelogPreferences .preferences-item[data-preference-kind="payments"]>.select-choice-picker{grid-column:1;grid-row:2;width:100%;min-width:0;max-width:none;min-height:44px;height:44px;padding:5px;font-size:12px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#stylelogPreferences .preferences-item[data-preference-kind="payments"]>.select-choice-picker:after{content:none}}

.inline-validation{margin:4px 0 12px;color:#9b554a;font-size:13px;line-height:1.5;text-align:left;white-space:pre-wrap}.validation-error{border-color:#bb8a79!important;outline:1px solid #bb8a79;outline-offset:2px;scroll-margin:90px 0 120px}.validation-error:focus{outline:2px solid #a87966}

.booking-delete-error{margin:10px 0 14px;padding:12px 14px;background:#f8ece7;border:1px solid #ebd5ca;border-radius:12px;color:#9b554a;font-size:13px;line-height:1.6;white-space:pre-wrap;text-align:left;overflow-wrap:anywhere;scroll-margin:80px 0 120px}

.client-booking-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:stretch}.client-booking-actions>button{width:100%;height:48px;min-height:48px;margin:0!important;padding:10px 8px!important;display:flex!important;align-items:center;justify-content:center;border:1px solid #d9cbbb;border-radius:12px;background:#faf8f4;font-size:13px;white-space:nowrap}.client-booking-actions>.client-booking-delete{color:#9b6657}

/* Recent service: one compact outline entry, no duplicate footer action. */
#clientLatest .list-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#clientLatest .list-heading h3{margin-right:auto}
#clientLatest .client-latest-add{min-height:44px;padding:8px 12px;border:1px solid #d9cbbb;border-radius:10px;background:#faf8f4;color:#816950;font-size:13px;line-height:1.4;white-space:nowrap}
#clientLatest .client-latest-add:active{background:#f1ebe2;border-color:#b69b7c}

/* Final121 compact product passes */
.product-passes{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}.pass-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px}.pass-card{padding:14px;border:1px solid #e5ddd2;border-radius:14px;background:#faf8f4;min-width:0}.pass-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.pass-card-head b{overflow-wrap:anywhere}.pass-card-balance{display:block;font-size:20px;color:var(--brown);margin:10px 0}.pass-card small{display:block;line-height:1.6}.pass-card-actions{display:flex;gap:8px;margin-top:12px}.pass-card-actions button{flex:1;min-height:44px;padding:8px;font-size:13px}.pass-record-panel{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:12px;background:#faf8f4}.pass-record-panel .field{margin:0 0 12px}.pass-record-panel .field:last-child{margin-bottom:0}#passCreateDialog,#passHistoryDialog{width:min(560px,calc(100vw - 28px));max-height:85dvh;overflow:auto;padding:22px;border:1px solid var(--line);border-radius:22px;background:var(--paper)}.pass-history-row{padding:14px 0;border-bottom:1px solid var(--line)}.pass-history-row p{margin:6px 0}#passNamePresets button{font-size:12px;padding:8px 10px}#passTotalUnits[hidden],#passUnitsField[hidden],#passRecordPanel[hidden]{display:none!important}@media(max-width:650px){.pass-cards{grid-template-columns:1fr}.pass-card{padding:12px}.pass-card-balance{font-size:19px}#passCreateDialog,#passHistoryDialog{padding:18px}.first-payment-row:has(#passRecordPanel){grid-template-columns:1fr}.pass-record-panel{margin:0;padding:12px}}
/* Final122: monetary payments and count passes are independent sections. */
.count-pass-section{border-top:1px solid var(--line,#e8e1d9);margin-top:20px;padding-top:16px}
.count-pass-row{display:grid;grid-template-columns:minmax(180px,1fr) 130px 60px;gap:12px;align-items:end;padding:14px 0;border-bottom:1px solid #eee7df}
.count-pass-row>.field-hint{grid-column:1/-1;margin:0}.count-pass-row .field{min-width:0;margin:0}
#addCountPass{margin-top:12px;min-height:44px}.count-pass-row button{min-height:44px}
.first-payment-row{display:flex;flex-direction:column;align-items:stretch;gap:12px}
#passRecordPanel{width:100%;margin:12px 0}.pass-card[role=button]{cursor:pointer}
#passEditDialog{width:min(560px,calc(100vw - 32px));max-height:85dvh;overflow:auto}
#passEditDialog form{display:grid;gap:12px}.primary-service-item[hidden]{display:none!important}
#countPassSection h4{margin:0 0 8px}.count-pass-row input{min-height:44px}
@media(max-width:650px){.count-pass-row{grid-template-columns:1fr 70px;gap:10px}.count-pass-row>.field:first-child{grid-column:1/-1}.count-pass-row>.field:nth-child(2){grid-column:1}.count-pass-row>.field-hint{grid-column:1/-1}.pass-card-actions{flex-wrap:wrap}}
/* Final122 phone-only settings density; all controls remain usable. */
@media(max-width:650px){
 #stylelogPreferences .preferences-list{gap:4px;margin-top:10px}
 #stylelogPreferences .preferences-item{padding:3px;gap:2px;border-radius:9px;grid-template-columns:28px minmax(0,1fr) 76px 40px 40px;align-items:center}
 #stylelogPreferences .preferences-item>.order-handle{grid-column:1;grid-row:1;width:28px;min-width:28px;height:40px;min-height:40px;padding:2px}
 #stylelogPreferences .preferences-item>.preference-name{grid-column:2;grid-row:1;margin:0;width:100%;min-width:0}
 #stylelogPreferences .preferences-item>.preference-price{grid-column:3/6;grid-row:1;max-width:110px;justify-self:end}
 #stylelogPreferences .preferences-item input[type=text]{height:40px;min-height:40px;max-height:40px;padding:5px;font-size:16px}
 #stylelogPreferences .preferences-item>.preference-check{grid-column:2;grid-row:2;justify-content:flex-end;height:40px;min-height:40px;font-size:11px}
 #stylelogPreferences .preferences-item>.text-button:not(.danger){grid-row:2;height:40px;min-height:40px;padding:3px}
 #stylelogPreferences .preferences-item>.text-button:nth-last-child(3){grid-column:3;justify-self:end;width:40px}
 #stylelogPreferences .preferences-item>.text-button:nth-last-child(2){grid-column:4;width:40px}
 #stylelogPreferences .preferences-item>.danger{grid-column:5;grid-row:2;height:40px;min-height:40px;padding:3px;font-size:11px}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]{grid-template-columns:28px minmax(58px,1fr) 30px 36px 40px 40px 40px}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-name{grid-column:2;grid-row:1}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker{grid-column:3;grid-row:1;height:40px;min-height:40px;width:30px;padding:0;font-size:0;border:0;background:transparent}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker:before{content:'분류';font-size:10px;color:var(--brown)}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-check{grid-column:4;grid-row:1;justify-content:center}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.text-button:nth-last-child(3){grid-column:5;grid-row:1}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.text-button:nth-last-child(2){grid-column:6;grid-row:1}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.danger{grid-column:7;grid-row:1}
}
@media(max-width:370px){
 #stylelogPreferences .preferences-item[data-preference-kind=payments]{grid-template-columns:28px minmax(0,1fr) 36px 40px 40px}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-name{grid-column:2/5;grid-row:1}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker{grid-column:5;grid-row:1;justify-self:end}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-check{grid-column:2;grid-row:2;justify-content:flex-end}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.text-button:nth-last-child(3){grid-column:3;grid-row:2}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.text-button:nth-last-child(2){grid-column:4;grid-row:2}
 #stylelogPreferences .preferences-item[data-preference-kind=payments]>.danger{grid-column:5;grid-row:2}
}

/* Final123: shared date controls; handedness applies only on phones. */
.schedule-date-control{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}
.schedule-date-control #scheduleDate{width:148px;text-align:center;flex:0 1 148px}
.schedule-date-control button{min-width:44px;min-height:44px;font-size:24px}
@media(max-width:650px){body[data-hand-mode=right] .schedule-date-control{justify-content:flex-end}body[data-hand-mode=left] .schedule-date-control{justify-content:flex-start}}
@media(min-width:651px){#scheduleView .schedule-date-control,#scheduleView .schedule-date-actions{justify-content:center!important}}

body[data-tablet=true] #scheduleView .schedule-date-control,body[data-tablet=true] #scheduleView .schedule-date-actions{justify-content:center!important}

/* Final124: the same home date strip across home, schedule and statistics. */
.date-switch{display:flex;align-items:center;width:100%;gap:0;background:#faf9f6;border:1px solid var(--line);border-radius:12px;min-height:52px;padding:3px;margin:12px 0 16px}
.date-switch>button{background:transparent;border:0;border-radius:8px;min-height:44px;color:var(--brown);padding:8px 10px;flex:0 0 44px;font-size:22px}
.date-switch>button:nth-child(2){flex:1;min-width:0;font-size:14px;font-weight:500;color:var(--ink);text-align:center}
#statsMonthlyFields{background:transparent;border:0;padding:0;margin:16px 0;box-shadow:none}.shared-date-nav{margin:0}.schedule-date-field{margin:0 0 16px}
#statsMonthDialog{width:min(480px,calc(100vw - 28px));padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--paper);max-height:85dvh;overflow:auto}
#statsMonthDialog .calendar-direct-options{position:static;width:100%;max-height:none;margin-top:14px}#statsMonthDialog .calendar-direct-nav{display:block}#statsMonthDialog>button{margin-top:16px}
#recordPaymentSection{display:flex;flex-direction:column;align-items:stretch;gap:12px}
#recordPaymentSection .first-payment-row{display:flex;flex-direction:column;align-items:stretch;width:100%;max-width:100%;gap:12px}
#recordPaymentSection .first-payment-row>.payment-selector{width:100%;max-width:100%}
#recordPaymentSection #passRecordPanel{width:100%;margin:0;min-width:0}
#recordPaymentSection #prepaidSplit,#recordPaymentSection #splitPaymentPanel{width:100%;margin:0}
.prepaid-topup-detail{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1;text-align:left;background:transparent;padding:8px 0;font-size:12px}.prepaid-topup-detail span{flex:1}.prepaid-topup.is-cancelled{opacity:.65}.prepaid-topup-info{padding:12px;background:var(--bg);border-radius:10px;line-height:1.6}
.revenue-activity summary{cursor:pointer;color:var(--brown);font-size:13px}

/* Final126: stable period dates, shared tablet alignment, compact booking settings. */
#statsDayField,#statsMonthlyFields,#statsPeriodFields{width:100%;max-width:620px;margin-inline:auto}
#statsMonthlyFields{margin:16px auto}
#statsPeriodFields .row{align-items:start;gap:12px}
#statsPeriodFields .field{margin:0;min-width:0}
#statsPeriodFields .shared-date-nav{height:64px;min-height:64px}
#statsPeriodFields .shared-date-nav>button:nth-child(2){padding:2px;line-height:1.4;font-size:14px}
#statsPeriodFields .shared-date-nav>button:nth-child(2)>span{display:block;white-space:nowrap;word-break:keep-all}
#statsPeriodFields>.muted{margin:18px 0 0}
#statsDayField .shared-date-nav>button:nth-child(2),#statsMonthLabel{white-space:nowrap;word-break:keep-all}
#statsResults{width:100%;max-width:1040px;margin-inline:auto}
#stylelogPreferences .booking-preferences{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;max-width:720px;margin:14px auto 0;align-items:start}
#stylelogPreferences .booking-preferences>.field{margin:0;gap:6px;min-width:0}
#stylelogPreferences .booking-preferences input,#stylelogPreferences .booking-preferences .select-choice-picker{height:46px;min-height:46px;width:100%;padding:8px 12px;text-align:left}
#stylelogPreferences .booking-preferences>.field:nth-child(5),#stylelogPreferences .booking-preferences>.field-hint{grid-column:1/-1}
#stylelogPreferences .booking-preferences>.field-hint{margin:2px 0 0}
.preferences-item.drop-target{outline:2px solid #b8a58e;outline-offset:1px}
@media(max-width:420px){
 #statsPeriodFields{padding:16px}
 #statsPeriodFields .row{gap:10px}
 #statsPeriodFields .shared-date-nav>button:not(:nth-child(2)){flex-basis:32px;width:32px;padding:4px;min-height:56px}
 #statsPeriodFields .shared-date-nav>button:nth-child(2){padding:0;font-size:clamp(12px,3.3vw,14px)}
 #stylelogPreferences .booking-preferences{gap:12px}
}

/* v1.0: settings density only; payment cards, columns, amounts and memos unchanged. */
.settings-grid>.card,.settings-data-management{padding:20px}
.settings-grid .field{margin-top:10px;gap:5px}
.settings-grid input:not([type=checkbox]):not([type=radio]),.settings-grid select,.settings-grid .select-choice-picker{min-height:44px;height:44px;padding:8px 10px}
.settings-grid .preference-section{margin-top:10px;padding-top:10px}
.settings-grid .preferences-fields{gap:10px;margin-top:10px}
.settings-grid .field-hint{margin:8px 0;line-height:1.5}
.settings-grid .toolbar{gap:8px;margin-top:10px;margin-bottom:6px}
.settings-grid .prepaid-preset-row{display:flex;flex-wrap:nowrap;align-items:center;margin:0;gap:8px}
.settings-grid .prepaid-preset-row>input{flex:1;min-width:0}
.settings-grid .prepaid-preset-row>.text-button{flex:0 0 auto;min-height:44px;margin:0}
.settings-data-management .settings-export,.settings-data-management .settings-transfer{padding:12px 0}
.settings-data-management .row{gap:12px}
.trade-recognition-hint{line-height:1.6;margin:8px 0 14px}
#countPassSection #purchaseCountPass{min-height:44px;margin:0 0 0 8px}

#settingsView .settings-grid>.card{padding:18px}
#settingsView .settings-grid .field{margin-top:10px;gap:5px}
#settingsView #stylelogPreferences .preferences-fields{gap:10px;margin-top:10px}
#settingsView #stylelogPreferences .preferences-fields input,#settingsView #stylelogPreferences .preferences-fields .select-choice-picker{height:44px;min-height:44px;padding:8px 10px}
#settingsView .settings-grid .preference-section{margin-top:10px;padding-top:10px}

/* v1.0 tablet alignment: existing form and payment structure preserved. */
@media(min-width:768px){
 :is(#homeView,#listView,#scheduleView,#statsView,#galleryView,#settingsView)>.page-heading{
  flex-direction:column;align-items:center;justify-content:center;text-align:center;
 }
 #listView>.page-heading .contact-heading-actions{justify-content:center}
 #listView .wedding-list-tools,#galleryFilters,#scheduleTypeFilters{justify-content:center}
 #statsView>.toolbar{justify-content:center}
 #editView>.page-heading{max-width:900px;margin-left:auto;margin-right:auto;justify-content:flex-start}
 #editView .record-date-row{width:100%;max-width:420px;margin-left:auto;margin-right:auto;text-align:center}
 #editView .record-date-row>.field{width:100%;margin-left:0;margin-right:0}
 #editView .record-date-row #date{text-align:center}
 #editView .service-lines .billing-item{grid-template-columns:minmax(0,2fr) minmax(0,1.4fr) minmax(80px,.8fr) auto;gap:12px;align-items:end}
 #editView .service-lines .billing-item>.field{grid-row:1;grid-column:auto;margin:0}
 #editView .service-lines .billing-item>.danger{grid-column:4;grid-row:1;justify-self:end;align-self:end;min-width:44px;min-height:44px;padding:8px}
 #editView .service-lines .billing-item>.billing-item-net{grid-column:1/-1;grid-row:2}
}

/* v1.0: action positions follow the existing device-local hand preference. */
body[data-hand-mode=right] #editView>.page-heading{justify-content:flex-end}
body[data-hand-mode=left] #editView>.page-heading{justify-content:flex-start}
@media(min-width:768px){
 body[data-hand-mode=left] #editView .service-lines .billing-item{grid-template-columns:auto minmax(0,2fr) minmax(0,1.4fr) minmax(80px,.8fr)}
 body[data-hand-mode=left] #editView .service-lines .billing-item>.danger{grid-column:1;justify-self:start}
 body[data-hand-mode=left] #editView .service-lines .billing-item>.field:nth-child(1){grid-column:2}
 body[data-hand-mode=left] #editView .service-lines .billing-item>.field:nth-child(2){grid-column:3}
 body[data-hand-mode=left] #editView .service-lines .billing-item>.field:nth-child(3){grid-column:4}
}

/* v1.0 final date and compact form alignment. */
#paymentMethods.payment-menu,#piecePaymentMethods.payment-menu{left:0;right:auto;width:100%;padding:6px;gap:4px}
#paymentMethods.payment-menu button,#piecePaymentMethods.payment-menu button{min-height:44px;font-size:14px;padding:11px 15px}
#editView .record-date-row .date-switch{width:100%;margin:0}
.stats-controls{display:flex;flex-direction:column;align-items:center;gap:14px;margin:16px 0}
#statsView .stats-tabs{margin:0;justify-content:center}
.stats-date-area{width:100%;max-width:620px;min-width:0}
#statsView .stats-date-area :is(#statsDayField,#statsMonthlyFields,#statsPeriodFields){width:100%;margin:0}
.stats-current-actions{width:100%;max-width:620px;min-height:44px;display:flex;justify-content:flex-end}
#statsView .stats-controls .stats-current-actions #statsMonth{min-height:44px}
@media(max-width:650px){
 .stats-controls{gap:10px;margin-top:16px}
 .stats-current-actions{order:-1;min-height:44px}
 #statsView .stats-tabs{width:100%;justify-content:center;gap:8px}
 #statsView .stats-tabs button{padding:10px 12px;min-width:0}
 .stats-date-area{margin-top:4px}
 #newRegistrationWedding .registration-memo-grid{grid-template-columns:minmax(0,1fr)}
 #newRegistrationWedding .registration-stage>.field{width:100%}
}

/* UI FINAL 01: iPad booking form only; preserve phone and desktop layouts. */
@media(min-width:651px){
 body[data-tablet=true] #appointmentForm>label.field:has(#appointmentDate),
 body[data-tablet=true] #appointmentForm .appointment-time-inputs>.field,
 body[data-tablet=true] #appointmentForm #appointmentServiceField{text-align:center;margin-top:10px;gap:5px}
 body[data-tablet=true] #appointmentForm :is(#appointmentDate,#appointmentTime,#appointmentOutTime,#appointmentServicePicker){text-align:center;min-height:44px;height:44px;padding:8px 12px}
 body[data-tablet=true] #appointmentForm .appointment-time-inputs{gap:12px;align-items:start;margin-top:10px}
 body[data-tablet=true] #appointmentForm .appointment-time-inputs>.field{margin-top:0}
 body[data-tablet=true] #appointmentForm #appointmentServiceField{margin-bottom:0}
 body[data-tablet=true] #appointmentForm #bookingServices{margin-top:6px;text-align:center}
 body[data-tablet=true] #appointmentForm #bookingAddService{display:block;width:max-content;max-width:100%;min-height:44px;margin:6px auto 0;padding:8px 14px}
 body[data-tablet=true] #appointmentForm #bookingExtraServices:empty{display:none}
 body[data-tablet=true] #appointmentForm #bookingExtraServices:not(:empty){margin-top:8px;text-align:left}
 body[data-tablet=true] #appointmentForm textarea{text-align:left}
}

/* UI FINAL 01 PART 1: phone-only density; existing controls and logic retained. */
@media(max-width:650px){
 .service-lines{gap:8px;margin:10px 0}
 .service-lines .billing-item,.service-lines .primary-service-item{grid-template-columns:minmax(0,2fr) minmax(0,1fr) 52px;gap:7px 8px;margin:0;padding:10px;border:1px solid var(--line);border-radius:12px;background:#faf8f4;align-items:end}
 .service-lines #billingItems{display:grid;gap:8px}
 .service-lines .billing-item>.field{margin:0;gap:4px;min-width:0;position:relative}
 .service-lines .billing-item>.field>.optional{position:absolute;top:0;right:0;font-size:10px}
 .service-lines .billing-item>.field:first-child{grid-column:1/3;grid-row:1}
 .service-lines .billing-item>.field:nth-child(2){grid-column:1/3;grid-row:2}
 .service-lines .billing-item>.billing-rate-label{grid-column:3;grid-row:2}
 .service-lines .billing-item>.danger{grid-column:3;grid-row:1;align-self:end;justify-self:end;min-width:44px;min-height:44px;padding:8px 4px}
 .service-lines .billing-item>.billing-item-net{grid-column:1/-1;grid-row:3;margin:0;padding:0;line-height:1.5}
 #editView .service-lines .billing-item :is(input,.select-choice-picker){height:44px;min-height:44px;padding:8px 10px}
 .service-lines .billing-item>.field:nth-child(2) input{font-size:17px;font-weight:600}
 .service-lines .billing-rate-label input{padding:8px 5px}
 .service-lines .select-choice-picker{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #billingAdd,#bookingAddService{width:max-content;max-width:100%;min-height:44px;margin:4px 0 0;padding:8px 14px}
 #editView .billing-panel{padding:12px!important;margin:10px 0}
 #recordPaymentSection{gap:8px;padding:12px 0;margin:12px 0}
 #recordPaymentSection h4{margin:0 0 4px}
 #recordPaymentSection .first-payment-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:8px;align-items:end}
 #recordPaymentSection .first-payment-row>.payment-selector{grid-column:1;max-width:none}
 #recordPaymentSection .first-payment-row>.payment-selector:only-child{grid-column:1/-1}
 #recordPaymentSection .first-payment-row:has(>.field[hidden])>.payment-selector{grid-column:1/-1}
 #recordPaymentSection .first-payment-row>.field{grid-column:2;grid-row:1;margin:0;gap:4px}
 #recordPaymentSection .split-payment-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:8px;margin:8px 0;align-items:end}
 #recordPaymentSection .split-payment-row>.select-choice-picker{grid-column:1;grid-row:1}
 #recordPaymentSection .split-payment-row>input{grid-column:2;grid-row:1}
 #recordPaymentSection .split-payment-row>.danger{grid-column:3;grid-row:1;min-width:44px;min-height:44px;padding:8px 4px}
 #editView #recordPaymentSection :is(input,.select-choice-picker,#paymentToggle),#editView #piecePaymentSection :is(input,.select-choice-picker,#piecePaymentToggle){min-height:44px;height:44px;padding:8px 10px;min-width:0;max-width:100%}
 #recordPaymentSection .payment-label{margin-bottom:4px}
 #recordPaymentSection :is(.field-hint,p){margin:6px 0;line-height:1.5}
 #recordPaymentSection :is(#prepaidSplit,#passRecordPanel){padding:10px}
 #recordPaymentSection .field{gap:4px;margin:6px 0}
 #recordPaymentSection .row{gap:8px}
 #splitPaymentFields{margin:0}
 #addSplitPayment,#addCountPass,#addPiecePayment{width:max-content;max-width:100%;min-height:44px;padding:8px 12px;margin:4px 0}
 .count-pass-section{margin-top:10px;padding-top:10px}
 .count-pass-row{gap:6px 8px;padding:8px 0}
 #piecePaymentSection{padding:10px;margin:6px 0}
 #piecePaymentSection .amount-payment-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:end}
 #piecePaymentSection .field,#piecePaymentSection .payment-selector{margin:0;gap:4px;min-width:0}
 #piecePaymentSection .field-hint,#chargeTotal{margin:6px 0}
 #appointmentForm .field{margin:10px 0 0;gap:4px;min-width:0}
 #scheduleView #appointmentForm :is(input,.select-choice-picker,#appointmentKindPicker){min-height:44px;height:44px;padding:8px 10px;min-width:0;max-width:100%}
 #appointmentForm .appointment-time-inputs{gap:8px;align-items:start;margin-top:10px}
 #appointmentForm .appointment-time-inputs>.field{margin-top:0}
 #appointmentForm textarea{padding:10px;text-align:left}
 #appointmentForm .field-hint{margin:6px 0}
 #appointmentForm .customer-results:empty{display:none}
 #appointmentForm #appointmentServiceField{margin-bottom:0}
 #appointmentForm #bookingServices{margin:4px 0 8px}
 #appointmentForm #bookingExtraServices:empty{display:none}
 #appointmentForm .booking-extra-service{gap:8px;margin:6px 0}
 #appointmentForm>.toolbar{margin-top:12px;gap:8px}
 #appointmentForm .select-choice-picker{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* UI FINAL 01 PART 2: mobile statistics/settings/registration/gallery only. */
@media(max-width:650px){
 #statsView>.page-heading{margin-top:14px;margin-bottom:8px}
 #statsView>.page-heading p{margin-top:6px}
 #statsView .stats-controls{gap:6px;margin:8px 0 12px}
 #statsView .stats-current-actions{justify-content:flex-end;min-height:44px}
 #statsView .stats-date-area{margin-top:0}
 #statsView .stats-tabs button{min-height:44px;padding:8px 12px}
 #settingsView .settings-grid{gap:10px}
 #settingsView .settings-grid>.card{padding:14px}
 #settingsView .settings-grid h3{margin-bottom:6px}
 #settingsView .settings-grid .field{margin-top:8px;gap:4px}
 #settingsView .settings-grid :is(input:not([type=checkbox]):not([type=radio]),select,.select-choice-picker){height:44px;min-height:44px;padding:8px 10px}
 #settingsView .settings-grid .field-hint{margin:6px 0}
 #settingsView .settings-grid .preference-section{margin-top:6px;padding:8px 0}
 #settingsView #stylelogPreferences .preferences-fields{gap:8px;margin-top:8px}
 #settingsView #stylelogPreferences .preferences-fields>.field{margin:0}
 #settingsView #stylelogPreferences .preferences-list{gap:4px;margin-top:8px}
 #settingsView #stylelogPreferences .preferences-item{grid-template-columns:44px minmax(0,1fr) 44px 44px 44px;padding:3px;gap:2px;border-radius:10px}
 #settingsView #stylelogPreferences .preferences-item>.order-handle{grid-column:1;grid-row:1;width:44px;min-width:44px;min-height:44px;height:44px;padding:6px}
 #settingsView #stylelogPreferences .preferences-item>.preference-name{grid-column:2/4;grid-row:1;margin:0;width:100%;min-width:0}
 #settingsView #stylelogPreferences .preferences-item>.preference-price{grid-column:4/6;grid-row:1;max-width:none;width:100%}
 #settingsView #stylelogPreferences .preferences-item input[type=text]{height:44px;min-height:44px;max-height:44px;padding:7px 6px}
 #settingsView #stylelogPreferences .preferences-item>.preference-check{grid-column:2;grid-row:2;justify-content:flex-end;min-height:44px;height:44px;margin:0;gap:3px}
 #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(3){grid-column:3;grid-row:2;width:44px;min-height:44px;height:44px;padding:6px}
 #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(2){grid-column:4;grid-row:2;width:44px;min-height:44px;height:44px;padding:6px}
 #settingsView #stylelogPreferences .preferences-item>.danger{grid-column:5;grid-row:2;width:44px;min-height:44px;height:44px;padding:6px 2px}
 #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-name{grid-column:2/5;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker{grid-column:5;grid-row:1;width:44px;min-height:44px;height:44px;padding:4px;font-size:0}
 #settingsView .prepaid-preset-row{margin:0;gap:6px}
 #settingsView .prepaid-preset-row>.text-button{min-width:44px;min-height:44px;padding:8px 4px}
 #settingsView .settings-data-management :is(.settings-export,.settings-transfer){margin-top:12px;padding:8px 0}
 #settingsView .settings-data-management .row{gap:8px}
 #settingsView .settings-grid .toolbar{margin-top:8px;margin-bottom:4px;gap:6px}
 body[data-new-client=true] #editView>.page-heading{margin:14px 0 12px;text-align:left;align-items:center;justify-content:space-between}
 body[data-new-client=true] #editView>.page-heading h2{font-size:23px}
 body[data-new-client=true] #editView>.page-heading p{margin-top:6px}
 body[data-view=edit][data-new-client=true] .profile-card{padding:16px}
 body[data-view=edit][data-new-client=true] #clientTypeField{margin:0 0 10px;gap:4px}
 body[data-view=edit][data-new-client=true] #clientInfoEditor>.profile-fields{gap:10px}
 body[data-view=edit][data-new-client=true] #clientInfoEditor>.field{margin-top:10px;gap:4px}
 body[data-new-client=true] #clientInfoEditor .field{gap:4px}
 body[data-new-client=true] #clientInfoEditor .profile-fields input{margin-top:0;height:44px;min-height:44px;padding:8px 10px}
 body[data-new-client=true] #clientInfoEditor #clientTypePicker{height:44px;min-height:44px;padding:8px 10px}
 body[data-new-client=true] #clientInfoEditor textarea{min-height:72px!important;padding:10px}
 body[data-view=edit][data-new-client=true] .registration-wedding{margin-top:12px;padding:12px}
 body[data-new-client=true] .registration-wedding .field{margin-top:10px;gap:4px}
 body[data-new-client=true] .registration-wedding h3{margin-bottom:8px}
 body[data-new-client=true] .registration-stage+.registration-stage{margin-top:14px;padding-top:12px}
 body[data-new-client=true] #clientSaveActions{margin-top:12px}
 #galleryGrid>p.muted:only-child{grid-column:1/-1;width:100%;text-align:center;padding:24px 8px;margin:0}
}

@media(min-width:520px) and (max-width:650px){
 #settingsView #stylelogPreferences .preferences-item{grid-template-columns:44px minmax(0,1fr) 84px 44px 44px 44px 44px}
 #settingsView #stylelogPreferences .preferences-item>.preference-name{grid-column:2;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.preference-price{grid-column:3;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.preference-check{grid-column:4;grid-row:1;justify-content:center}
 #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(3){grid-column:5;grid-row:1;min-width:0;width:100%}
 #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(2){grid-column:6;grid-row:1;min-width:0;width:100%}
 #settingsView #stylelogPreferences .preferences-item>.danger{grid-column:7;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-name{grid-column:2;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker{grid-column:3;grid-row:1;width:100%}
}

/* UI FINAL 01 PART 3: wide-screen new-client form only; mobile remains unchanged. */
@media(min-width:651px){
 body[data-view=edit][data-new-client=true] #editView>.page-heading{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;max-width:780px;margin:18px auto 14px;text-align:left;gap:16px}
 body[data-new-client=true] #editView>.page-heading>div{min-width:0;text-align:left}
 body[data-new-client=true] #editView>.page-heading #back{flex:0 0 auto;margin:0}
 body[data-view=edit][data-new-client=true] .profile-card{padding:20px}
 body[data-view=edit][data-new-client=true] #clientTypeField{margin:0 0 12px;gap:6px}
 body[data-view=edit][data-new-client=true] #clientInfoEditor>.profile-fields{gap:14px}
 body[data-view=edit][data-new-client=true] #clientInfoEditor>.field{margin-top:12px;gap:6px}
 body[data-new-client=true] #clientInfoEditor .profile-fields>.field{margin:0;gap:6px}
 body[data-new-client=true] #clientInfoEditor .profile-fields input{margin-top:0}
 body[data-view=edit][data-new-client=true] .registration-wedding{margin-top:12px;padding:16px;gap:0 16px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 body[data-new-client=true] .registration-wedding>h3{margin-bottom:10px}
 body[data-new-client=true] .registration-stage{min-width:0;text-align:center}
 body[data-new-client=true] .registration-stage h4{margin:0 0 6px;text-align:center}
 body[data-new-client=true] .registration-stage .field{margin:8px 0 0;gap:5px;text-align:center;min-width:0}
 body[data-new-client=true] .registration-stage .field:has(>#weddingDate)>span,
 body[data-new-client=true] .registration-stage .field:has(>#weddingCeremonyDate)>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body[data-new-client=true] .registration-stage :is(input,.wedding-clear-date){text-align:center}
 body[data-new-client=true] .registration-stage .wedding-clear-date{align-self:center;min-height:44px;padding:6px 12px}
 body[data-new-client=true] .registration-time-row{gap:10px;align-items:start}
 body[data-new-client=true] .registration-stage textarea{text-align:left;height:88px;min-height:88px;max-height:240px}
 body[data-new-client=true] .registration-memo-grid{margin-top:8px;gap:0 16px}
 body[data-new-client=true] #clientSaveActions{margin-top:14px}
 #galleryGrid>p.muted:only-child{grid-column:1/-1;width:100%;text-align:center;margin:0;padding:28px 8px}
}

/* New-client mobile basic fields: center within each field, lift spacing slightly. */
@media(max-width:650px){
 body[data-view=edit][data-new-client=true] #clientTypeField{margin:0 auto 6px;text-align:center}
 body[data-new-client=true] #clientInfoEditor>.profile-fields>.field,
 body[data-new-client=true] #clientInfoEditor>.field:has(>#profile){text-align:center}
 body[data-new-client=true] #clientInfoEditor :is(#name,#phone,#profile){text-align:center}
 body[data-new-client=true] #clientInfoEditor #clientTypePicker{justify-content:center;position:relative;text-align:center;padding-inline:30px}
 body[data-new-client=true] #clientTypePicker::after{position:absolute;right:12px;margin:0}
 body[data-view=edit][data-new-client=true] #clientInfoEditor>.field:has(>#profile){margin-top:6px}
}

/* Mobile new-client wedding details: centered fields, redundant date labels hidden. */
@media(max-width:650px){
 body[data-new-client=true] #newRegistrationWedding :is(h3,h4,.field){text-align:center}
 body[data-new-client=true] #newRegistrationWedding :is(input,textarea){text-align:center}
 body[data-new-client=true] #newRegistrationWedding .field:has(>#weddingDate)>span,
 body[data-new-client=true] #newRegistrationWedding .field:has(>#weddingCeremonyDate)>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body[data-new-client=true] #newRegistrationWedding .wedding-clear-date{align-self:flex-end;text-align:right}
}

/* iPad new-client basic field labels align with their own controls. */
@media(min-width:651px){
 body[data-tablet=true][data-view=edit][data-new-client=true] #clientTypeField{margin-inline:auto;text-align:center}
 body[data-tablet=true][data-new-client=true] #clientInfoEditor>.profile-fields>.field,
 body[data-tablet=true][data-new-client=true] #clientInfoEditor>.field:has(>#profile){text-align:center}
 body[data-tablet=true][data-new-client=true] #clientTypePicker{text-align:center;position:relative;padding-inline:30px}
 body[data-tablet=true][data-new-client=true] #clientTypePicker::after{position:absolute;right:12px;margin:0}
}

/* iPad new-client bridal text alignment and compact memo/date spacing. */
@media(min-width:651px){
 body[data-tablet=true][data-new-client=true] #clientInfoEditor :is(#name,#phone,#profile){text-align:center}
 body[data-tablet=true][data-new-client=true] #clientInfoEditor #profile{height:44px;min-height:44px!important;padding:10px;line-height:22px}
 body[data-tablet=true][data-new-client=true] #newRegistrationWedding :is(.field,h3,input,textarea){text-align:center}
 body[data-tablet=true][data-new-client=true] .registration-stage .field:has(>.wedding-clear-date){gap:2px}
 body[data-tablet=true][data-new-client=true] .registration-stage .wedding-clear-date{margin-top:-3px}
 body[data-tablet=true][data-new-client=true] #registrationWeddingMemos{margin-top:2px}
 body[data-tablet=true][data-new-client=true] #registrationWeddingMemos>.field{margin-top:4px;gap:5px}
}

/* Mobile service lines: service, amount, discount, delete share one input row. */
@media(max-width:650px){
 .service-lines .billing-item,.service-lines .primary-service-item{grid-template-columns:minmax(0,.85fr) minmax(0,1.2fr) 44px 44px;gap:5px 6px;padding:8px;align-items:end}
 .service-lines .billing-item>.field:first-child{grid-column:1;grid-row:1}
 .service-lines .billing-item>.field:nth-child(2){grid-column:2;grid-row:1}
 .service-lines .billing-item>.billing-rate-label{grid-column:3;grid-row:1}
 .service-lines .billing-item>.danger{grid-column:4;grid-row:1;justify-self:stretch;padding:8px 0}
 .service-lines .billing-item>.billing-item-net{grid-column:1/-1;grid-row:2}
 .service-lines .billing-item>.field{font-size:11px;white-space:nowrap}
 .service-lines .billing-item>.field>.optional{display:none}
 #editView .service-lines .billing-item :is(input,.select-choice-picker){padding:8px 5px;font-size:14px;min-width:0;width:100%}
 .service-lines .billing-item>.field:nth-child(2) input{font-size:15px}
 .service-lines .billing-rate-label input{text-align:center}
}

/* Mobile statistics: current-month action shares subtitle row; period dates stay inline. */
@media(max-width:650px){
 #statsView{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:14px}
 #statsView[hidden]{display:none!important}
 #statsView>.page-heading,#statsView>.page-heading>div,#statsView>.stats-controls{display:contents}
 #statsView>.page-heading .eyebrow{grid-column:1/-1;grid-row:1;margin:0}
 #statsView>.page-heading h2{grid-column:1/-1;grid-row:2}
 #statsView>.page-heading p{grid-column:1;grid-row:3;margin:0;align-self:start}
 #statsView .stats-current-actions{grid-column:2;grid-row:3;width:auto;min-height:44px;align-self:start}
 #statsView .stats-current-actions:has(#statsMonth[hidden]){display:none}
 #statsView:has(#statsMonth[hidden])>.page-heading p{grid-column:1/-1}
 #statsView .stats-tabs{grid-column:1/-1;grid-row:4;margin-top:0}
 #statsView .stats-date-area{grid-column:1/-1;grid-row:5;margin-top:0;justify-self:center}
 #statsView>:is(#statsSetup,#statsResults){grid-column:1/-1}
 #statsPeriodFields .shared-date-nav{height:44px;min-height:44px;gap:2px}
 #statsPeriodFields .shared-date-nav>button:not(:nth-child(2)){flex:0 0 24px;width:24px;min-height:44px;padding:0}
 #statsPeriodFields .shared-date-nav>button:nth-child(2){padding:0;font-size:clamp(10px,2.8vw,13px);white-space:nowrap;min-width:0}
 #statsPeriodFields .shared-date-nav>button:nth-child(2)>span{display:inline}
 #statsPeriodFields .shared-date-nav>button:nth-child(2)>span+span::before{content:' '}
}

/* iPad statistics: centered current-month action and inline period dates. */
@media(min-width:651px){
 body[data-tablet=true] #statsView .stats-current-actions{justify-content:center}
 body[data-tablet=true] #statsPeriodFields .field{text-align:center}
 body[data-tablet=true] #statsPeriodFields .shared-date-nav>button:nth-child(2){white-space:nowrap}
 body[data-tablet=true] #statsPeriodFields .shared-date-nav>button:nth-child(2)>span{display:inline}
 body[data-tablet=true] #statsPeriodFields .shared-date-nav>button:nth-child(2)>span+span::before{content:' '}
}

/* Compact single-row settings menus; preserve all existing actions. */
@media(max-width:650px){
#settingsView #stylelogPreferences .preferences-item{display:grid;grid-template-columns:24px minmax(0,1fr) 66px 40px 24px 24px 28px;gap:3px;padding:3px;align-items:center;border-radius:10px}
#settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]{grid-template-columns:24px minmax(0,1fr) 30px 40px 24px 24px 28px}
#settingsView #stylelogPreferences .preferences-item>:is(.order-handle,.preference-name,.preference-price,.select-choice-picker,.preference-check,.text-button){grid-row:1;margin:0;min-width:0;max-width:none;width:100%;height:44px;min-height:44px;max-height:44px;padding:4px;font-size:12px;justify-self:stretch}
#settingsView #stylelogPreferences .preferences-item>.order-handle{grid-column:1;grid-row:1}
#settingsView #stylelogPreferences .preferences-item>.preference-name{grid-column:2;grid-row:1}
#settingsView #stylelogPreferences .preferences-item>.preference-price{grid-column:3;grid-row:1}
#settingsView #stylelogPreferences .preferences-item>.select-choice-picker{grid-column:3;grid-row:1}
#settingsView #stylelogPreferences .preferences-item>.preference-check{grid-column:4;grid-row:1}
#settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(3){grid-column:5;grid-row:1;min-width:0;width:100%}
#settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(2){grid-column:6;grid-row:1;min-width:0;width:100%}
#settingsView #stylelogPreferences .preferences-item>.danger{grid-column:7;grid-row:1}
#settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-name{grid-column:2;grid-row:1}
#settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker{grid-column:3;grid-row:1;min-width:0;width:100%;font-size:0;padding:0;border:0;background:transparent}
#settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker::before{content:"분류";font-size:10px}
#settingsView #stylelogPreferences .preferences-item>.preference-check{justify-content:center;gap:2px;font-size:10px;padding:0;white-space:nowrap}
#settingsView #stylelogPreferences .preferences-item .preference-check input{width:14px;height:14px;min-height:14px;margin:0}
#settingsView #stylelogPreferences .preferences-item>.danger{font-size:10px;padding:0}
#settingsView #stylelogPreferences .preferences-item input[type=text]{font-size:12px;padding:4px}
#settingsView #stylelogPreferences .preferences-list{gap:4px}
}
@media(min-width:651px){
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item{display:grid;grid-template-columns:32px minmax(0,1fr) 100px 52px 36px 36px 40px;gap:3px;padding:3px;align-items:center;border-radius:10px}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]{grid-template-columns:32px minmax(0,1fr) 80px 52px 36px 36px 40px}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>:is(.order-handle,.preference-name,.preference-price,.select-choice-picker,.preference-check,.text-button){grid-row:1;margin:0;min-width:0;max-width:none;width:100%;height:44px;min-height:44px;max-height:44px;padding:4px;font-size:14px;justify-self:stretch}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.order-handle{grid-column:1;grid-row:1}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.preference-name{grid-column:2;grid-row:1}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.preference-price{grid-column:3;grid-row:1}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.select-choice-picker{grid-column:3;grid-row:1}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.preference-check{grid-column:4;grid-row:1}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(3){grid-column:5;grid-row:1;min-width:0;width:100%}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(2){grid-column:6;grid-row:1;min-width:0;width:100%}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.danger{grid-column:7;grid-row:1}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-name{grid-column:2;grid-row:1}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker{grid-column:3;grid-row:1;min-width:0;width:100%;font-size:0;padding:0;border:0;background:transparent}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker::before{content:"분류";font-size:10px}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.preference-check{justify-content:center;gap:2px;font-size:10px;padding:0;white-space:nowrap}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item .preference-check input{width:14px;height:14px;min-height:14px;margin:0}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item>.danger{font-size:10px;padding:0}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item input[type=text]{font-size:14px;padding:4px}
body[data-tablet=true] #settingsView #stylelogPreferences .preferences-list{gap:4px}
}
@media(max-width:650px){#settingsView #stylelogPreferences>.toolbar{justify-content:flex-end}}
@media(min-width:651px){body[data-tablet=true] #settingsView #stylelogPreferences>.toolbar{justify-content:center}}

/* Record customer context and mobile right-hand actions. */
@media(max-width:650px){
 #recordClientContext{text-align:center}
 #editView #billingAdd,#editView #addSplitPayment,#editView #addPiecePayment,#editView #prepaidAddFromRecord{display:block;width:max-content;max-width:100%;margin-left:auto;margin-right:0;justify-self:end;align-self:flex-end}
 #editView #countPassSection{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px 8px}
 #editView #countPassSection>:is(h4,p,#countPassRows){flex:0 0 100%;min-width:0}
 #editView #countPassSection>:is(#addCountPass,#purchaseCountPass){margin:0;width:max-content;max-width:100%}
}
@media(min-width:651px){body[data-tablet=true] #recordClientContext{text-align:center}}

/* Schedule selection uses existing action controls at compact touch size. */
#bookingSelectionHead button{padding:6px 12px;font-size:12px;min-height:44px}

/* Workspace permission UI; dimensions of existing screens are unchanged. */
.workspace-operational-only .service-lines,.workspace-operational-only .billing-panel,.workspace-operational-only #recordPaymentSection,.workspace-operational-only .piece-fields,.workspace-operational-only #reserveRecord,.workspace-operational-only #completeRecord{display:none!important}
#workspaceAdmin .toolbar{flex-wrap:wrap;gap:8px}#workspaceAdmin input,#workspaceAdmin select{min-width:0;max-width:100%}#workspaceAdmin .toolbar>input{flex:1 1 140px}#workspaceControls{flex-wrap:wrap}

.workspace-operational-only #piecePaymentSection,.workspace-operational-only #addPiecePayment,.workspace-operational-only .record-count-passes,.workspace-operational-only #chargeTotal{display:none!important}

.workspace-operational-only #countPassSection{display:none!important}

body[data-workspace-role=staff] [data-workspace-admin-only],body[data-workspace-role=staff]:not([data-permission-mode=granular]) #profileDelete,body[data-workspace-role=staff]:not([data-permission-mode=granular]) #delete{display:none!important}

#workspaceAdmin .toolbar>span{flex:1 1 100%;min-width:0;overflow-wrap:anywhere}#workspaceAdmin pre{white-space:pre-wrap;overflow-wrap:anywhere}#workspaceAdmin button{min-height:44px}#workspaceControls select{max-width:100%;min-width:0}#workspaceControls span{overflow-wrap:anywhere}

/* PHOTO3_AUTH2 UI1: only the employee management / audit card. */
#workspaceAdmin .workspace-admin-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
#workspaceAdmin .workspace-admin-heading h3{margin:0}
#workspaceAdmin .workspace-admin-heading>button{flex:0 0 auto}
#workspaceAdmin button{font-size:12px;white-space:nowrap;padding:8px 10px}
#workspaceAdmin .workspace-member-list{display:grid;gap:6px}
#workspaceAdmin .workspace-member{min-width:0;border:1px solid var(--line);border-radius:12px;padding:6px 10px;background:var(--paper)}
#workspaceAdmin .workspace-member-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}
#workspaceAdmin .workspace-member-identity{display:flex;align-items:center;gap:7px;min-width:0}
#workspaceAdmin .workspace-member-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;font-size:13px}
#workspaceAdmin .workspace-member-role,#workspaceAdmin .workspace-member-state{flex:0 0 auto;white-space:nowrap;font-size:10px;line-height:1.6;padding:2px 6px;border-radius:6px}
#workspaceAdmin .workspace-member-role{color:var(--brown);background:var(--soft);font-weight:600}
#workspaceAdmin .workspace-member-state{color:var(--muted);background:var(--bg)}
#workspaceAdmin .workspace-member-state[data-active=true]{color:var(--brown)}
#workspaceAdmin .workspace-member-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}
#workspaceAdmin .workspace-member-editor{display:grid;grid-template-columns:minmax(0,1fr) 110px auto;align-items:end;gap:10px;border-top:1px solid var(--line);padding-top:10px;margin-top:6px;padding-bottom:4px}
#workspaceAdmin .workspace-member-editor .field{margin:0;gap:4px}
#workspaceAdmin .workspace-staff-create{background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:12px}
#workspaceAdmin .workspace-create-form,#workspaceAdmin .workspace-link-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#workspaceAdmin .workspace-create-form .field,#workspaceAdmin .workspace-link-form .field{margin:0;gap:4px}
#workspaceAdmin .workspace-create-form>button,#workspaceAdmin .workspace-link-form>button{grid-column:1/-1;justify-self:start;max-width:100%;white-space:normal}
#workspaceAdmin .workspace-existing-account{border-top:1px solid var(--line);margin-top:12px;padding-top:4px}
#workspaceAdmin .workspace-link-form{padding-top:6px}
#workspaceAdmin .workspace-audit-section{border-top:1px solid var(--line);margin-top:12px;padding-top:4px}
#workspaceAdmin summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;cursor:pointer;list-style:none;color:var(--brown);font-size:12px;font-weight:600}
#workspaceAdmin summary::-webkit-details-marker{display:none}
#workspaceAdmin summary::after{content:'+';font-size:18px;font-weight:400}
#workspaceAdmin details[open]>summary::after{content:'−'}
#workspaceAdmin summary:focus-visible{outline:2px solid var(--brown);outline-offset:2px;border-radius:6px}
#workspaceAdmin .workspace-audit-list{margin-top:6px;max-height:320px;overflow:auto;overscroll-behavior:contain}
#workspaceAdmin .workspace-audit-list p{margin:0;padding:8px 0;border-bottom:1px solid var(--line);font-size:11px;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:650px){
 #workspaceAdmin .workspace-member{padding:7px 9px}
 #workspaceAdmin .workspace-member-summary{grid-template-columns:minmax(0,1fr);gap:4px}
 #workspaceAdmin .workspace-member-identity{min-height:25px}
 #workspaceAdmin .workspace-member-actions{justify-content:flex-end}
 #workspaceAdmin .workspace-member-editor{grid-template-columns:minmax(0,1fr) 94px;gap:8px}
 #workspaceAdmin .workspace-member-editor>button{grid-column:1/-1;justify-self:end}
 #workspaceAdmin .workspace-create-form,#workspaceAdmin .workspace-link-form{grid-template-columns:minmax(0,1fr)}
}

/* Mobile customer list: compact spacing; existing controls and theme unchanged. */
@media(max-width:650px){
 #listView>.page-heading{margin:6px 0;gap:4px}
 #listView>.page-heading .eyebrow{margin-bottom:3px}
 #listView>.page-heading h2{font-size:22px;line-height:1.25}
 #listView>.page-heading p{margin:3px 0;line-height:1.35}
 #listView>.page-heading .contact-heading-actions{gap:6px}
 #listView>.list-heading{margin:2px 0;gap:6px;min-height:44px}
 #listView>.list-heading h3{font-size:13px}
 #listView #clientSortPicker{min-height:44px;padding:6px;font-size:11px}
 #listView .wedding-list-tools{margin:0;gap:4px;justify-content:space-between;flex-wrap:wrap}
 #listView #clientTypeFilters{gap:2px;margin:0;min-width:0}
 #listView #clientTypeFilters button{min-width:44px;min-height:44px;padding:6px 8px;font-size:11px}
 #listView #openBrideNotes{padding:6px 8px;font-size:11px;gap:4px;min-height:44px}
 #listView>.search-bar{margin:4px 0 6px;gap:6px}
 #listView .search-input{min-width:0;padding:0 8px}
 #listView #search{min-height:44px;padding:8px 4px;font-size:12px}
 #listView #refresh{min-width:44px;min-height:44px;padding:6px 8px}
 #listView #clients{padding:0 10px;gap:0}
 #listView #clients>.client{position:relative;gap:8px;padding:4px 0;min-height:64px;align-items:center}
 #listView #clients>.client>.avatar{width:36px;height:40px;flex:0 0 36px;font-size:18px}
 #listView #clients>.client>.client-info{min-width:0;padding-right:44px}
 #listView #clients .client-info>.name{font-size:13px;line-height:1.2;margin:0 0 1px;overflow-wrap:anywhere}
 #listView #clients .client-info>.phone{font-size:11px;line-height:1.2;overflow-wrap:anywhere}
 #listView #clients .client-info>.meta{margin-top:1px;font-size:10px;line-height:1.2;overflow-wrap:anywhere}
 #listView #clients .client-info>.client-summary{margin-top:1px;padding:0;background:transparent;font-size:10px;line-height:1.1;overflow-wrap:anywhere}
 #listView #clients .client-info>.client-type-badge{position:absolute;right:0;top:1px;height:16px;margin:0;padding:0 5px;font-size:9px;line-height:14px;max-width:44px}
 #listView #clients>.client>.contact-quick{position:absolute;right:0;bottom:2px;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;margin:0}
 #listView #clients .contact-check{flex:0 0 44px;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
}

/* Mobile customer detail only: retain theme, data and existing action handlers. */
@media(max-width:650px){
 body[data-view=edit]:has(#editView .profile-card:not([hidden])) .identity{margin:4px auto;gap:0}
 body[data-view=edit]:has(#editView .profile-card:not([hidden])) .identity .official-logo{width:125px}
 #editView:has(.profile-card:not([hidden]))>.page-heading{margin:4px 0;gap:4px}
 #editView:has(.profile-card:not([hidden])) #back{min-height:44px;padding:6px 10px}
 #editView .client-detail-card{padding:12px;margin-bottom:10px}
 #editView .client-detail-card #profileHero{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:10px;row-gap:0;text-align:left;margin:0 0 10px;padding:0;align-items:center}
 #editView #profileHero>.profile-avatar{width:48px;height:48px;min-height:44px;margin:0;grid-row:1/3;font-size:22px}
 #editView #profileHero>h3{grid-column:2;font-size:17px;line-height:1.3;overflow-wrap:anywhere;display:flex;align-items:center;flex-wrap:wrap;gap:4px}
 #editView #profileHero .profile-type-toggle{min-width:44px;min-height:44px;margin:0;padding:4px;font-size:10px}
 #editView #profileHero>.profile-phone{grid-column:2;margin:0;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
 #editView #profileHero>.client-contact-icons{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:8px 0 0}
 #editView #profileHero .client-contact-icons button{min-height:48px;padding:5px 2px;gap:3px}
 #editView .client-contact-icons .contact-action-icon,#editView .client-contact-icons svg{width:18px;height:18px}
 #editView .client-contact-icons .contact-action-label{font-size:10px}
 #editView .client-next-card{margin:0 0 10px;min-height:44px}
 #editView .client-next-card .client-next-link{min-height:44px;padding:8px;gap:6px}
 #editView .client-booking-info{gap:3px}
 #editView .client-booking-info>b{font-size:12px;line-height:1.35}
 #editView .booking-memo-preview{margin:0;padding:4px 8px}
 #editView .booking-memo-preview .memo-lines{margin:3px 0;line-height:1.4;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 #editView .booking-memo-preview.expanded .memo-lines{display:block;-webkit-line-clamp:unset;overflow:visible;max-height:none}
 #editView .booking-memo-preview button{min-height:44px;padding:4px 8px;font-size:11px}
 #editView .client-booking-actions{gap:6px;padding:4px 8px 8px;margin:0;display:flex;flex-wrap:wrap}
 #editView .client-booking-actions button{min-height:44px;padding:6px 10px;font-size:11px}
 #editView .client-summary-card{margin-bottom:10px}
 #editView .client-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #editView .client-summary-metric{min-height:60px;padding:7px 5px}
 #editView .client-summary-metric>span{margin-bottom:4px;font-size:10px}
 #editView .client-summary-metric>b{font-size:14px;line-height:1.35;overflow-wrap:anywhere;white-space:normal}
 #editView .client-summary-footnote{padding:5px;margin:0}
 #editView .client-latest-card{padding:10px;margin-bottom:10px}
 #editView #clientLatest>.list-heading{display:flex;flex-wrap:nowrap;gap:4px;margin:0 0 5px;justify-content:space-between}
 #editView #clientLatest>.list-heading h3{font-size:12px;white-space:nowrap}
 #editView #clientLatest>.list-heading button{min-height:44px;padding:4px;font-size:10px;white-space:nowrap;width:auto;margin:0}
 #editView .client-latest-link{gap:8px;min-height:44px}
 #editView .client-latest-link>div{min-width:0;gap:3px}
 #editView .client-latest-link b{font-size:13px;overflow-wrap:anywhere}
 #editView .client-recent-memo{margin:6px 0 0;font-size:11px;line-height:1.4}
 #editView .client-recent-thumbs{margin-top:6px;gap:5px}
 #editView .client-recent-thumb,#editView .client-recent-thumb .photo{width:48px;height:48px;min-height:48px}
 #editView .client-detail-accordion>summary{min-height:44px;padding:11px 0;font-size:12px}
 #editView .client-detail-accordion[open]{padding-bottom:8px}
 #editView .client-detail-pair{padding:5px 0;gap:10px;font-size:11px;line-height:1.4}
 #editView .client-detail-pair>b{min-width:0;overflow-wrap:anywhere}
 #editView #clientPayments .prepaid-card{padding:10px;margin:0 0 6px}
 #editView #clientPayments p{margin:4px 0;line-height:1.4}
 #editView #clientPayments button,#editView #clientPayments summary{min-height:44px;padding:6px;font-size:11px}
 #editView .client-prepaid-use{gap:8px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
 #editView .client-prepaid-use>*{min-width:0}
 #editView .client-detail-accordion .field{margin:7px 0;gap:4px}
 #editView .client-detail-accordion input,#editView .client-detail-accordion select{min-height:44px;padding:6px 8px}
 #editView .profile-card textarea{min-height:44px;padding:7px 8px;line-height:1.4;font-size:12px;box-sizing:border-box}
 #editView .wedding-details{padding:8px;margin-bottom:6px}
 #editView #weddingDetails.detail-non-bride{display:none!important}
 #editView .wedding-details .row{gap:6px;grid-template-columns:repeat(2,minmax(0,1fr))}
 #editView .wedding-details button{min-height:44px;padding:5px 7px;font-size:11px}
 #editView .client-detail-actions{padding-top:8px;margin-top:4px;gap:6px}
 #editView .client-detail-actions button{min-height:44px;padding:7px}
}

/* Mobile new-client registration only. */
@media(max-width:650px){
 body[data-view=edit][data-new-client=true] #editView>.page-heading{margin:3px 0;gap:3px}
 body[data-view=edit][data-new-client=true] #editView>.page-heading .eyebrow{margin-bottom:2px}
 body[data-view=edit][data-new-client=true] #editView>.page-heading h2{font-size:21px;line-height:1.25}
 body[data-view=edit][data-new-client=true] #editView>.page-heading p{margin:3px 0;line-height:1.35}
 body[data-view=edit][data-new-client=true] #editView .profile-card{padding:12px}
 body[data-view=edit][data-new-client=true] #clientInfoEditor .field{margin:6px 0;gap:4px;min-width:0}
 body[data-view=edit][data-new-client=true] #clientTypeField{padding:0;margin:0 0 6px}
 body[data-view=edit][data-new-client=true] #clientTypeField :is(select,.sl-select-trigger,button){min-height:44px;height:auto;padding:7px 10px;font-size:13px}
 body[data-view=edit][data-new-client=true] #clientInfoEditor .profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start}
 body[data-view=edit][data-new-client=true] #clientInfoEditor .profile-fields input{height:44px;min-height:44px;margin-top:0;padding:7px 8px;font-size:13px}
 body[data-view=edit][data-new-client=true] #clientInfoEditor textarea{min-height:44px;max-height:none;padding:7px 8px!important;font-size:12px;line-height:1.4;scroll-margin-bottom:100px}
 body[data-view=edit][data-new-client=true] #newRegistrationWedding{padding:10px;margin-top:8px;gap:6px}
 body[data-view=edit][data-new-client=true] #newRegistrationWedding>h3{font-size:13px;margin:0 0 6px}
 body[data-view=edit][data-new-client=true] #newRegistrationWedding .registration-stage h4{font-size:12px;margin:0 0 3px}
 body[data-view=edit][data-new-client=true] #newRegistrationWedding .registration-stage+.registration-stage{margin-top:8px;padding-top:8px}
 body[data-view=edit][data-new-client=true] #newRegistrationWedding .registration-time-row{gap:6px;grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-view=edit][data-new-client=true] #newRegistrationWedding input{height:44px;min-height:44px;padding:6px;font-size:12px}
 body[data-view=edit][data-new-client=true] #newRegistrationWedding .wedding-clear-date{min-height:44px;padding:4px 8px;font-size:11px}
 body[data-view=edit][data-new-client=true] #registrationWeddingMemos:empty{display:none}
 body[data-view=edit][data-new-client=true] #registrationMemoDetails{margin-top:6px;border-top:1px solid var(--line);grid-column:1/-1}
 body[data-view=edit][data-new-client=true] #registrationMemoDetails>summary{min-height:44px;padding:10px 0;font-size:11px;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
 body[data-view=edit][data-new-client=true] #registrationMemoDetails .field{width:100%;margin:6px 0}
 body[data-view=edit][data-new-client=true] #clientSaveActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px;padding:0;position:static}
 body[data-view=edit][data-new-client=true] #clientSaveActions>button{width:100%;min-width:0;min-height:44px;height:auto;margin:0;padding:7px 5px;font-size:11px;line-height:1.4;white-space:normal}
 body[data-view=edit][data-new-client=true] #clientInfoEditor :is(input,textarea,button){scroll-margin-top:20px;scroll-margin-bottom:100px}
 body[data-view=edit][data-new-client=true] #weddingReferencePhotos{margin-top:6px}
}
@media(max-width:359px){
 body[data-view=edit][data-new-client=true] #clientInfoEditor .profile-fields{grid-template-columns:minmax(0,1fr);gap:0}
}

/* Appointment UI and booking selection, isolated from home/customer screens. */
#scheduleView .schedule-filter-row{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
#scheduleView .schedule-filter-row #scheduleTypeFilters,#scheduleView .booking-selection-head{margin:0}
#scheduleView{padding-bottom:var(--booking-bar-space,0px)}
#scheduleView #bookingSelectionBar{position:fixed;left:max(8px,calc((100vw - 1180px)/2));right:max(8px,calc((100vw - 1180px)/2));z-index:20;margin:0;background:var(--paper);box-shadow:0 -3px 14px #0001}
#scheduleView #bookingSelectionBar button{min-height:44px}
#scheduleView #appointmentResults{max-height:176px;overflow-y:auto;overscroll-behavior:contain}
#scheduleView #appointmentResults .customer-result{min-height:44px;margin:0;overflow-wrap:anywhere}
#contactDialog .contact-individual>summary{min-height:44px;padding:12px 0;cursor:pointer}
#contactDialog .contact-individual>button{display:block;width:100%;min-height:44px;margin:4px 0;overflow-wrap:anywhere}
@media(max-width:650px){
 #scheduleView>.page-heading{margin:6px 0;gap:4px;flex-direction:column;align-items:stretch;min-width:0}
 #scheduleView>.page-heading .eyebrow{margin-bottom:3px}
 #scheduleView>.page-heading h2{font-size:22px;line-height:1.25}
 #scheduleView>.page-heading p{margin:3px 0;line-height:1.35}
 #scheduleView .schedule-date-actions{gap:6px;margin:0}
 #scheduleView .schedule-date-actions button{min-height:44px;padding:6px 14px}
 #scheduleView .schedule-grid{gap:10px}
 #scheduleView .schedule-grid>.card{padding:10px}
 #scheduleView .schedule-grid>.card>.list-heading{margin-bottom:2px;gap:6px}
 #scheduleView .schedule-grid>.card>.list-heading h3{font-size:14px}
 #scheduleView #jumpToAppointment{min-height:44px;padding:6px}
 #scheduleView .schedule-date-field{margin:3px 0}
 #scheduleView .schedule-date-field .date-switch{margin:0}
 #scheduleView #scheduleTypeFilters{gap:2px;min-width:0}
 #scheduleView #scheduleTypeFilters button{min-height:44px;min-width:44px;padding:6px 8px;font-size:11px}
 #scheduleView #bookingSelectionHead button{min-height:44px;padding:6px 8px;font-size:11px}
 #scheduleView .appointment-contact-row{grid-template-columns:minmax(0,1fr) 44px;gap:2px}
 #scheduleView .appointment-contact-row.booking-selecting{grid-template-columns:44px minmax(0,1fr) 44px;gap:2px}
 #scheduleView .appointment-contact-row>.contact-quick{width:44px;min-width:44px;height:44px;min-height:44px;padding:0}
 #scheduleView .compact-appointment{display:grid;grid-template-columns:48px minmax(0,1fr) auto;grid-template-rows:auto auto;gap:2px 5px;min-height:56px;padding:5px 0;font-size:11px}
 #scheduleView .compact-appointment>.avatar,#scheduleView .compact-appointment>span:last-child{display:none}
 #scheduleView .compact-appointment>.booking-time{grid-column:1;grid-row:1/3;font-size:11px;gap:2px;align-self:center}
 #scheduleView .compact-appointment>strong{grid-column:2;grid-row:1;padding:0;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;display:flex;align-items:center;gap:2px}
 #scheduleView .compact-appointment .booking-name{flex:1;min-width:0;padding:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
 #scheduleView .compact-appointment .new-badge{display:none}
 #scheduleView .compact-appointment>strong .client-type-badge{flex:none;padding:0 3px;font-size:9px;margin-left:3px}
 #scheduleView .compact-appointment>.compact-service{grid-column:2;grid-row:2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
 #scheduleView .compact-appointment>.pill{grid-column:3;grid-row:1/3;align-self:center;padding:3px;font-size:9px;white-space:nowrap}
 #scheduleView .booking-selection-check{width:44px;min-height:44px;padding:0}
 #scheduleView #bookingSelectionBar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:6px;gap:4px}
 #scheduleView #bookingSelectionBar>b{grid-column:1/-1;font-size:11px;margin:0}
 #scheduleView #bookingSelectionBar button{padding:5px 2px;font-size:10px;white-space:normal;line-height:1.3;min-width:0}
 #scheduleView #appointmentForm .field{margin:7px 0;gap:4px;min-width:0}
 #scheduleView #appointmentForm input,#scheduleView #appointmentForm select,#scheduleView #appointmentForm .select-choice-picker,#scheduleView #appointmentKindPicker{min-height:44px;padding:7px 8px;font-size:12px}
 #scheduleView #appointmentForm .row,#scheduleView #appointmentForm .wedding-time-row{gap:6px}
 #scheduleView #appointmentResults{gap:3px;margin-bottom:6px;max-height:144px}
 #scheduleView #appointmentResults .customer-result{padding:6px 8px;font-size:12px}
 #scheduleView #appointmentForm textarea{min-height:58px;padding:8px;line-height:1.4;max-height:none}
 #scheduleView #appointmentForm>.toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}
 #scheduleView #appointmentForm>.toolbar button{min-height:44px;padding:7px 4px;width:100%;font-size:12px}
 #scheduleView #appointmentForm .field-hint{margin:3px 0;line-height:1.4}
 #scheduleView #appointmentForm :is(input,textarea,button){scroll-margin-bottom:100px}
}

/* Mobile statistics: display density only; existing theme and calculations retained. */
#statsView .monthly-empty-option{display:flex;align-items:center;gap:8px;min-height:44px;font-size:12px;cursor:pointer}
#statsView .monthly-empty-option input{width:20px;height:20px;min-height:20px;margin:0;accent-color:var(--brown);flex:none}
@media(max-width:650px){
 #statsView>.page-heading{margin:6px 0;gap:4px}
 #statsView>.page-heading .eyebrow{margin-bottom:3px}
 #statsView>.page-heading h2{font-size:22px;line-height:1.25}
 #statsView>.page-heading p{margin:3px 0;line-height:1.4}
 #statsView .stats-controls{gap:6px;margin:6px 0}
 #statsView .stats-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0}
 #statsView .stats-tabs button{width:100%;min-width:0;min-height:44px;padding:6px 4px;font-size:12px;white-space:nowrap}
 #statsView .stats-date-area{margin:0;min-width:0}
 #statsView .stats-date-area .field{margin:4px 0}
 #statsView .stats-current-actions{margin:3px 0;display:flex;justify-content:flex-end}
 #statsView #statsMonth{min-height:44px;padding:6px 12px;font-size:12px}
 #statsView .stats-month-controls{padding:6px 8px;margin:0}
 #statsView .date-switch{margin:0;gap:3px;min-width:0}
 #statsView .date-switch button{min-height:44px;padding:6px;font-size:12px;min-width:44px}
 #statsView #statsPeriodFields{padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 8px}
 #statsView #statsPeriodFields .field{min-width:0;margin:0}
 #statsView #statsPeriodFields input{min-height:44px;padding:6px;font-size:12px}
 #statsView #statsPeriodFields>p{grid-column:1/-1;margin:3px 0;font-size:10px;line-height:1.4}
 #statsView #statsResults>.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0}
 #statsView #statsResults .stat{padding:9px 6px;min-height:65px;min-width:0}
 #statsView #statsResults .stat>span{font-size:10px;line-height:1.4}
 #statsView #statsResults .stat>b{font-size:19px;line-height:1.3;margin-top:4px;overflow-wrap:anywhere}
 #statsView #statsResults>.card{padding:11px;margin-top:8px;margin-bottom:8px;min-width:0}
 #statsView #statsResults h3{font-size:14px;line-height:1.4}
 #statsView #statsResults>p,#statsView #statsResults .field-hint,#statsView #statsResults .card>p{margin:5px 0;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
 #statsView #statsResults .stat-line{margin:7px 0 4px;gap:8px;font-size:11px;line-height:1.4;align-items:baseline}
 #statsView #statsResults .stat-line>*{min-width:0;overflow-wrap:anywhere}
 #statsView #statsResults .stat-line>:last-child{text-align:right;flex-shrink:0;max-width:60%}
 #statsView #statsResults .payment-total{padding-top:7px;margin-top:8px}
 #statsView #statsResults .stat-track{height:4px;margin-bottom:8px}
 #statsView #statsResults .revenue-activity>summary{min-height:44px;padding:10px 0;font-size:12px;line-height:1.4}
 #statsView #statsResults .daily-revenue-row{min-height:44px;padding:6px 0;gap:6px;font-size:11px}
 #statsView #statsResults .daily-revenue-row b{font-size:12px;overflow-wrap:anywhere}
 #statsView .daily-service-list>.list-heading{margin-bottom:4px;gap:6px}
 #statsView .daily-service-item{min-height:44px;padding:8px 0;gap:8px;align-items:center}
 #statsView .daily-service-info,#statsView .daily-service-price{min-width:0;gap:3px;line-height:1.4}
 #statsView .daily-service-info{flex:1}
 #statsView .daily-service-price{max-width:58%;flex-shrink:1}
 #statsView .daily-service-item b{font-size:12px;overflow-wrap:anywhere}
 #statsView .daily-service-item span{font-size:10px;white-space:normal;overflow-wrap:anywhere}
}

/* Settings UI: folds preserve mounted inputs and existing save handlers. */
#settingsView .settings-fold{width:100%;min-width:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);overflow:visible}
#settingsView .settings-fold>summary{min-height:44px;padding:10px 14px;cursor:pointer;font-weight:600;overflow-wrap:anywhere}
#settingsView .settings-fold>.card,#settingsView .settings-fold>.settings-export,#settingsView .settings-fold>.settings-transfer{width:100%;margin:0;padding:0 14px 12px;border:0;background:transparent;box-shadow:none}
#settingsView .settings-fold>div>h3:first-child,#settingsView .settings-fold>section>h3:first-child{display:none}
#settingsView .settings-fold:has(>[hidden]){display:none}
#settingsView .settings-data-management>.settings-fold{margin-top:8px}
#settingsView .account-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
#settingsView .account-actions>button{flex:1 1 125px;width:auto;min-height:44px;margin:0}
#settingsView #accountEmail{margin:4px 0 8px;overflow-wrap:anywhere}
#settingsView .settings-grid button,#settingsView .settings-grid summary{min-height:44px}
#settingsView .transfer-client-list{max-height:264px;overflow-y:auto;overscroll-behavior:contain}
#settingsView .transfer-client-option{min-height:44px;padding:3px 8px;gap:8px}
#settingsView .transfer-client-option span{line-height:1.3}
#settingsView .settings-about p{margin:6px 0;line-height:1.4}
#contactDialog .template-settings{display:grid;gap:8px;min-width:0}
#contactDialog .template-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px}
#contactDialog .template-tabs button[aria-pressed=true]{border-color:var(--brown);font-weight:700}
#contactDialog .template-settings :is(button,select){min-height:44px;margin:0}
#contactDialog .template-settings .field{margin:0;gap:5px}
#contactDialog .template-settings .field-hint{margin:2px 0;overflow-wrap:anywhere}
#contactDialog .template-settings textarea{min-height:104px;max-height:280px;overflow-y:auto;resize:vertical;width:100%;font-size:16px}
@media(max-width:760px){
 body[data-view=settings] .app-header{margin-bottom:6px;padding-bottom:6px}
 #settingsView .page-heading{margin:4px 0 8px;padding:0}
 #settingsView .settings-grid{gap:8px}
 #settingsView .settings-fold>summary{padding:9px 12px}
 #settingsView .settings-fold>.card,#settingsView .settings-fold>.settings-export,#settingsView .settings-fold>.settings-transfer{padding:0 10px 10px}
 #settingsView .settings-grid .field{margin-top:6px}
 #settingsView .settings-grid :is(input:not([type=checkbox]),select,.select-choice-picker){min-width:0;max-width:100%;min-height:44px}
 #settingsView .booking-preferences{grid-template-columns:repeat(2,minmax(0,1fr))}
 #settingsView .booking-preferences>.field-hint{grid-column:1/-1}
 #settingsView .settings-data-management .row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 #settingsView .settings-grid .field-hint{margin:4px 0;line-height:1.4}
 #settingsView .settings-grid .toolbar{flex-wrap:wrap;gap:6px}
 /* Keep controls distinct with 44px targets; narrow rows wrap controls once. */
 #settingsView #stylelogPreferences .preferences-item,#settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]{grid-template-columns:44px minmax(0,1fr) 44px 44px 44px;gap:2px}
 #settingsView #stylelogPreferences .preferences-item>.order-handle{grid-column:1;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.preference-name,#settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-name{grid-column:2/4;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.preference-price,#settingsView #stylelogPreferences .preferences-item>.select-choice-picker,#settingsView #stylelogPreferences .preferences-item>select,#settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker{grid-column:4/6;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.preference-check{grid-column:2;grid-row:2;min-width:44px}
 #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(3){grid-column:3;grid-row:2}
 #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(2){grid-column:4;grid-row:2}
 #settingsView #stylelogPreferences .preferences-item>.danger{grid-column:5;grid-row:2}
}
@media(min-width:761px){
 #settingsView #stylelogPreferences .preferences-item,body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item,#settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments],body[data-tablet=true] #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]{grid-template-columns:44px minmax(0,1fr) 90px 44px 44px 44px 44px}
}

/* Android/iPad residual UI: presentation only; keep permission and data paths intact. */
#refresh{flex:0 0 44px;width:44px;height:44px;padding:12px;display:grid;place-items:center;position:relative}
#refresh>span{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#refresh .icon{width:18px;height:18px}
#notice.success-toast{position:fixed;z-index:100;left:50%;transform:translateX(-50%);bottom:calc(86px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 24px);margin:0;pointer-events:none;box-shadow:0 4px 20px #0002}
#clients .client .name{overflow-wrap:anywhere;min-width:0}
#clients .client>button{flex-shrink:0}
#scheduleView #appointmentResults{max-height:min(374px,48dvh);gap:3px;overflow-y:auto;overscroll-behavior:contain;scroll-padding:4px}
#scheduleView #appointmentResults .customer-result{height:44px;min-height:44px;padding:6px 10px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
#bookingServices{display:flex;flex-direction:column;align-items:stretch;gap:4px}
#bookingAddService{align-self:flex-end;width:auto;min-height:44px;padding:6px 10px}
#appointmentForm .select-choice-picker,#appointmentKindPicker,#appointmentClient{min-height:44px;text-align:center;text-align-last:center;padding-inline:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#appointmentForm .select-choice-picker:after{position:absolute;right:10px}
#appointmentForm .select-choice-picker{position:relative}
#appointmentForm :is(input[type=search],textarea,#guestName,#guestPhone){text-align:left}
#appointmentForm label:has(>#appointmentClient){scroll-margin-top:12px}
#addSplitPayment,#addCountPass,#purchaseCountPass,#addPiecePayment{display:block;flex:0 1 auto;width:fit-content;max-width:100%;min-height:44px;margin:8px auto;padding:8px 12px}
.photo-picker-group .photo-picker{height:80px;min-height:80px;display:flex;align-items:center;justify-content:center}
.photo-picker-group .photo-add{display:grid;place-items:center;line-height:1;width:100%;height:58px;min-height:58px;padding:0}
#closeBrideNotes{width:44px;height:44px;min-width:44px;min-height:44px;padding:4px;border-radius:10px;display:grid;place-items:center;flex-shrink:0;font-size:12px}
#statsPeriodFields .shared-date-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:0;min-width:0;width:100%}
#statsPeriodFields .shared-date-nav>button{min-width:0;padding:4px;white-space:nowrap;max-width:100%}
#statsPeriodFields :is(#statsFromButton,#statsToButton){font-size:14px;letter-spacing:-.3px;text-align:center}
#homeView .home-columns{align-items:start}
#homeSchedule{min-height:0}
#homeSchedule>.single-page-placeholder{display:none}
#homeSchedule .home-booking-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
#homeSchedule .home-appointment{min-width:0;min-height:76px;height:auto;margin:0;padding:5px 6px!important;gap:2px!important;line-height:1.2}
#homeSchedule .home-appointment>strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:13px;line-height:1.25}
#homeSchedule .home-appointment>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;max-width:100%;font-size:11px}
#homeSchedule .home-booking-status{font-size:9px;padding:2px 5px;line-height:1.2;margin:0}
#homeSchedule>.page-dots{margin-top:4px;padding-top:0}
#homeView .home-columns>.card{padding-top:10px}
#newRegistrationWedding .field:has(>.wedding-clear-date){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 5px;align-items:center;margin:6px 0}
#newRegistrationWedding .field:has(>.wedding-clear-date)>span{grid-column:1/-1}
#newRegistrationWedding .wedding-clear-date{min-height:44px;margin:0;padding:4px 6px;white-space:nowrap;font-size:11px}
#newRegistrationWedding .wedding-time-row{gap:6px}
#newRegistrationWedding .field{margin:6px 0;gap:4px}
#newRegistrationWedding input{min-height:44px;padding:7px}
#registrationMemoDetails textarea{min-height:64px!important;line-height:1.45;padding:8px}
#newRegistrationWedding .registration-stage{padding-top:8px;padding-bottom:8px;margin-top:6px;margin-bottom:6px}
@media(max-width:760px){
 body[data-view=home] .app-header{margin-top:4px;margin-bottom:4px;padding-top:4px;padding-bottom:4px}
 body[data-view=home] .identity{margin:6px auto 4px;gap:4px}
 #homeView>.page-heading{margin:4px 0;gap:4px}
 #homeView>.page-heading p{margin:2px 0;line-height:1.35}
 #homeView .stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:6px 0}
 #homeView .stat{padding:7px 3px;min-height:0}
 #homeView .stat b{font-size:20px;margin-top:2px;line-height:1.2}
 #homeView .stat>span{font-size:10px}
 #homeView .home-columns{gap:8px}
 #homeSchedule{padding:8px}
 #homeSchedule>.list-heading{margin-bottom:2px;gap:2px}
 #homeSchedule>.list-heading button{min-height:44px;padding:4px;font-size:11px}
 #homeSchedule>.list-heading .home-today-title{font-size:14px}
 #homeSchedule>.date-switch{margin:0 0 4px;gap:2px}
 #homeSchedule>.date-switch button{min-height:44px;padding:4px}
 #scheduleView #appointmentResults{max-height:min(279px,45dvh)}
 #statsView #statsPeriodFields{grid-template-columns:minmax(0,1fr);gap:8px}
}
@media(min-width:761px){
 #scheduleView .schedule-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
 #scheduleView .schedule-grid>.card:has(#appointmentForm){max-height:none;overflow:visible;overscroll-behavior:auto;scroll-padding:12px;position:static}
 #statsView #statsPeriodFields{grid-template-columns:repeat(2,minmax(230px,1fr))}
}
@media(min-width:761px) and (max-width:950px){#statsView #statsPeriodFields{grid-template-columns:minmax(0,1fr)}}
@media(max-width:340px){#newRegistrationWedding .field:has(>.wedding-clear-date){grid-template-columns:minmax(0,1fr)}#newRegistrationWedding .wedding-clear-date{justify-self:end}}
#newRegistrationWedding .registration-time-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
#editView :is(#addSplitPayment,#addPiecePayment){margin-left:auto;margin-right:auto;align-self:center;justify-self:center}
#editView #countPassSection{display:flex;flex-direction:column;align-items:stretch}
#editView #countPassSection>:is(#addCountPass,#purchaseCountPass){align-self:center;margin:8px auto;flex:0 0 auto;width:fit-content}
#statsView #statsPeriodFields .shared-date-nav{min-width:0;max-width:100%;grid-template-columns:44px minmax(0,1fr) 44px}
#statsView #statsPeriodFields .shared-date-nav>button{width:auto;min-width:0}
@media(max-width:760px){#statsView #statsPeriodFields:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr)!important}}
/* Period controls contain their own row: collapse that row, not only its card. */
#statsView #statsPeriodFields{grid-template-columns:minmax(0,1fr)}
#statsView #statsPeriodFields>.row{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px;min-width:0;width:100%}

/* Allow a short customer profile to align its name with the viewport top. */
body[data-view=edit][data-new-client=false] #editView{min-height:100dvh}
/* Device UI residual v2: presentation only; retain existing input handlers. */
@media(max-width:760px){
 body[data-view=edit][data-new-client=true] #newClientTypeTabs:not([hidden]){display:flex;justify-content:center;gap:8px;width:100%;margin:0 auto 12px}
 body[data-view=edit][data-new-client=true] #newClientTypeTabs>button{display:flex;align-items:center;justify-content:center;flex:0 1 120px;min-width:0;min-height:44px;height:44px;margin:0;padding:8px 12px;text-align:center}
 #statsView #statsPeriodFields>.row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #statsView #statsPeriodFields .shared-date-nav{grid-template-columns:repeat(2,minmax(44px,1fr));grid-template-rows:44px 44px;gap:0;height:auto;min-height:88px}
 #statsView #statsPeriodFields .shared-date-nav>button:first-child{grid-column:1;grid-row:2}
 #statsView #statsPeriodFields .shared-date-nav>button:nth-child(3){grid-column:2;grid-row:2}
 #statsView #statsPeriodFields :is(#statsFromButton,#statsToButton){grid-column:1/-1;grid-row:1;min-height:44px;font-size:12px;letter-spacing:-.3px;padding:4px 0;white-space:nowrap}
 #editView :is(#addSplitPayment,#addPiecePayment){display:block;margin:8px 0 8px auto;width:fit-content;max-width:100%;min-height:44px;align-self:flex-end;justify-self:end}
 #editView #countPassSection{flex-direction:row;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px}
 #editView #countPassSection>:is(h4,p,#countPassRows){flex:0 0 100%;min-width:0}
 #editView #countPassSection>:is(#addCountPass,#purchaseCountPass){flex:0 1 auto;align-self:auto;margin:0;width:fit-content;min-height:44px;padding:8px;white-space:nowrap;font-size:12px}
}
@media(min-width:761px){
 body[data-view=edit][data-new-client=true] #registrationMemoDetails{grid-column:1/-1;width:100%;min-width:0;max-width:none}
 body[data-view=edit][data-new-client=true] #registrationMemoDetails>.field{display:flex;flex-direction:column;width:100%;min-width:0;max-width:none;grid-column:1/-1}
 body[data-view=edit][data-new-client=true] #registrationMemoDetails textarea{width:100%;max-width:none;box-sizing:border-box}
}
/* Android device regression fixes: display only. */
#brideNotesDialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr);align-content:stretch;gap:0;overflow:hidden}
#brideNotesDialog>.notes-header{position:static;height:auto;min-height:0;max-height:none;overflow:visible;margin:0;z-index:1}
#brideNotesDialog .notes-controls{align-items:flex-start;flex-wrap:wrap}
#brideNotesDialog .notes-controls .filter-bar{flex:1 1 160px;flex-wrap:wrap;min-width:0}
#brideNotesDialog #notesScroller{height:auto;min-height:0;overflow-y:auto;position:relative;margin:0;align-self:stretch}
#brideNotesList{margin:0;align-content:start}
.client-detail-card:has(>#profileDelete:not([hidden])){padding-top:64px}
.client-detail-card>#profileDelete{min-height:44px;min-width:44px;z-index:1}
.client-detail-card .profile-hero h3{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;min-width:0}
.client-detail-card .profile-hero h3 .profile-name{flex:0 0 100%;width:100%;max-width:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;line-height:1.4;max-height:2.8em}
.client-detail-card .profile-hero h3 .profile-type-toggle{flex:none;margin:0;max-width:100%}
body[data-view=edit][data-new-client=true] #clientInfoEditor #clientTypeField{width:min(240px,100%);max-width:100%;margin:8px auto 12px;align-items:stretch;text-align:center;grid-column:1/-1}
body[data-view=edit][data-new-client=true] #clientTypeField :is(select,.select-choice-picker){width:100%;min-height:44px;text-align:center;text-align-last:center;justify-content:center}
@media(max-width:760px){
 #statsView #statsPeriodFields{padding:6px}
 #statsView #statsPeriodFields>.row{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 #statsView #statsPeriodFields .shared-date-nav{grid-template-columns:24px minmax(0,1fr) 24px;grid-template-rows:44px;height:44px;min-height:44px;padding:0;gap:0}
 #statsView #statsPeriodFields .shared-date-nav>button:first-child{grid-column:1;grid-row:1}
 #statsView #statsPeriodFields .shared-date-nav>button:nth-child(3){grid-column:3;grid-row:1}
 #statsView #statsPeriodFields .shared-date-nav>button{height:44px;min-height:44px;min-width:0;width:100%;max-width:100%;padding:0;flex-basis:auto}
 #statsView #statsPeriodFields :is(#statsFromButton,#statsToButton){grid-column:2;grid-row:1;font-size:clamp(10px,2.7vw,12px);letter-spacing:-.5px;line-height:1;white-space:nowrap;padding:0}
}

/* ui-FINAL: keep the existing layout; new-customer badge follows the name. */
#scheduleView #appointments .compact-appointment>strong.guest-booking-name,
#homeSchedule .home-appointment>strong:has(>.new-badge){display:flex;align-items:center;gap:5px;padding-left:0;min-width:0}
#scheduleView #appointments .compact-appointment>strong.guest-booking-name>.booking-name,
#homeSchedule .home-appointment>strong:has(>.new-badge)>.booking-name{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#scheduleView #appointments .compact-appointment>strong>.new-badge,
#homeSchedule .home-appointment>strong>.new-badge{display:inline-block;position:static;transform:none;flex:none;inset:auto;margin:0;white-space:nowrap}
#homeSchedule .home-appointment>strong:has(>.new-badge){justify-content:center}

/* Schedule rows only: time, photo, name and adjacent badges on every device. */
#scheduleView #appointments .compact-appointment{grid-template-columns:48px 30px minmax(0,1.3fr) minmax(0,1fr) 42px 8px;gap:5px;align-items:center}
#scheduleView #appointments .compact-appointment>.booking-time{grid-column:1;grid-row:1}
#scheduleView #appointments .compact-appointment>.avatar{display:grid;grid-column:2;grid-row:1;width:30px;height:30px;min-width:30px;overflow:hidden;border-radius:50%}
#scheduleView #appointments .compact-appointment>.avatar img{width:100%;height:100%;object-fit:cover}
#scheduleView #appointments .compact-appointment>strong{display:flex;grid-column:3;grid-row:1;align-items:center;justify-content:flex-start;gap:4px;padding:0;min-width:0}
#scheduleView #appointments .compact-appointment>strong>.booking-name{flex:0 1 auto;min-width:0;width:auto;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#scheduleView #appointments .compact-appointment>strong>.client-type-badge{display:inline-flex;flex:none;width:auto;margin:0;padding:1px 4px;font-size:9px}
#scheduleView #appointments .compact-appointment>strong>.new-badge{display:inline-block;position:static;flex:none;margin:0;transform:none;font-size:9px;padding:1px 3px}
#scheduleView #appointments .compact-appointment>.compact-service{grid-column:4;grid-row:1}
#scheduleView #appointments .compact-appointment>.pill{grid-column:5;grid-row:1;width:42px;min-width:0}
#scheduleView #appointments .compact-appointment>span:last-child{grid-column:6;grid-row:1}
@media(max-width:760px){
 #scheduleView #appointments .compact-appointment{grid-template-columns:40px 26px minmax(0,1fr) 32px;grid-template-rows:auto auto;gap:3px 4px}
 #scheduleView #appointments .compact-appointment>.booking-time{grid-column:1;grid-row:1/3}
 #scheduleView #appointments .compact-appointment>.avatar{grid-column:2;grid-row:1/3;width:26px;height:26px;min-width:26px}
 #scheduleView #appointments .compact-appointment>strong{grid-column:3;grid-row:1;gap:3px;flex-wrap:wrap}
 #scheduleView #appointments .compact-appointment>strong>.booking-name{max-width:100%}
 #scheduleView #appointments .compact-appointment>.compact-service{grid-column:3;grid-row:2;text-align:left}
 #scheduleView #appointments .compact-appointment>.pill{grid-column:4;grid-row:1/3;width:32px}
}

/* Final four UI requests; all selectors stay within their requested screens. */
@media(min-width:761px){
 #scheduleView #appointments .compact-appointment{grid-template-columns:52px 32px minmax(0,1.3fr) minmax(0,1fr) 42px 8px;column-gap:9px}
 #editView :is(#addSplitPayment,#addPiecePayment){margin:8px auto;align-self:center;justify-self:center}
 #editView #countPassSection{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px}
 #editView #countPassSection>:is(h4,p,#countPassRows){flex:0 0 100%;min-width:0}
 #editView #countPassSection>:is(#addCountPass,#purchaseCountPass){flex:0 1 auto;align-self:center;margin:0;width:fit-content}
}
@media(max-width:760px){
 #scheduleView #appointmentForm :is(#appointmentCeremonyToggle,#bookingAddService){display:block;width:fit-content;max-width:100%;margin-left:auto;margin-right:0;align-self:flex-end;justify-self:end}
 #settingsView #stylelogPreferences .preferences-item,
 #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]{grid-template-columns:22px minmax(42px,1fr) 62px 24px 24px 24px 30px;gap:2px;padding:3px 0;min-height:0;align-items:center}
 #settingsView #stylelogPreferences .preferences-item>.order-handle{grid-column:1;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.preference-name,
 #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.preference-name{grid-column:2;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.preference-price,
 #settingsView #stylelogPreferences .preferences-item>.select-choice-picker,
 #settingsView #stylelogPreferences .preferences-item>select,
 #settingsView #stylelogPreferences .preferences-item[data-preference-kind=payments]>.select-choice-picker{grid-column:3;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.preference-check{grid-column:4;grid-row:1;min-width:0;justify-content:center;margin:0;padding:0}
 #settingsView #stylelogPreferences .preferences-item>.preference-check>span{display:none}
 #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(3){grid-column:5;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.text-button:nth-last-child(2){grid-column:6;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>.danger{grid-column:7;grid-row:1}
 #settingsView #stylelogPreferences .preferences-item>:is(input,button,select,.select-choice-picker){height:34px;min-height:34px;min-width:0;width:100%;margin:0;padding:3px;font-size:11px}
 #settingsView #stylelogPreferences .preferences-item>.preference-check>input{width:16px;height:16px;min-height:16px;margin:0}
}
@media(max-width:760px){
 #settingsView #stylelogPreferences .preferences-item>:is(button,.select-choice-picker,.preference-check){height:34px!important;min-height:34px!important}
 #settingsView #stylelogPreferences .preferences-item>.preference-check>span{display:block;position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

/* Five screenshot corrections, accumulated on the latest candidate. */
@media(max-width:760px){
 #scheduleView #appointments .compact-appointment{grid-template-columns:36px 26px minmax(0,1fr) 42px 32px;grid-template-rows:auto;gap:4px}
 #scheduleView #appointments .compact-appointment>.booking-time,
 #scheduleView #appointments .compact-appointment>.avatar,
 #scheduleView #appointments .compact-appointment>strong{grid-row:1}
 #scheduleView #appointments .compact-appointment>.compact-service{grid-column:4;grid-row:1;white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.35}
 #scheduleView #appointments .compact-appointment>.pill{grid-column:5;grid-row:1}
}
#homeSchedule .home-appointment>strong{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px;padding:0}
#homeSchedule .home-appointment>strong>.booking-name{flex:0 1 auto;max-width:100%;min-width:0}
#homeSchedule .home-appointment>strong>:is(.new-badge,.client-type-badge){position:static;display:inline-flex;flex:none;inset:auto;transform:none;margin:0;padding:1px 4px;font-size:9px}
#listView #clients .client-info>.name{display:flex;align-items:center;justify-content:flex-start;gap:5px;min-width:0}
#listView #clients .client-info>.name>.client-name-text{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#listView #clients .client-info>.name>.client-type-badge{position:static;float:none;flex:none;margin:0;padding:1px 5px}
#editView #profileHero{display:flex;flex-direction:column;align-items:center;text-align:center}
#editView #profileHero>.profile-avatar{margin:0 auto 8px;flex:none}
#editView #profileHero>h3{width:100%;margin:0;justify-content:center;text-align:center}
#editView #profileHero>.profile-phone{width:100%;text-align:center;margin:6px 0}
#editView #profileHero>.client-contact-icons{width:100%}
#productPasses>.list-heading{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#productPasses>.list-heading>h3{margin:0;margin-right:auto}
#productPasses>.list-heading>#addProductPass{flex:none;width:auto;min-height:44px;margin:0 0 0 auto;padding:6px 10px;font-size:12px}
#editView #profileHero{display:flex!important}
#editView #profileHero>.profile-avatar{align-self:center;margin:0 auto 8px!important}
@media(min-width:761px) and (max-width:950px){
 #scheduleView #appointments .compact-appointment{grid-template-columns:40px 28px minmax(0,1fr) 42px 32px 6px;column-gap:5px}
 #scheduleView #appointments .compact-appointment>.avatar{width:28px;height:28px;min-width:28px}
 #scheduleView #appointments .compact-appointment>strong{flex-wrap:wrap}
 #scheduleView #appointments .compact-appointment>.compact-service{white-space:normal;overflow-wrap:anywhere}
 #scheduleView #appointments .compact-appointment>.pill{width:32px}
}

/* Requested profile, badge ordering and top-up emphasis only. */
#editView #profileHero{display:grid!important;grid-template-columns:auto auto;justify-content:start;align-items:center;column-gap:8px;row-gap:3px;text-align:left}
#editView #profileHero>.profile-avatar{grid-column:1;grid-row:1;width:48px;height:48px;min-height:48px;margin:0!important;justify-self:start}
#editView #profileHero>.profile-type-toggle{grid-column:2;grid-row:1;justify-self:start;align-self:center;min-height:32px;height:auto;padding:4px 9px;margin:0;font-size:11px}
#editView #profileHero>h3{grid-column:1/-1;grid-row:2;width:100%;text-align:left;justify-content:flex-start;margin:0;font-size:18px}
#editView #profileHero>h3>.profile-name{max-width:100%;text-align:left;-webkit-line-clamp:2;line-height:1.3}
#editView #profileHero>.profile-phone{grid-column:1/-1;grid-row:3;text-align:left;margin:0;font-size:12px}
#editView #profileHero>.client-contact-icons{grid-column:1/-1;grid-row:4;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;margin-top:8px}
#editView #profileHero{grid-template-columns:48px minmax(0,1fr);width:100%}
#scheduleView #appointments .compact-appointment>strong{flex-wrap:nowrap}
#scheduleView #appointments .compact-appointment>strong>.booking-name{flex:0 1 auto;min-width:0}
#prepaidInfo>.list-heading{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
#prepaidInfo>.list-heading>h3{flex:1;min-width:0;margin:0;font-size:clamp(13px,3.5vw,18px)}
#prepaidInfo>.list-heading>button[data-permission="credit.issue"]{flex:none;margin-left:auto;background:var(--brown);color:#fffaf1;border-radius:10px;min-height:40px;padding:7px 12px;font-size:12px;white-space:nowrap}
#prepaidInfo>.list-heading>button[data-permission="credit.issue"]::first-letter{font-size:15px;font-weight:700}

/* Four final corrections: existing customer, selected booking name, new registration, phone top-up. */
body:not([data-new-client=true]) #editView #profileHero{display:flex!important;flex-direction:column;align-items:center;gap:4px;padding-top:0;text-align:center}
body:not([data-new-client=true]) #editView #profileHero>.profile-identity-row{display:flex;align-items:center;justify-content:center;gap:7px;width:fit-content;max-width:100%;min-width:0;margin:0 auto}
#editView #profileHero>.profile-identity-row>.profile-avatar{width:48px;height:48px;min-width:48px;flex:none;margin:0!important}
#editView #profileHero>.profile-identity-row>h3{flex:0 1 auto;min-width:0;width:auto;margin:0;font-size:18px;line-height:1.3}
#editView #profileHero>.profile-identity-row>h3>.profile-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;max-height:2.6em;margin:0;text-align:center;line-height:1.3}
#editView #profileHero>.profile-identity-row>.profile-type-toggle{flex:none;margin:0;padding:4px 8px;min-height:32px;height:auto;font-size:11px;white-space:nowrap}
body:not([data-new-client=true]) #editView #profileHero>.profile-phone{width:100%;text-align:center;margin:0;font-size:12px}
#scheduleView #appointmentForm :is(#appointmentClient,#appointmentClientPicker){text-align:center;text-align-last:center;justify-content:center;width:100%;white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;height:auto;min-height:44px;padding:8px 12px;line-height:1.4}
body[data-new-client=true] #editView #profileHero{display:none!important}
body[data-new-client=true] #editView #newClientTypeTabs:not([hidden]){display:flex!important;justify-content:center;gap:8px;margin:8px 0 14px}
body[data-new-client=true] #editView #newClientTypeTabs>button{flex:0 1 140px;min-width:0;min-height:44px;padding:8px}
body[data-new-client=true] #editView #clientTypeField{display:none!important}
body[data-new-client=true] #editView #clientInfoEditor>.profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body[data-new-client=true] #editView #clientInfoEditor>.profile-fields>.field{min-width:0}
@media(max-width:760px){
 body:not([data-tablet=true]) #prepaidInfo>.list-heading>button[data-permission="credit.issue"]{position:relative;height:34px;min-height:34px;min-width:0;width:fit-content;flex:0 0 auto;padding:5px 11px;font-size:12px}
 body:not([data-tablet=true]) #prepaidInfo>.list-heading>button[data-permission="credit.issue"]::after{content:'';position:absolute;inset:-5px 0}
}

/* Customer editor validation only: keep the name/phone grid columns stable. */
#clientInfoEditor > .profile-fields > label.field > .inline-validation{
 display:block;
 flex:none;
 max-width:100%;
 margin:0;
 overflow-wrap:anywhere;
}

/* Urgent home gestures + booking-time validation only / 2026-10-11. */
#homeSchedule > .home-booking-grid,
#homeSchedule > .date-switch{touch-action:pan-y;user-select:none;-webkit-user-select:none}
#homeSchedule > .home-booking-grid{grid-template-columns:repeat(2,minmax(0,1fr));height:auto;max-height:none;overflow:visible}
#appointmentForm :is(.appointment-time-inputs,.wedding-time-row){align-items:start}
#appointmentForm :is(.appointment-time-inputs,.wedding-time-row) > label.field > .inline-validation{
 display:block;flex:none;min-width:0;max-width:100%;width:100%;box-sizing:border-box;
 margin:4px 0 0;overflow-wrap:anywhere;white-space:normal;text-align:left;
}

/* 2026-10-11 scoped fix: fixed eight home slots + in-panel horizontal drag. */
#homeSchedule > .home-booking-grid{position:relative}
#homeSchedule .home-booking-empty-slot{display:none}
#homeSchedule .home-empty-status{grid-column:1/-1;width:100%;margin:0}
#homeSchedule[data-home-dragging="cards"] > .home-booking-grid{transform:translateX(var(--home-drag-offset,0px))}
#homeSchedule[data-home-dragging="date"] > .date-switch{transform:translateX(var(--home-drag-offset,0px))}
#homeSchedule[data-home-dragging] :is(.home-booking-grid,.date-switch){cursor:grabbing}
@media(hover:hover){
 #homeSchedule > .home-booking-grid[data-pages]:not([data-pages="1"]),
 #homeSchedule > .date-switch{cursor:grab}
}
@media(min-width:651px), (hover:hover) and (pointer:fine){
 #homeSchedule > .home-booking-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:repeat(4,minmax(0,1fr));grid-auto-rows:0;
  height:415px;min-height:415px;max-height:415px;gap:5px;
  flex:none;align-content:stretch;overflow:visible;
 }
 #homeSchedule .home-booking-grid > .home-appointment{
  height:100%;min-height:0;max-height:100%;justify-content:center;overflow:hidden;
 }
 #homeSchedule .home-booking-empty-slot{
  display:block;min-width:0;min-height:0;border:1px dashed var(--line);border-radius:10px;
 }
 #homeSchedule .home-empty-status{
  position:absolute;inset:0;display:grid;place-content:center;padding:0;pointer-events:none;
 }
 #homeSchedule > .page-dots{height:36px;min-height:36px;max-height:36px;flex:none;padding:0;margin-top:4px}
 #homeSchedule > .single-page-placeholder{display:flex;visibility:hidden}
}
/* iPad split view: keep the same eight slots even below the desktop breakpoint. */
@media(max-width:650px){
 body[data-tablet="true"] #homeSchedule > .home-booking-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:repeat(4,minmax(0,1fr));grid-auto-rows:0;
  height:415px;min-height:415px;max-height:415px;gap:5px;flex:none;
 }
 body[data-tablet="true"] #homeSchedule .home-booking-grid > .home-appointment{
  height:100%;min-height:0;max-height:100%;justify-content:center;overflow:hidden;
 }
 body[data-tablet="true"] #homeSchedule .home-booking-empty-slot{
  display:block;min-width:0;min-height:0;border:1px dashed var(--line);border-radius:10px;
 }
 body[data-tablet="true"] #homeSchedule .home-empty-status{
  position:absolute;inset:0;display:grid;place-content:center;padding:0;pointer-events:none;
 }
 body[data-tablet="true"] #homeSchedule > .page-dots{height:36px;min-height:36px;max-height:36px;flex:none;padding:0;margin-top:4px}
 body[data-tablet="true"] #homeSchedule > .single-page-placeholder{display:flex;visibility:hidden}
}

/* The discount unit is the label above each line's editable value. */
#editView .service-lines .billing-discount-unit {
  display: inline-flex; align-items: center; justify-content: flex-start;
  justify-self: start; min-width: 0; min-height: 28px; padding: 2px 3px;
  background: transparent; border: 0; box-shadow: none; color: var(--brown);
  font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
}
@media(max-width:650px) {
  #editView .service-lines .billing-item {
    grid-template-columns: minmax(0,1fr) minmax(65px,.95fr) minmax(72px,.8fr) 40px;
    gap: 6px;
  }
}
