
  
  :root {
    --bg:       #f7f7fb;
    --surface:  #f7f7fb;
    --card:     #ffffff;
    --grey:     #EBE9F2;
    --border:   #E2DFEC;
    --field-bd: #DEDBE7;
    --accent:   #4F3787;
    --accent2:  #644AA6;
    --text:     #1d1d1f;
    --text-2:   #55555a;
    --muted:    #636369;
    --success:  #2E7D32;
    --error:    #c0392b;
    --warn:     #F5973D;
    --pair-a:   #68421F;
    --pair-b:   #0D5E5E;
    --pair-a-bg: rgba(104,66,31,.12);
    --pair-b-bg: rgba(13,94,94,.12);
    --gold:     #c9a84a;
    --r-pill:   999px;
    --r-field:  12px;
    --r-card:   20px;
    --r-inner:  12px;
    --r-sheet:  24px;
    --font-ui:  var(--font-sym), 'Segoe UI', system-ui, sans-serif;
    --font-sym: 'AB Symbols';
    --glyph:    var(--accent);
    --shadow:   0 4px 24px rgba(79,55,135,0.10);
    --card-shadow: 0 1px 3px rgba(79,55,135,0.04);
    --accent-hover: #3C2566;
    --hover-lav:    #E1DFEA;
    --error-bg:  #fdecec;  --error-bd:  #f5b5b5;
    --warn-bg:   #fff6e5;  --warn-bd:   #f0d9a8;  --warn-fg: #7a5a1e;
    --info-bg:   #eef1ff;  --info-bd:   #c9d2f5;  --info-fg: #2f3a7a;
    --badge-bg:  #fff1e0;  --badge-fg:  #a25b12;  --medal:   #c8961e;
    --fire:  #DC0600;  --fire-bg:  #fdeceb;
    --earth: #198800;  --earth-bg: #e4f2e0;
    --air:   #FA8C00;  --air-bg:   #fdeed6;
    --water: #474B84;  --water-bg: #e6e7f0;
    --c-portrait:  #4F3787;
    --c-relations: #DD5770;
    --c-timing:    #D97400;
    --c-timing-fill: #FA8C00;
    --on-fill:     #ffffff;
    --tint-zebra:    rgba(79,55,135,.035);
    --tint-soft:     rgba(79,55,135,.05);
    --tint-hover:    rgba(79,55,135,.08);
    --tint-active:   rgba(79,55,135,.10);
    --tint-selected: rgba(79,55,135,.16);
    --line-soft:     rgba(79,55,135,.06);
    --line:          rgba(79,55,135,.10);
    --focus-ring:    0 0 0 3px rgba(79,55,135,.12);
    --shadow-thumb:  0 1px 3px rgba(79,55,135,.30);
    --shadow-lift:   0 2px 10px rgba(20,20,40,.10);
    --shadow-pop:    0 8px 28px rgba(20,20,40,.14);
    --shadow-modal:  0 12px 48px rgba(20,20,40,.25);
    --scrim:         rgba(20,20,35,.45);
    --success-bg:  #eaf4ec;  --success-fg: #2f6b3f;
    --error-fg:    #a13d3d;  --error-hover: #a5311f;
    --tone-harmony: #2e7d32;
    --tone-tension: #c0392b;
    --tone-mixed:   #e08a1e;
    --tone-conj:    #337aba;
    --tone-neutral: #8a8a93;
    --motion-rx: #8f5f0a;
    --motion-st: #6e4e9e;
    --c-variants:   #7a8f00;
    --c-relations-ink: #b03050;
    --c-grp-fam:      #2E8540;
    --c-grp-fam-ink:  #1E6B2A;
    --c-grp-fam-bg:   rgba(30,107,42,.12);
    --c-grp-fr:       #2F6DB5;
    --c-grp-fr-ink:   #1F5FA8;
    --c-grp-fr-bg:    rgba(31,95,168,.12);
    --c-grp-oth:      #8a8a93;
    --c-grp-oth-bg:   rgba(85,85,90,.12);
    --ty-from:  #474B84;
    --ty-to:    #5b2a86;
    --on-ty-2:  rgba(255,255,255,.86);
    --ty-line:  rgba(255,255,255,.18);
    --fs-read-step: 0;  --fs-ui-step: 0;  --fs-head-step: 0;
    --fs-xs:      11px;
    --fs-sm:      13px;
    --fs-ui:      calc(15px + var(--fs-ui-step) * .5px);
    --fs-read:    calc(18px + var(--fs-read-step) * 1px);
    --fs-title:   calc(19px + var(--fs-head-step) * 1px);
    --fs-h2:      calc(22px + var(--fs-head-step) * 1px);
    --fs-h1:      calc(26px + var(--fs-head-step) * 1.5px);
    --fs-display: calc(32px + var(--fs-head-step) * 2px);
    --fw-h:       600;
    --lh-read:    1.45;
  }
  @media (max-width: 640px) {
    :root { --card-py: 14px; --card-px: 16px; --card-gap: 10px; }
  }
  html[data-fs-read="-2"] { --fs-read-step: -2; }
  html[data-fs-read="-1"] { --fs-read-step: -1; }
  html[data-fs-read="1"]  { --fs-read-step: 1; }
  html[data-fs-read="2"]  { --fs-read-step: 2; }
  html[data-fs-read="3"]  { --fs-read-step: 3; }
  html[data-fs-ui="-2"]   { --fs-ui-step: -2; }
  html[data-fs-ui="-1"]   { --fs-ui-step: -1; }
  html[data-fs-ui="1"]    { --fs-ui-step: 1; }
  html[data-fs-ui="2"]    { --fs-ui-step: 2; }
  html[data-fs-head="-2"] { --fs-head-step: -2; }
  html[data-fs-head="-1"] { --fs-head-step: -1; }
  html[data-fs-head="1"]  { --fs-head-step: 1; }
  html[data-fs-head="2"]  { --fs-head-step: 2; }
  html[data-fw-head="1"]  { --fw-h: 500; }
  input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
  input[type="checkbox"] { width: 18px; height: 18px; }

  .ctx-link, .upgrade-faq-link, .upgrade-secondary-link {
    font-size: var(--fs-sm); color: var(--muted); text-decoration: underline; }
  .ctx-link:hover, .upgrade-faq-link:hover, .upgrade-secondary-link:hover {
    color: var(--accent); }
  .ctx-link.is-lead { color: var(--accent); font-weight: 600; }
  .ctx-link.is-lead:hover { color: var(--accent-hover); }

  .lead-link, .astrolog-bio-all {
    color: var(--accent); font-size: var(--fs-ui); font-weight: 600; text-decoration: none; }
  .lead-link:hover, .astrolog-bio-all:hover { text-decoration: underline; }

  .act-link, .astrolog-meet-link, .astrolog-chip-change,
  .moon-bio-more, .header-desc-toggle, .link-row-edit,
  .co-discount-toggle, .form-link {
    color: var(--accent); font-size: var(--fs-ui); font-weight: 600; text-decoration: underline; }
  .act-link:hover, .astrolog-meet-link:hover,
  .astrolog-chip-change:hover, .moon-bio-more:hover,
  .header-desc-toggle:hover, .link-row-edit:hover, .co-discount-toggle:hover,
  .form-link:hover { color: var(--accent-hover); }

  .check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
    color: var(--text); font-size: var(--fs-ui); line-height: 1.45; margin: 0 0 10px; }
  .check-row:last-child { margin-bottom: 0; }
  .check-row input[type="checkbox"] { margin-top: 1px; flex-shrink: 0; cursor: pointer; }
  .check-row a { color: var(--accent); text-decoration: underline; }
  .check-row .hint { display: block; color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
  .check-row--fine { font-size: var(--fs-sm); color: var(--muted); }

  body.canvas-grey { background: var(--grey); }
  html:has(body.canvas-grey) { background: var(--grey); }

  @media (max-width: 768px) {
    @supports (-webkit-touch-callout: none) {
      input, select, textarea { font-size: 16px !important; }
      .chat-input-row.fs-large textarea { font-size: calc(var(--fs-ui) + 2px) !important; }
    }
  }
  .rec-legacy-note { border-radius: var(--r-inner); padding: 10px 14px; font-size: var(--fs-sm);
    background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-bd);
    margin: 0 0 14px; }

  
  [class*="btn-"][class*="btn-"], .bt-buy { border-radius: var(--r-pill); }
  .btn-secondary-small, .btn-primary-small {
    display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box; min-height: 36px;
    padding: 0 16px; border-radius: var(--r-pill);
    font-size: var(--fs-sm); font-weight: 600; font-family: inherit; cursor: pointer;
  }
  .btn-secondary-small { background: var(--grey); color: var(--accent);
                          border: 1px solid var(--field-bd); }
  .btn-secondary-small:hover { background: var(--hover-lav); border-color: var(--accent); }
  body.canvas-grey .btn-secondary-small { background: var(--card); }
  body.canvas-grey .btn-secondary-small:hover { background: var(--hover-lav); }
  .btn-primary-small { background: var(--accent); color: var(--on-fill);
                        border: 1px solid transparent; }
  .btn-primary-small:hover { background: var(--accent-hover); }
  [class*="btn-"], .bt-buy { font-size: var(--fs-ui); font-weight: 600; }
  [class*="btn-"], .bt-buy { transition: background .15s ease, border-color .15s ease, color .15s ease, transform .06s ease; }
  [class*="btn-"]:active:not(:disabled), .bt-buy:active:not(:disabled) { transform: translateY(1px); }
  [class*="btn-"]:focus-visible, .bt-buy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .ask-ico { width: 18px; height: 18px; flex: none; margin-right: 8px; vertical-align: -4px; }

  body { font-family: var(--font-ui); font-size: var(--fs-ui); max-width: 1232px;
         margin: 40px auto; padding: 0 16px; background: var(--grey); color: var(--text); }
  .page-title { font-size: var(--fs-h1); font-weight: var(--fw-h); letter-spacing: -0.01em; margin: 0 0 4px; }
  .page-title-row { display: flex; justify-content: space-between; align-items: center;
                     margin-bottom: 24px; flex-wrap: wrap; gap: 8px; }
  .page-title-row .page-title { margin: 0; line-height: 1.6; }
  .ph:not(:has(> .rec-back)) > .page-title-row { margin-top: 18px; }
  .sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 24px; }

  .chl { margin: 0 0 8px; }
  .chl-side { display: flex; flex-direction: column; gap: 10px; margin: 0 0 4px; }
  .chl-sec-h { display: none; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
               margin: 6px 4px 0; }
  .chl-search { position: relative; display: block; }
  .chl-search-ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px;
                    margin-top: -9px; color: var(--muted); pointer-events: none; }
  .chl-search-in { width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px 12px 8px 42px;
                   border: 1px solid var(--field-bd); border-radius: var(--r-field);
                   background: var(--card); color: var(--text); font-family: inherit;
                   font-size: var(--fs-ui); }
  .chl-search-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .chl-filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px;
                 scrollbar-width: none; }
  .chl-filters::-webkit-scrollbar { display: none; }
  .chl-f { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
           padding: 0 16px; border: 1px solid var(--field-bd); border-radius: var(--r-pill);
           background: var(--card); color: var(--text-2); font-family: inherit;
           font-size: var(--fs-ui); font-weight: 600; white-space: nowrap; cursor: pointer; }
  .chl-f-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
  .chl-f-n { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
  .chl-f[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-fill); }
  .chl-f[aria-pressed="true"] .chl-f-n, .chl-f[aria-pressed="true"] .chl-f-dot { color: var(--on-fill); }
  @media (hover: hover) {
    .chl-f:hover { border-color: var(--accent); }
    .chl-f[aria-pressed="true"]:hover { background: var(--accent-hover); }
  }
  .chl-f:focus-visible, .chl-s:focus-visible, .chl-sort-btn:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px; }
  .chl-sort-list { display: none; }
  .chl-bar { display: flex; margin: 2px 0 8px; }
  .chl-sort-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
                  min-height: 44px; padding: 0 14px; border-radius: var(--r-pill);
                  background: var(--card); border: 1px solid var(--field-bd); color: var(--text);
                  font: inherit; font-size: var(--fs-ui); cursor: pointer; text-align: left; }
  @media (hover: hover) { .chl-sort-btn:hover { border-color: var(--accent); } }
  .chl-sort-l { color: var(--text-2); flex-shrink: 0; }
  .chl-sort-cur { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis;
                  white-space: nowrap; }
  .chl-sort-chev { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
  .chl-s-ok { width: 20px; height: 20px; margin-left: auto; color: var(--accent); visibility: hidden; }
  .chl-s[aria-pressed="true"] .chl-s-ok { visibility: visible; }
  .app-sheet-opt.chl-s { width: 100%; border: 0; background: none; font-family: inherit;
                         cursor: pointer; text-align: left; }
  .app-sheet-opt.chl-s[aria-pressed="true"] { color: var(--accent); font-weight: 600; }
  .chl-bar { gap: 8px; }
  .chl-bar > .chl-sort-btn { flex: 0 1 auto; min-width: 0; }
  .chl-kto-btn[hidden], [data-chl-kto][hidden] { display: none; }
  .chl-kto-list { display: none; }
  .chl-kto-sheet .chl-f-n { margin-left: auto; }
  .chl-kto-sheet .chl-s-ok { margin-left: 8px; }
  .chl-kto-btn.is-set { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .chl-bar.has-kto .chl-sort-btn:not(.chl-kto-btn) .chl-sort-l {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
    white-space: nowrap; }
  .chl-f-dot.grp-me  { color: var(--accent); }
  .chl-f-dot.grp-fam { color: var(--c-grp-fam); }
  .chl-f-dot.grp-fr  { color: var(--c-grp-fr); }
  .chl-f-dot.grp-oth { color: var(--c-grp-oth); }
  .chl-order { margin-left: auto; padding: 0 4px; border: 0; background: none; color: var(--text-2); }
  .chl-order-top { display: none; }
  .chl-order .chl-sort-cur { font-weight: 500; }
  .chl-order .chl-sort-l { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; }
  @media (hover: hover) { .chl-order:hover { color: var(--accent); } }
  .chl-empty { margin: 16px 4px 0; font-size: var(--fs-ui); color: var(--text-2); }
  .chl-empty[hidden] { display: none; }
  @media (min-width: 641px) {
    .chl-filters { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  }
  @media (min-width: 1024px) {
    .chl.has-side { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px;
                    align-items: start; }
    .chl-side { gap: 4px; margin: 0; }
    .chl-search { margin: 0 0 8px; }
    .chl-sec-h { display: block; margin: 24px 12px 6px; font-size: var(--fs-ui); font-weight: 700;
                 color: var(--text); }
    .chl-filters { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
    .chl-f, .chl-s { width: 100%; justify-content: flex-start; min-height: 40px; padding: 0 12px;
                     border: 0; border-radius: var(--r-inner); background: none; color: var(--text);
                     text-align: left; font-family: inherit; font-size: var(--fs-ui);
                     font-weight: 400; cursor: pointer; }
    .chl-f-n { margin-left: auto; }
    .chl-f[aria-pressed="true"], .chl-s[aria-pressed="true"] {
      background: var(--card); color: var(--accent); font-weight: 600; box-shadow: var(--card-shadow); }
    .chl-f.is-zero:not([aria-pressed="true"]), .chl-s.is-zero:not([aria-pressed="true"]) { color: var(--muted); }
    .chl-f[aria-pressed="true"] .chl-f-dot { color: inherit; }
    .chl-f[aria-pressed="true"] .chl-f-n { color: var(--muted); }
    .chl-f[aria-pressed="true"] .int-portrait { color: var(--c-portrait); }
    .chl-f[aria-pressed="true"] .int-relations { color: var(--c-relations); }
    .chl-f[aria-pressed="true"] .int-timing { color: var(--c-timing); }
    @media (hover: hover) {
      .chl-f:hover, .chl-s:hover { background: var(--tint-hover); border-color: transparent; }
      .chl-f[aria-pressed="true"]:hover, .chl-s[aria-pressed="true"]:hover { background: var(--card); }
    }
    .chl-sort-list, .chl-kto-list { display: flex; flex-direction: column; gap: 2px; }
    .chl-kto-list .chl-s:not([hidden]) { display: flex; align-items: center; gap: 8px; }
    .chl-bar { display: none; }
    .chl-order-top { display: inline-flex; }
    .chl-side > .chl-sec-h:first-child { margin-top: 0; }
  }

  
  .chl-me, .grp-chip { flex: none; display: inline-flex; align-items: center; justify-content: center;
            height: 22px; padding: 0 9px; border-radius: var(--r-pill); background: var(--accent);
            color: var(--on-fill); font-size: var(--fs-sm); font-weight: 600; line-height: 1;
            white-space: nowrap; max-width: 100%; }
  .chl-me .me-t, .grp-chip .me-t { display: block; text-box: trim-both cap alphabetic;
            padding: .3em 0; margin: -.3em 0; overflow: hidden; text-overflow: ellipsis; }
  .grp-chip.grp-fam { background: var(--c-grp-fam-bg); color: var(--c-grp-fam-ink); }
  .grp-chip.grp-fr  { background: var(--c-grp-fr-bg); color: var(--c-grp-fr-ink); }
  .grp-chip.grp-oth { background: var(--c-grp-oth-bg); color: var(--text-2); }
  .grp-chip[hidden] { display: none; }

  .chl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
              border: 1px solid var(--field-bd); border-radius: var(--r-card); overflow: hidden;
              background: var(--card); }
  .chl-row { position: relative; display: flex; align-items: center;
             box-shadow: inset 0 1px 0 var(--line-soft); }
  .chl-row[hidden] { display: none; }
  .chl-row.chl-first { box-shadow: none; }
  .chl-row.chl-alt { background: var(--tint-zebra); }
  @media (hover: hover) { .chl-row:hover { background: var(--tint-hover); } }
  .chl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
              min-height: 64px; box-sizing: border-box; padding: 10px 4px 10px 14px;
              color: var(--text); text-decoration: none; }
  .chl-main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .chl-pic { flex: none; width: 34px; display: inline-flex; justify-content: center; }
  .chl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .chl-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .chl-nm { font-size: var(--fs-ui); font-weight: 600; color: var(--text); overflow-wrap: anywhere;
            min-width: 0; }
  .chl-meta { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }
  .chl-conv, .chl-when { white-space: nowrap; }
  .chl-c0 { display: none; }
  .chl-sub-w[hidden] { display: none; }
  .chl-note { font-size: var(--fs-sm); font-weight: 500; color: var(--error-fg); line-height: 1.45; }
  .chl-more.blink { animation: chip-blink 0.6s ease-in-out 5; }
  @media (prefers-reduced-motion: reduce) { .chl-more.blink { animation: none; } }
  .chl-more { flex: none; width: 44px; height: 44px; margin-right: 6px; display: inline-flex;
              align-items: center; justify-content: center; padding: 0; border: 0;
              border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
  .chl-more svg { width: 22px; height: 22px; }
  @media (hover: hover) { .chl-more:hover { background: var(--tint-active); color: var(--accent); } }
  .chl-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .chl-sh-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .chl-sh-pic { flex: none; display: inline-flex; }
  .chl-sh-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .chl-sh-txt .app-sheet-title { overflow-wrap: anywhere; }
  .chl-sh-meta { font-size: var(--fs-sm); color: var(--text-2); }
  .chl-sh-note { margin: 0 8px 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--error-fg); }
  .chl-sh-note[hidden] { display: none; }
  .chl-acts .app-sheet-opt { width: 100%; box-sizing: border-box; border: 0; background: none;
                             font-family: inherit; text-align: left; cursor: pointer; }
  .chl-acts .app-sheet-opt[hidden] { display: none; }
  .chl-acts .app-sheet-opt-ico { color: var(--accent); }
  .chl-act-lbl { min-width: 0; }
  .chl-act-val { margin-left: auto; padding-left: 8px; font-size: var(--fs-sm); color: var(--text-2);
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
  .chl-acts .chl-act-danger { margin-top: 8px; box-shadow: inset 0 1px 0 var(--line); color: var(--error); }
  .chl-acts .chl-act-danger .app-sheet-opt-ico { color: var(--error); }
  @media (hover: hover) { .chl-acts .chl-act-danger:hover { background: var(--error-bg); color: var(--error); } }
  .chart-pictogram { width: 34px; height: 34px; flex-shrink: 0; color: var(--accent);
                     display: inline-flex; align-items: center; justify-content: center; }
  .chart-pictogram.pic-relations { color: var(--c-relations); }
  .chart-pictogram.pic-timing    { color: var(--c-timing); }
  .chart-pictogram.pic-variants  { color: var(--c-variants); }
  .chart-pictogram svg { width: 30px; height: 30px; }
  .synastry-hint-single { font-size: var(--fs-sm); color: var(--muted); margin: 4px 0 18px;
                          padding: 12px 16px; background: var(--card);
                          border: 1px solid var(--field-bd); border-radius: var(--r-inner); }
  .syn-hint-cta { margin-left: 6px; }
  
  .identity-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px;
                   border: 1px solid var(--field-bd); border-radius: var(--r-pill); background: none;
                   font-size: var(--fs-sm); line-height: 1.6; color: var(--text-2); cursor: pointer;
                   white-space: nowrap; flex-shrink: 0; font-family: inherit;
                   transition: background .15s, border-color .15s, color .15s; }
  .identity-chip svg { width: 13px; height: 13px; flex-shrink: 0; }
  .identity-chip:hover { background: var(--grey); border-color: var(--accent); }
  .identity-chip.is-me { background: var(--accent); border-color: var(--accent); color: var(--on-fill); }
  .identity-chip.is-me:hover { background: var(--accent-hover); }
  .identity-chip.rel-family { background: #198800; border-color: #198800; color: var(--on-fill); }
  .identity-chip.rel-family:hover { background: #136b00; border-color: #136b00; }
  .identity-chip.rel-friend { background: #FA8C00; border-color: #FA8C00; color: var(--on-fill); font-weight: 600; }
  .identity-chip.rel-friend:hover { background: #e07d00; border-color: #e07d00; }
  .identity-chip.rel-custom { background: #337ABA; border-color: #337ABA; color: var(--on-fill); }
  .identity-chip.rel-custom:hover { background: #2a679d; border-color: #2a679d; }
  .identity-chip.is-tag { background: #4468B2; border-color: #4468B2; color: var(--on-fill); }
  .identity-chip.is-tag:hover { background: #3a5896; border-color: #3a5896; }
  .identity-chip.unset { border-style: dashed; border-width: 1.5px;
    border-color: var(--c-relations); color: var(--c-relations-ink); background: rgba(221,87,112,0.05); }
  .identity-chip.unset:hover { background: rgba(221,87,112,0.12);
    border-color: var(--c-relations); color: #8f2540; }
  @keyframes chip-blink {
    0%, 100% { border-color: var(--field-bd); background: none; transform: scale(1); }
    50%      { border-color: #A4BD00; background: rgba(164,189,0,0.14);
               color: #5a6a00; transform: scale(1.06); }
  }
  .identity-chip.unset.blink { border-style: solid;
    animation: chip-blink 0.6s ease-in-out 5; }
  @media (prefers-reduced-motion: reduce) {
    .identity-chip.unset.blink { animation: none;
      border-style: solid; border-color: #A4BD00; color: #5a6a00; }
  }
  .identity-chip.unset.pulse-rel {
    border-style: solid; border-color: var(--c-relations);
    background: rgba(221,87,112,0.07); color: var(--c-relations-ink);
    animation: chip-pulse-soft 2s ease-in-out 7;
    will-change: transform;
  }
  @keyframes chip-pulse-soft {
    0%   { transform: scale(1); }
    38%  { transform: scale(1.055); }
    72%  { transform: scale(1.012); }
    100% { transform: scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .identity-chip.unset.pulse-rel { animation: none; }
  }
  .rel-modal-sub { margin: -4px 0 14px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
  .rel-modal-note { margin: 0 0 14px; padding: 9px 12px; border-radius: var(--r-inner);
                    background: var(--grey); color: var(--text-2);
                    font-size: var(--fs-sm); line-height: 1.5; }
  .rel-picker-list { display: flex; flex-direction: column; gap: 2px; margin: 0 0 12px;
                     max-height: 50vh; overflow-y: auto; }
  .rel-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
             background: none; border: none; border-radius: var(--r-inner); cursor: pointer;
             font-size: var(--fs-ui); color: var(--text); text-align: left; font-family: inherit; }
  .rel-opt:hover { background: var(--tint-hover); }
  .rel-opt.active { background: var(--tint-active); color: var(--accent); font-weight: 600; }
  .rel-ico { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); }
  .rel-opt-name { flex: 1; }
  .rel-check { width: 18px; height: 18px; color: var(--accent); opacity: 0; flex-shrink: 0; }
  .rel-opt.active .rel-check { opacity: 1; }
  .rel-other-input { width: 100%; padding: 10px 12px; margin: 0 0 14px; font-size: var(--fs-ui);
                     font-family: inherit; border: 1px solid var(--field-bd); border-radius: var(--r-field); }
  .rel-clear-link { background: none; border: none; color: var(--error); font-size: var(--fs-ui);
                    cursor: pointer; margin-right: auto; padding: 8px 2px; }
  .rel-clear-link:hover { text-decoration: underline; }

  .empty { color: var(--muted); text-align: center; padding: 40px 0; }
  .sup-block { margin: 26px 0 8px; }
  .sup-block > summary { cursor: pointer; color: var(--muted); font-size: var(--fs-sm);
    padding: 6px 2px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
  .sup-block > summary::-webkit-details-marker { display: none; }
  .sup-block > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -3px; }
  .sup-block[open] > summary::after { transform: rotate(225deg); margin-top: 2px; }
  .sup-block > summary:hover { color: var(--text-2); }
  .sup-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
    padding: 10px 12px; margin-top: 6px; background: var(--card); border-radius: var(--r-inner);
    box-shadow: var(--card-shadow); }
  .sup-row-name { font-weight: 600; color: var(--text-2); min-width: 0; }
  .sup-row-meta { font-size: var(--fs-sm); color: var(--muted); min-width: 0; }
  .sup-row-why { font-size: var(--fs-sm); color: var(--muted); flex-basis: 100%; }

  .login-card { background: var(--card); border: none; border-radius: var(--r-card);
                box-shadow: var(--card-shadow);
                padding: 28px 24px; max-width: 420px; margin: 0 auto; }
  .login-page-wrap { max-width: 460px; margin: 40px auto 0; }
  .login-page-wrap .page-title { margin-bottom: 24px; }
  .login-card p { font-size: var(--fs-ui); color: var(--muted); line-height: 1.5; margin: 0 0 18px; }
  .login-card input:not([type="checkbox"]):not([type="radio"]) { width: 100%; box-sizing: border-box; padding: 10px 12px;
                       border: 1px solid var(--field-bd); border-radius: var(--r-field); font-size: var(--fs-ui);
                       font-family: inherit; margin-bottom: 12px; }
  .btn-primary { width: 100%; padding: 11px 0; background: var(--accent); color: var(--on-fill);
                 border: none; border-radius: var(--r-pill); font-size: var(--fs-ui); font-weight: 600;
                 cursor: pointer; }
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-primary:disabled { opacity: 0.6; cursor: default; }
  .form-msg { font-size: var(--fs-sm); margin-top: 14px; padding: 10px 12px; border-radius: var(--r-inner);
              display: none; }
  .form-msg.error { background: var(--error-bg); color: var(--error-fg); display: block; }
  .form-msg.success { background: var(--success-bg); color: var(--success-fg); display: block; }
  .auth-error-banner { background: var(--error-bg); color: var(--error-fg); border-radius: var(--r-inner);
                        padding: 10px 12px; font-size: var(--fs-sm); margin-bottom: 18px; }
  .auth-error-banner.info { background: var(--info-bg); color: var(--accent); }
  .verify-banner { border-radius: var(--r-inner); padding: 11px 14px; font-size: var(--fs-ui);
                   margin-bottom: 18px; display: flex; align-items: center;
                   gap: 10px; flex-wrap: wrap; }
  .verify-banner.success { background: var(--success-bg); color: var(--success-fg); }
  .verify-banner.error { background: var(--error-bg); color: var(--error-fg); }
  .verify-banner.pending { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-bd); }
  .btn-resend-verify { background: var(--accent); color: var(--on-fill); border: none; border-radius: var(--r-pill);
                       padding: 6px 12px; font-size: var(--fs-ui); cursor: pointer; }
  .btn-resend-verify:hover { background: var(--accent-hover); }
  .verify-resend-msg { font-size: var(--fs-sm); }
  .password-set-hint { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 8px;
                       line-height: 1.5; }
  .back-link { display: inline-block; font-size: var(--fs-ui); color: var(--muted);
               text-decoration: none; margin-bottom: 16px; }
  .back-link:hover { color: var(--accent); }
  
  .rec-back { display:inline-flex; align-items:center; justify-content:center; position:relative;
    width:44px; height:44px; border-radius:50%; border:2px solid transparent;
    background:var(--accent); background-clip:padding-box; color:var(--on-fill);
    text-decoration:none; margin:0 0 14px; }
  .rec-back:hover { background-color:var(--accent-hover); }
  .rec-back:focus-visible { outline:2px solid var(--accent); outline-offset:0; }
  .rec-back-arr { display:flex; }
  .rec-back-arr svg { width:20px; height:20px; display:block; }
  @media (min-width:641px) {
    .ph:has(> .rec-back) { display:grid; grid-template-columns:auto minmax(0, 1fr); column-gap:16px;
      align-items:center; margin-bottom:14px; }
    .ph > .rec-back { grid-column:1; grid-row:1; margin:0; align-self:center; }
    .ph:has(> .rec-of) > .rec-back { grid-row:2; }
    .ph > :not(.rec-back) { grid-column:2; }
    .ph > .rec-head { display:contents; }
    .ph > .rec-head > * { grid-column:2; }
    .ph:has(> .rec-back) > .page-title-row { margin-bottom:0; }
    .ph:has(> .rec-back):has(> .page-title-row) { margin-bottom:24px; }
    .rec-back { background-color:var(--card); box-shadow:inset 0 0 0 1.5px var(--field-bd); color:var(--accent); }
    .rec-back:hover { background-color:var(--hover-lav); }
  }
  .rec-back-lbl { position:absolute; width:1px; height:1px; overflow:hidden;
    clip-path:inset(50%); white-space:nowrap; }
  .rec-of { display:flex; align-items:center; gap:6px; margin:0 0 2px; min-width:0;
    font-size:var(--fs-sm); color:var(--text-2); line-height:1.35; }
  .rec-of-name { min-width:0; overflow-wrap:anywhere; }
  .rec-of .chart-pictogram { flex:none; display:inline-flex; width:18px; height:18px;
    color:var(--c-portrait); }
  .rec-of .chart-pictogram svg { width:16px; height:16px; }
  .rec-of .chart-pictogram.pic-relations { color:var(--c-relations); }
  .rec-of .chart-pictogram.pic-timing    { color:var(--c-timing); }
  .rec-of .chart-pictogram.pic-variants  { color:var(--c-variants); }
  .ph-of-title > .rec-of { gap:10px; margin:0 0 12px; font-size:var(--fs-h2); font-weight:var(--fw-h);
    color:var(--text); line-height:1.2; letter-spacing:-.01em; }
  .ph-of-title > .rec-of .chart-pictogram { width:30px; height:auto; justify-content:center; }
  .ph-of-title > .rec-of .chart-pictogram svg { width:28px; height:28px; }
  @media (min-width:641px) {
    .ph.ph-of-title:has(> .rec-of) > .rec-back { grid-row:1; }
    .ph-of-title > .rec-of { margin:0; }
  }
  .rec-viewbar { display:inline-flex; gap:4px; padding:4px; background:var(--card);
    border:1px solid var(--field-bd); border-radius:var(--r-pill); margin:0 0 18px; }
  .rec-vb { display:inline-flex; align-items:center; gap:7px; padding:7px 14px;
    border-radius:var(--r-pill); font-size:var(--fs-ui); font-weight:600; color:var(--text-2);
    background:transparent; border:none; text-decoration:none; cursor:pointer; }
  .rec-vb svg { width:15px; height:15px; }
  .rec-vb:not(.active):hover { color:var(--text); background:var(--grey); }
  .rec-vb:not(.active):active { background:var(--tint-selected); }
  .rec-vb-busy { position:relative; --vb-load-ms:2000ms; }
  .rec-vb-busy.place { --vb-load-ms:4000ms; }
  .rec-vb-busy::after { content:""; position:absolute; left:6px; right:6px;
    bottom:3px; height:2px; border-radius:1px; background:var(--accent);
    transform-origin:left center;
    animation:rec-vb-load var(--vb-load-ms) ease-in-out infinite; }
  @keyframes rec-vb-load { 0% { transform:scaleX(0); } 50% { transform:scaleX(1); }
    100% { transform:scaleX(0); } }
  @media (prefers-reduced-motion: reduce) {
    .rec-vb-busy::after { animation:none; }
  }
  .rec-vb.active { background:var(--accent); color:var(--on-fill); cursor:default; }
  .rec-vb.wheel   svg { color:var(--c-portrait); }
  .rec-vb.life    svg { color:var(--c-timing); }
  .rec-vb.transit svg { color:var(--c-timing); }
  .rec-vb.place   svg { color:var(--c-portrait); }
  .rec-vb.active.wheel svg { color:var(--on-fill); }
  .rec-vb.active.place svg { color:var(--on-fill); }
  .rec-vb.active.life svg, .rec-vb.active.transit svg { color:var(--c-timing-fill); }
  .vbar { position:sticky; top:66px; z-index:40; background:var(--grey);
    padding:6px 0 10px; margin:0 0 4px; }
  .vbar .rec-viewbar { margin:0; }
  html:has(.vbar) { scroll-padding-top:158px; }
  .view-tools { position:relative; display:flex; flex-wrap:wrap; align-items:center;
    gap:6px 10px; margin:4px 0 16px; }
  .view-tools .help-hint.open { z-index:70; }
  .view-tools .help-hint .help-pop { z-index:80; }
  .view-tools .vt-meta { margin:0; font-size:var(--fs-sm); color:var(--text-2); line-height:1.45;
    max-width:none; }
  @media (max-width:560px) {
    .rec-viewbar { display:flex; width:100%; }
    .rec-vb { flex:1 1 0; min-width:0; flex-direction:column; gap:4px;
      justify-content:center; text-align:center; padding:7px 4px;
      font-size:var(--fs-sm); line-height:1.25; overflow-wrap:anywhere; }
    .rec-vb svg { width:17px; height:17px; }
  }

  
  .segmented {
    display: flex; gap: 4px; background: var(--grey); border-radius: var(--r-pill); padding: 4px;
  }
  .seg-btn:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
  .seg-btn {
    flex: 1; text-align: center; padding: 10px 14px; border: none; background: transparent;
    color: var(--muted); font-family: inherit; font-size: var(--fs-ui); font-weight: 600; line-height: 1.25;
    cursor: pointer; border-radius: var(--r-pill); user-select: none;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  }
  .seg-btn:hover:not(.active):not(:disabled) { color: var(--accent); }
  .seg-btn.active { background: var(--accent); color: var(--on-fill);
    box-shadow: var(--shadow-thumb); }
  .seg-btn:disabled { cursor: default; }
  .seg-btn.seg-fixed:disabled { opacity: 1; cursor: default; pointer-events: none; }
  .seg-sub { font-weight: 400; opacity: .65; font-size: .85em; }

  .syn-rt-opts { display: flex; flex-wrap: wrap; gap: 8px; }
  .syn-rt-btn { padding: 5px 14px; border-radius: var(--r-pill);
                border: 1px solid var(--field-bd); background: none;
                font-family: inherit; font-size: var(--fs-ui); line-height: 1.6;
                color: var(--text-2); cursor: pointer; white-space: nowrap;
                transition: background .15s, border-color .15s, color .15s; }
  @media (hover:hover) {
    .syn-rt-btn:hover { background: var(--grey); border-color: var(--accent); }
  }
  .syn-rt-btn.active { background: var(--accent); border-color: var(--accent);
                       color: var(--on-fill); }
  .syn-rt-btn.active:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .syn-rt-opts.is-busy { opacity: .55; pointer-events: none; }

  
  .hz-wrap { margin-top:16px; }
  .hz-label { font-size:var(--fs-sm); color:var(--muted); margin:0 0 6px; }
  @media (max-width:520px){
    .hz-wrap .seg-btn { padding-left:6px; padding-right:6px; font-size:var(--fs-ui); }
  }
  .hz-fixed-info { font-size:var(--fs-sm); color:var(--text-2); line-height:1.5; }
  
  .astrolog-title { font-weight: 600; margin-bottom: 10px; }
  .astrolog-picker { display: flex; gap: 12px; }
  .astrolog-card {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
    align-items: center; text-align: center; gap: 4px; padding: 8px 4px;
    cursor: pointer; border-radius: var(--r-inner); }
  .astrolog-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .ap-av { position: relative; display: inline-block; margin-bottom: 6px; }
  .astrolog-avatar { display: block; width: 72px; height: 72px; border-radius: 50%;
    object-fit: cover; object-position: 50% 18%; background: var(--grey);
    box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--border);
    transition: box-shadow .15s; }
  @media (hover: hover) {
    .astrolog-card:not(.is-locked):hover .astrolog-avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
  }
  .astrolog-card.selected .astrolog-avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 5px var(--accent); }
  .ap-av-check, .ap-av-lock { display: none; position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px;
    border-radius: 50%; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--card); }
  .ap-av-check { background: var(--accent); color: var(--on-fill); }
  .ap-av-check svg { width: 16px; height: 16px; }
  .astrolog-card.selected .ap-av-check { display: inline-flex; }
  .ap-av-lock { background: var(--grey); color: var(--text-2); }
  .ap-av-lock svg { width: 13px; height: 13px; }
  .astrolog-name { font-weight: 600; font-size: var(--fs-ui); line-height: 1.3; }
  .astrolog-card.selected .astrolog-name { color: var(--accent); }
  @media (prefers-reduced-motion: reduce) { .astrolog-avatar { transition: none; } }
  .astrolog-rate { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill);
    background: var(--grey); color: var(--text-2); font-size: var(--fs-xs);
    font-weight: 600; white-space: nowrap; }
  .astrolog-tagline { font-size: var(--fs-sm); color: var(--text); line-height: 1.35; }
  .astrolog-card.is-locked { cursor: default; }
  .astrolog-card.is-locked .astrolog-avatar { filter: grayscale(1); opacity: .45; }
  .astrolog-card.is-locked .astrolog-name,
  .astrolog-card.is-locked .astrolog-tagline { color: var(--muted); opacity: .85; }
  .astrolog-lock { display: inline-block; max-width: 100%; padding: 2px 7px;
    border-radius: 8px; background: var(--tint-hover); color: var(--accent);
    font-size: var(--fs-xs); font-weight: 600; line-height: 1.25;
    white-space: normal; overflow-wrap: break-word; }

  .election-teaser { margin: 18px 0 0; font-size: var(--fs-ui); color: var(--text-2);
    line-height: 1.6; max-width: 100ch; }
  .election-teaser strong { color: var(--text); }
  .astrolog-picker[data-n="1"] { justify-content: center; }
  .astrolog-picker[data-n="1"] .astrolog-card { flex: 0 1 260px; }
  .tester-pill { display: flex; align-items: center; gap: 8px; width: 100%;
    margin-top: 10px; padding: 9px 12px; cursor: pointer; box-sizing: border-box;
    border: 2px solid var(--border); border-radius: var(--r-pill); background: var(--card);
    font-size: var(--fs-ui); color: var(--text-2);
    transition: border-color .15s, background .15s, color .15s; }
  @media (hover: hover) { .tester-pill:hover { border-color: var(--accent); } }
  .tester-pill.selected { border-color: var(--accent); background: var(--bg);
    color: var(--text); font-weight: 600; }
  .tester-pill .tester-pill-tag { font-size: var(--fs-sm); color: var(--muted);
    font-weight: 400; }

  .ap-mode-seg { margin-bottom: 12px; }
  .ap-switch {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    min-height: 32px; padding: 0 2px; user-select: none; -webkit-user-select: none;
    font-size: var(--fs-ui); font-weight: 600; color: var(--text); line-height: 1.2;
  }
  .ap-switch input[type="checkbox"] {
    position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
  }
  .ap-switch-track {
    position: relative; width: 30px; height: 18px; border-radius: 9px;
    background: var(--hover-lav); transition: background .15s; flex: 0 0 30px;
  }
  .ap-switch-track::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
    border-radius: 50%; background: var(--card); box-shadow: var(--shadow-thumb);
    transition: transform .15s;
  }
  .ap-switch input:checked + .ap-switch-track { background: var(--accent); }
  .ap-switch input:checked + .ap-switch-track::after { transform: translateX(12px); }
  .ap-switch input:focus-visible + .ap-switch-track { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
  .ap-switch:hover .ap-switch-track { filter: brightness(.96); }
  @media (prefers-reduced-motion: reduce) {
    .ap-switch-track, .ap-switch-track::after { transition: none; }
  }
  .ap-mode-hint { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45;
    margin: -4px 0 12px; }
  .ap-reading { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
  .ap-lifeline { margin: 0 0 12px; }
  .ap-cost { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45;
    text-align: right; margin: 16px 0 0; font-variant-numeric: tabular-nums; }
  .ap-cost[hidden] { display: none; }
  .ap-cost + .pchat-actions, .ap-cost + .acc-modal-actions {
    margin-top: 8px !important; }
  .ap-mode-seg ~ * .is-disabled,
  .acc-modal-btn.is-disabled, .pchat-start.is-disabled {
    opacity: .5; cursor: default; }

  .astrolog-tagstrip { display: none; }
  .astrolog-picker.ap-many { container-type: inline-size; display: grid;
    grid-template-columns: repeat(var(--ap-cols, 4), 1fr);
    column-gap: 8px; row-gap: 12px; }
  .ap-locknote { display: none; }
  @container (max-width: 419px) {
    .astrolog-card { padding: 8px 2px; gap: 4px; }
    .ap-av { display: block; width: calc(100% - 10px); max-width: 72px; margin: 0 auto 6px; }
    .astrolog-avatar { width: 100%; max-width: 72px; height: auto; aspect-ratio: 1; }
    .astrolog-name { font-size: var(--fs-sm); }
    .astrolog-lock { display: none; }
    .astrolog-card.is-locked .ap-av-lock { display: inline-flex; }
    .ap-locknote { display: block; grid-column: 1 / -1; margin: 0; font-size: var(--fs-sm);
      color: var(--text-2); line-height: 1.4; text-align: center; }
    .astrolog-rate { display: none; }
    .astrolog-tagline { display: none; }
    .astrolog-tagstrip {
      display: block; grid-column: 1 / -1; box-sizing: border-box;
      min-height: 2.7em; padding: 8px 12px; border-radius: var(--r-inner);
      background: var(--grey); color: var(--text);
      font-size: var(--fs-sm); line-height: 1.35; text-align: center; }
    .astrolog-tagstrip:empty { background: transparent; }
  }

  .link-row { text-align: center; font-size: var(--fs-ui); }
  .link-row a { color: var(--accent); text-decoration: none; cursor: pointer; }
  .link-row a:hover { text-decoration: underline; }
  .login-card .link-row { margin-top: 14px; }
  .login-card .link-row a { font-size: var(--fs-ui); font-weight: 600; color: var(--accent);
                            text-decoration: none; }
  .login-card .link-row a:hover { text-decoration: underline; }
  .auth-switch-row { margin-top: 14px; text-align: center; }
  .auth-switch-row a { color: var(--accent); font-size: var(--fs-ui); font-weight: 600;
                       text-decoration: none; }
  .auth-switch-row a:hover { text-decoration: underline; }
  .name-row { display: flex; gap: 10px; }
  .name-row input { flex: 1; }
  .reg-adult-row { display: flex; width: 100%; box-sizing: border-box;
                   align-items: flex-start; justify-content: flex-start; gap: 8px;
                   text-align: left; font-size: var(--fs-sm); color: var(--muted);
                   margin: 8px 0 12px; cursor: pointer; }
  .reg-adult-row span { flex: 1 1 auto; min-width: 0; }
  .reg-adult-row input[type="checkbox"] { margin-top: 1px; flex-shrink: 0; cursor: pointer; }
  .reg-grant-note { color: var(--text-2); font-size: var(--fs-sm); font-weight: 400;
    text-align: center; margin: 2px 0 12px; }
  .reg-grant-berry { display: inline-block; width: 15px; height: 15px; margin-right: 6px;
    vertical-align: -3px; background-color: var(--accent);
    -webkit-mask: url("/static/berry.svg") center / contain no-repeat;
    mask: url("/static/berry.svg") center / contain no-repeat; }
  .twofa-nudge { background: var(--card); border-radius: var(--r-card); padding: var(--card-py, 18px) var(--card-px, 20px);
    margin: 0 0 var(--card-gap, 16px); box-shadow: var(--card-shadow); }
  .twofa-nudge-title { font-size: var(--fs-title); font-weight: var(--fw-h); color: var(--text); margin: 0 0 6px; }
  .twofa-nudge-body { font-size: var(--fs-ui); color: var(--text-2); line-height: 1.5; margin: 0 0 14px; }
  .twofa-nudge-actions { display: flex; gap: 10px; flex-wrap: wrap; }
  .twofa-nudge-on, .twofa-nudge-later { font-size: var(--fs-ui); font-weight: 600; border-radius: var(--r-pill);
    padding: 9px 16px; cursor: pointer; }
  .twofa-nudge-on { background: var(--accent); color: var(--on-fill); border: none; }
  .twofa-nudge-on:hover { background: var(--accent-hover); }
  .twofa-nudge-later { background: var(--grey); color: var(--accent); border: 1px solid var(--field-bd); }
  .twofa-nudge-later:hover { background: var(--hover-lav); border-color: var(--accent); }
  .field-hint { font-size: var(--fs-sm); color: var(--muted); margin: -8px 0 12px; }
  .password-field-wrap { position: relative; margin-bottom: 10px; }
  .password-field-wrap input { display: block; margin-bottom: 0; padding-right: 40px; }
  .password-toggle-btn {
    position: absolute; right: 4px; top: 0; bottom: 0; height: auto; margin: 0;
    transform: none; display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    padding: 0 8px; color: var(--muted);
  }
  .password-toggle-btn:hover { color: var(--accent); }
  .password-toggle-btn svg { width: 20px; height: 20px; }
  .password-toggle-btn .pw-eye-off { display: none; }
  .password-toggle-btn.is-visible .pw-eye { display: none; }
  .password-toggle-btn.is-visible .pw-eye-off { display: block; }
  .profile-card { background: var(--card); border: none; border-radius: var(--r-card);
                  box-shadow: var(--card-shadow); padding: 14px 16px; margin-bottom: 14px; }
  .profile-row { display: flex; justify-content: space-between; align-items: baseline;
                 font-size: var(--fs-ui); margin-bottom: 6px; gap: 12px; }
  .profile-label { color: var(--muted); flex-shrink: 0; }
  .settings-card-title { display: block; margin-bottom: 8px; color: var(--text);
    font-weight: 600; font-size: var(--fs-ui); }
  .settings-group-title { display: block; margin: 0 0 14px; color: var(--text);
    font-weight: var(--fw-h); font-size: var(--fs-title); }
  .settings-sub { margin: 0 0 20px; }
  .settings-sub:last-child { margin-bottom: 0; }
  .settings-sub:target { background: var(--tint-active); border-radius: 10px;
    margin-left: -10px; margin-right: -10px; padding: 10px; }
  .settings-sub .settings-card-title { font-size: var(--fs-sm); margin-bottom: 6px; }
  @media (pointer: coarse) { #chat-enter-card { display: none; } }
  .profile-value { font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }
  .profile-missing { color: var(--error-fg); font-weight: 500; font-style: normal; }
  .link-row-edit { display: inline-block; margin-top: 4px; cursor: pointer; }
  .acct-hist-entry { margin: -4px 0 18px; }
  .hist-summary { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 8px;
    font-size: var(--fs-ui); color: var(--text-2); }
  .hist-summary strong { color: var(--text); font-size: var(--fs-ui); }
  .hist-table-wrap { overflow-x: auto; margin-top: 10px; }
  .hist-table { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); }
  .hist-table th { text-align: left; font-weight: 600; color: var(--muted);
    font-size: var(--fs-sm); padding: 0 12px 6px 0; white-space: nowrap; }
  .hist-table td { padding: 8px 12px 8px 0; border-top: 1px solid var(--field-bd);
    color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .hist-muted { color: var(--muted); }
  .hist-ok { color: var(--success-fg); }
  .hist-drill > summary { cursor: pointer; list-style: none; display: inline-flex;
    align-items: center; gap: 5px; }
  .hist-drill > summary::-webkit-details-marker { display: none; }
  .hist-drill > summary::after { content: "⌄"; color: var(--muted); font-size: var(--fs-sm);
    line-height: 1; transform: translateY(-2px); transition: transform .15s; }
  .hist-drill[open] > summary::after { transform: translateY(1px) rotate(180deg); }
  .hist-top { vertical-align: top; }
  .hist-drill-body { padding: 6px 0 2px 14px; margin-top: 4px;
    border-left: 2px solid var(--field-bd); }
  .hist-drill-row { display: flex; justify-content: space-between; gap: 14px;
    font-size: var(--fs-sm); color: var(--text-2); padding: 2px 0; }
  .hist-drill-row > span:last-child { white-space: nowrap; }
  .profile-edit-buttons { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
  .session-status { border-radius: var(--r-inner); padding: 12px 16px; margin-bottom: 18px;
                     display: flex; align-items: center; justify-content: space-between;
                     gap: 10px; font-size: var(--fs-sm); flex-wrap: wrap; }
  .session-status.paid { background: var(--success-bg); color: var(--success-fg); }
  .session-status.free { background: var(--card); color: var(--muted); }
  .btn-buy-session { background: var(--accent); color: var(--on-fill); text-decoration: none;
                      font-size: var(--fs-sm); font-weight: 600; padding: 7px 14px;
                      border-radius: var(--r-pill); white-space: nowrap; }
  .btn-buy-session:hover { background: var(--accent-hover); }
  
  .acc-modal-overlay {
    display: none; position: fixed; inset: 0; background: var(--scrim);
    z-index: 1000; align-items: center; justify-content: center; padding: 20px;
  }
  .acc-modal-overlay.open { display: flex; }
  .acc-modal {
    background: var(--card); border-radius: var(--r-card); max-width: 440px; width: 100%;
    padding: 24px; box-shadow: var(--shadow-modal);
  }
  .acc-modal h3 { margin: 0 0 12px; font-size: var(--fs-title); color: var(--text); }
  .acc-modal p { margin: 0 0 18px; font-size: var(--fs-ui); line-height: 1.55; color: var(--text); }
  .acc-modal input[type="text"] { width: 100%; padding: 9px 12px; border: 1px solid var(--field-bd);
                                  border-radius: var(--r-field); font-size: var(--fs-ui); box-sizing: border-box; }
  .acc-modal-segrow { margin: 0 0 18px; }
  .acc-modal-seglabel { font-size: var(--fs-ui); color: var(--muted); margin: 0 0 7px; }
  .acc-modal-seginfo { font-size: var(--fs-ui); line-height: 1.55; color: var(--text-2);
                       text-align: center; }
  .acc-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
  .acc-modal-btn {
    margin: 0; padding: 9px 18px; border-radius: var(--r-pill); font-size: var(--fs-ui); font-weight: 600;
    border: none; cursor: pointer; transition: background 0.12s, transform 0.05s;
  }
  .acc-modal-btn:active { transform: translateY(1px); }
  .acc-modal-cancel { background: var(--grey); color: var(--accent); border: 1px solid var(--field-bd); }
  .acc-modal-cancel:hover { background: var(--hover-lav); border-color: var(--accent); }
  .acc-modal-confirm { background: var(--error); color: var(--on-fill); }
  .acc-modal-confirm:hover:not(:disabled) { background: var(--error-hover); }
  .acc-modal-confirm:disabled { background: var(--error-bd); cursor: not-allowed; }
  .acc-modal-confirm.primary { background: var(--accent); }
  .acc-modal-confirm.primary:hover { background: var(--accent-hover); }
  .acc-modal-start { background: var(--accent); color: var(--on-fill); }
  .acc-modal-start:hover { background: var(--accent-hover); }
  .newconvo-flagdrop { margin-top: 14px; font-size: var(--fs-sm); color: var(--muted);
                       font-style: italic; line-height: 1.45; }
  .acc-modal-error { background: var(--error-bg); color: var(--error); border: 1px solid var(--error-bd);
                     padding: 9px 12px; border-radius: var(--r-inner); font-size: var(--fs-sm); margin-bottom: 14px; display: none; }
  .acc-modal-error.show { display: block; }
  .acc-modal-sigil { width: 40px; height: 40px; margin: 6px auto 18px; display: block;
    background: center / contain no-repeat; filter: saturate(1); }
  .acc-modal.acc-status { background: var(--bg); border: 1px solid var(--accent); }
  .acc-modal.acc-status h3 { margin-top: 4px; }
  .acc-modal.acc-status .acc-modal-sigil { margin: 6px auto 8px; }


  
  html { scrollbar-gutter: stable; }
  html { scroll-padding-top: 82px; }
  *, *::before, *::after { box-sizing: border-box; }
  body { padding-top: 66px; margin-top: 0; }
  .app-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: var(--card); border-bottom: 1px solid transparent;
    transition: box-shadow .22s ease, border-color .22s ease; }
  .app-header.scrolled { border-bottom-color: var(--border);
    box-shadow: var(--shadow-lift); }
  body.canvas-grey .app-header { background: var(--grey); }
  body.canvas-grey .app-balance.level-ok,
  body.canvas-grey .app-balance.level-low,
  body.canvas-grey .app-balance.level-crit { background-color: var(--card); }
  body.canvas-grey .app-nav-link:hover { background: var(--card); }
  body.canvas-grey .lang-dd-trigger { background: transparent; border-color: var(--field-bd); }
  body.canvas-grey .lang-dd-trigger:hover { background: var(--hover-lav); border-color: var(--accent); }
  body.canvas-grey .app-login-btn { background: var(--card); border-color: var(--field-bd); }
  body.canvas-grey .app-login-btn:hover { background: var(--hover-lav); border-color: var(--accent); }
  .app-header-inner { max-width: 1232px; margin: 0 auto;
    padding: max(9px, env(safe-area-inset-top)) 16px 9px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  .app-brand { display: flex; align-items: center; gap: 7px; text-decoration: none;
    min-width: 0; flex-shrink: 1; }
  .app-brand-logo { display: inline-flex; align-items: stretch; height: 1.9rem; flex-shrink: 0; }
  .app-brand-logo > .abf-box, .app-brand-logo > .app-brand-word { height: 100%; width: auto; display: block; }
  .app-brand-sygnet { display: none; height: 1.9rem; width: auto; flex-shrink: 0; }
  .abf-box { position: relative; aspect-ratio: 206 / 201; flex-shrink: 0; }
  .abf-box > .abf-img, .abf-box > .abf { position: absolute; inset: 0; width: 100%; height: 100%;
    display: block; overflow: visible; }
  .abf-box > .abf { visibility: hidden; }
  .abf-box.abf-live > .abf { visibility: visible; filter: invert(1); isolation: isolate; }
  .abf-box.abf-live > .abf-img { visibility: hidden; }
  .abf-box.abf-live .abf-pt path { mix-blend-mode: plus-lighter; }
  .abf-box.abf-hold > .abf-img { animation: abf-wait 0s 1.6s both; }
  @keyframes abf-wait { from { opacity: 0; } to { opacity: 1; } }
  .app-brand-name { font-size: var(--fs-title); font-weight: var(--fw-h); color: var(--accent);
    letter-spacing: -0.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .app-header.is-brand-mark .app-brand-logo { display: none; }
  .app-header.is-brand-mark .app-brand-sygnet { display: block; }
  .app-header.is-brand-mark .app-brand { min-height: 44px; min-width: 44px; }
  .app-balance { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
    height: 44px; padding: 0 12px 0 10px; border: 2px solid transparent; background-clip: padding-box;
    border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 5px;
    font-variant-numeric: tabular-nums; text-decoration: none; flex-shrink: 0;
    transition: background .3s ease, color .3s ease; }
  .app-balance:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
  .app-balance-buy { display: none; color: var(--accent); padding-right: 8px; margin-right: 3px;
    border-right: 1px solid var(--line); }
  .app-balance.level-low .app-balance-buy, .app-balance.level-crit .app-balance-buy { display: inline; }
  .app-buy-l { display: none; }
  @media (min-width: 1280px) {
    .app-balance .app-buy-l { display: inline; }
    .app-balance:has(.app-buy-l) .app-buy-s { display: none; }
  }
  .app-acct-open { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; padding: 0;
    border: 2px solid transparent; background: var(--info-bg); background-clip: padding-box;
    box-shadow: inset 0 0 0 1.5px var(--tint-selected); color: var(--accent); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: inherit; font-size: var(--fs-sm); font-weight: 700; line-height: 1; }
  .app-acct-open:hover { background-color: var(--hover-lav); }
  .app-acct-open[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
  .app-acct-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
  .app-acct-open-m { display: none; }
  .app-balance .balance-berry { width: 15.2px; height: 15.2px; flex-shrink: 0; display: block;
    background-color: currentColor; transform-origin: center bottom;
    -webkit-mask: url("/static/berry.svg") center / contain no-repeat;
    mask: url("/static/berry.svg") center / contain no-repeat; }
  .app-balance.level-ok   { color: var(--accent); background-color: var(--grey); }
  .app-balance.level-low  { color: var(--badge-fg); background-color: var(--grey); }
  .app-balance.level-crit { color: var(--c-relations-ink); background-color: var(--grey); }
  @keyframes berry-pulse { 0%{transform:scale(1)} 35%{transform:scale(1.18)} 100%{transform:scale(1)} }
  .app-balance.pulse .balance-berry { animation: berry-pulse .45s ease-out; }
  @media (prefers-reduced-motion: reduce) { .app-balance.pulse .balance-berry { animation: none; } }
  .app-nav-desktop { display: flex; align-items: center; gap: 4px; }
  .app-nav-link { font-size: var(--fs-sm); color: var(--text); text-decoration: none;
    padding: 7px 12px; border-radius: 8px; white-space: nowrap; }
  .app-nav-link:hover { background: var(--grey); color: var(--accent); }
  .app-nav-link.active { color: var(--accent); font-weight: 600; }
  .lang-dd { position: relative; display: inline-flex; }
  .lang-dd-trigger { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-field); padding: 5px 9px;
    color: var(--text); font-size: var(--fs-sm); font-weight: 500; transition: background .15s, border-color .15s; }
  .lang-dd-trigger:hover { background: var(--hover-lav); border-color: var(--accent); }
  .lang-dd-code { letter-spacing: .02em; }
  .lang-dd-chev { width: 13px; height: 13px; color: var(--muted); transition: transform .18s ease; }
  .lang-dd.open .lang-dd-chev { transform: rotate(180deg); }
  @media (prefers-reduced-motion: reduce) { .lang-dd-chev { transition: none; } }
  .lang-dd-menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--card);
    border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop);
    padding: 6px; min-width: 190px; z-index: 60; display: none; }
  .lang-dd.open .lang-dd-menu { display: block; }
  .lang-dd-opt { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
    font-size: var(--fs-ui); color: var(--text); text-decoration: none; }
  .lang-dd-opt:hover { background: var(--tint-hover); color: var(--accent); }
  .lang-dd-name { flex: 1; }
  .lang-dd-check { width: 16px; height: 16px; color: var(--accent); opacity: 0; }
  .lang-dd-opt.active { color: var(--accent); font-weight: 600; }
  .lang-dd-opt.active .lang-dd-check { opacity: 1; }
  .lang-dd-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .lang-flag { width: 19px; height: 13px; display: block; flex-shrink: 0; clip-path: inset(0 round 2.5px); }
  .app-lang-opt { display: none; }
  .app-lang-opt .lang-dd-trigger { height: 44px; padding: 0 12px; gap: 7px; border: 2px solid transparent;
    background-clip: padding-box; border-radius: var(--r-pill); background-color: var(--grey); font-weight: 600; }
  .app-lang-opt .lang-dd-trigger:hover { background-color: var(--hover-lav); }
  body.canvas-grey .app-lang-opt .lang-dd-trigger { background-color: var(--card); border-color: transparent;
    background-clip: padding-box; }
  body.canvas-grey .app-lang-opt .lang-dd-trigger:hover { background-color: var(--hover-lav); border-color: transparent;
    background-clip: padding-box; }
  .app-lang-opt .lang-dd-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
  .app-place { display: inline-flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px; min-height: 44px; padding: 4px 8px;
    border-radius: 10px; color: var(--muted); text-decoration: none;
    font-size: var(--fs-xs); line-height: 1.2; white-space: nowrap; position: relative; }
  .app-place svg { width: 21px; height: 21px; flex-shrink: 0; }
  .app-place:hover { color: var(--accent); background: var(--grey); }
  body.canvas-grey .app-place:hover { background: var(--card); }
  .app-place.on { color: var(--accent); font-weight: 600; }
  .app-place-lbl { padding-bottom: 1px; border-bottom: 2px solid transparent; }
  .app-place.on .app-place-lbl { border-bottom-color: var(--accent); }
  .app-place:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .app-new-open { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
    border: 2px solid transparent; background: var(--accent); background-clip: padding-box;
    color: var(--on-fill); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .app-new-open svg { width: 20px; height: 20px; flex-shrink: 0; }
  .app-new-open:hover { background-color: var(--accent-hover); }
  .app-new-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
  .app-new-open-m { display: none; }
  .app-new-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; }
  .app-topback, .app-top-title { display: none; }
  .int-portrait { color: var(--c-portrait); }
  .int-relations { color: var(--c-relations); }
  .int-timing { color: var(--c-timing); }
  .int-variants { color: var(--c-variants); }
  .int-relations svg, .int-timing svg { stroke-width: 2.4; }
  .app-tabbar { display: none; }
  .app-sheet-bd { position: fixed; inset: 0; background: var(--scrim); z-index: 950;
    opacity: 0; pointer-events: none; transition: opacity .24s ease; }
  .app-sheet-bd.open { opacity: 1; pointer-events: auto; }
  .app-sheet { position: fixed; z-index: 960; background: var(--card);
    left: 50%; top: 50%; width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 32px); overflow-y: auto;
    border-radius: var(--r-card); padding: 12px 12px 16px;
    transform: translate(-50%, -48%); opacity: 0; visibility: hidden;
    transition: transform .24s cubic-bezier(.4,0,.2,1), opacity .24s ease, visibility 0s linear .24s; }
  .app-sheet.open { transform: translate(-50%, -50%); opacity: 1; visibility: visible;
    box-shadow: var(--shadow-modal);
    transition: transform .24s cubic-bezier(.4,0,.2,1), opacity .24s ease, visibility 0s; }
  .app-sheet-head { display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 4px 4px 8px 8px; }
  .app-sheet-title { font-size: var(--fs-title); font-weight: var(--fw-h); color: var(--text); margin: 0; }
  .app-sheet-close { width: 44px; height: 44px; border: none; background: none; border-radius: 50%;
    font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; flex-shrink: 0; }
  .app-sheet-close:hover { background: var(--grey); color: var(--accent); }
  .app-sheet-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .app-sheet-list { display: flex; flex-direction: column; gap: 2px; }
  .app-sheet-opt { display: flex; align-items: center; gap: 14px; min-height: 52px;
    padding: 10px 12px; border-radius: var(--r-inner); color: var(--text); text-decoration: none;
    font-size: var(--fs-ui); }
  .app-sheet-opt:hover { background: var(--tint-hover); color: var(--accent); }
  .app-sheet-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .app-sheet-opt-ico { width: 24px; height: 24px; flex-shrink: 0; display: inline-flex; }
  .app-sheet-opt-ico svg { width: 24px; height: 24px; }
  body.sheet-open { overflow: hidden; }
  @media (prefers-reduced-motion: reduce) {
    .app-sheet, .app-sheet.open, .app-sheet-bd { transition: none; } }
  .acct-menu { display: flex; flex-direction: column; }
  .acct-id { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-inner);
    background: var(--grey); color: var(--text); text-decoration: none; margin-bottom: 6px; }
  .acct-id:hover { background: var(--hover-lav); }
  .acct-id:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .acct-mono { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-fill);
    font-size: var(--fs-ui); font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; }
  .acct-id-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .acct-id-name { font-size: var(--fs-ui); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
  .acct-id-sub { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.35; overflow-wrap: anywhere; }
  .acct-chev { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
  .acct-list { display: flex; flex-direction: column; gap: 2px; }
  .acct-row { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 6px 12px;
    border-radius: var(--r-inner); color: var(--text); text-decoration: none; font-size: var(--fs-ui); }
  .acct-row:hover { background: var(--tint-hover); color: var(--accent); }
  .acct-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .acct-row > svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--muted); }
  .acct-row:hover > svg { color: var(--accent); }
  .acct-lbl { flex: 1; min-width: 0; }
  .acct-meta { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
  .acct-berry { width: 20px; height: 20px; flex-shrink: 0; background-color: var(--muted);
    -webkit-mask: url("/static/berry-outline.svg") center / contain no-repeat;
    mask: url("/static/berry-outline.svg") center / contain no-repeat; }
  .acct-row:hover .acct-berry { background-color: var(--accent); }
  .acct-lang { display: block; }
  .acct-lang > summary { cursor: pointer; list-style: none; }
  .acct-lang > summary::-webkit-details-marker { display: none; }
  .acct-dd { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; transition: transform .2s ease; }
  .acct-lang[open] .acct-dd { transform: rotate(180deg); }
  @media (prefers-reduced-motion: reduce) { .acct-dd { transition: none; } }
  .acct-meta-lang { display: inline-flex; align-items: center; gap: 8px; }
  .acct-lang-opt { padding-left: 46px; }
  .acct-lang-opt.on { color: var(--accent); font-weight: 600; }
  .acct-check { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
  .acct-sep { height: 1px; background: var(--line); margin: 6px 12px; }
  .acct-out, .acct-out > svg { color: var(--error); }
  .acct-out:hover { background: var(--error-bg); color: var(--error); }
  .acct-out:hover > svg { color: var(--error); }
  .acct-small { margin: 6px 12px 2px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.9; }
  .acct-small a { color: var(--muted); text-decoration: none; white-space: nowrap; }
  .acct-small a:hover { color: var(--accent); text-decoration: underline; }
  .acct-guest { display: grid; gap: 8px; padding: 2px 0 10px; }
  .acct-guest-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
    padding: 0 18px; border-radius: var(--r-pill); font-size: var(--fs-ui); font-weight: 600; text-decoration: none; }
  .acct-guest-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
  .acct-guest-in { background: var(--accent); color: var(--on-fill); }
  .acct-guest-in:hover { background: var(--accent-hover); }
  .acct-guest-reg { background: var(--grey); color: var(--accent); }
  .acct-guest-reg:hover { background: var(--hover-lav); }
  .acct-guest-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .app-acct-guest svg { width: 22px; height: 22px; }
  .app-login-btn { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm);
    font-weight: 600; color: var(--accent); background: var(--grey);
    border: 1px solid var(--border); border-radius: var(--r-pill); padding: 6px 14px; text-decoration: none;
    transition: background .15s, border-color .15s; }
  .app-login-btn:hover { background: var(--hover-lav); border-color: var(--accent); }
  .app-login-btn svg { width: 16px; height: 16px; }
  .app-balance-mobile { display: none; }
  .app-places-top { display: none; }
  @media (min-width: 641px) {
    .app-places-top { display: flex; flex: 1 0 auto; justify-content: center; align-items: center;
      gap: 4px; }
    .app-acct { left: auto; top: 60px; right: max(16px, calc((100% - 1232px) / 2 + 16px));
      width: 340px; max-height: calc(100vh - 76px); padding: 10px;
      transform: translateY(-6px); }
    .app-acct.open { transform: translateY(0); box-shadow: var(--shadow-pop); }
    .app-acct .app-sheet-head { display: none; }
    .app-sheet-bd.app-acct-bd { background: transparent; }
  }
  @media (min-width: 641px) and (max-width: 1023px) {
    .app-header.is-guest .app-places-top { gap: 0; }
    .app-header.is-guest .app-places-top .app-place { padding-left: 4px; padding-right: 4px; }
  }
  @media (min-width: 641px) and (max-width: 1279px) {
    .app-header .app-brand-logo { display: none; }
    .app-header .app-brand-sygnet { display: block; }
  }
  @media (min-width: 1024px) {
    .app-places-top .app-place { flex-direction: row; gap: 6px; font-size: var(--fs-ui);
      padding: 7px 10px; }
    .app-places-top .app-place svg { width: 17px; height: 17px; }
    .app-lang-opt { display: inline-flex; }
    .app-nav-desktop:has(.app-new-open-top) { gap: 8px; }
    .app-new-open-top { margin-right: 12px; }
  }
  @media (min-width: 1280px) {
    .app-new-open-top { width: auto; gap: 7px; padding: 0 18px 0 13px; border-radius: var(--r-pill);
      font-family: inherit; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
    .app-new-open-top .app-new-lbl { position: static; width: auto; height: auto; overflow: visible;
      clip-path: none; }
  }
  @media (max-width: 640px) {
    body { overflow-x: hidden; }
    .app-nav-desktop { display: none; }
    .app-balance-unit { display: none; }
    .app-balance { padding: 0 9px 0 7px; }
    .app-balance-mobile { display: inline-flex; }
    .app-acct-open-m { display: inline-flex; }
    .app-header-inner { gap: 8px; }
    .app-header-actions { gap: 4px; }
    .app-brand { gap: 5px; }
    .app-brand-logo { height: 1.46rem; }
    .app-header:not(.is-brand-mark):has(.app-balance-mobile.level-low) .app-brand-logo,
    .app-header:not(.is-brand-mark):has(.app-balance-mobile.level-crit) .app-brand-logo { display: none; }
    .app-header:not(.is-brand-mark):has(.app-balance-mobile.level-low) .app-brand-sygnet,
    .app-header:not(.is-brand-mark):has(.app-balance-mobile.level-crit) .app-brand-sygnet { display: block; height: 1.7rem; }
    .app-new-open-m { display: inline-flex; }
    .app-topback { display: inline-flex; align-items: center; justify-content: center; position: relative;
      width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
      border: 2px solid transparent; background: var(--accent); background-clip: padding-box;
      color: var(--on-fill); text-decoration: none; }
    .app-topback:hover { background-color: var(--accent-hover); }
    .app-topback svg { width: 20px; height: 20px; display: block; }
    .app-topback-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden;
      clip-path: inset(50%); white-space: nowrap; }
    .app-topback:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
    .app-header.is-brand-mark .app-brand-sygnet { height: 1.7rem; }
    .app-topback ~ .app-brand .app-brand-logo,
    .app-topback ~ .app-brand .app-brand-sygnet { display: none; }
    .app-topback ~ .app-brand .app-beta-badge { margin-left: 0; }
    body:has(.app-topback) .rec-back { display: none; }
    .app-header.scrolled .app-top-title { display: block; flex: 1 1 auto; min-width: 0;
      margin-right: auto; font-size: var(--fs-title); font-weight: var(--fw-h); color: var(--text);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-header.scrolled .app-brand:has(+ .app-top-title) .app-brand-logo { display: none; }
    .app-header.scrolled .app-brand:has(+ .app-top-title) .app-brand-sygnet { display: block; height: 1.7rem; }
    .app-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
      background: var(--card); border-top: 1px solid var(--border);
      padding: 2px 2px env(safe-area-inset-bottom); }
    .app-tabbar .app-place { flex: 1 1 0; min-width: 0; min-height: 54px; padding: 4px 0;
      border-radius: 0; }
    .app-tabbar .app-place:hover { background: none; }
    .app-tabbar .app-place-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    body:has(.app-tabbar) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    body:has(.app-tabbar) .cookie-consent { bottom: calc(68px + env(safe-area-inset-bottom)); }
    .app-sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto;
      max-height: 85vh; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
      padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
      transform: translateY(100%); opacity: 1; }
    .app-sheet.open { transform: translateY(0); opacity: 1;
      box-shadow: 0 -10px 40px rgba(20,20,40,.18); }
  }
  .app-beta-badge {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em;
    color: var(--on-fill); background: #8184BB; border-radius: var(--r-pill);
    padding: 2px 8px; white-space: nowrap; align-self: center;
    margin-left: 6px; line-height: 1.3; text-transform: uppercase;
    min-width: 0; overflow: hidden; text-overflow: ellipsis;
  }
  @media (max-width: 640px) {
    .app-beta-badge { font-size: 0.56rem; padding: 1px 6px; margin-left: 0; }
  }
  .cookie-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200;
    max-width: 720px; margin: 0 auto; display: none; align-items: center; gap: 16px;
    flex-wrap: wrap; justify-content: space-between; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--r-card);
    box-shadow: var(--shadow-pop); padding: 14px 18px; }
  .cookie-consent.show { display: flex; }
  .cookie-consent-text { font-size: var(--fs-ui); color: var(--muted); line-height: 1.5; flex: 1 1 260px; }
  .cookie-consent-text a { color: var(--accent); text-decoration: underline; }
  .cookie-consent-ok { flex-shrink: 0; background: var(--accent); color: var(--on-fill); border: none;
    border-radius: var(--r-pill); padding: 9px 20px; font-size: var(--fs-ui); font-weight: 600; cursor: pointer; }
  .cookie-consent-ok:hover { background: var(--accent-hover); }
  .legal-footer { text-align: center; font-size: var(--fs-sm); margin-top: 48px; line-height: 2; }
  .legal-footer a { color: var(--muted); text-decoration: none; white-space: nowrap; }
  .legal-footer a:hover { color: var(--accent); text-decoration: underline; }
  .legal-footer-sep { color: var(--border); margin: 0 10px; }
  .legal-footer-copy { margin-top: 12px; font-size: var(--fs-sm); color: var(--muted); }
  .legal-footer-ver { margin-top: 4px; font-size: var(--fs-xs); color: var(--muted);
                      font-variant-numeric: tabular-nums; }
  .fb-overlay { display: none; position: fixed; inset: 0; z-index: 1000;
    background: var(--scrim); align-items: center; justify-content: center; padding: 20px; }
  .fb-overlay.open { display: flex; }
  .fb-modal { position: relative; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
    box-sizing: border-box; padding: 32px 28px 28px; background: var(--bg);
    border-radius: var(--r-card); box-shadow: var(--shadow-modal); text-align: left; }
  .fb-close { position: absolute; top: 8px; right: 8px; min-width: 44px; min-height: 44px;
    background: none; border: none; font-size: var(--fs-h2); line-height: 1; color: var(--muted);
    cursor: pointer; font-family: inherit; }
  .fb-close:hover { color: var(--text); }
  .fb-title { margin: 0 0 12px; font-size: var(--fs-title); font-weight: var(--fw-h);
    color: var(--text); text-align: center; }
  .fb-intro { margin: 0 0 14px; font-size: var(--fs-ui); line-height: 1.5; color: var(--text-2); }
  .fb-textarea { display: block; width: 100%; min-height: 140px; box-sizing: border-box; resize: vertical;
    padding: 12px 14px; border: 1px solid var(--field-bd); border-radius: var(--r-field);
    background: var(--card); color: var(--text); font-family: inherit; font-size: var(--fs-read);
    line-height: 1.5; }
  .fb-textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
  .fb-textarea::placeholder { color: var(--muted); }
  .fb-error { display: none; margin: 8px 0 0; font-size: var(--fs-sm); color: var(--error); }
  .fb-success { display: none; font-size: var(--fs-ui); line-height: 1.5; color: var(--success); text-align: center; }
  .fb-buttons { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; }
  .fb-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
    min-height: 44px; padding: 0 24px; border-radius: var(--r-pill); border: 1px solid var(--field-bd);
    background: var(--card); color: var(--accent); font-family: inherit; font-size: var(--fs-ui);
    font-weight: 600; cursor: pointer; }
  .fb-btn:hover { background: var(--hover-lav); border-color: var(--accent); }
  .fb-btn-primary { background: var(--accent); color: var(--on-fill); border-color: transparent; }
  .fb-btn-primary:hover { background: var(--accent-hover); border-color: transparent; }
  .fb-btn:disabled { opacity: .6; cursor: default; }
  .fb-btn:focus-visible, .fb-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  @media (max-width: 480px) {
    .fb-overlay { padding: 12px; }
    .fb-modal { padding: 24px 18px 20px; }
    .fb-buttons { flex-direction: column; gap: 8px; }
    .fb-btn { width: 100%; }
  }


  @media (max-width: 640px) {
    body { padding-left: 16px; padding-right: 16px; margin: 0 auto 8px; }
    .page-title-row { row-gap: 16px; }

    .profile-card, .session-status { padding-left: 14px; padding-right: 14px; }
    .login-card input, .name-row input, .password-field-wrap input { font-size: var(--fs-ui); }
  }
  @media (min-width: 1024px) {
    .chl-main { display: grid; align-items: center; column-gap: 16px; min-height: 56px; row-gap: 2px;
                grid-template-columns: 34px minmax(0, 1.6fr) minmax(0, 1.3fr) minmax(0, .6fr) minmax(0, .7fr); }
    .chl-txt, .chl-meta { display: contents; }
    .chl-sep { display: none; }
    .chl-name { grid-column: 2; }
    .chl-kind { grid-column: 3; }
    .chl-conv { grid-column: 4; }
    .chl-conv.chl-c0 { display: block; }
    .chl-when { grid-column: 5; }
    .chl-kind .chl-sep { display: inline; }
    .chl-note { grid-column: 2 / -1; }
    .chl.has-side ~ .sup-block { margin-left: 264px; }
  }
  
  .help-hint { position:relative; display:inline-flex; vertical-align:middle; }
  .help-btn { position:relative; width:22px; height:22px; border-radius:50%; border:1.5px solid var(--muted);
    background:transparent; color:var(--muted); font-size:var(--fs-sm); font-weight:700; line-height:1;
    cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
    padding:0; font-family:inherit; transition:background .12s, color .12s, border-color .12s; flex:0 0 auto; }
  .help-btn::after { content:""; position:absolute; inset:-4px; border-radius:50%; }
  .help-btn:hover, .help-hint.open .help-btn { background:var(--accent); border-color:var(--accent); color:var(--on-fill); }
  .help-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .help-legend-link { background:none; border:none; padding:0; margin:0; cursor:pointer;
    color:var(--accent); font-size:var(--fs-ui); font-weight:600; font-family:inherit;
    text-decoration:none; display:inline-flex; align-items:center; gap:5px; }
  .help-legend-link::before { content:''; width:13px; height:13px; flex:0 0 auto;
    background:no-repeat center / contain;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F3787' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v4h1'/%3E%3C/svg%3E"); }
  .help-legend-link:hover { text-decoration:underline; }
  .help-pop { display:none; position:absolute; top:32px; left:0; z-index:60;
    width:min(300px, 82vw); background:var(--card); border:1px solid var(--field-bd);
    border-radius:10px; box-shadow:var(--shadow-pop);
    padding:13px 34px 13px 15px;
    font-size:var(--fs-sm); line-height:1.55; color:var(--text-2); font-weight:400;
    text-align:left; white-space:normal; }
  .help-pop-x { position:absolute; top:5px; right:5px; width:26px; height:26px;
    display:inline-flex; align-items:center; justify-content:center; padding:0;
    border:0; background:none; color:var(--muted); border-radius:8px;
    cursor:pointer; line-height:0; }
  .help-pop-x:hover { background:var(--grey); color:var(--text); }
  .help-pop--wide { width:min(360px, 86vw); }
  .help-pop-p { display:block; margin-top:8px; }
  .help-faq-row { display:block; margin-top:10px; }
  .help-faq-link { display:inline-block; color:var(--accent);
    font-weight:600; text-decoration:none; }
  .help-faq-link:hover { text-decoration:underline; }
  .help-set-row { display:block; margin-top:10px; color:var(--text-2); }
  .help-set-link { display:inline-block; color:var(--accent);
    font-weight:600; text-decoration:none; }
  .help-set-link:hover { text-decoration:underline; }
  .help-hint.open .help-pop { display:block; }
  .help-hint.help-pop-right .help-pop { left:auto; right:0; }
  .help-legend-trigger { margin:0 0 18px; }
  .help-legend-title { font-size:var(--fs-sm); font-weight:700; color:var(--text); margin:0 0 10px; }
  .help-legend-dots { display:inline-flex; gap:3px; margin-right:2px; }
  .help-legend-dots b { width:8px; height:8px; border-radius:50%; display:inline-block; }
  .help-hint--legend .help-legend-link::before { display:none; }
  .legend-row { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
  .legend-settings-link { white-space:nowrap; }
  .legend-warn { display:block; margin:10px 0 0; font-size:var(--fs-sm);
    color:var(--text-2); line-height:1.5; }
  @media (max-width:640px) {
    .help-btn { width:24px; height:24px; }
    .help-btn::after { inset:-10px; }
    .help-legend-link { padding:5px 11px; border-radius:14px; background:var(--grey);
      border:1px solid var(--field-bd); position:relative; }
    .help-legend-link::after { content:""; position:absolute; inset:-6px -4px; }
    .help-legend-link:hover { background:var(--hover-lav); text-decoration:none; }
    .help-pop, .help-pop--wide { position:fixed; left:8px; right:8px; top:auto;
      width:auto; max-width:none; max-height:70vh; overflow-y:auto;
      -webkit-overflow-scrolling:touch; }
    .help-hint.help-pop-right .help-pop { left:8px; right:8px; }
  }
