@font-face { font-family: Urbanist; font-weight: 400; font-display: swap; src: url(fonts/urbanist-400.woff2) format('woff2'); }
@font-face { font-family: Urbanist; font-weight: 500; font-display: swap; src: url(fonts/urbanist-500.woff2) format('woff2'); }
@font-face { font-family: Urbanist; font-weight: 600; font-display: swap; src: url(fonts/urbanist-600.woff2) format('woff2'); }

:root {
  --green: #263F36;
  --ink: #1d2622;
  --muted: #5b6661;
  --glass: rgba(255, 255, 255, 0.86);
  --line: rgba(38, 63, 54, 0.14);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #dfe5e3; color: var(--ink);
  font-family: Urbanist, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
#c, #still { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#c { touch-action: none; opacity: 0; transition: opacity .6s ease; outline: none; }
#still { object-fit: cover; object-position: 50% 50%; transition: opacity .6s ease; background: #dfe5e3; }
body.ready #c { opacity: 1; }
body.ready #still { opacity: 0; pointer-events: none; }
body.fallback #c { display: none; }

.top { position: fixed; top: 0; left: 0; right: 0; padding: calc(30px + var(--safe-t)) 18px 26px;
  display: flex; align-items: center; gap: 16px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,.82), rgba(255,255,255,.55) 55%, rgba(255,255,255,0)); }
.logo { height: 18px; width: auto; flex: none; }
.titles { border-left: 1px solid var(--line); padding-left: 14px; min-width: 0; }
h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--green); }
#note { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

.loader { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; flex-direction: column;
  align-items: center; gap: 10px; padding: 14px 18px; border-radius: 14px; background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14px; color: var(--ink); min-width: 220px; }
body.loading .loader { display: flex; }
#bar { display: block; width: 100%; height: 3px; border-radius: 3px; background: rgba(38,63,54,.15); overflow: hidden; }
#bar i { display: block; height: 100%; width: 4%; background: var(--green); transition: width .25s ease; }
body.fallback .loader { display: flex; top: auto; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%);
  flex-direction: row; padding: 8px 12px; font-size: 13px; min-width: 0; }
body.fallback #bar { display: none; }
#retry { font: inherit; font-weight: 600; color: var(--green); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

.tips { position: fixed; top: 0; left: 0; right: 0; margin: 0; padding: calc(8px + var(--safe-t)) 18px 0;
  display: flex; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: .01em; color: var(--muted);
  pointer-events: none; opacity: 0; transition: opacity .5s ease; }
body.ready .tips { opacity: 1; }
.tips .touch { display: none; }
@media (pointer: coarse) { .tips .touch { display: inline; } .tips .mouse { display: none; } }

.panel { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--safe-b));
  width: min(720px, calc(100% - 24px)); padding: 10px; border-radius: 18px; background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 30px rgba(20, 30, 25, .14);
  display: flex; flex-direction: column; gap: 8px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: rgba(38,63,54,.08); border-radius: 13px; }
.seg-btn { font: inherit; font-size: 15px; font-weight: 600; color: var(--green); background: transparent; border: 0;
  border-radius: 10px; padding: 12px 10px; min-height: 48px; cursor: pointer; transition: background .2s, color .2s; line-height: 1.15; }
.seg-btn.on { background: var(--green); color: #fff; box-shadow: 0 2px 8px rgba(38,63,54,.25); }
.seg-btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 1 0 auto; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap;
  background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 99px; padding: 9px 14px; min-height: 40px; cursor: pointer; }
.chip.on { border-color: var(--green); color: var(--green); font-weight: 600; background: #fff; }
body.fallback .chip:not([data-has-still]) { }
.fs-btn { order: 9; flex: 1 0 auto; font: inherit; font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap;
  background: var(--green); border: 1px solid var(--green); border-radius: 99px; padding: 9px 16px; min-height: 40px; cursor: pointer;
  transition: background .2s; }
.fs-btn:hover { background: #1d3129; }
.fs-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.fs-btn[hidden] { display: none; }
body.fs.fs-soft .top, body.fs.fs-soft #pricing { display: none; }
body.fs.fs-soft .tips { padding: calc(10px + var(--safe-t)) 14px 18px; background: linear-gradient(to bottom, rgba(255,255,255,.8), rgba(255,255,255,0)); }

#pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 13px; }
.price { background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px;
  display: flex; flex-direction: column; gap: 1px; color: var(--muted); line-height: 1.2; }
.price b { font-size: 16px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.price.on { border-color: var(--green); background: #fff; }
.price.on b { color: var(--green); }
.price-note { grid-column: 1 / -1; margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
body.priced.fallback .loader { bottom: calc(215px + var(--safe-b)); }

@media (max-width: 560px) {
  .top { padding: calc(26px + var(--safe-t)) 14px 22px; gap: 12px; }
  .tips { padding: calc(7px + var(--safe-t)) 14px 0; font-size: 10.5px; }
  .logo { height: 14px; }
  .titles { padding-left: 12px; }
  h1 { font-size: 17px; }
  #note { font-size: 11.5px; }
  .panel { width: calc(100% - 16px); bottom: calc(8px + var(--safe-b)); padding: 8px; border-radius: 16px; }
  .seg-btn { font-size: 14px; padding: 10px 6px; }
  .chips { flex-wrap: wrap; overflow: visible; }
  .chip, .fs-btn { flex: 1 1 auto; font-size: 13px; padding: 7px 10px; min-height: 36px; }
  body.fallback .loader { bottom: calc(178px + var(--safe-b)); }
  #pricing { gap: 4px; font-size: 11px; }
  .price { padding: 6px 7px; }
  .price b { font-size: 13.5px; }
  .price-note { font-size: 10.5px; }
  body.priced.fallback .loader { bottom: calc(268px + var(--safe-b)); }
}
@media (prefers-reduced-motion: reduce) { #c, #still, .tips { transition: none; } }
