:root {
    color-scheme: light;
    --background: #fff;
    --ink: #302c30;
    --muted: #716b73;
    --accent: #c35067;
    --accent-hover: #ad3f58;
    --heart: #e76a7b;
    --line: #f0e8ec;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--background);
    -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); }
p { line-height: 1.5; }
button, input { font: inherit; }
a[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: .85em;
    height: .85em;
    margin-inline-start: .3em;
    vertical-align: -.08em;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4H4a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-4M11 3h6v6M17 3l-8 8'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
.page-width { width: min(100% - 80px, 1140px); margin-inline: auto; }
.heart { display: inline-block; flex: none; width: 23px; height: 23px; fill: none; stroke: var(--heart); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gauge-icon { display: block; flex: none; width: 32px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.site-header { min-height: 84px; display: flex; align-items: center; justify-content: center; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 600; letter-spacing: -.5px; }
.brand .gauge-icon { width: 34px; height: 26px; }
.intro { text-align: center; padding-top: 18px; }
h1 { margin: 0; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.2; letter-spacing: -.035em; font-weight: 700; }
.intro p { margin: 12px auto 0; color: var(--ink); font-size: 19px; line-height: 1.5; }
.demo { margin-top: 30px; text-align: center; }
.home-page .intro p { max-width: 660px; }
.demo .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 680px); gap: clamp(12px, 5vw, 56px); }
.demo .instrument { width: min(100%, 300px); }
.demo .gauge-heart { width: 13.75%; height: 13.75%; cursor: default; }
.demo .gauge-heart svg { width: 70%; height: 70%; }
.demo .partner-name { top: 84%; margin: 0; font-size: clamp(16px, 2.5vw, 21px); }
.gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 7vw, 100px); width: min(100%, 840px); margin-inline: auto; }
.gauge { min-width: 0; }
.instrument { position: relative; width: min(100%, 350px); aspect-ratio: 1; margin-inline: auto; }
.dial { display: block; width: 100%; height: 100%; pointer-events: none; }
.gauge-heart { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; cursor: pointer; }
.gauge-heart input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; border-radius: inherit; }
.gauge-heart svg { width: 28px; height: 28px; fill: none; stroke: #8d8187; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.gauge-heart.is-filled svg { fill: var(--accent); stroke: var(--accent); }
.gauge-heart input:focus-visible + svg { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 5px; }
.gauge-heart:has(input:disabled) { opacity: .65; cursor: default; }
.dial-value { fill: #252326; font: 700 46px Arial, Helvetica, sans-serif; }
.empty-gauge-help { position: absolute; top: 76%; left: 0; width: 100%; margin: 0; padding-inline: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; pointer-events: none; }
.needle { transform-origin: 160px 160px; transition: transform 650ms cubic-bezier(.22, .85, .25, 1); }
.partner-name { position: absolute; top: 71%; left: 50%; transform: translateX(-50%); font-size: 21px; font-weight: 700; letter-spacing: -.3px; margin: 42px 0 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.no-script { color: var(--ink); font-size: 14px; }
.create { text-align: center; margin: 22px 0 30px; }
.create-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 54px; padding: 14px 34px; border: 0; border-radius: 32px; color: #fff; background: var(--accent); font-size: 17px; line-height: 1.3; font-weight: 600; cursor: pointer; }
.primary-button .heart { stroke: currentColor; }
.about { max-width: 720px; margin: 60px auto; text-align: left; }
.about h2 { margin: 0 0 20px; font-size: clamp(22px, 2.5vw, 26px); line-height: 1.3; letter-spacing: -.02em; }
.about p { margin: 16px 0 0; color: var(--ink); font-size: 16px; line-height: 1.5; }
.about a, .intro a { color: var(--accent); text-decoration: underline solid; text-underline-offset: 3px; }
.about a:hover, .intro a:hover { color: var(--accent-hover); }
.home-page .about a[target="_blank"] { color: inherit; }
.privacy-policy { max-width: 760px; margin-block: 28px 60px; }
.privacy-policy h1 { margin-inline: 0; text-align: left; }
.privacy-policy section { margin-top: 32px; }
.privacy-policy h2 { margin-bottom: 0; }
.privacy-policy p { margin-top: 12px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center; margin-top: 60px; padding-block: 20px; border-top: 1px solid var(--line); }
.language-selector { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.language-selector select { min-height: 44px; max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--background); color: var(--ink); font: inherit; }
.language-selector button[hidden] { display: none; }
.site-footer .gauge-icon { width: 22px; height: 17px; }
.site-footer p { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; margin: 0; }
.site-footer a { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: underline solid; text-underline-offset: 3px; white-space: nowrap; }
.site-footer a[target="_blank"]::after { margin-inline-start: 0; }
.site-footer a:hover { color: var(--accent-hover); }
.site-footer .footer-contact { white-space: nowrap; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.personal-title { margin: 14px auto 0; font-size: 32px; text-align: center; }
.personal-intro { max-width: 720px; margin: 12px auto 0; color: var(--ink); font-size: 16px; line-height: 1.5; text-align: left; }
.personal-gauges { margin-top: 20px; }
.personal-gauges .instrument { margin-bottom: 65px; }
.name-editor { width: calc(100% - 24px); text-align: center; }
.name-button { display: inline-grid; grid-template-columns: 16px minmax(0, 1fr) 16px; align-items: center; gap: 8px; max-width: 100%; min-height: 44px; padding: 5px; border: 0; background: transparent; color: inherit; font-weight: inherit; cursor: pointer; }
.name-button::before { content: ""; }
.name-button [data-name] { min-width: 0; overflow-wrap: anywhere; }
.name-button svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.name-button.has-custom-name svg { stroke: #d9d9d9; }
.name-input { width: 100%; min-height: 44px; padding: 6px 8px; border: 1px solid var(--accent); border-radius: 6px; text-align: center; color: inherit; background: var(--background); }
.name-button[hidden], .name-input[hidden] { display: none; }
.save-error { margin: 8px 12px 0; color: var(--accent); font-size: 14px; line-height: 1.5; text-align: center; }
.personal-info { max-width: 720px; margin: 52px auto 0; }
.personal-info h2 { margin: 0; font-size: clamp(20px, 2.5vw, 24px); line-height: 1.3; letter-spacing: -.02em; }
.personal-info p { margin: 14px 0 0; color: var(--ink); font-size: 16px; line-height: 1.5; }
.page-privacy { margin-top: 32px; padding: clamp(20px, 4vw, 28px); border: 1px solid var(--line); border-radius: 12px; background: #fcfbfc; }
.hearts-meaning { margin-top: 32px; }
.password-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--accent); border-radius: 8px; background: #fff; color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; }
.password-button:hover:enabled { border-color: var(--accent-hover); color: var(--accent-hover); }
.password-button:disabled { opacity: .5; cursor: default; }
.password-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.personal-info .password-help { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.text-action { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--accent); font: inherit; vertical-align: baseline; white-space: nowrap; cursor: pointer; }
.text-action span, .site-footer .contact-link, .privacy-policy .contact-link { text-decoration: underline dashed; text-underline-offset: 3px; }
.text-action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notifications { margin-top: 32px; }
.notifications [hidden] { display: none; }
.notification-gauges { display: grid; gap: 4px; min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.notification-gauges label { display: flex; align-items: center; gap: 10px; min-height: 44px; width: fit-content; max-width: 100%; cursor: pointer; }
.notification-gauges input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.notification-gauges span { overflow-wrap: anywhere; }
.notification-gauges:disabled label { opacity: .5; cursor: default; }
[data-notifications-enable]:hover:enabled, .unsubscribe-action:hover:enabled { color: var(--accent-hover); }
[data-notifications-enable]:disabled, .unsubscribe-action:disabled { opacity: .5; cursor: default; }
.unsubscribe-action { color: var(--muted); }
.install-action:hover:enabled { color: var(--accent-hover); }
.install-action:disabled { opacity: .5; cursor: default; }
.install-dialog [hidden] { display: none; }
.install-dialog ol { margin: 16px 0 0; padding-inline-start: 24px; font-size: 16px; line-height: 1.5; }
.install-dialog li + li { margin-top: 8px; }
.install-dialog .dialog-actions { margin-top: 24px; }
.privacy-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 20px; }
.privacy-actions-end { display: flex; align-items: center; gap: 16px; margin-inline-start: auto; }
.delete-gauge, .logout-gauge { min-height: 44px; color: var(--muted); font-size: 14px; }
.delete-gauge:hover:enabled, .logout-gauge:hover:enabled { color: var(--accent-hover); }
.delete-gauge:disabled, .logout-gauge:disabled { opacity: .5; cursor: default; }
.logout-gauge[hidden] { display: none; }
.change-password { min-height: 44px; color: var(--muted); font-size: 14px; }
.change-password:hover:enabled { color: var(--accent-hover); }
.change-password:disabled { opacity: .5; cursor: default; }
.delete-dialog { width: min(100% - 32px, 480px); max-height: calc(100% - 32px); padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--background); box-shadow: 0 16px 48px rgba(48, 44, 48, .18); }
.delete-dialog::backdrop { background: rgba(48, 44, 48, .35); }
.delete-dialog .create { margin: 0; text-align: left; }
.delete-dialog h2 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: -.02em; }
.delete-dialog p { margin: 16px 0 24px; font-size: 16px; line-height: 1.5; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.dialog-actions .primary-button { min-height: 44px; padding: 10px 20px; font-size: 16px; }
.dialog-cancel { min-height: 44px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: var(--background); cursor: pointer; }
.dialog-cancel:hover { border-color: var(--muted); }
.dialog-actions button:disabled { opacity: .6; cursor: default; }
.password-form { text-align: left; }
.password-form label { display: block; margin: 20px 0 8px; font-size: 15px; font-weight: 600; }
.password-form input[type="password"] { display: block; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d8d0d6; border-radius: 6px; color: var(--ink); background: var(--background); font-size: 16px; }
.password-form .password-help { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.password-form .password-error { margin: 16px 0; color: var(--accent-hover); font-size: 14px; line-height: 1.5; }
.password-error:empty { display: none; }
.password-form .dialog-actions { margin-top: 24px; }
.password-form a { display: inline-block; margin-top: 12px; color: var(--accent); text-decoration: underline solid; text-underline-offset: 3px; }
.password-form a[hidden] { display: none; }
.unlock-intro { max-width: 680px; margin: 40px auto 0; }
.unlock-form { max-width: 400px; margin: 28px auto 80px; }
.unlock-form .primary-button { width: 100%; margin-top: 36px; }
.personal-info .link-feedback { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.link-feedback:not(:empty) { padding-top: 8px; }
.manual-link { margin-top: 10px; }
.manual-link label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.manual-link input { display: block; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--background); color: var(--ink); font-size: 16px; }

@media (hover: hover) and (pointer: fine) {
    .gauge-heart:not(.is-filled):hover input:enabled + svg,
    .gauge-heart:not(.is-filled):has(~ .gauge-heart:hover input:enabled) input:enabled + svg { stroke: var(--accent); }
    .create .primary-button { transition: background-color 190ms ease, box-shadow 190ms ease; }
    .create .primary-button:hover { background-color: var(--accent-hover); box-shadow: 0 6px 16px rgba(195, 80, 103, .22); }
    .create .primary-button:active { box-shadow: none; }
}

@media (max-width: 700px) {
    .page-width { width: calc(100% - 32px); }
    .site-header { min-height: 64px; }
    .brand { font-size: 20px; gap: 9px; }
    .brand .gauge-icon { width: 30px; height: 23px; }
    .intro { padding-top: 15px; }
    h1 { max-width: 440px; margin-inline: auto; font-size: clamp(27px, 5.5vw, 36px); line-height: 1.2; }
    .personal-title { margin-top: 12px; font-size: 25px; }
    .personal-gauges { margin-top: 18px; }
    .intro p { font-size: 15px; line-height: 1.5; margin-top: 12px; }
    .gauges { gap: 2px; }
    .partner-name { font-size: 18px; }
    .create { margin: 21px 0 28px; }
    .primary-button { font-size: 16px; min-height: 52px; padding-inline: 27px; }
    .home-page .intro { padding-top: 8px; }
    .home-page h1 { font-size: clamp(30px, 6vw, 36px); }
    .home-page .intro p { font-size: 16px; }
    .demo { margin-top: 18px; }
    .home-page .create { margin: 18px 0 0; }
    .about { margin-block: 48px; }
}

@media (max-width: 600px) {
    .gauges { grid-template-columns: 1fr; }
    .instrument { width: min(100%, 350px); }
    .personal-gauges .instrument { margin-bottom: 0; }
}

@media (max-width: 350px) {
    .privacy-actions .password-button { padding-inline: 6px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .needle { transition: none; }
    .create .primary-button { transition: none; }
}
