:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #20322f; background: #f7f4ef; }
* { box-sizing: border-box; }
body { margin: 0; }
.shell { max-width: 1330px; margin: 0 auto; padding: 0 46px; }
.topbar { height: 92px; border-bottom: 1px solid #dcded7; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 22px; font-weight: 750; letter-spacing: -.04em; display: flex; align-items: center; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; gap: 4px; }
.clinic-name { white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: #d7e9df; color: #1d5b48; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; font-size: 27px; line-height: 1; }
.brand-light { font-weight: 500; color: #688078; font-size: 11px; letter-spacing: .04em; }
.prototype, .eyebrow, .step { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.avatar-nav { text-decoration: none; color: #326d54; font-size: 12px; font-weight: 750; padding: 9px 0; }
.avatar-nav:hover { text-decoration: underline; }
.avatar-nav:focus-visible { outline: 3px solid #438e6b; outline-offset: 4px; }
.prototype { padding: 9px 13px; border-radius: 100px; color: #507063; background: #e4eee7; }
.intro { padding: 49px 0 32px; max-width: 850px; }
.eyebrow { color: #4f8d72; margin: 0 0 15px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.06; font-size: clamp(44px, 5.3vw, 76px); letter-spacing: -.055em; margin: 0; }
h1 em { color: #729881; font-weight: 400; }
.lead { color: #66766d; line-height: 1.7; font-size: 15px; max-width: 575px; margin: 20px 0 0; }
.experience { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr); gap: 26px; align-items: stretch; }
.portrait-card { background: #e9e4dc; padding: 12px 12px 0; border-radius: 18px; overflow: hidden; align-self: start; position: sticky; top: 16px; }
.portrait-wrap { position: relative; border-radius: 11px; overflow: hidden; aspect-ratio: 1; background: #e9e4dc; }
.portrait-loading { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait-loading[hidden] { display: none; }
canvas { display: block; position: relative; width: 100%; height: 100%; object-fit: cover; }
canvas[hidden] { display: none; }
.portrait-fallback { position: absolute; inset: 0; overflow: hidden; }
.portrait-fallback[hidden], .file-hint[hidden] { display: none; }
.fallback-scene, .fallback-tone { position: absolute; inset: 0; }
.fallback-scene img, .fallback-tone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fallback-shape { opacity: var(--shape, 0); -webkit-mask-image: radial-gradient(ellipse var(--mouth-width, 24%) var(--mouth-height, 11%) at var(--mouth-x, 50%) var(--mouth-y, 55.5%), black 65%, transparent 100%); mask-image: radial-gradient(ellipse var(--mouth-width, 24%) var(--mouth-height, 11%) at var(--mouth-x, 50%) var(--mouth-y, 55.5%), black 65%, transparent 100%); }
.fallback-tone { opacity: var(--tone, 0); filter: var(--tone-filter, brightness(1.25) saturate(.6)); -webkit-mask-image: radial-gradient(ellipse 9% 3% at var(--mouth-x, 50%) var(--mouth-y, 55.5%), black 58%, transparent 100%); mask-image: radial-gradient(ellipse 9% 3% at var(--mouth-x, 50%) var(--mouth-y, 55.5%), black 58%, transparent 100%); }
.photo-profiles { border: 0; border-top: 1px solid #ebeee9; padding: 18px 0 22px; margin: 0; min-width: 0; }
.photo-profiles legend { font-size: 14px; font-weight: 750; padding: 0; }
.photo-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.photo-profile { border: 2px solid #e4e9e3; background: #fafaf8; padding: 5px 5px 9px; color: #425b4d; min-height: 0; display: grid; gap: 6px; text-align: center; font-size: 11px; }
.photo-profile.is-active { border-color: #468e6b; background: #ecf5ef; }
.photo-profile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.step-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 30px; }
.step-tab { border: 1px solid #dce7dd; background: #f7faf7; color: #557163; min-height: 46px; padding: 9px; }
.step-tab.is-active { background: #326d54; border-color: #326d54; color: #fff; }
[data-step-pane][hidden] { display: none; }
.face-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 20px; }
.face-field { min-width: 0; }
.face-field label { display: block; font-size: 12px; font-weight: 750; margin-bottom: 7px; }
.face-field select { width: 100%; min-height: 44px; border: 1px solid #d8e4d9; border-radius: 9px; background: #fff; color: #20322f; font: inherit; font-size: 12px; padding: 0 10px; }
.face-field select:focus-visible { outline: 3px solid #438e6b; outline-offset: 2px; }
.next-step { width: 100%; margin: 20px 0 7px; }
.portrait-label { position: absolute; top: 16px; left: 16px; border-radius: 100px; background: rgba(255,255,255,.91); padding: 9px 13px; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: #3b5548; backdrop-filter: blur(9px); }
.label-dot { width: 7px; height: 7px; background: #65a587; border-radius: 50%; }
.portrait-footer { display: flex; justify-content: space-between; color: #708077; padding: 15px 7px 17px; font-size: 11px; font-weight: 700; letter-spacing: .035em; }
.controls { background: white; border: 1px solid #e9e8e2; border-radius: 18px; padding: clamp(28px, 3.6vw, 51px); display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(31,51,44,.035); }
.step { color: #5d9a7d; }
.controls h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.05em; line-height: 1.1; font-size: clamp(31px, 3.5vw, 47px); margin: 17px 0 12px; }
.controls-heading p { color: #7b8880; line-height: 1.65; font-size: 14px; max-width: 370px; margin: 0 0 31px; }
.control-group { padding: 23px 0; border-top: 1px solid #ebeee9; }
.control-title, .range-ends { display: flex; align-items: center; justify-content: space-between; }
.control-title label { font-size: 14px; font-weight: 750; }
.control-title span { color: #46826a; font-size: 12px; font-weight: 700; }
input[type=range] { appearance: none; width: 100%; height: 6px; border-radius: 100px; background: linear-gradient(to right, #5fa382 0 var(--progress, 0%), #e9eee9 var(--progress, 0%) 100%); margin: 24px 0 13px; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; border: 5px solid white; border-radius: 50%; background: #468e6b; box-shadow: 0 0 0 1px #468e6b, 0 2px 9px #9ab5a2; }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border: 5px solid white; border-radius: 50%; background: #468e6b; box-shadow: 0 0 0 1px #468e6b, 0 2px 9px #9ab5a2; }
input[type=range]:focus-visible { outline: 3px solid #438e6b; outline-offset: 8px; }
.range-ends { color: #98a49b; font-size: 11px; }
.actions { display: flex; gap: 11px; margin-top: auto; padding-top: 21px; }
button { font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; border-radius: 10px; min-height: 48px; transition: transform .15s, box-shadow .15s; }
button:hover { transform: translateY(-2px); }
button:disabled { opacity: .52; cursor: not-allowed; }
button:disabled:hover { transform: none; }
button:focus-visible { outline: 3px solid #438e6b; outline-offset: 3px; }
.button-secondary { border: 1px solid #d8e4d9; color: #40604c; background: #fff; padding: 0 17px; }
.button-primary { border: 1px solid #326d54; color: white; background: #326d54; padding: 0 18px; flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.button-primary:hover { box-shadow: 0 8px 20px rgba(50,109,84,.19); }
.button-primary span { font-size: 18px; font-weight: 400; }
.notice { color: #819087; font-size: 11px; line-height: 1.55; padding-top: 19px; margin: 0; }
.notice span { color: #73a586; margin-right: 5px; }
.file-hint { color: #6f7e72; font-size: 11px; line-height: 1.5; margin: 12px 0 0; }
footer { padding: 38px 0; text-align: center; color: #9aa79d; font-size: 11px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 860px) { .shell { padding: 0 24px; } .experience { grid-template-columns: 1fr; } .portrait-card { max-width: 650px; width: 100%; margin: 0 auto; position: static; } .controls { max-width: 650px; width: 100%; margin: 0 auto; } }
@media (max-width: 520px) { .shell { padding: 0 15px; } .topbar { height: 70px; } .brand { font-size: 18px; } .brand-light { font-size: 10px; } .prototype { display: none; } .intro { padding: 36px 8px 26px; } .lead { font-size: 14px; } .portrait-card { padding: 7px 7px 0; } .portrait-label { top: 11px; left: 11px; } .controls { padding: 27px 25px; } .controls-heading p { margin-bottom: 18px; } .photo-profile-grid { gap: 5px; } .photo-profile { font-size: 10px; } footer { line-height: 1.5; } }
