.function-shell { width: min(1050px, calc(100% - 40px)); }
.back-link { display: inline-flex; gap: 8px; margin-bottom: 42px; color: var(--muted); text-decoration: none; font-size: .86rem; }
.back-link:hover { color: white; }
.function-hero { max-width: 710px; position: relative; }
.function-hero h1 { margin: 0 0 16px; font-size: clamp(2.5rem, 6vw, 5.6rem); }
.function-symbol { position: absolute; left: min(75vw, 760px); top: -22px; display: grid; place-items: center; width: 130px; height: 130px; border: 1px solid color-mix(in srgb, var(--page-accent), transparent 50%); border-radius: 50%; color: var(--page-accent); font-size: 3.5rem; box-shadow: 0 0 65px color-mix(in srgb, var(--page-accent), transparent 77%); }
.function-workspace { display: grid; grid-template-columns: minmax(260px, .78fr) minmax(360px, 1.35fr); gap: 18px; margin-top: 50px; }
.input-card, .result-card { position: relative; min-height: 330px; padding: 28px; border: 1px solid var(--line); border-radius: 26px; background: var(--panel); box-shadow: var(--shadow); }
.input-card h2, .result-card h2 { margin: 45px 0 20px; font-size: 1.4rem; }
.step-number { position: absolute; top: 24px; right: 25px; color: var(--page-accent); font-size: .72rem; font-weight: 700; letter-spacing: .12em; }
.profile-chip { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.04); }
.profile-chip div { display: grid; gap: 4px; }
.profile-chip span:not(.profile-dot) { color: var(--muted); font-size: .72rem; }
.profile-chip strong { font-size: .97rem; }
.profile-dot { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, white 0 4%, var(--page-accent) 7%, transparent 68%); border: 1px solid color-mix(in srgb, var(--page-accent), transparent 45%); }
.secondary-date { display: grid; gap: 8px; margin-top: 22px; color: var(--muted); font-size: .8rem; }
.result-card { text-align: center; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--page-accent), transparent 87%), transparent 45%), var(--panel); }
.result-card h2 { margin-top: 18px; }
.result-card p { max-width: 480px; margin: 0 auto 22px; color: var(--muted); line-height: 1.6; }
.waiting-constellation { position: relative; width: 125px; height: 90px; margin: 22px auto 0; }
.waiting-constellation::before { content: ""; position: absolute; inset: 18px 14px; border-top: 1px solid color-mix(in srgb, var(--page-accent), transparent 55%); transform: rotate(-12deg); }
.waiting-constellation i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--page-accent); box-shadow: 0 0 15px var(--page-accent); }
.waiting-constellation i:nth-child(1) { left: 10px; top: 44px; }
.waiting-constellation i:nth-child(2) { left: 45px; top: 19px; }
.waiting-constellation i:nth-child(3) { right: 29px; top: 43px; }
.waiting-constellation i:nth-child(4) { right: 4px; top: 13px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; text-align: left; }
.dialog-header h2 { margin: 3px 0; }
.history-dialog { width: min(650px, calc(100% - 36px)); }
.history-empty { padding: 30px 10px 15px; color: var(--muted); }

@media (max-width: 720px) {
  .function-shell { width: min(100% - 24px, 1050px); }
  .back-link { margin-bottom: 30px; }
  .function-symbol { position: static; width: 70px; height: 70px; margin-bottom: 25px; font-size: 2rem; }
  .function-workspace { grid-template-columns: 1fr; }
  .input-card, .result-card { min-height: auto; }
}

