/* cyrillic-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(tracker/fonts/cormorant-garamond-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(tracker/fonts/cormorant-garamond-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(tracker/fonts/cormorant-garamond-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(tracker/fonts/cormorant-garamond-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(tracker/fonts/cormorant-garamond-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(tracker/fonts/manrope-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(tracker/fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(tracker/fonts/manrope-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(tracker/fonts/manrope-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(tracker/fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(tracker/fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.bt {
  color-scheme: light;
  --bg:#fff8ef; --panel:#fffcf7; --line:#e2d1ba; --ink:#402b48;
  --muted:#6c5d6d; --plum:#3e2a46; --gold:#79582c; --gold-line:#dcc9a3;
  --serif:"Cormorant Garamond",Georgia,serif; --sans:Manrope,system-ui,sans-serif;
}
.bt * {box-sizing:border-box}
.bt {margin:0; color:var(--ink); background:var(--bg); font:1rem/1.55 var(--sans)}
.bt a {color:inherit; text-decoration:none}
.bt a:hover {text-decoration:underline}
.bt button, .bt input, .bt select, .bt textarea {font:inherit}
.bt button {color:inherit; cursor:pointer}
.bt :focus-visible {outline:2px solid #795281; outline-offset:3px}
.bt h1, .bt h2, .bt h3, .bt p {margin:0}
.bt [hidden] {display:none!important}
.bt {width:min(1160px,100%); margin-inline:auto; padding-inline:28px}
.bt {flex:1; padding-top:22px; padding-bottom:54px}
.bt .breadcrumb {font-size:.85rem; color:var(--muted); margin-bottom:16px}
.bt .breadcrumb a {font-weight:700}
.bt .primary, .bt .secondary, .bt .quiet, .bt .text-button {display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:42px; padding:8px 14px; border-radius:7px; border:1px solid transparent; font-size:.88rem; font-weight:800; line-height:1.3}
.bt .primary {background:var(--plum); color:#fffaf4; border-color:var(--plum)}
.bt .primary:hover {background:#59405f; text-decoration:none}
.bt .secondary {background:#fffaf3; border-color:var(--gold-line)}
.bt .secondary:hover, .bt .quiet:hover {background:#f2e8d9; text-decoration:none}
.bt .quiet, .bt .text-button {background:transparent; color:var(--ink)}
.bt .text-button {padding-inline:4px; text-decoration:underline; text-underline-offset:3px}
.bt .text-button:hover {color:#754467}
.bt .toolbar {display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 22px; padding:8px 12px; background:var(--panel); border:1px solid var(--line); border-radius:8px}
.bt .views {display:flex; flex-wrap:wrap; gap:5px; align-items:center}
.bt .views button {background:#fffaf2; border:1px solid var(--gold-line); border-radius:999px; font-weight:700; font-size:.88rem; min-height:38px; padding:5px 14px; white-space:nowrap}
.bt .views button[aria-pressed=true] {background:var(--plum); border-color:var(--plum); color:white}
.bt .views button:not([aria-pressed=true]):hover {background:#f2e7d9}
.bt .overview, .bt .calendar-layout {display:grid; grid-template-columns:minmax(0,1.75fr) minmax(295px,1fr); gap:22px; align-items:start}
.bt .section-head {display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px}
.bt .overview-heading {flex-wrap:wrap}
.bt .section-head h2, .bt .view-title {font:700 2.35rem/1.05 var(--serif); letter-spacing:-.02em}
.bt .routine-list, .bt .agenda-list {display:grid; gap:10px}
.bt .routine, .bt .side, .bt .calendar, .bt .history, .bt .empty {border:1px solid var(--line); border-radius:8px; background:var(--panel)}
.bt .routine {padding:14px 16px; box-shadow:0 2px 5px #65422f08}
.bt .routine-top, .bt .agenda, .bt .visit {display:flex; gap:12px; align-items:center}
.bt .kind-icon {display:grid; place-items:center; flex:0 0 42px; height:42px; border-radius:7px; border:1px solid; color:#5a3c63; background:#f0e6f1; border-color:#dac5dd}
.bt .kind-icon.nails {color:#844457; background:#fae7e8; border-color:#eac4cd}
.bt .service-icon {display:block; width:22px; height:22px; flex:none}
.bt .routine h3, .bt .agenda h3, .bt .visit h3 {font-size:1rem; line-height:1.35; font-weight:800; overflow-wrap:anywhere}
.bt .routine p, .bt .agenda p, .bt .visit p, .bt .empty p, .bt .muted {color:var(--muted); font-size:.88rem; overflow-wrap:anywhere}
.bt .routine-top>div:nth-child(2), .bt .visit>div:nth-child(2), .bt .agenda-info {flex:1; min-width:0}
.bt .routine-bottom {display:grid; grid-template-columns:1fr 1.1fr 1fr; gap:8px; border-top:1px solid var(--line); padding-top:10px; margin-top:12px}
.bt .mini {display:block; color:var(--muted); font-size:.81rem; margin-bottom:2px}
.bt .date-info {font-size:.9rem; font-weight:800; overflow-wrap:anywhere}
.bt .record-detail {display:flex; gap:6px; align-items:center}
.bt .swatch {display:inline-block; width:16px; height:16px; flex:0 0 16px; border-radius:50%; border:1px solid #6c455755}
.bt .side, .bt .calendar, .bt .history, .bt .empty {padding:15px 16px}
.bt .agenda {padding-bottom:10px; border-bottom:1px solid var(--line)}
.bt .agenda:last-child, .bt .visit:last-child {border-bottom:0; padding-bottom:0}
.bt .date-tile {display:grid; place-items:center; align-content:center; height:49px; flex:0 0 47px; background:#f4ead7; color:#684921; border:1px solid #ebd9b7; border-radius:7px}
.bt .date-tile strong {font:700 1.6rem/.85 var(--serif)}
.bt .date-tile small {font-weight:800; text-transform:uppercase; font-size:.67rem; margin-top:3px}
.bt .status {display:inline-flex; font-size:.75rem; font-weight:800; border-radius:999px; background:#f4ead7; color:#694922; padding:2px 8px; margin-top:4px}
.bt .status.due {color:#69441e; background:#f7e8c6}
.bt .status.complete {color:#355c49; background:#e7f0e5}
.bt .status.cancelled {color:#783d4a; background:#f9e7e9}
.bt .plan {display:grid; gap:8px; border-top:1px solid var(--line); margin-top:12px; padding-top:11px}
.bt .plan-button {justify-self:start}
.bt .empty h3 {font-size:1rem}
.bt .history, .bt .calendar-layout {margin-top:14px}
.bt .visit {border-bottom:1px solid var(--line); padding:8px 0}
.bt .cal-head {display:flex; justify-content:space-between; align-items:center; gap:6px; margin-bottom:11px}
.bt .cal-head h3 {font:700 clamp(1.45rem,4vw,2rem)/1 var(--serif); flex:1; text-align:center}
.bt .cal-head button {min-width:40px; padding-inline:8px}
.bt .cal-grid {display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px}
.bt .cal-grid>span {text-align:center; font-size:.79rem; color:var(--muted); padding-block:3px}
.bt .day {display:flex; flex-direction:column; gap:4px; align-items:flex-start; justify-content:flex-start; min-height:65px; min-width:0; border-radius:6px; border:1px solid #ebddcb; background:#fffaf4; padding:4px 5px; font-size:.84rem; font-weight:700; text-align:left}
.bt .day:hover {background:#f7eee2}
.bt .day[aria-pressed=true] {border-color:#6e4a75; box-shadow:inset 0 0 0 1px #6e4a75; background:#f6edf6}
.bt .day-number {display:grid; place-items:center; min-width:20px; height:20px}
.bt .day[aria-current=date] .day-number {color:#fff; background:var(--plum); border-radius:50%}
.bt .day-icons {display:flex; gap:2px; flex-wrap:wrap; align-items:center}
.bt .cal-icon {display:inline-grid; place-items:center; width:24px; height:24px; border-radius:5px; border:1px solid #d6c2da; color:#5a3c63; background:#efe5f1; flex:none}
.bt .cal-icon.nails {color:#803e53; border-color:#e8c2cb; background:#fae6e9}
.bt .cal-icon.due, .bt .kind-icon.due {color:#69441e; background:#fff2d5; border-color:#956b36; border-style:dashed}
.bt .cal-icon.due {border-radius:50%}
.bt .cal-icon.complete {color:#355c49; background:#e7f0e5; border-color:#b7cdb7}
.bt .due-key {display:flex; align-items:center; gap:6px; margin-top:12px; color:#69441e; font-size:.85rem; font-weight:800}
.bt .due-key + .legend {margin-top:6px}
.bt .due-preview:not(:empty) {padding:8px 10px; border:1px dashed #956b36; border-radius:7px; background:#fff2d5; color:#69441e; font-size:.9rem; font-weight:800}
.bt .cal-icon.cancelled {position:relative}
.bt .cal-icon.cancelled::after {content:""; position:absolute; width:72%; height:1px; background:currentColor; transform:rotate(-45deg)}
.bt .cal-icon .service-icon {width:16px; height:16px}
.bt .cal-more {font-size:.72rem; line-height:1}
.bt .legend {margin-top:12px; color:var(--muted); font-size:.84rem}
.bt .legend summary {cursor:pointer; font-weight:800; width:max-content}
.bt .legend-groups {display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr)); gap:8px 15px; margin-block:12px}
.bt .legend-group h4 {font-size:.86rem; margin:0}
.bt .legend ul {display:flex; flex-wrap:wrap; gap:7px 12px; list-style:none; padding:0; margin:8px 0}
.bt .legend li {display:flex; align-items:center; gap:5px}
.bt .legend .cal-icon {width:24px; height:24px}
.bt .legend .service-icon {width:18px; height:18px}
.bt .day-detail {margin-top:10px}
.bt .day-detail .agenda {align-items:start}
.bt .day-detail .section-head h2 {font-size:2rem}
.bt .day-detail .agenda-list {margin-bottom:13px}
.bt dialog {color:var(--ink); background:var(--panel); border:1px solid #bda984; border-radius:12px; width:min(590px,calc(100% - 24px)); max-height:calc(100dvh - 32px); padding:0; box-shadow:0 25px 70px #271b3055}
.bt dialog::backdrop {background:#24172a80}
.bt .dialog-inner {padding:20px}
.bt .dialog-header {display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:14px}
.bt .dialog-header h2 {font:700 2.45rem/1.05 var(--serif)}
.bt .close {min-width:42px; font-size:1.2rem; padding:5px}
.bt .form-grid, .bt .detail-grid {display:grid; grid-template-columns:1fr 1fr; gap:12px}
.bt .fields {display:grid; gap:5px; font-size:.89rem; font-weight:700; min-width:0}
.bt .full {grid-column:1/-1}
.bt input, .bt select, .bt textarea {width:100%; min-width:0; min-height:42px; background:#fffaf3; color:var(--ink); border:1px solid #cdb990; border-radius:8px; padding:8px 10px}
.bt select {appearance:none; padding-right:28px; background:#fffaf3 url("tracker/icons/select-chevron.svg") right 10px center no-repeat}
.bt textarea {resize:vertical; min-height:75px}
.bt .form-actions {display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:15px}
/* Direction D — Hero + dock (routine and visit details only). The hero is a
 * full-width plum button for the primary action; the dock is a row of small
 * icon buttons underneath, with Delete in red. Other dialogs keep
 * .form-actions untouched. */
