:root {
  --color-success: #23634e;
  --color-success-bg: #e8f2e9;
  --color-warning: #8c5413;
  --color-warning-bg: #fff0d8;
  --color-info: #345a70;
  --color-info-bg: #e7f0f5;
}
.ui-icon { width: 20px; height: 20px; flex-shrink: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--color-success); outline-offset: 3px; }
.input { min-height: 46px; font-size: 16px; }
.btn { min-height: 44px; }
.section-kicker { letter-spacing: .15em; font-size: 11px; }
.header-inner { max-width: 1320px; flex-wrap: nowrap; gap: 18px; }
.site-brand { flex-shrink: 0; }
.site-brand span { letter-spacing: -.03em; }
.header-nav { margin-right: auto; flex-wrap: nowrap; }
.header-actions .btn { padding: 10px 12px; }
.header-account { display: flex; gap: 9px; align-items: center; max-width: 210px; padding: 5px 0 5px 14px; border: 0; border-left: 1px solid var(--color-divider); background: transparent; color: var(--color-text); text-align: left; cursor: pointer; flex-shrink: 0; min-height: 52px; }
.header-account[aria-current] .account-avatar { background: var(--color-success); color: white; }
.account-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--color-surface); font-weight: 650; flex-shrink: 0; }
#headerProfileAvatar > svg { width: 100%; height: auto; }
.header-identity { display: grid; min-width: 0; }
.header-identity strong { font-size: 13px; line-height: 1.2; }
.header-identity > span { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; color: var(--color-neutral-700); }
.header-identity small { font-size: 10px; color: var(--color-success); }
.account-chevron { font-size: 17px; margin-left: 4px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--color-neutral-800); background: var(--color-neutral-200); border: 1px solid rgba(20,43,56,.06); }
.status-badge > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-available, .status-active { color: var(--color-success); background: var(--color-success-bg); }
.status-reserved, .status-confirmed, .status-return_requested, .status-maintenance { color: var(--color-warning); background: var(--color-warning-bg); }
.status-rented { color: var(--color-info); background: var(--color-info-bg); }
.status-cancelled { color: var(--color-error); background: var(--color-error-bg); }
#profileStatus:not(:empty), #orderActionStatus:not(:empty) { padding: 12px 16px; border-radius: 12px; color: var(--color-success); background: var(--color-success-bg); }
.catalog-search { display: grid; grid-template-columns: 1.5fr 1fr 1fr; background: var(--color-neutral-100); border: 1px solid var(--color-divider); border-radius: 20px; padding: 20px; gap: 16px; }
.catalog-search .field { min-width: 0; }
.catalog-filter-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--color-divider); padding-top: 14px; }
.catalog-filter-actions > div { display: flex; flex-wrap: wrap; gap: 6px; }
.availability-switch { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 0; min-height: 44px; cursor: pointer; color: var(--color-text); font-size: 14px; white-space: nowrap; }
.switch-track { width: 38px; height: 24px; border-radius: 99px; padding: 3px; background: #627c8e; transition: background .2s; }
.switch-track > span { display: block; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform .2s; box-shadow: 0 1px 3px #0002; }
[aria-checked="true"] .switch-track { background: var(--color-success); }
[aria-checked="true"] .switch-track > span { transform: translateX(14px); }
.choice { position: relative; min-width: 0; }
.choice-control { text-align: left; padding-right: 36px; cursor: pointer; position: relative; }
button.choice-control { display: block; line-height: 1.4; }
button.choice-control::after { content: ''; position: absolute; right: 16px; top: 18px; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
button.choice-control[aria-expanded="true"]::after { transform: rotate(225deg); top: 21px; }
.choice-search { cursor: text; }
.choice:has(.choice-search)::after { content: '⌄'; position: absolute; right: 15px; top: 8px; pointer-events: none; }
.choice-list { position: fixed; z-index: 120; overflow-y: auto; overscroll-behavior: contain; background: var(--color-neutral-100); color: var(--color-text); border: 1px solid var(--color-divider); border-radius: 14px; padding: 6px; box-shadow: 0 14px 44px #16384926; }
.choice-list[hidden] { display: none; }
.choice-option { font-size: 15px; padding: 11px 12px; border-radius: 8px; min-height: 44px; cursor: pointer; line-height: 1.45; }
.choice-option:hover, .choice-option.is-highlighted { color: var(--color-success); background: var(--color-success-bg); }
.choice-control[aria-invalid="true"] { border-color: var(--color-error); }
.assistant-dialog { position: fixed; z-index: 60; inset: 0 0 0 auto; width: min(376px,100vw); height: 100dvh; display: flex; flex-direction: column; border: 0; border-left: 1px solid var(--color-divider); border-radius: 0; background: var(--color-neutral-100); box-shadow: -12px 0 42px #17344815; animation: assistant-in .22s ease-out; }
.assistant-header { background: var(--color-surface); padding: 16px; flex-shrink: 0; }
.assistant-header h2 { font-size: 18px; }
.assistant-header p { color: var(--color-neutral-700); font-size: 11px; }
.chat-feed { padding: 16px; }
.chat-question { background: var(--color-success); }
.chat-answer { background: var(--color-neutral-200); }
.chat-prompts { padding: 0 14px 12px; }
.chat-quick { padding: 7px 10px; font-size: 11px; min-height: 44px; }
.assistant-dialog #chatForm { padding: 12px 14px max(14px,env(safe-area-inset-bottom)); flex-shrink: 0; }
.chat-input-row { gap: 6px; }
.chat-input-row button { padding: 10px 12px; }
@keyframes assistant-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (min-width: 1100px) {
  #app.with-assistant { padding-right: 376px; }
  .with-assistant .header-inner { flex-wrap: wrap; gap: 8px 14px; }
  .with-assistant .header-account { margin-left: auto; }
  .with-assistant .header-actions { order: 4; }
  .with-assistant .catalog-search { grid-template-columns: 1fr 1fr; }
  .with-assistant .catalog-query-field { grid-column: 1 / -1; }
  .with-assistant .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1099px) {
  .header-inner { flex-wrap: wrap; gap: 8px 16px; }
  .header-actions { margin-left: auto; }
  .header-account { max-width: 205px; }
  #app:has(.assistant-dialog[data-minimized="true"]) { padding-bottom: 96px; }
  .chat-prompts { display: flex; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior: contain; padding-bottom: 8px; flex-shrink: 0; }
  .chat-quick { flex-shrink: 0; }
}
@media (max-width: 700px) {
  .header-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 4px 8px; padding: 8px 12px; }
  .site-brand { grid-column: 1; grid-row: 1; gap: 5px; }
  .site-brand img { width: 30px; height: 30px; }
  .site-brand span { font-size: 14px; }
  .header-account { grid-column: 2; grid-row: 1; justify-self: end; padding-left: 8px; max-width: 176px; gap: 6px; }
  .account-avatar { width: 28px; height: 28px; font-size: 12px; }
  .header-identity strong { font-size: 12px; max-width: 115px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-identity > span { max-width: 110px; font-size: 10px; }
  .account-chevron { display: none; }
  .header-nav { grid-column: 1; grid-row: 2; gap: 0; margin: 0; justify-content: start; }
  .header-nav .nav-btn { padding: 6px; font-size: 11px; }
  .header-actions { grid-column: 2; grid-row: 2; margin: 0; gap: 4px; }
  .header-actions .btn { padding: 7px; font-size: 11px; min-height: 44px; }
  .header-actions .ui-icon { display: none; }
  .catalog-search { grid-template-columns: minmax(0,1fr); padding: 16px; gap: 14px; }
  .catalog-filter-actions { flex-wrap: wrap; }
  .catalog-filter-actions > div { width: 100%; justify-content: space-between; }
  .assistant-header { padding: 12px 14px; }
  .assistant-header h2 { font-size: 16px; }
  .assistant-note { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .assistant-dialog { animation: none; }
  .switch-track, .switch-track > span { transition: none; }
}
.personal-studio { max-width: 1220px; padding: 30px clamp(16px,3vw,28px) 72px; }
.account-heading { margin-bottom: 26px; }
.account-greeting { font-size: 17px; font-weight: 600; margin-top: 6px; }
.account-greeting > span { color: var(--color-neutral-700); font-weight: 400; font-size: 13px; }
.account-heading-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.personal-hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); border: 1px solid var(--color-divider); border-radius: 26px; overflow: hidden; background: var(--color-neutral-100); }
.personal-copy { padding: clamp(26px,4vw,48px); position: relative; z-index: 1; }
.personal-copy h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px,3.2vw,44px); letter-spacing: -.05em; line-height: 1.28; margin: 24px 0 14px; }
.personal-copy h1 > span { color: var(--color-neutral-700); }
.personal-copy > p { color: var(--color-neutral-700); font-size: 15px; line-height: 1.65; }
.personal-goal { margin: 26px 0 20px; display: grid; gap: 4px; padding-left: 14px; border-left: 2px solid var(--color-accent); }
.personal-goal > span { font-size: 11px; color: var(--color-neutral-700); }
.personal-goal strong { font-size: 17px; font-weight: 500; }
.personal-copy .personal-footnote { font-size: 11px; margin-top: 12px; }

.header-nav [aria-current] { color: var(--color-success); background: var(--color-success-bg); border-radius: 10px; }
.rehab-entry { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0 0; padding: 30px 36px; border-radius: 24px; background: #eef5da; }
.rehab-entry h2 { font-size: clamp(23px,2.5vw,32px); margin: 8px 0; letter-spacing: -.035em; }
.rehab-entry p:not(.section-kicker) { margin: 0; color: var(--color-neutral-700); max-width: 55ch; }
.rehab-entry .btn { flex-shrink: 0; }
.rehab-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; margin-top: 20px; padding: 36px 36px 36px 54px; background: #d9e7f4; border-radius: 28px; overflow: hidden; }
.rehab-copy h1 { font-family: var(--font-display); font-size: clamp(32px,3.7vw,54px); font-weight: 500; line-height: 1.3; letter-spacing: -.055em; margin: 24px 0; }
.rehab-copy h1 span { color: var(--color-success); }
.rehab-description { font-size: 20px; line-height: 1.55; max-width: 34ch; margin: 0 0 26px; }
.rehab-guidance { font-size: 13px; line-height: 1.6; color: var(--color-neutral-700); max-width: 48ch; margin: 24px 0 0; }
.rehab-visual { position: relative; }
.rehab-visual img { display: block; width: 100%; height: auto; border-radius: 20px; }
.rehab-visual span { position: absolute; bottom: 14px; right: 14px; background: var(--color-neutral-100); padding: 5px 10px; border-radius: 8px; font-size: 11px; }
@media (max-width: 700px) {
  .header-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .header-nav .nav-btn { min-height: 36px; font-size: 12px; padding: 6px 10px; }
  .header-actions { grid-column: 1 / -1; grid-row: 3; }
  .header-actions .btn { flex: 1; justify-content: center; }
  .rehab-entry { flex-direction: column; align-items: start; gap: 20px; padding: 24px; }
  .rehab-hero { grid-template-columns: minmax(0,1fr); padding: 26px 24px 20px; gap: 24px; }
  .rehab-copy h1 { font-size: clamp(26px,6.8vw,40px); margin: 18px 0; }
  .rehab-description { font-size: 17px; }
  .rehab-visual span { right: 8px; bottom: 8px; font-size: 10px; }
}
.studio-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--color-divider); border-radius: 20px; background: var(--color-neutral-100); margin-top: 16px; }
.studio-metric { padding: 24px 26px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.studio-metric + .studio-metric { border-left: 1px solid var(--color-divider); }
.metric-label { font-size: 11px; color: var(--color-neutral-700); }
.studio-metric > strong { font-size: 28px; font-family: var(--font-heading); font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.studio-metric strong > small { font-size: 13px; font-weight: 400; color: var(--color-neutral-700); }
.studio-metric p { font-size: 11px; color: var(--color-neutral-700); }
.completion-track { height: 4px; background: var(--color-divider); border-radius: 9px; margin: 2px 0; }
.completion-track > span { display: block; height: 100%; background: #67866c; border-radius: inherit; }
.profile-completion .text-btn { font-size: 12px; text-align: left; padding: 0; min-height: 28px; align-self: start; }
.personal-studio .account-tabs { display: flex; gap: 6px; position: sticky; top: var(--header-height,80px); z-index: 12; margin: 0 0 18px; padding: 10px 0; background: var(--color-bg); border-bottom: 1px solid var(--color-divider); }
.personal-studio .account-tab { cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; padding: 11px 20px; border: 0; border-radius: 99px; color: var(--color-neutral-700); background: transparent; min-height: 44px; }
.personal-studio .account-tab[aria-pressed="true"] { background: var(--color-text); color: var(--color-neutral-100); }
.personal-studio .empty-account { position: relative; padding: 36px; background: linear-gradient(120deg,#d9e7f4,#f9fcff); border-radius: 22px; }
.personal-studio .empty-account h2 { font-weight: 500; font-size: 27px; letter-spacing: -.02em; }
.personal-studio .empty-account p { margin: 12px 0 22px; }
.profile-editor { max-width: none; display: block; }
.profile-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; margin-bottom: 28px; }
.profile-intro .section-kicker { grid-column: 1 / -1; }
.profile-intro h2 { font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1.3; }
.profile-intro h2 span { color: var(--color-neutral-700); }
.profile-intro > p:last-child { align-self: end; max-width: 46ch; color: var(--color-neutral-700); font-size: 14px; }
.profile-section { border: 1px solid var(--color-divider); border-radius: 18px; margin: 0 0 24px; padding: 22px; background: var(--color-neutral-100); min-width: 0; }
.profile-section legend { font-size: 16px; font-weight: 600; padding: 0 10px; }
.profile-section legend span { color: var(--color-neutral-700); font-size: 11px; margin-right: 8px; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.profile-fields .field { min-width: 0; }
.field-hint { font-size: 11px; line-height: 1.5; color: var(--color-neutral-700); margin-top: 7px; }
.profile-basis-note { display: flex; gap: 12px; align-items: start; color: #355127; background: #f0f8da; padding: 18px 20px; border-radius: 16px; font-size: 13px; line-height: 1.6; }
.profile-save { margin: 24px 0 16px; }
@media (max-width: 700px) {
  .personal-studio { padding-top: 20px; }
  .account-heading { align-items: start; gap: 10px; }
  .account-greeting { font-size: 15px; }
  .account-greeting > span { display: block; font-size: 11px; }
  .account-heading-actions { justify-content: end; }
  .account-heading-actions .btn { padding: 8px 10px; font-size: 11px; }
  .personal-hero { grid-template-columns: 1fr; border-radius: 22px; }
  .personal-copy { padding: 28px 24px; }
  .personal-copy h1 { font-size: clamp(27px,7vw,36px); margin-top: 20px; }
  .personal-copy > p { font-size: 14px; }
  .personal-goal { margin-top: 20px; }
  .studio-metrics { grid-template-columns: 1fr 1fr; }
  .studio-metric { padding: 18px 16px; }
  .studio-metric > strong { font-size: 22px; }
  .studio-metric:nth-child(3) { border-top: 1px solid var(--color-divider); border-left: 0; grid-column: 1 / -1; }
  .personal-studio .account-tabs { gap: 0; justify-content: space-between; }
  .personal-studio .account-tab { padding: 10px 12px; font-size: 12px; }
  .personal-studio .empty-account { padding: 26px 22px; }
  .personal-studio .empty-account h2 { font-size: 23px; }
  .profile-intro { grid-template-columns: 1fr; gap: 12px; }
  .profile-intro h2 { font-size: 27px; }
  .profile-fields { grid-template-columns: 1fr; }
  .profile-section { padding: 18px 16px; }
}
.assistant-window-actions { display: flex; gap: 2px; }
.assistant-dialog[data-minimized="true"] { top: auto; width: min(340px,100vw); height: auto; }
.assistant-dialog[data-minimized="true"] .chat-feed,
.assistant-dialog[data-minimized="true"] .chat-prompts,
.assistant-dialog[data-minimized="true"] #chatForm { display: none; }
#accountPanel { margin-top: 30px; scroll-margin-top: calc(var(--header-height,80px) + 86px); }
.privacy-consent { margin: 12px 0; font-size: 16px; line-height: 1.5; }
.privacy-consent label, #chatForm .privacy-consent label { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; font-weight: 400; line-height: 1.5; cursor: pointer; }
.privacy-consent input { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; accent-color: var(--color-accent); }
.privacy-consent p { margin: 6px 0 0 32px; }
.privacy-consent .privacy-draft { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--color-accent-700); }
.privacy-consent a, .legal-document a { text-decoration: underline; text-underline-offset: 3px; }
.legal-document { max-width: 820px; margin: 0 auto; padding: 32px 20px 64px; overflow-wrap: anywhere; }
.legal-document h1 { margin: 28px 0 20px; font-size: clamp(28px, 5vw, 46px); line-height: 1.15; }
.legal-text { font-size: 16px; line-height: 1.7; }
.legal-text p { margin: 24px 0; white-space: pre-line; }
.legal-date, .legal-version { color: var(--color-neutral-700); font-size: 14px; margin: 20px 0; }
.legal-document nav { display: grid; gap: 16px; border-top: 1px solid var(--color-divider); padding-top: 24px; }
.equipment-notice { border-left: 3px solid var(--color-accent); padding: 12px 16px; margin: 16px 0; background: var(--color-neutral-100); font-size: 14px; line-height: 1.6; }

/* The avatar uses saved preferences; motion is decorative and optional. */
.avatar-card { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 24px 28px 30px; background: radial-gradient(ellipse at 50% 42%,#f9fcff 0%,#e8f3ee 56%,#d3e5f1 100%); }
.avatar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.avatar-heading .section-kicker { margin: 0; font-size: 10px; }
.avatar-heading .text-btn { font-size: 11px; min-height: 44px; }
.avatar-stage { position: relative; display: grid; place-items: center; min-height: 250px; isolation: isolate; }
.avatar-stage::before { content: ''; position: absolute; width: min(80%,300px); aspect-ratio: 1; border-radius: 50%; border: 1px solid #bdcfd7; z-index: -1; }
.avatar-stage::after { content: ''; position: absolute; bottom: 5%; width: 35%; height: 18px; border-radius: 50%; background: #294c5b1a; filter: blur(6px); z-index: -1; }
.profile-avatar { width: min(100%,360px); aspect-ratio: 1; display: grid; place-items: center; }
.profile-avatar > svg { width: 100%; height: auto; overflow: visible; animation: avatar-breathe var(--avatar-duration,6s) ease-in-out infinite; }
.avatar-fallback .ui-icon { width: 100px; height: 100px; color: var(--color-success); }
.profile-avatar[data-paused="true"] > svg { animation-play-state: paused; }
.avatar-caption { text-align: center; }
.avatar-caption h2 { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -.035em; margin: 0 0 6px; }
.avatar-caption p { font-size: 12px; line-height: 1.6; color: var(--color-neutral-700); margin: 0; }
.avatar-caption .avatar-key { margin: 12px 0 6px; font-size: 11px; }
.avatar-caption .text-btn { min-height: 44px; }
@keyframes avatar-breathe { 0%,100% { transform: translateY(3px) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
@media (max-width: 700px) {
  .avatar-card { padding: 14px 20px 22px; }
  .avatar-stage { min-height: 200px; }
  .profile-avatar { width: 220px; }
  .avatar-caption h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-avatar > svg { animation: none; }
  #avatarMotion { display: none; }
}

.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
@media(max-width: 767px) { .cookie-actions { width: 100%; } .cookie-actions button { flex: 1 1 160px; } }

.cookie-notice[hidden] { display: none; }