.person-form { margin-top: 26px; padding-top: 6px; border-top: 1px solid var(--line); }
.person-form h3 { margin: 16px 0 0; font-size: 1.05rem; }
.person-form .secondary-date { margin-top: 17px; }
.field-hint { margin: 8px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.save-person-button { display: grid; width: 44px; min-width: 44px; height: 44px; margin: 36px auto 0; }
.form-error { color: #fda4af; font-size: .85rem; line-height: 1.5; }



.person-form input[type="text"] { width: 100%; min-width: 0; min-height: 50px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.055); color: #fff; font: inherit; }
.person-form input[type="text"]:focus-visible { outline: 2px solid var(--page-accent); outline-offset: 2px; }

body:is([data-function-id="dating"],[data-function-id="profile"]) .input-card h2 { margin-top: 0; }

body:is([data-function-id="dating"],[data-function-id="profile"]) .function-workspace { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: start; }
body:is([data-function-id="dating"],[data-function-id="profile"]) .function-workspace:has(.dating-result[hidden]) { max-width: 480px; }
body:is([data-function-id="dating"],[data-function-id="profile"]) .input-card { min-width: 0; }
.saved-person-controls { margin-top: 28px; }
.saved-person-controls > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .8rem; }
.saved-person-dropdown { position: relative; }
.saved-person-picker { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.055); color: #fff; font: inherit; cursor: pointer; text-align: left; }
.saved-person-picker span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-person-picker svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; }
.saved-person-picker:disabled { cursor: default; opacity: .5; }
.saved-person-picker:focus-visible { outline: 2px solid var(--page-accent); outline-offset: 2px; }
.saved-person-options { position: absolute; top: calc(100% + 5px); inset-inline: 0; z-index: 10; max-height: 400px; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: #151d30; box-shadow: var(--shadow); }
.saved-person-options[hidden] { display: none; }
.saved-person-options li { box-sizing: border-box; height: 40px; padding: 10px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; cursor: pointer; }
.saved-person-options li:hover, .saved-person-options li.is-active { background: rgba(167,139,250,.2); }
.saved-person-options li[aria-selected="true"] { color: var(--page-accent); }
.saved-person-actions { display: flex; justify-content: center; gap: 14px; margin-top: 12px; }

.icon-button.save-person-button { width: 80px; min-width: 80px; height: 80px; padding: 14px; border: 1px solid rgba(198,181,241,.28); border-radius: 24px; color: #ded1ff; background: linear-gradient(145deg,rgba(177,149,235,.19),rgba(149,197,178,.09)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1),0 7px 20px rgba(64,48,103,.18); transition: transform .18s ease,background .18s ease; }
.icon-button.save-person-button svg { width: 50px; height: 50px; stroke-linejoin: round; }
.save-person-button .save-disk-body { fill: #b9a3e7; stroke: #d8c8f4; stroke-width: 1.2; }
.save-person-button .save-disk-top { fill: #eee8f8; stroke: none; }
.save-person-button .save-disk-slot { fill: #ab97d3; stroke: none; }
.save-person-button .save-disk-label { fill: #edf5f1; stroke: none; }
.save-person-button .save-disk-heart { fill: #86b3a3; stroke: none; }
.icon-button.save-person-button:hover { background: linear-gradient(145deg,rgba(177,149,235,.28),rgba(149,197,178,.15)); transform: translateY(-2px); }
.icon-button.save-person-button:focus-visible { outline: 2px solid #cdbaf2; outline-offset: 4px; }

.saved-person-actions { gap: 18px; margin-top: 16px; }
.saved-person-actions .person-action-button { width: 68px; min-width: 68px; height: 68px; padding: 10px; border: 1px solid rgba(198,181,241,.22); border-radius: 21px; background: linear-gradient(145deg,rgba(177,149,235,.14),rgba(149,197,178,.07)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08),0 5px 16px rgba(41,31,75,.14); transition: transform .18s ease,background .18s ease; }
.saved-person-actions .person-action-button svg { width: 46px; height: 46px; stroke-linecap: round; stroke-linejoin: round; }
.person-action-button .person-icon-head, .person-action-button .person-icon-body { fill: #b9a3e7; stroke: #d8c8f4; stroke-width: 1.1; }
.person-action-button .person-icon-shine { fill: none; stroke: #eee8f8; stroke-width: 1.6; }
.person-action-button .person-icon-badge { fill: #8db9a9; stroke: #c8e2d8; stroke-width: 1.2; }
.person-action-button .person-icon-check { fill: none; stroke: #f4faf7; stroke-width: 2.6; }
.saved-person-actions .person-action-button--delete { border-color: rgba(220,170,185,.22); background: linear-gradient(145deg,rgba(207,158,178,.14),rgba(177,149,235,.06)); }
.person-action-button .trash-icon-body { fill: #c99cae; stroke: #e3c5d0; stroke-width: 1.1; }
.person-action-button .trash-icon-lid { fill: #e4c5d0; stroke: #eed9e1; stroke-width: 1.1; }
.person-action-button .trash-icon-handle { fill: none; stroke: #d6b3c3; stroke-width: 2.5; }
.person-action-button .trash-icon-lines { fill: none; stroke: #f5e8ee; stroke-width: 2; }
.person-action-button .trash-icon-shine { fill: none; stroke: #e5c5d2; stroke-width: 1.2; }
.saved-person-actions .person-action-button:hover:not(:disabled) { transform: translateY(-2px); background-color: rgba(185,163,231,.1); }
.saved-person-actions .person-action-button:focus-visible { outline: 2px solid #cdbaf2; outline-offset: 3px; }

.dating-primary-actions { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 36px; }
.dating-primary-actions .save-person-button { margin: 0; flex-shrink: 0; }
.dating-start-button { flex-shrink: 0; }
.dating-start-button:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.6); }
.dating-start-button:disabled:hover { transform: none; }
.dating-start-button[aria-busy="true"] { cursor: wait; }
.dating-result { margin: 0; min-width: 0; text-align: left; }
.dating-result[hidden] { display: none; }
.dating-result .dating-result-heading { margin: 0 0 16px; text-align: center; overflow-wrap: anywhere; font-size: 1.15rem; }
.dating-score { display: grid; justify-items: center; gap: 4px; }
.dating-score-value { font: 800 clamp(3rem,8vw,4.5rem) "Manrope",sans-serif; color: #f0b0cb; letter-spacing: -.04em; line-height: 1.15; }
.dating-score-label { color: var(--muted); font-size: .8rem; }
.dating-result > .dating-result-title { margin: 14px 0 24px; text-align: center; font-weight: 700; line-height: 1.5; }
.dating-dimension { padding: 16px 0; border-top: 1px solid var(--line); }
.dating-dimension summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 12px; border-left: 3px solid var(--dimension-accent); border-radius: 12px; color: var(--dimension-accent); background: color-mix(in srgb, var(--dimension-accent), transparent 91%); cursor: pointer; font-size: 1.02rem; font-weight: 800; }
.dating-dimension summary::after { content: "+"; color: var(--muted); }
.dating-dimension-details[open] summary::after { content: "−"; }
.dating-dimension summary strong { margin-left: auto; color: var(--dimension-accent); white-space: nowrap; }
.dating-dimension summary:focus-visible { outline: 2px solid var(--page-accent); outline-offset: 5px; border-radius: 3px; }
.dating-dimension p { margin: 12px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.dating-direction { margin: 18px 0 0; font-size: .85rem; font-weight: 700; overflow-wrap: anywhere; }

body[data-function-id="dating"] .function-hero { display: flex; align-items: center; gap: clamp(12px, 2vw, 20px); max-width: none; }
body[data-function-id="dating"] .function-hero h1 { margin: 0; font: 800 clamp(2rem, 4vw, 3.35rem) "Manrope", sans-serif; letter-spacing: -.04em; }
.function-title-heart { display: block; flex-shrink: 0; width: clamp(64px, 12vw, 94px); aspect-ratio: 94 / 82; filter: drop-shadow(0 9px 16px rgba(244,63,94,.3)); }
.function-title-heart svg { display: block; width: 100%; height: 100%; }
.function-title-heart path { fill: #e84f72; }

.dating-name-heart { display: inline-block; width: 22px; height: 20px; margin: 0 7px; vertical-align: -3px; fill: #e84f72; }
.dating-dimension { --dimension-accent: #c4b5fd; }
.dating-dimension[data-dimension-index="0"] { --dimension-accent: #e8bc8e; }
.dating-dimension[data-dimension-index="1"] { --dimension-accent: #f0b0cb; }
.dating-dimension[data-dimension-index="2"] { --dimension-accent: #aabff1; }

.dating-instructions p + p { margin-top: 1.5em; }

.dating-dimension { position: relative; }
.dating-dimension summary { margin-right: 44px; }
.dating-info-button { position: absolute; top: 23px; right: 0; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid color-mix(in srgb, var(--dimension-accent), transparent 50%); border-radius: 50%; color: var(--dimension-accent); background: transparent; font: 700 1rem "Manrope",sans-serif; cursor: pointer; }
.dating-info-button:hover { background: color-mix(in srgb, var(--dimension-accent), transparent 87%); }
.dating-info-button:focus-visible { outline: 2px solid var(--dimension-accent); outline-offset: 3px; }
.dating-info-dialog { max-height: 85dvh; overflow-y: auto; }
.dating-info-dialog form { text-align: left; }
.dating-info-dialog p { font-size: .92rem; line-height: 1.65; overflow-wrap: anywhere; }
.dating-dimension-details { min-width: 0; }

@media (max-width: 430px) {
  .dating-dimension summary { padding: 12px 8px; gap: 6px; font-size: .94rem; }
  .dating-dimension summary > span { min-width: 0; overflow-wrap: anywhere; }
}

.dating-weight-control { margin: 22px 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.dating-weight-label { display: block; text-align: center; font-size: .9rem; font-weight: 700; line-height: 1.5; }
.dating-weight-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 15px; color: var(--muted); font-size: .8rem; }
#dating-weight { display: block; width: 100%; height: 34px; margin: 0; padding: 0; accent-color: #e84f72; cursor: pointer; }
#dating-weight:focus-visible { outline: 2px solid var(--page-accent); outline-offset: 3px; border-radius: 8px; }
.dating-weight-summary { display: block; margin-top: 5px; color: var(--muted); text-align: center; font-size: .75rem; line-height: 1.6; }

.dating-weight-control .dating-weight-explanation { margin: 8px 0 0; font-size: .8rem; line-height: 1.5; text-align: center; }

.dating-weight-header{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:10px}
.dating-weight-header .dating-weight-label{margin:0}
.dating-weight-help,.dating-weight-reset{flex:0 0 28px;width:28px;height:28px;border:1px solid #bda2df66;border-radius:50%;background:#bda2df14;color:#e4d8f7;cursor:pointer;display:grid;place-items:center;padding:4px}
.dating-weight-help{font-family:Georgia,serif;font-weight:700;font-size:17px}
.dating-weight-reset svg{width:20px;height:20px;fill:none;stroke:#a5ddc8;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dating-weight-reset:disabled{opacity:.35;cursor:default}
.dating-weight-help:hover,.dating-weight-reset:not(:disabled):hover{background:#bda2df30}
.dating-weight-help:focus-visible,.dating-weight-reset:focus-visible{outline:2px solid #c6a7ee;outline-offset:3px}
@media(max-width:430px){.dating-weight-header{gap:6px}.dating-weight-header .dating-weight-label{font-size:.8rem}}

.dating-result-actions{display:flex;justify-content:center;margin-top:24px}
.icon-button.save-person-button.result-save-button{margin:0}

.saved-person-options li { font-weight: 400; }
.saved-person-options li.is-main-profile, #saved-person-selection.is-main-profile { font-weight: 700; }

.relationship-field select{width:100%;min-height:50px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:#182137;color:var(--text);font:inherit}
.relationship-field select:focus-visible{outline:2px solid #c6b4fa;outline-offset:2px}
.dating-relationship-label{text-align:center;color:var(--muted);font-size:.85rem;margin:8px 0 20px}

body[data-function-id="profile"] .function-hero{display:flex;align-items:center;gap:clamp(12px,2vw,20px);max-width:none}
body[data-function-id="profile"] .function-hero h1{margin:0;font:800 clamp(2rem,4vw,3.35rem) "Manrope",sans-serif;letter-spacing:-.04em}
.function-title-self{display:block;flex-shrink:0;width:clamp(64px,12vw,94px)}.function-title-self svg{display:block;width:100%;height:auto}
.about-start-button{width:94px;min-width:94px;height:82px;padding:0;border:0;background:transparent}.about-start-button svg{width:82px;height:82px}
.about-start-button:hover{transform:translateY(-2px);background:transparent}.about-start-button:disabled{opacity:.35;transform:none}
.self-result-name{overflow-wrap:anywhere}.self-result-date{font-size:.85rem}.self-result-summary{font-size:.92rem}
.self-result .dating-dimension{text-align:left}.self-result .dating-dimension p{margin:14px 0;max-width:none}.self-result .self-value-note{font-size:.8rem;opacity:.85}
.self-result{scroll-margin-top:20px;min-width:0}.self-result[hidden]{display:none}
.person-form input{width:100%;min-width:0;max-width:100%}
body[data-function-id="rhythm"] .function-hero{display:flex;align-items:center;gap:clamp(12px,2vw,20px);max-width:none}
body[data-function-id="rhythm"] .function-hero h1{margin:0;font:800 clamp(2rem,4vw,3.35rem) "Manrope",sans-serif;letter-spacing:-.04em}
.function-title-rhythm{width:clamp(64px,12vw,94px);flex-shrink:0}.function-title-rhythm svg{display:block;width:100%}
.rhythm-controls{display:flex;align-items:center;justify-content:space-between;gap:28px;margin:34px 0 22px;min-height:0;padding:22px 26px}
.rhythm-controls h2{margin:0 0 14px;font-size:1.15rem}.rhythm-own-data{min-width:0;flex:1}.rhythm-date-control{display:flex;align-items:end;gap:14px;margin:0!important;border:0!important;padding:0!important}
.rhythm-date-control .secondary-date{margin:0}.rhythm-date-control input{width:185px;min-width:0}.rhythm-navigation{display:flex;align-items:center;gap:6px;height:50px}
.rhythm-navigation .icon-button{width:38px;min-width:38px;height:42px}.rhythm-navigation svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rhythm-navigation .compact-button{padding:0 14px;min-height:42px}.rhythm-charts{display:grid;gap:18px}
.rhythm-chart-card{min-width:0;border:1px solid var(--line);border-radius:24px;padding:20px 20px 4px;background:radial-gradient(ellipse at 50% 0,rgba(124,99,176,.08),transparent 65%),var(--panel);box-shadow:0 12px 35px rgba(0,0,0,.16)}
.rhythm-chart-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 8px 5px}.rhythm-chart-heading h2{margin:0;font:800 1.1rem "Manrope",sans-serif;color:#e8bc8e}
.rhythm-chart-card[data-rhythm-area="1"] h2{color:#f0b0cb}.rhythm-chart-card[data-rhythm-area="2"] h2{color:#aabff1}
.rhythm-position{font-size:.72rem;color:#bfb4dc;padding:5px 9px;border-radius:20px;background:#b8a2df12;white-space:nowrap}.rhythm-position[data-position="upper"]{color:#9cdbcb;background:#9cdbcb12}
.rhythm-plot{position:relative;min-width:0;touch-action:pan-y;cursor:grab;user-select:none;-webkit-user-select:none;border-radius:12px}.rhythm-plot.is-dragging{cursor:grabbing}.rhythm-plot:focus-visible{outline:2px solid #b8a2df;outline-offset:3px}
.rhythm-svg{display:block;width:100%;height:224px;overflow:visible}.rhythm-axis-label{fill:#939bb3;font:10.5px "DM Sans",system-ui,sans-serif}.rhythm-svg circle[role="button"]{cursor:pointer}.rhythm-svg circle[role="button"]:focus{outline:none;stroke:white;stroke-width:3}
.rhythm-hover{position:absolute;z-index:3;max-width:210px;padding:8px 11px;border:1px solid #ffffff26;border-radius:10px;background:#1c2239;color:#f4efff;font-size:.75rem;pointer-events:none;box-shadow:0 8px 24px #0005}
.rhythm-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:24px;margin:20px 0;color:var(--muted);font-size:.78rem}.rhythm-legend>span{display:flex;align-items:center;gap:8px}.rhythm-key{width:9px;height:9px;border-radius:50%;display:inline-block}.rhythm-key--peak{background:#f1ca80}.rhythm-key--trough{background:#b6a4f1}.rhythm-key--crossing{background:#88d8cf}
@media(max-width:760px){.rhythm-controls{flex-direction:column;align-items:stretch;gap:20px;padding:20px}.rhythm-date-control{justify-content:space-between;gap:8px}.rhythm-chart-card{padding:16px 8px 2px}.rhythm-chart-heading{padding:0 8px 4px}.rhythm-chart-heading h2{font-size:1rem}.rhythm-date-control input{width:100%}.rhythm-date-control .secondary-date{flex:1;min-width:0}.rhythm-navigation{gap:2px}.rhythm-navigation .icon-button{min-width:30px;width:30px}.rhythm-navigation .compact-button{padding:0 10px}}
@media(max-width:360px){.rhythm-date-control{flex-wrap:wrap}.rhythm-date-control .secondary-date{flex:1 1 100%}.rhythm-navigation{width:100%;justify-content:center}.rhythm-chart-heading{gap:6px}.rhythm-chart-heading h2{font-size:.9rem}.rhythm-position{font-size:.65rem;padding:4px 6px}}

.rhythm-svg [role="button"]{cursor:pointer;outline:none}.rhythm-svg [role="button"]:focus-visible .rhythm-event-dot{stroke:#fff;stroke-width:3}.rhythm-event-hit{pointer-events:all}

.rhythm-person-controls{max-width:390px;margin-top:16px}.saved-person-picker .is-main-profile{font-weight:700}.rhythm-hover{width:min(280px,calc(100% - 8px));max-width:none;font-size:.75rem;line-height:1.5}.rhythm-hover strong{display:block;font-weight:700}.rhythm-hover p{margin:6px 0 0}

.rhythm-chart-heading{flex-wrap:wrap;align-items:center}.rhythm-chart-title{display:flex;align-items:center;gap:9px;min-width:0}.rhythm-area-help{display:grid;place-items:center;flex-shrink:0;width:27px;height:27px;padding:0;border:1px solid #b8a2df66;border-radius:50%;background:#b8a2df12;color:#d9cdf5;font:700 .85rem Georgia,serif;cursor:pointer}.rhythm-area-help:hover{background:#b8a2df26}.rhythm-area-help:focus-visible{outline:2px solid #c6b4fa;outline-offset:3px}
.rhythm-day-reading{margin:9px 8px 12px;color:#d4d8e7;font-size:.86rem;line-height:1.6}.rhythm-day-reading strong{display:block;margin-bottom:4px;color:#a4adc5;font-size:.73rem;font-weight:500}.rhythm-day-reading span{display:block}
.rhythm-position{white-space:normal;line-height:1.4}.rhythm-position[data-position="positive"],.rhythm-position[data-position="positivePeak"]{color:#a6dfcc;background:#a6dfcc14}.rhythm-position[data-position="negative"],.rhythm-position[data-position="negativePeak"]{color:#c5b5ed;background:#c5b5ed14}.rhythm-position[data-position="critical"],.rhythm-position[data-position="criticalCenter"]{color:#a3dadd;background:#a3dadd14}
.rhythm-daily-key{margin:28px 0}.rhythm-daily-key>h2{font-size:1.05rem;margin:0 0 14px}.rhythm-key-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.rhythm-key-card{padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--panel);min-width:0}.rhythm-key-card>div{display:flex;align-items:center;gap:9px}.rhythm-key-card h3{margin:0;font-size:.84rem;line-height:1.45;overflow-wrap:anywhere}.rhythm-key-card p{margin:9px 0 0;color:var(--muted);font-size:.78rem;line-height:1.6}.rhythm-period-symbol{display:grid;place-items:center;flex:0 0 31px;height:31px;border-radius:10px;color:#a6dfcc;background:#a6dfcc14;font-weight:800}.rhythm-key-card[data-period^="negative"] .rhythm-period-symbol{color:#c5b5ed;background:#c5b5ed14}.rhythm-key-card[data-period^="critical"] .rhythm-period-symbol{color:#a3dadd;background:#a3dadd14}
@media(max-width:850px){.rhythm-key-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:540px){.rhythm-key-grid{grid-template-columns:minmax(0,1fr)}.rhythm-chart-heading{gap:8px}.rhythm-day-reading{font-size:.83rem}}

.rhythm-controls{align-items:flex-start}.rhythm-own-data{max-width:520px}.rhythm-person-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.rhythm-person-heading h3{margin:0}.rhythm-clear-button{width:48px;height:48px;min-width:48px;padding:3px;background:transparent;border:0}.rhythm-clear-button svg{width:42px;height:42px}.rhythm-clear-button:disabled{opacity:.3}.rhythm-compare-button{width:80px;height:80px;min-width:80px;padding:0;border:0;background:transparent}.rhythm-compare-button svg{width:80px;height:76px}.rhythm-compare-button:disabled{opacity:.3}.rhythm-compare-button:hover{background:transparent}.rhythm-person-controls{max-width:none}#rhythm-person-selection.is-main-profile{font-weight:700}.rhythm-curve-legend{display:flex;flex-wrap:wrap;gap:16px 28px;justify-content:center;margin:18px 0;color:var(--muted);font-size:.82rem}.rhythm-curve-legend[hidden],.rhythm-other-reading[hidden]{display:none}.rhythm-legend-item{display:flex;align-items:center;gap:9px;overflow-wrap:anywhere;min-width:0}.rhythm-legend-item:before{content:'';display:block;width:32px;flex:0 0 32px;border-top:3px solid #c5b0fa}.rhythm-legend-1:before{border-top:3px dashed #86c8ed}.rhythm-legend-2:before{border:0;height:12px;background:#89d7af55;border-radius:4px}.rhythm-other-reading{border-left:2px dashed #86c8ed;padding-left:10px}.rhythm-charts{scroll-margin-top:20px}@media(max-width:760px){.rhythm-own-data{max-width:none}.rhythm-date-control{width:100%}}
@media(max-width:760px){.rhythm-controls{align-items:stretch}.rhythm-own-data{width:100%;max-width:100%}}

.rhythm-state{display:flex;align-items:center;gap:8px}.rhythm-status-help{width:24px;height:24px;font-size:.78rem}#rhythm-help-dialog section h3{font-size:.95rem;margin:18px 0 5px}#rhythm-help-dialog section p{margin-top:0}

#rhythm-person-form .dating-primary-actions{gap:20px}#rhythm-person-form .dating-primary-actions>.icon-button{flex:0 0 80px;width:80px;min-width:80px;height:80px;padding:6px;background:transparent;border:0}#rhythm-person-form .dating-primary-actions>.icon-button svg{width:64px;height:64px}#rhythm-person-form .dating-primary-actions>.icon-button:disabled{opacity:.3;cursor:default}.rhythm-person-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto}.rhythm-person-dialog h2{font-size:1.2rem}.rhythm-person-dialog select{display:block;width:100%;height:min(360px,52dvh);padding:5px;border:1px solid var(--line);border-radius:12px;background:#182137;color:var(--text);font:inherit}.rhythm-person-dialog select[hidden]{display:none}.rhythm-person-dialog option{padding:10px 8px;font-size:.86rem;white-space:normal;overflow-wrap:anywhere}.rhythm-person-dialog option.is-main-profile{font-weight:700}.rhythm-person-dialog select:focus-visible{outline:2px solid #c6b4fa;outline-offset:2px}.rhythm-person-dialog .dialog-actions{flex-wrap:wrap}.rhythm-person-dialog button:disabled{opacity:.35;cursor:default}@media(max-width:540px){#rhythm-person-form .dating-primary-actions{gap:10px}#rhythm-person-form .dating-primary-actions>.icon-button{flex:0 0 52px;width:52px;min-width:52px;height:58px;padding:2px}#rhythm-person-form .dating-primary-actions>.icon-button svg{width:48px;height:48px}}

.compact-person-actions{gap:20px}.compact-person-actions>button:not([hidden]){flex:0 0 80px;width:80px;min-width:80px;height:80px;padding:6px;border:0;background:transparent}.compact-person-actions>.icon-button svg{width:64px;height:64px}.compact-person-actions>button:disabled{opacity:.3;cursor:default}.compact-person-actions>.dating-start-button svg{width:72px;height:72px}.compact-person-actions>.dating-start-button span{display:none}@media(max-width:540px){.compact-person-actions{gap:10px}.compact-person-actions>button:not([hidden]){flex:0 0 52px;width:52px;min-width:52px;height:58px;padding:2px}.compact-person-actions>.icon-button svg,.compact-person-actions>.dating-start-button svg{width:48px;height:48px}}