.bt .detail-actions {margin-top:15px}
.bt .detail-hero {display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:48px; padding:10px 14px; border-radius:10px; border:1px solid var(--plum); background:var(--plum); color:#fffaf4; font-size:.92rem; font-weight:800; line-height:1.3}
.bt .detail-hero:hover {background:#59405f}
.bt .detail-hero svg {width:19px; height:19px; flex:none}
.bt .detail-dock {display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top:10px}
.bt .detail-dock-btn {display:flex; flex-direction:column; align-items:center; gap:3px; min-width:64px; padding:9px 6px 7px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); font-size:.68rem; font-weight:700; line-height:1.2}
.bt .detail-dock-btn svg {width:20px; height:20px}
.bt .detail-dock-btn:hover {border-color:#96759c; background:#f7f1f8}
.bt .detail-dock-btn:focus-visible {outline:2px solid #795281; outline-offset:2px}
.bt .detail-dock-danger {color:#a33333; border-color:#e3b7b7}
.bt .detail-dock-danger:hover {background:#fdf0f0; border-color:#c66}
.bt .detail-grid>div {padding:10px; border:1px solid var(--line); border-radius:7px; overflow-wrap:anywhere}
.bt .detail-grid strong {font-size:.92rem}
.bt .detail-body>p {margin-top:12px; overflow-wrap:anywhere; white-space:pre-wrap}
.bt .notice, .bt .form-note {color:var(--muted); font-size:.86rem; margin-bottom:8px}
.bt .toast {position:fixed; bottom:18px; right:18px; background:var(--plum); color:white; padding:10px 15px; border-radius:7px; z-index:5; max-width:calc(100% - 36px)}
.bt .color-field {display:flex; align-items:center; gap:8px}
.bt .color-field input[type=color] {width:46px; padding:5px}
.bt .color-field input[type=checkbox] {width:18px; min-height:18px; accent-color:var(--plum)}
.bt .color-field label {font-weight:400}
@media(max-width:850px) {.bt {padding-inline:20px}}
@media(max-width:690px) {.bt .overview, .bt .calendar-layout {grid-template-columns:1fr; gap:16px}
.bt .toolbar {flex-wrap:wrap; padding:8px}}
@media(max-width:420px) {.bt {padding-inline:12px}
.bt .calendar, .bt .side, .bt .routine {padding:10px}
.bt .cal-grid {gap:3px}
.bt .day {min-height:62px; padding:2px; gap:2px}
.bt .day-icons {gap:1px}
.bt .cal-icon {width:17px; height:17px}
.bt .cal-icon .service-icon {width:13px; height:13px}
.bt .views button {padding-inline:11px}
.bt .detail-grid, .bt .form-grid {gap:8px}}
.bt {--bg:#faf8f5; --panel:#fff; --line:#e9e2e9; --ink:#2d2131; --muted:#685d69; --plum:#4c3058; --gold-line:#e1d6e6}
.bt {
  background-color:var(--bg);
  background-image:radial-gradient(ellipse at top, #f3eaf5, transparent 680px);
}
.bt .page-heading {
  display:flex; justify-content:space-between; align-items:center;
  gap:16px; margin-bottom:20px; padding:clamp(16px,3vw,32px);
  border:1px solid #e8dce7; border-radius:20px;
  background:#f7eff5;
  background-image:
    radial-gradient(circle at 91% 12%, transparent 71px, #ac82ad22 72px, transparent 73px, transparent 103px, #ac82ad1c 104px, transparent 105px),
    linear-gradient(115deg,#fff8ee 0%,#fcf3f4 46%,#eee2f1 100%);
}
.bt .page-heading h1 {font-size:clamp(1.9rem,5vw,3rem); line-height:1.1; font-weight:850; letter-spacing:-.06em; margin-bottom:5px}
.bt .page-heading p {color:var(--muted); font-size:.94rem}
.bt .page-heading .primary {white-space:nowrap}
.bt .section-head h2, .bt .view-title, .bt .day-detail .section-head h2 {font:800 1.25rem/1.15 var(--sans); letter-spacing:-.035em}
.bt .toolbar {width:max-content; max-width:100%; background:#eee8ef; border:0; border-radius:13px; padding:4px; margin-bottom:20px}
.bt .views button {background:transparent; border:0; border-radius:9px; min-width:94px}
.bt .views button[aria-pressed=true] {background:#fff; color:var(--ink); box-shadow:0 1px 5px #34263516}
.bt .primary, .bt .secondary, .bt .quiet, .bt .text-button {border-radius:10px}
.bt .overview {grid-template-columns:minmax(0,1.25fr) minmax(285px,1fr); margin-bottom:23px}
.bt .overview-heading {margin-bottom:12px}
.bt .routine, .bt .side, .bt .calendar, .bt .empty {border-radius:15px; box-shadow:none}
.bt .routine-bottom {border-color:#eee9ee}
.bt .treatment-thumbnail {width:56px; height:56px; flex:0 0 56px; display:grid; place-items:center; overflow:hidden; border-radius:13px; background:#eee5f2; color:#553660}
.bt .treatment-thumbnail.nails {background:#f9edf1; color:#813f55}
.bt .treatment-thumbnail img {width:100%; height:100%; object-fit:cover; display:block}
.bt .treatment-thumbnail .service-icon {width:25px; height:25px}
.bt .next-visit {position:relative; display:flex; align-items:center; gap:13px; min-height:112px; padding:15px; border-radius:16px; background:#eee5f2; border:1px solid #e6d9eb; margin-bottom:16px}
.bt .next-visit .treatment-thumbnail {width:70px; height:70px; flex-basis:70px; background:#f9f1fb; border:1px solid #fff9}
.bt .next-copy {flex:1; min-width:0}
.bt .next-copy .mini {font-size:.79rem; font-weight:800; color:#614969}
.bt .next-copy h3 {font-size:1.15rem; letter-spacing:-.04em; overflow-wrap:anywhere}
.bt .next-copy p {font-size:.85rem; color:var(--muted); overflow-wrap:anywhere}
.bt .next-visit .secondary {background:#fffafc}
.bt .timeline .agenda {margin-left:7px; padding-left:12px; border-left:2px solid #e9ddec}
.bt .timeline .date-tile {background:#f3edf5; color:#4c3058; border-color:#e8ddeb}
.bt .timeline .date-tile strong {font:800 1.04rem/1 var(--sans)}
.bt .timeline .text-button {font-size:.82rem}
.bt .last-look {display:flex; align-items:center; gap:10px; margin-top:18px; padding-top:15px; border-top:1px solid var(--line)}
.bt .last-look .treatment-thumbnail {width:42px; height:42px; flex-basis:42px}
.bt .last-look h3 {font-size:.88rem}
.bt .last-look p {display:flex; gap:6px; align-items:center; font-size:.83rem; color:var(--muted)}
.bt .last-look .text-button {margin-left:auto;text-align:left}
.bt .calendar-actions {display:flex; align-items:center; gap:7px; flex-wrap:wrap}
.bt .calendar-mode[aria-pressed=true] {background:#eee5f2; border-color:#b59bbf}
.bt .cal-head h3 {font:800 clamp(1rem,3vw,1.24rem)/1.1 var(--sans)}
.bt .cal-grid .day {background:#fcf9fd;border-color:#eee7ef;border-radius:8px; min-height:63px}
.bt .cal-grid .day[aria-pressed=true] {background:#eee2f2; border-color:#9e7bac}
@media(max-width:690px) {.bt .overview {grid-template-columns:1fr}
.bt .page-heading {align-items:flex-start}
.bt .page-heading p {max-width:25ch}
.bt .page-heading .primary {padding-inline:10px}
.bt .next-visit .treatment-thumbnail {width:57px;height:57px;flex-basis:57px}
.bt .calendar-actions {justify-content:flex-end}
.bt .calendar-actions button {padding-inline:9px}}
.bt .routine-bottom {grid-template-columns:repeat(4,minmax(0,1fr))}
.bt .routine {container-type:inline-size}
@container(max-width:420px) {.bt .routine-bottom {grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:10px}}
.bt .calendar-layout.quarter, .bt .calendar-layout.year {grid-template-columns:minmax(0,1fr)}
.bt .period-months {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px}
.bt .calendar-layout.year .period-months {grid-template-columns:repeat(4,minmax(0,1fr))}
.bt .month-tile {background:#fdfafd; border:1px solid var(--line); border-radius:12px; text-align:left; padding:10px; min-width:0}
.bt .month-tile:hover {background:#f5edf7; border-color:#c4a6cd}
.bt .month-tile strong {display:block; font-size:.9rem; margin-bottom:6px; overflow-wrap:anywhere}
.bt .mini-month-grid {display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); text-align:center; font-size:.69rem; line-height:1.4; row-gap:3px}
.bt .mini-day {display:grid; justify-items:center; align-content:start; gap:1px; min-width:0; font-variant-numeric:tabular-nums}
.bt .mini-day-markers {display:flex; align-items:center; justify-content:center; gap:1px; height:5px}
.bt .period-marker {display:inline-block; flex:none; width:4px; height:4px; box-sizing:border-box}
.bt .period-marker.complete {background:#36734e; border-radius:50%}
.bt .period-marker.booked {background:#78498f; border-radius:1px}
.bt .period-marker.due {border:1px solid #9a6b23; border-radius:50%}
.bt .period-key .period-marker {width:8px; height:8px}
.bt .period-key > span {display:inline-flex; align-items:center; gap:5px}
.bt .mini-day.current {font-weight:800; text-decoration:underline}
.bt .mini-month-count, .bt .period-key {font-size:.76rem;color:var(--muted)}
.bt .mini-month-count {display:block; margin-top:6px}
.bt .period-key {display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:12px}
.bt .category-picker {margin:0; padding:0; border:0; min-width:0}
.bt .category-picker legend {padding:0; margin-bottom:8px; font-size:.85rem; font-weight:800}
.bt .category-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.bt .category-option {position:relative; min-width:0; cursor:pointer}
.bt .category-option input {position:absolute;width:1px;height:1px; min-height:0; padding:0; border:0; opacity:0; overflow:hidden}
.bt .category-card {position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;height:100%;min-height:100px;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:13px;padding:8px 4px}
.bt .category-option:hover .category-card {border-color:#85608b}
.bt .category-option input:checked + .category-card {border-color:#795184;box-shadow:inset 0 0 0 1px #795184; background:#f0e5f3}
.bt .category-option input:focus-visible + .category-card {outline:2px solid #795281; outline-offset:2px}
.bt .category-art {display:block;width:54px;height:54px;flex:none;overflow:hidden;border-radius:10px}
.bt .category-art .treatment-thumbnail {width:100%; height:100%; border-radius:10px}
.bt .category-art img {object-position:center;object-fit:contain}
.bt .category-name {font-size:.73rem;font-weight:800;line-height:1.13;overflow-wrap:anywhere}
@media(max-width:850px) {.bt .calendar-layout.year .period-months {grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:500px) {.bt .period-months, .bt .calendar-layout.year .period-months {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.bt .month-tile {padding:7px}
.bt .category-grid {grid-template-columns:repeat(3,minmax(0,1fr))}}
.bt .category-group {margin-top:12px}
.bt .category-group h3 {font-size:.9rem;margin:0 0 6px}
.bt .category-group + .category-group {padding-top:11px;border-top:1px solid var(--line)}
.bt .routine-specific-fields {display:contents}
.bt .page-actions {display:grid;gap:7px;flex-shrink:0}
@media(max-width:460px) {.bt .page-heading {flex-wrap:wrap}
.bt .page-actions {justify-items:start}}
.bt .category-option input:checked + .category-card::after {content:"✓";position:absolute;top:5px;right:5px;background:#654571;color:white;width:17px;height:17px;border-radius:50%;font-size:11px;line-height:17px}
/* Treatment panel inside the category grid: spans the full row directly
 * under the selected category, so the treatments are visible and tappable
 * right after picking a category, without scrolling past the rest of the grid. */
.bt .category-grid #routine-services {display:block;grid-column:1/-1;background:#eee4f1;border:1px solid #ddd0e3;border-radius:13px;padding:14px 16px 16px;margin:2px 0}
.bt .category-grid #routine-services .tap-group legend {font-size:1rem;margin-bottom:10px}
.bt .category-grid #routine-services #custom-label {margin-top:10px}
.bt .tap-group {border:0;padding:0;margin:0;min-width:0}
.bt .tap-group legend {font-size:.85rem;font-weight:800;margin-bottom:7px;padding:0}
.bt .tap-list {display:flex;gap:6px;flex-wrap:wrap}
.bt .tap-option {position:relative;cursor:pointer}
.bt .tap-option input {position:absolute;width:1px;height:1px;min-height:0;padding:0;border:0;opacity:0}
.bt .tap-choice {display:flex;min-height:42px;align-items:center;justify-content:center;text-align:center;padding:7px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-size:.84rem;font-weight:700}
.bt .tap-choice:hover {border-color:#96759c}
.bt .tap-option input:checked + .tap-choice {background:#f0e5f3;border-color:#795184;box-shadow:inset 0 0 0 1px #795184}
.bt .tap-option input:focus-visible + .tap-choice {outline:2px solid #795281;outline-offset:2px}
.bt .segmented .tap-list {background:#f5eef5;border-radius:13px;padding:4px;display:grid;grid-template-columns:1fr 1fr;gap:4px}
.bt .segmented .tap-choice {border-radius:10px}
.bt .appointment-toggle {display:flex;align-items:center;justify-content:space-between;gap:8px 14px;flex-wrap:wrap;font-size:.89rem;font-weight:800}
.bt .switch-line {display:inline-flex;align-items:center;gap:10px;background:#f6eff6;border-radius:999px;padding:0 12px;cursor:pointer}
.bt .switch-control {position:relative;display:block;width:50px;height:44px}
.bt .switch-control input {position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.bt .switch-track {pointer-events:none;position:absolute;inset:8px 0;background:#785886;border-radius:999px}
.bt .switch-track::before {content:"";position:absolute;left:4px;top:4px;width:20px;height:20px;border-radius:50%;background:white;box-shadow:0 1px 4px #25153440;transition:transform .15s ease}
.bt .switch-control input:checked + .switch-track {background:#4c6d5d}
.bt .switch-control input:checked + .switch-track::before {transform:translateX(22px)}
.bt .switch-control input:focus-visible + .switch-track {outline:2px solid var(--plum);outline-offset:3px}
.bt .switch-line:has(input:not(:checked)) > span:last-child, .bt .switch-line:has(input:checked) > span:first-child {color:var(--muted);font-weight:600}
@media(prefers-reduced-motion:reduce) {.bt .switch-track::before {transition:none}}
.bt .picker-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
.bt .date-picker, .bt .time-picker {display:contents}
.bt .picker-trigger {width:100%;display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:44px;padding:7px 10px;background:#fffaf3;color:var(--ink);border:1px solid #cdb990;border-radius:8px;text-align:left}
.bt .picker-trigger span[aria-hidden] {font-size:1.15rem;color:var(--plum)}
.bt .picker-trigger:hover, .bt .picker-trigger[aria-expanded=true] {border-color:#795184;background:#faf3fc}
.bt .picker-trigger[aria-invalid=true] {border-color:#a34156}
.bt .picker-error {grid-column:1/-1;grid-row:2;color:#903447;font-size:.84rem}
.bt .picker-panel {grid-column:1/-1;grid-row:3;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px;min-width:0}
.bt .picker-header {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.bt .picker-header button {min-width:44px;font-size:1.15rem;padding:4px}
.bt .picker-header button:disabled, .bt .picker-days button:disabled {opacity:.46;cursor:default}
.bt .picker-days {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;text-align:center}
.bt .picker-days > span {color:var(--muted);font-size:.72rem;font-weight:700}
.bt .picker-days button {border:1px solid transparent;background:transparent;color:var(--ink);border-radius:9px;min-height:42px;padding:0;font-variant-numeric:tabular-nums}
.bt .picker-days button[aria-current=date] {border-color:#aa8ab3}
.bt .picker-days button:not(:disabled):hover {background:#f6edf8}
.bt .picker-days button[aria-pressed=true], .bt .picker-days button[aria-pressed=true]:hover {background:var(--plum);color:white}
.bt .clear-picker-date {margin-top:5px}
.bt .clock-wheels {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.bt .clock-wheel-label {font-size:.85rem;font-weight:800;margin-bottom:5px;text-align:center}
.bt .clock-wheel-frame {position:relative;border:1px solid var(--line);border-radius:12px;background:#fcf9fc}
.bt .clock-wheel-frame::before {content:"";position:absolute;inset:44px 5px auto;height:44px;border-radius:8px;background:#f0e5f3;pointer-events:none}
.bt .clock-wheel {position:relative;height:132px;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y mandatory;scrollbar-width:none}
.bt .clock-wheel::-webkit-scrollbar {display:none}
.bt .clock-wheel::before, .bt .clock-wheel::after {content:"";display:block;height:44px}
.bt .clock-wheel button {display:block;width:100%;height:44px;min-height:0;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:1rem;font-variant-numeric:tabular-nums;scroll-snap-align:center}
.bt .clock-wheel button[aria-pressed=true] {color:var(--ink);font-weight:800}
.bt .clock-wheel button:focus-visible {outline:2px solid var(--plum);outline-offset:-4px}
.bt .clock-footer {display:flex;flex-wrap:wrap;align-items:end;justify-content:flex-end;gap:6px}
.bt .clock-footer fieldset {margin-right:auto}
.bt .clock-footer button {min-height:44px}