


:root {
  --app-dark: linear-gradient(160deg, #1d3a63 0%, #132b4c 60%, #0e2240 100%); --app-link: #0f2c52; --app-on: #f8fbff;
  --app-pin: 0 8px 14px -12px rgba(15, 44, 82, .5); --app-soft: rgba(18, 58, 107, .07);
  --app-lift: 0 14px 24px -18px rgba(15, 44, 82, .55); --app-inset: inset 0 1px 3px rgba(15, 44, 82, .06);
  --app-bubble: var(--srf-hi); --app-bubble-line: var(--glass-line);
  --app-scrim: rgba(15, 44, 82, .62); --app-heart: #d23a52;
  --app-task-line: rgba(21, 88, 159, .45); --app-task-lift: 0 18px 30px -22px rgba(21, 88, 159, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="warm-glass"]) {
    --app-dark: linear-gradient(160deg, #16294a 0%, #0f1f38 60%, #0b172a 100%); --app-link: #5aadff; --app-on: #f8fbff;
    --app-pin: 0 8px 14px -12px rgba(0, 0, 0, .6); --app-soft: rgba(172, 206, 246, .10);
    --app-lift: 0 14px 24px -18px rgba(0, 0, 0, .7); --app-inset: inset 0 1px 3px rgba(0, 0, 0, .25);
    --app-bubble: var(--srf-hi); --app-bubble-line: var(--glass-line);
    --app-scrim: rgba(0, 0, 0, .6); --app-heart: #ff7088;
    --app-task-line: rgba(90, 173, 255, .5); --app-task-lift: 0 18px 30px -22px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --app-dark: linear-gradient(160deg, #16294a 0%, #0f1f38 60%, #0b172a 100%); --app-link: #5aadff; --app-on: #f8fbff;
  --app-pin: 0 8px 14px -12px rgba(0, 0, 0, .6); --app-soft: rgba(172, 206, 246, .10);
  --app-lift: 0 14px 24px -18px rgba(0, 0, 0, .7); --app-inset: inset 0 1px 3px rgba(0, 0, 0, .25);
  --app-bubble: var(--srf-hi); --app-bubble-line: var(--glass-line);
  --app-scrim: rgba(0, 0, 0, .6); --app-heart: #ff7088;
  --app-task-line: rgba(90, 173, 255, .5); --app-task-lift: 0 18px 30px -22px rgba(0, 0, 0, .7);
}
:root[data-theme="warm-glass"] {
  --app-dark: linear-gradient(160deg, #1f3a4e 0%, #13283a 60%, #0f2130 100%); --app-link: #1b3548; --app-on: #f6f5f1;
  --app-pin: 0 8px 14px -12px rgba(31, 42, 56, .5); --app-soft: rgba(25, 47, 64, .07);
  --app-lift: 0 14px 24px -18px rgba(31, 42, 56, .55); --app-inset: inset 0 1px 3px rgba(31, 42, 56, .06);
  --app-bubble: #ffffff; --app-bubble-line: rgba(132, 102, 69, .2);
  --app-scrim: rgba(25, 47, 64, .62); --app-heart: #c4354d;
  --app-task-line: rgba(132, 102, 69, .45); --app-task-lift: 0 18px 30px -22px rgba(132, 102, 69, .55);
}

.app-nav, .app-menu { display: none; }

.app-top { display: none; }
.app-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-nav svg, .app-menu svg, .app-sheet svg, .app-top svg { fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 767px) {

  
  html[data-theme] body:where(.amk-app) > nav.top, html[data-theme] body:where(.amk-app) > header.top {
    position: absolute; top: env(safe-area-inset-top); left: 0; right: 0; z-index: 30; transform: none;
    width: auto; max-width: none; height: 64px; margin: 0; padding: 0 16px; gap: 8px;
    display: flex; align-items: center; justify-content: space-between;
    background: none; border: 0; outline: 0; border-radius: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  
  html[data-theme] body:where(.amk-app) > nav.top > :not(.am-logo):not(.bell):not(.app-top),
  html[data-theme] body:where(.amk-app) > header.top > :not(.am-logo):not(.right),
  html[data-theme] body:where(.amk-app) > header.top > .right > :not(.bell) { display: none; }
  html[data-theme] body:where(.amk-app) > header.top > .right { margin-left: auto; display: flex; }
  html[data-theme] body:where(.amk-app) > nav.top .bell, html[data-theme] body:where(.amk-app) > header.top .bell {
    width: 44px; height: 44px; margin-left: auto; }
  html[data-theme] body:where(.amk-app) > nav.top .am-logo,
  html[data-theme] body:where(.amk-app) > header.top .am-logo { min-height: 44px; }
  
  :where(body.amk-app) main::before { display: none; }
  :where(body.amk-app) .fbar { top: calc(8px + env(safe-area-inset-top)); }

  
  body:where(.amk-app) { padding-top: env(safe-area-inset-top); padding-bottom: calc(108px + env(safe-area-inset-bottom)); }

  
  body:where(.amk-app) > .fab, body:where(.amk-app) > .ai-fab { display: none; }
  
  body:where(.amk-app) > .ai-dock { left: 8px; right: 8px; width: auto;
    bottom: calc(88px + env(safe-area-inset-bottom)); height: min(540px, calc(100dvh - 120px)); }
  
  body:where(.amk-app) .ckbar { bottom: calc(88px + env(safe-area-inset-bottom)); }
  body:where(.amk-app) .cmp-bar { bottom: calc(92px + env(safe-area-inset-bottom)); }
  html.app-open .ckbar { visibility: hidden; }

  
  body:where(.amk-app) > .app-nav { display: grid; }
  .app-nav {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 47;
    height: 64px; grid-template-columns: repeat(5, minmax(0, 1fr));
    border-radius: 22px; background: var(--srf-bar); border: 1px solid var(--glass-line);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--lift-2);
  }
  .app-ni {
    position: relative; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; text-decoration: none;
    font-family: var(--font); font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0;
    color: var(--ink-faint); white-space: nowrap; -webkit-tap-highlight-color: transparent;
  }
  .app-ni svg { width: 23px; height: 23px; flex: none; }
  .app-ni.on { color: var(--accent-ink); font-weight: 700; }
  .app-ni.on::before { content: ""; position: absolute; top: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px;
    border-radius: 2px; background: var(--accent); }
  .app-ni .app-ico { position: relative; display: block; }
  .app-ni .app-dot { position: absolute; top: -3px; right: -6px; width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 2px var(--srf-solid); }
  
  .app-ni-c { justify-content: flex-end; padding-bottom: 10.5px; color: var(--accent-ink); font-weight: 700; }
  .app-ni-c.on::before { display: none; }
  .app-fab { position: absolute; left: 50%; top: -24px; width: 54px; height: 54px; margin-left: -27px; border-radius: 50%;
    display: grid; place-items: center; background: var(--accent-deep); color: #fff;
    box-shadow: 0 0 0 5px var(--amb-0), var(--lift-blue); }
  .app-fab svg { width: 25px; height: 25px; }
  .app-ni:focus-visible { outline-offset: -3px; border-radius: 16px; }
  
  .app-nav.app-menu-open .app-ni.on:not(.app-ni-m) { color: var(--ink-faint); font-weight: 600; }
  .app-nav.app-menu-open .app-ni.on:not(.app-ni-m)::before { display: none; }

  
  .app-menu {
    display: block; position: fixed; inset: 0; z-index: 46; overflow-y: auto; overscroll-behavior: contain;
    padding: env(safe-area-inset-top) 16px calc(124px + env(safe-area-inset-bottom));
    background: linear-gradient(160deg, var(--amb-0), var(--amb-2));
  }
  .app-menu[hidden] { display: none; }
  .app-menu-top { height: 56px; display: flex; align-items: center; }
  .app-menu-h { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 36px; color: var(--ink); }
  .app-mg { margin-top: 18px; }
  .app-eb { margin: 0; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase;
    color: var(--accent); }
  .app-ml { list-style: none; margin: 8px 0 0; padding: 0; border-radius: 20px; overflow: hidden;
    background: var(--srf-solid); box-shadow: var(--lift-1); }
  .app-ml + .app-ml { margin-top: 8px; }
  .app-ml > li + li { border-top: 1px solid rgba(var(--line-c), .07); }
  .app-mrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; margin: 0; padding: 0 16px;
    border: 0; background: none; cursor: pointer; text-align: left; text-decoration: none;
    font-family: var(--font); font-size: 16px; line-height: 21px; font-weight: 600; color: var(--ink); }
  .app-mrow > span:first-child { flex: 1; min-width: 0; }
  .app-mrow .app-note { font-size: 13px; font-weight: 400; color: var(--ink-faint); }
  
  .app-mrow::after, .app-si::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 2px;
    border-top: 1.7px solid; border-right: 1.7px solid; border-radius: 1px; transform: rotate(45deg);
    color: var(--ink-faint); }
  .app-mrow.app-plain::after { display: none; }
  .app-mrow:focus-visible { outline-offset: -3px; }
  .app-ml form { margin: 0; }
  .app-theme { padding: 12px 16px; }
  .app-theme p { margin: 0; font-size: 13.5px; color: var(--ink-faint); }
  .app-seg { display: flex; gap: 2px; margin: 8px 0 0; padding: 2px; border: 0; border-radius: 999px;
    background: rgba(var(--line-c), .07); }
  .app-seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .app-seg label { flex: 1; position: relative; min-height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
  .app-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
  .app-seg label:has(input:checked) { background: var(--srf-solid); color: var(--ink); box-shadow: var(--lift-1); }
  .app-seg label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 1px; }

  
  .app-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: min(764px, calc(100dvh - 48px - env(safe-area-inset-top)));
    margin: 0; padding: 8px 16px calc(28px + env(safe-area-inset-bottom)); border: 0; border-radius: 26px 26px 0 0;
    overflow-y: auto; overscroll-behavior: contain; color: var(--ink); box-shadow: var(--lift-2);
    
    background: linear-gradient(var(--srf-solid), var(--srf-solid)), var(--amb-0); }
  .app-sheet::backdrop { background: var(--backdrop); }
  .app-grab { width: 40px; height: 4px; border-radius: 2px; margin: 2px auto 12px; background: rgba(var(--line-c), .2); }
  .app-sh-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  .app-sh-h h2 { margin: 4px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 31px; color: var(--ink); }
  .app-sh-lead { margin: -4px 0 16px; font-size: 13.5px; line-height: 19px; color: var(--ink-faint); }
  .app-x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; margin: 0; padding: 0; border-radius: 50%;
    border: 1px solid rgba(var(--line-c), .1); background: var(--srf-solid); color: var(--ink-soft); cursor: pointer; }
  .app-x svg { width: 22px; height: 22px; }
  .app-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .app-si { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; margin: 0; padding: 12px;
    border-radius: 18px; border: 1px solid rgba(var(--line-c), .07); background: rgba(var(--line-c), .035);
    cursor: pointer; text-align: left; text-decoration: none; font-family: var(--font); color: var(--ink); }
  .app-si .app-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .app-si b { font-size: 16px; line-height: 21px; font-weight: 700; }
  .app-si small { font-size: 13px; line-height: 18px; color: var(--ink-faint); }
  .app-tile { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 13px;
    border: 1px solid rgba(var(--line-c), .1); background: var(--srf-solid); color: var(--accent); }
  .app-tile svg { width: 22px; height: 22px; }
  .app-si.app-dark { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; box-shadow: var(--lift-blue); }
  .app-si.app-dark small, .app-si.app-dark::after { color: inherit; opacity: .82; }
  .app-si.app-dark .app-tile { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: inherit; }
  .app-sh-note { margin: 16px 0 0; font-size: 12.5px; line-height: 17px; color: var(--ink-faint); }
  .app-sh-note a { color: var(--accent-ink); text-decoration: underline; }
  .app-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .app-step { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px;
    border: 1px solid rgba(var(--line-c), .07); background: rgba(var(--line-c), .035); }
  .app-step > b { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%;
    background: var(--accent-deep); color: #fff; font-size: 14px; }
  .app-step > span { flex: 1; min-width: 0; font-size: 13.5px; line-height: 19px; color: var(--ink-faint); }
  .app-step > span strong { display: block; font-size: 15px; line-height: 20px; color: var(--ink); }
  .app-step .app-tile { color: var(--accent-ink); }
  .app-wide { width: 100%; margin-top: 16px; }
  html.app-open, html.app-open body { overflow: hidden; }

  
  body:where(.amk-app) .buybar { left: auto; right: 12px; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 45;
    height: 56px; gap: 10px; padding: 0 8px 0 16px; border: 0; border-radius: 18px;
    background: var(--accent-deep); color: #fff; box-shadow: var(--lift-blue);
    transition: opacity .2s, transform .2s, visibility 0s; }
  
  body:where(.amk-app) .buybar.app-away { opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility 0s .2s; }
  body:where(.amk-app) .buybar .p { font-size: 17px; line-height: 20px; color: inherit; }
  body:where(.amk-app) .buybar .p small { color: inherit; opacity: .8; letter-spacing: 0; }
  body:where(.amk-app) .buybar .btn { flex: none; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; font-size: 14px;
    background: var(--srf-solid); color: var(--accent-ink); box-shadow: none; }

  
  html[data-theme] body:where(.amk-app) #m-assist .assist-pd-hint { display: none; }
  html[data-theme] body:where(.amk-app) #m-assist .assist-info { position: relative; display: flex; justify-content: flex-end;
    height: 28px; margin: -4px 0 4px; }
  html[data-theme] body:where(.amk-app) #m-assist .assist-i { display: grid; place-items: center; width: 44px; height: 44px;
    margin: -8px -6px -8px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer; }
  html[data-theme] body:where(.amk-app) #m-assist .assist-i[aria-expanded="true"] { color: var(--accent); }
  html[data-theme] body:where(.amk-app) #m-assist .assist-pop { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 2;
    width: min(320px, calc(100vw - 32px)); margin: 0; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(var(--line-c), .1);
    background: var(--srf-solid); box-shadow: var(--lift-2); font-size: 13.5px; line-height: 19px; color: var(--ink-soft); }
  html[data-theme] body:where(.amk-app) #m-assist .assist-pop p { margin: 0; }
  html[data-theme] body:where(.amk-app) #m-assist .assist-pop p + p { margin-top: 8px; }
  html[data-theme] body:where(.amk-app) #m-assist .assist-pop a { display: inline; padding: 4px 0; color: var(--accent-ink);
    text-decoration: underline; }   
  html[data-theme] body:where(.amk-app) #m-assist .assist-consent { margin: 0 0 8px 34px; padding: 12px 14px;
    border-radius: 18px 18px 18px 6px; border: 1px solid var(--app-bubble-line); background: var(--app-bubble); }
  html[data-theme] body:where(.amk-app) #m-assist .assist-consent .consent-box { margin: 0 0 10px; font-size: 13.5px; line-height: 19px; }
  html[data-theme] body:where(.amk-app) #m-assist .assist-consent .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }

  
  html[data-theme] body:where(.amk-app) footer.rich { margin-top: 40px; padding: 20px 16px 0; }
  html[data-theme] body:where(.amk-app) footer.rich .foot-grid { display: flex; flex-direction: column; gap: 10px; }
  html[data-theme] body:where(.amk-app) footer.rich .foot-grid > div:nth-child(2),
  html[data-theme] body:where(.amk-app) footer.rich .foot-grid .foot-h { display: none; }
  html[data-theme] body:where(.amk-app) footer.rich .foot-grid > div:first-child p { margin-top: 10px; font-size: 13.5px; line-height: 19px; }
  html[data-theme] body:where(.amk-app) footer.rich .foot-grid > div:last-child { display: flex; flex-wrap: wrap; gap: 0 14px; }
  html[data-theme] body:where(.amk-app) footer.rich .foot-grid > div > a { display: inline-flex; align-items: center; min-height: 33px;
    margin: 0; padding: 0; font-size: 13.5px; color: var(--ink-soft); text-decoration: underline; }
  html[data-theme] body:where(.amk-app) footer.rich .foot-grid > div:last-child p { flex-basis: 100%; margin-top: 6px;
    font-size: 12px; line-height: 18px; }
  html[data-theme] body:where(.amk-app) footer.rich .foot-grid > div:last-child p a { display: inline; margin: 0; padding: 4px 0; }
  html[data-theme] body:where(.amk-app) footer.rich .legal { margin-top: 14px; font-size: 12px; line-height: 18px; text-align: left; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  body:where(.amk-app) .buybar, body:where(.amk-app) .buybar.app-away { transition: none; }
}
