/* ============================================================
   ビルノート — design system
   ============================================================ */
@font-face {
  font-family: 'Noto Sans JP';
  src: url('../fonts/NotoSansJP.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #4c6fff;
  --primary-deep: #3a56d4;
  --primary-soft: #eef2ff;
  --primary-softer: #f6f8ff;
  --ink: #23283b;
  --ink-2: #5a6172;
  --ink-3: #8a91a3;
  --line: #e7e9f0;
  --bg: #f6f7fb;
  --card: #ffffff;
  --success: #2fb380;
  --success-soft: #e6f7f0;
  --warning: #f5a623;
  --warning-soft: #fef4e2;
  --danger: #e5484d;
  --danger-soft: #fdebec;
  --premium: #8b5cf6;
  --premium-soft: #f3eeff;
  --gold: #d9a441;

  --c-water: #4aa8e8;
  --c-electric: #f6b93b;
  --c-gas: #f07167;
  --c-mobile: #9b7ede;
  --c-rent: #3eb489;
  --c-net: #5b8def;
  --c-insurance: #e88ab0;
  --c-other: #a0a6b8;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(35, 40, 59, .05), 0 4px 12px rgba(35, 40, 59, .05);
  --shadow-md: 0 2px 4px rgba(35, 40, 59, .05), 0 12px 32px rgba(35, 40, 59, .09);
  --shadow-lg: 0 8px 20px rgba(35, 40, 59, .10), 0 24px 64px rgba(35, 40, 59, .14);
  --header-h: 64px;
  --font: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
  letter-spacing: .01em;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
::selection { background: var(--primary); color: #fff; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; font-weight: 700; font-size: 15px;
  padding: 12px 22px; line-height: 1.4; transition: all .18s ease;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(76, 111, 255, .32); }
.btn-primary:hover { background: var(--primary-deep); box-shadow: 0 6px 18px rgba(76, 111, 255, .4); }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--primary); background: var(--primary-soft); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: #e2e8ff; }
.btn-premium { background: linear-gradient(135deg, #8b5cf6, #6d4ae0); color: #fff; box-shadow: 0 4px 14px rgba(139, 92, 246, .35); }
.btn-premium:hover { filter: brightness(1.06); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-lg { padding: 15px 30px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-icon { padding: 9px; border-radius: 10px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; line-height: 1;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.badge-free { background: #eef0f5; color: var(--ink-2); }
.badge-premium { background: linear-gradient(135deg, #f3eeff, #ece4ff); color: var(--premium); }
.badge-paid { background: var(--success-soft); color: var(--success); }
.badge-unpaid { background: var(--warning-soft); color: #c77f0a; }
.badge-overdue { background: var(--danger-soft); color: var(--danger); }
.badge-soft { background: var(--primary-soft); color: var(--primary); }
.badge-gold { background: #faf3e3; color: var(--gold); }
.badge .icon { width: 13px; height: 13px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: 100%; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 19px; color: var(--ink); letter-spacing: .02em; white-space: nowrap; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #5d7dff, #3a56d4);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 3px 8px rgba(76, 111, 255, .35);
}
.logo-mark .icon { width: 19px; height: 19px; }
.logo small { font-size: 10px; font-weight: 700; color: var(--ink-3); display: block; line-height: 1.1; letter-spacing: .08em; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { color: var(--ink-2); font-size: 14px; font-weight: 500; padding: 8px 13px; border-radius: 9px; transition: .15s; }
.main-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; padding: 8px; color: var(--ink); }
.mobile-menu {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  padding: 12px 20px 18px; flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 10px; color: var(--ink); font-weight: 500; border-radius: 10px; }
.mobile-menu a:hover { background: var(--primary-softer); color: var(--primary); }
.mobile-menu .btn { margin-top: 8px; }

/* user menu (app) */
.user-chip { display: flex; align-items: center; gap: 9px; background: none; border: none; padding: 5px 8px 5px 5px; border-radius: 999px; transition: .15s; }
.user-chip:hover { background: var(--primary-softer); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #ffd9a0, #ff9d6c); color: #7a4a12;
  display: grid; place-items: center; font-weight: 900; font-size: 14px;
}
.user-chip .uname { font-size: 13.5px; font-weight: 700; color: var(--ink); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; right: 24px; top: calc(var(--header-h) - 6px); width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; display: none; z-index: 120;
}
.user-dropdown.open { display: block; }
.user-dropdown .ud-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-dropdown .ud-head .n { font-weight: 700; font-size: 14px; }
.user-dropdown .ud-head .e { font-size: 12px; color: var(--ink-3); word-break: break-all; }
.user-dropdown button, .user-dropdown a {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; padding: 10px 12px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
}
.user-dropdown button:hover, .user-dropdown a:hover { background: var(--primary-softer); color: var(--primary); }
.user-dropdown .ud-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
  letter-spacing: .06em;
}
.section-head h2 { font-size: 32px; font-weight: 900; line-height: 1.4; letter-spacing: .01em; }
.section-head p { color: var(--ink-2); margin-top: 12px; font-size: 15px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 96px; background: linear-gradient(180deg, #f2f5ff 0%, var(--bg) 100%); }
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none;
}
.hero::before { width: 480px; height: 480px; background: #cdd9ff; top: -160px; right: -100px; }
.hero::after { width: 380px; height: 380px; background: #ffe3d1; bottom: -180px; left: -120px; opacity: .45; }
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; z-index: 1; }
.hero-copy h1 { font-size: 46px; font-weight: 900; line-height: 1.35; letter-spacing: .01em; margin: 18px 0 20px; }
.hero-copy h1 .grad {
  background: linear-gradient(120deg, #4c6fff, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy .lead { color: var(--ink-2); font-size: 16px; line-height: 1.9; max-width: 480px; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { display: flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.hero-note .icon { width: 15px; height: 15px; color: var(--success); }

.hero-stats { display: flex; gap: 0; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 24px; }
.hero-stats > div { padding-right: 28px; margin-right: 28px; border-right: 1px solid var(--line); }
.hero-stats > div:last-child { border: none; margin: 0; padding: 0; }
.hero-stats .v { font-size: 22px; font-weight: 900; color: var(--ink); }
.hero-stats .v span { font-size: 13px; font-weight: 700; color: var(--primary); }
.hero-stats .k { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* phone mockup */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  width: 290px; background: #fff; border-radius: 36px; padding: 14px;
  box-shadow: var(--shadow-lg); border: 1px solid #eceef5; position: relative; z-index: 2;
  transform: rotate(1.5deg);
}
.phone-screen { background: var(--bg); border-radius: 26px; overflow: hidden; }
.phone-notch { width: 96px; height: 20px; background: #fff; border-radius: 0 0 14px 14px; margin: 0 auto; position: relative; z-index: 3; }
.pm-head { background: linear-gradient(135deg, #5d7dff, #3a56d4); color: #fff; padding: 14px 18px 40px; margin-top: -14px; }
.pm-head .pm-hi { font-size: 11px; opacity: .85; }
.pm-head .pm-total { font-size: 26px; font-weight: 900; margin-top: 2px; }
.pm-head .pm-sub { font-size: 10.5px; opacity: .85; }
.pm-body { padding: 0 14px 16px; margin-top: -26px; }
.pm-card { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.pm-card .pm-label { font-size: 10px; color: var(--ink-3); font-weight: 700; margin-bottom: 8px; }
.pm-bars { display: flex; align-items: flex-end; gap: 7px; height: 56px; }
.pm-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: #dbe3ff; }
.pm-bars i.hot { background: linear-gradient(180deg, #6d89ff, #4c6fff); }
.pm-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.pm-row + .pm-row { border-top: 1px solid #f1f2f7; }
.pm-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.pm-ic .icon { width: 15px; height: 15px; }
.pm-row .pm-name { font-size: 11px; font-weight: 700; flex: 1; }
.pm-row .pm-name small { display: block; font-size: 9px; color: var(--ink-3); font-weight: 500; }
.pm-row .pm-amt { font-size: 11.5px; font-weight: 900; }
.pm-pill { font-size: 8.5px; font-weight: 700; padding: 3px 7px; border-radius: 999px; }

.float-card {
  position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow-md);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px; z-index: 3;
  border: 1px solid #f0f1f7; animation: floaty 5s ease-in-out infinite;
}
.float-card .fc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.float-card .fc-t { font-size: 11px; color: var(--ink-3); font-weight: 500; line-height: 1.3; }
.float-card .fc-v { font-size: 14px; font-weight: 900; line-height: 1.3; }
.float-ai { top: 40px; left: -30px; animation-delay: .6s; }
.float-cat { bottom: 60px; right: -24px; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; }
.float-cat .fc-chips { display: flex; gap: 5px; }
.float-cat .chip { font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: 999px; color: #fff; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.cat-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 10px 18px; text-align: center; transition: .2s;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.cat-tile .ct-ic { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 10px; display: grid; place-items: center; }
.cat-tile .ct-ic .icon { width: 23px; height: 23px; }
.cat-tile .ct-name { font-size: 13px; font-weight: 700; }

/* ---------- feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: .2s; position: relative;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-card .f-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: var(--primary-soft); color: var(--primary); }
.feature-card h3 { font-size: 17px; font-weight: 900; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feature-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; position: relative; text-align: center; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
  font-weight: 900; font-size: 15px; display: grid; place-items: center; margin: 0 auto 16px;
  box-shadow: 0 4px 10px rgba(76, 111, 255, .35);
}
.step-card .s-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--primary-softer); color: var(--primary); display: grid; place-items: center; margin: 0 auto 16px; }
.step-card .s-ic .icon { width: 30px; height: 30px; }
.step-card h3 { font-size: 17px; font-weight: 900; margin-bottom: 8px; }
.step-card p { font-size: 13.5px; color: var(--ink-2); }
.step-arrow { display: none; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 820px; margin: 0 auto; }
.plan-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 32px 30px;
  position: relative; display: flex; flex-direction: column;
}
.plan-card.featured { border-color: var(--premium); box-shadow: 0 12px 40px rgba(139, 92, 246, .16); }
.plan-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #8b5cf6, #6d4ae0); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 16px; border-radius: 999px; white-space: nowrap;
}
.plan-card .p-name { font-size: 16px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.plan-card .p-desc { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.plan-price { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 4px; }
.plan-price .cur { font-size: 16px; font-weight: 700; }
.plan-price .num { font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -.01em; }
.plan-price .per { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.plan-price-note { font-size: 12px; color: var(--premium); font-weight: 700; min-height: 20px; }
.plan-feats { list-style: none; margin: 20px 0 26px; flex: 1; }
.plan-feats li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; padding: 6px 0; color: var(--ink-2); }
.plan-feats li .icon { width: 17px; height: 17px; color: var(--success); margin-top: 3px; }
.plan-feats li.dim { color: var(--ink-3); }
.plan-feats li.dim .icon { color: #c6cad6; }
.plan-feats li strong { color: var(--ink); }

.billing-toggle { display: inline-flex; background: #eceef5; border-radius: 999px; padding: 4px; gap: 2px; }
.billing-toggle button {
  border: none; background: transparent; padding: 8px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--ink-2); transition: .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.billing-toggle button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.billing-toggle .save-tag { font-size: 10.5px; background: var(--premium-soft); color: var(--premium); padding: 2px 7px; border-radius: 999px; }

/* ---------- FAQ / accordion ---------- */
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-q {
  width: 100%; background: none; border: none; text-align: left;
  display: flex; align-items: center; gap: 14px; padding: 19px 22px;
  font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.6;
}
.acc-q .q-mark { color: var(--primary); font-weight: 900; font-size: 16px; flex: none; }
.acc-q .chev { margin-left: auto; color: var(--ink-3); transition: transform .25s; flex: none; }
.acc-item.open .acc-q .chev { transform: rotate(180deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc-a-inner { padding: 0 22px 20px 50px; font-size: 13.5px; color: var(--ink-2); line-height: 1.9; }
.acc-item.open .acc-a { max-height: 400px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, #4c6fff 0%, #6d4ae0 100%);
  border-radius: 24px; padding: 56px 48px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); top: -140px; right: -60px;
}
.cta-band h2 { font-size: 28px; font-weight: 900; margin-bottom: 10px; position: relative; }
.cta-band p { opacity: .9; font-size: 14px; margin-bottom: 26px; position: relative; }
.cta-band .btn { background: #fff; color: var(--primary); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); position: relative; }
.cta-band .btn:hover { transform: translateY(-2px); }

/* ---------- footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 88px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 52px 0 40px; }
.footer-brand p { font-size: 13px; color: var(--ink-3); margin-top: 14px; max-width: 300px; line-height: 1.8; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 14px; letter-spacing: .04em; }
.footer-col a { display: block; font-size: 13px; color: var(--ink-2); padding: 5px 0; transition: .15s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom .copy { font-size: 12px; color: var(--ink-3); }
.footer-bottom .fb-links { display: flex; gap: 18px; }
.footer-bottom .fb-links a { font-size: 12px; color: var(--ink-3); }
.footer-bottom .fb-links a:hover { color: var(--primary); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-brand {
  background: linear-gradient(150deg, #4c6fff 0%, #6d4ae0 100%);
  color: #fff; padding: 56px 60px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.auth-brand::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .08); bottom: -180px; right: -140px; }
.auth-brand::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .07); top: -80px; left: -100px; }
.auth-brand .logo { color: #fff; position: relative; z-index: 1; }
.auth-brand .logo small { color: rgba(255, 255, 255, .7); }
.auth-brand-body { margin: auto 0; position: relative; z-index: 1; }
.auth-brand h2 { font-size: 32px; font-weight: 900; line-height: 1.5; margin-bottom: 18px; }
.auth-brand .ab-lead { opacity: .92; font-size: 14.5px; line-height: 1.9; max-width: 400px; }
.ab-feats { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.ab-feats div { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.ab-feats .ab-ic { width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; flex: none; }
.auth-brand .ab-foot { font-size: 12px; opacity: .7; position: relative; z-index: 1; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-mobile-logo { display: none; margin-bottom: 28px; }
.auth-card h1 { font-size: 25px; font-weight: 900; margin-bottom: 6px; }
.auth-card .auth-sub { font-size: 13.5px; color: var(--ink-2); margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--ink-2); }
.auth-switch a { font-weight: 700; }
.demo-hint {
  margin-top: 20px; background: var(--primary-softer); border: 1px dashed #c4d0ff;
  border-radius: 12px; padding: 12px 16px; font-size: 12px; color: var(--ink-2); line-height: 1.7;
}
.demo-hint strong { color: var(--primary); }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--ink); }
.field label .req { color: var(--danger); margin-left: 3px; }
.input-wrap { position: relative; }
.input {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 15px; transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(76, 111, 255, .13); }
.input.err { border-color: var(--danger); }
.input.err:focus { box-shadow: 0 0 0 3.5px rgba(229, 72, 77, .12); }
.input::placeholder { color: #b3b9c8; }
.field .f-err { display: none; font-size: 12px; color: var(--danger); margin-top: 6px; }
.field.has-err .f-err { display: block; }
.field .f-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--ink-3); padding: 8px; border-radius: 8px; }
.pw-toggle:hover { color: var(--primary); background: var(--primary-softer); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a91a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input { flex: 1; }
.captcha-box {
  display: flex; align-items: center; gap: 6px; background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 8px 4px 4px; flex: none;
}
.captcha-box canvas { border-radius: 8px; cursor: pointer; }
.captcha-refresh { background: none; border: none; color: var(--ink-3); padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.captcha-refresh:hover { color: var(--primary); background: var(--primary-softer); }

label.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; font-weight: 500; color: var(--ink-2); line-height: 1.6; cursor: pointer; margin-bottom: 0; }
.check-row input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); flex: none; cursor: pointer; }
.check-row a { font-weight: 700; }
.check-err { display: none; font-size: 12px; color: var(--danger); margin-top: 6px; }
.check-err.show { display: block; }

/* ---------- app layout ---------- */
.app-main { padding: 32px 0 72px; }
.app-greet { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.app-greet h1 { font-size: 23px; font-weight: 900; }
.app-greet .g-sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.app-greet .g-right { display: flex; align-items: center; gap: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; position: relative; overflow: hidden; }
.stat-card .s-label { font-size: 12.5px; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.stat-card .s-label .icon { width: 15px; height: 15px; }
.stat-card .s-value { font-size: 27px; font-weight: 900; margin-top: 8px; letter-spacing: -.01em; line-height: 1.2; }
.stat-card .s-value small { font-size: 14px; font-weight: 700; }
.stat-card .s-sub { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.stat-card .s-deco { position: absolute; right: -14px; bottom: -14px; width: 74px; height: 74px; border-radius: 50%; opacity: .1; }
.stat-card.tone-blue .s-deco { background: var(--primary); }
.stat-card.tone-amber .s-deco { background: var(--warning); }
.stat-card.tone-green .s-deco { background: var(--success); }
.stat-card.tone-violet .s-deco { background: var(--premium); }
.quota-bar { height: 6px; border-radius: 99px; background: #eceef5; margin-top: 10px; overflow: hidden; }
.quota-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6d89ff, #4c6fff); transition: width .4s; }

.app-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
.app-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 0; }
.panel-head h2 { font-size: 16px; font-weight: 900; display: flex; align-items: center; gap: 9px; }
.panel-head h2 .icon { color: var(--primary); }
.panel-head .ph-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 18px 22px 22px; }

/* upload zone */
.upload-zone {
  border: 2px dashed #c9d4f5; border-radius: 14px; background: var(--primary-softer);
  padding: 30px 20px; text-align: center; transition: .2s; cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone .uz-ic {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px;
  background: linear-gradient(135deg, #5d7dff, #3a56d4); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(76, 111, 255, .35);
}
.upload-zone .uz-ic .icon { width: 27px; height: 27px; }
.upload-zone .uz-t { font-size: 15px; font-weight: 900; }
.upload-zone .uz-d { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.upload-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.upload-meta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.sample-link { background: none; border: none; color: var(--primary); font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* scanning overlay */
.scan-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(28, 32, 48, .55);
  backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 24px;
}
.scan-overlay.show { display: flex; }
.scan-box { background: #fff; border-radius: 20px; padding: 40px 48px; text-align: center; box-shadow: var(--shadow-lg); max-width: 340px; width: 100%; }
.scan-anim { width: 84px; height: 84px; margin: 0 auto 20px; position: relative; }
.scan-anim .doc { width: 60px; height: 74px; border: 2.5px solid var(--primary); border-radius: 10px; margin: 5px auto; position: relative; background: var(--primary-softer); overflow: hidden; }
.scan-anim .doc::before { content: ''; position: absolute; left: 10px; right: 10px; top: 14px; height: 4px; border-radius: 2px; background: #c4d0ff; box-shadow: 0 12px 0 #c4d0ff, 0 24px 0 #c4d0ff, 0 36px 0 #c4d0ff; }
.scan-anim .laser { position: absolute; left: 6px; right: 6px; height: 3px; border-radius: 2px; background: var(--primary); box-shadow: 0 0 12px 2px rgba(76, 111, 255, .6); animation: laser 1.2s ease-in-out infinite; top: 8px; }
@keyframes laser { 0%, 100% { top: 8px; } 50% { top: 70px; } }
.scan-box .sc-t { font-size: 16px; font-weight: 900; }
.scan-box .sc-d { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.scan-dots::after { content: '…'; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '・'; } 50% { content: '・・'; } 75% { content: '・・・'; } }

/* bill list */
.seg { display: inline-flex; background: #eceef5; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; padding: 6px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); transition: .15s; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.bill-list { display: flex; flex-direction: column; }
.bill-row { display: flex; align-items: center; gap: 13px; padding: 14px 0; }
.bill-row + .bill-row { border-top: 1px solid #f1f2f7; }
.bill-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.bill-ic .icon { width: 20px; height: 20px; }
.bill-info { flex: 1; min-width: 0; }
.bill-info .b-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-info .b-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.bill-amt { text-align: right; flex: none; }
.bill-amt .b-val { font-size: 15px; font-weight: 900; }
.bill-act { display: flex; gap: 4px; flex: none; }
.bill-act .btn-icon { color: var(--ink-3); background: none; border: none; }
.bill-act .btn-icon:hover { background: var(--primary-softer); color: var(--primary); }
.bill-act .btn-icon.del:hover { background: var(--danger-soft); color: var(--danger); }
.bill-empty { text-align: center; padding: 36px 0; color: var(--ink-3); font-size: 13px; }
.bill-empty .icon { width: 34px; height: 34px; margin: 0 auto 10px; color: #c6cad6; }

/* charts */
.chart-box { width: 100%; height: 260px; }
.chart-legend-note { font-size: 11.5px; color: var(--ink-3); text-align: center; margin-top: 4px; }

/* premium panels */
.lock-wrap { position: relative; }
.lock-overlay {
  position: absolute; inset: 0; z-index: 5; border-radius: var(--radius);
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(3px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 20px;
}
.lock-overlay .lk-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--premium-soft); color: var(--premium); display: grid; place-items: center; }
.lock-overlay .lk-t { font-size: 14px; font-weight: 900; }
.lock-overlay .lk-d { font-size: 12px; color: var(--ink-2); max-width: 260px; }

.remind-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.remind-item + .remind-item { border-top: 1px solid #f1f2f7; }
.remind-item .r-info { flex: 1; min-width: 0; }
.remind-item .r-name { font-size: 13.5px; font-weight: 700; }
.remind-item .r-date { font-size: 11.5px; color: var(--ink-3); }
.remind-item .r-amt { font-weight: 900; font-size: 14px; }
.due-pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.due-ok { background: var(--primary-soft); color: var(--primary); }
.due-soon { background: var(--warning-soft); color: #c77f0a; }
.due-over { background: var(--danger-soft); color: var(--danger); }

.budget-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.budget-row label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.budget-input { width: 140px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; outline: none; }
.budget-input:focus { border-color: var(--primary); }
.budget-bar { height: 12px; border-radius: 99px; background: #eceef5; overflow: hidden; }
.budget-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #34c38f, #2fb380); transition: width .5s; }
.budget-bar.warn i { background: linear-gradient(90deg, #f7b955, #f5a623); }
.budget-bar.over i { background: linear-gradient(90deg, #ef6a6e, #e5484d); }
.budget-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.budget-alert { margin-top: 12px; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; font-weight: 700; display: none; align-items: center; gap: 8px; }
.budget-alert.show { display: flex; }
.budget-alert.warn { background: var(--warning-soft); color: #c77f0a; }
.budget-alert.over { background: var(--danger-soft); color: var(--danger); }

.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.export-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: var(--primary-softer); border: 1.5px solid #dde5ff; border-radius: 14px;
  padding: 16px 18px; transition: .18s; text-align: left;
}
.export-btn:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }
.export-btn .e-t { font-size: 13.5px; font-weight: 900; display: flex; align-items: center; gap: 7px; color: var(--ink); }
.export-btn .e-t .icon { color: var(--primary); }
.export-btn .e-d { font-size: 11.5px; color: var(--ink-3); }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 250; background: rgba(28, 32, 48, .55);
  backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
  width: 100%; max-height: calc(100vh - 40px); overflow-y: auto;
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { transform: scale(.94) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  background: #f1f2f7; border: none; color: var(--ink-2); display: grid; place-items: center; z-index: 2;
}
.modal-close:hover { background: #e5e7ef; color: var(--ink); }
.modal-plan { max-width: 760px; position: relative; padding: 36px 36px 30px; }
.modal-plan .mp-head { text-align: center; margin-bottom: 22px; }
.modal-plan .mp-head h2 { font-size: 23px; font-weight: 900; }
.modal-plan .mp-head p { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.modal-plan .pricing-grid { max-width: none; gap: 16px; }
.modal-plan .plan-card { padding: 26px 24px; }
.modal-plan .plan-price .num { font-size: 34px; }
.mp-note { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; }

.modal-result { max-width: 480px; position: relative; padding: 30px 30px 26px; }
.modal-result .mr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.modal-result .mr-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--success-soft); color: var(--success); display: grid; place-items: center; flex: none; }
.modal-result h2 { font-size: 18px; font-weight: 900; }
.modal-result .mr-sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; }
.mr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.mr-grid .field.full { grid-column: 1 / -1; }
.mr-actions { display: flex; gap: 10px; margin-top: 8px; }
.mr-actions .btn { flex: 1; }
.ai-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--premium); background: var(--premium-soft); padding: 4px 10px; border-radius: 999px; }

/* ---------- toast ---------- */
.toast-root { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 9px; background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2);
  max-width: 100%;
}
.toast .icon { width: 17px; height: 17px; flex: none; }
.toast.ok .icon { color: #5ee6a8; }
.toast.warn .icon { color: #ffd479; }
.toast.err .icon { color: #ff9a9e; }
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0; } }

/* ---------- demo switch ---------- */
.demo-switch {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-md); padding: 5px; display: flex; align-items: center; gap: 2px;
}
.demo-switch .ds-label { font-size: 10.5px; font-weight: 700; color: var(--ink-3); padding: 0 8px 0 10px; }
.demo-switch button { border: none; background: transparent; padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.demo-switch button.on-free { background: #eef0f5; color: var(--ink); }
.demo-switch button.on-premium { background: var(--premium-soft); color: var(--premium); }

/* ---------- bottom nav (mobile app) ---------- */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 140;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a, .bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--ink-3); font-size: 10.5px; font-weight: 700;
  padding: 6px 0; border-radius: 10px; text-decoration: none;
}
.bottom-nav .icon { width: 21px; height: 21px; }
.bottom-nav a.on, .bottom-nav button.on { color: var(--primary); }
.bottom-nav .bn-cam {
  width: 46px; height: 46px; border-radius: 50%; margin-top: -20px;
  background: linear-gradient(135deg, #5d7dff, #3a56d4); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(76, 111, 255, .4);
}
.bottom-nav .bn-cam .icon { width: 22px; height: 22px; }

/* ---------- legal pages ---------- */
.legal-hero { background: linear-gradient(180deg, #f2f5ff, var(--bg)); padding: 52px 0 36px; border-bottom: 1px solid var(--line); }
.legal-hero .crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px; }
.legal-hero .crumb a { color: var(--ink-3); }
.legal-hero .crumb a:hover { color: var(--primary); }
.legal-hero h1 { font-size: 30px; font-weight: 900; }
.legal-hero .upd { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.legal-body { max-width: 780px; margin: 0 auto; padding: 44px 24px 20px; }
.legal-body section { margin-bottom: 36px; }
.legal-body h2 { font-size: 18px; font-weight: 900; margin-bottom: 12px; padding-left: 13px; border-left: 4px solid var(--primary); line-height: 1.5; }
.legal-body h3 { font-size: 15px; font-weight: 700; margin: 16px 0 8px; }
.legal-body p { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; line-height: 1.95; }
.legal-body ul, .legal-body ol { margin: 0 0 12px 22px; font-size: 14px; color: var(--ink-2); }
.legal-body li { margin-bottom: 6px; line-height: 1.85; }
.legal-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); font-size: 13.5px; }
.legal-table th, .legal-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.8; }
.legal-table th { width: 200px; background: var(--primary-softer); font-weight: 700; color: var(--ink); white-space: nowrap; }
.legal-table td { color: var(--ink-2); }
.legal-table tr:last-child th, .legal-table tr:last-child td { border-bottom: none; }
.legal-note { background: var(--primary-softer); border: 1px solid #dde5ff; border-radius: 12px; padding: 14px 18px; font-size: 13px; color: var(--ink-2); margin-top: 16px; }
.faq-group-title { font-size: 15px; font-weight: 900; color: var(--primary); margin: 30px 0 12px; display: flex; align-items: center; gap: 8px; }

/* ---------- utilities ---------- */
.text-center { text-align: center; }
.br-m { display: none; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; gap: 60px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin: 0 auto; }
  .hero-cta, .hero-note { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { max-width: 420px; margin: 0 auto; }
  .float-ai { left: -10px; }
  .float-cat { right: -6px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .app-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .hdr-landing .header-actions { display: none; }
  .nav-toggle { display: grid; place-items: center; margin-left: auto; }
  .header-actions { margin-left: 0; }
  .header-actions .btn { padding: 9px 15px; font-size: 13px; }
  .section { padding: 60px 0; }
  .section-head h2 { font-size: 25px; }
  .br-m { display: inline; }
  .hero { padding: 52px 0 64px; }
  .hero-copy h1 { font-size: 33px; }
  .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 30px; }
  .auth-wrap { display: block; background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 340px); }
  .auth-brand { display: flex; padding: calc(22px + env(safe-area-inset-top)) 22px 74px; }
  .auth-brand::before { width: 220px; height: 220px; bottom: -120px; right: -70px; }
  .auth-brand::after { width: 160px; height: 160px; top: -60px; left: -60px; }
  .auth-brand-body { margin: 20px 0 0; }
  .auth-brand h2 { font-size: 22px; margin-bottom: 8px; }
  .auth-brand .ab-lead { font-size: 12.5px; line-height: 1.8; max-width: none; opacity: .9; }
  .ab-feats, .auth-brand .ab-foot { display: none; }
  .auth-mobile-logo { display: none; }
  .auth-panel { padding: 0 16px 40px; margin-top: -46px; min-height: 0; align-items: flex-start; position: relative; z-index: 1; background: transparent; }
  .auth-card {
    max-width: 480px; background: #fff; border-radius: 20px;
    padding: 26px 22px 24px; box-shadow: var(--shadow-md);
  }
  .auth-card h1 { font-size: 21px; }
  .auth-card .auth-sub { font-size: 12.5px; margin-bottom: 22px; }
  .auth-card .field { margin-bottom: 16px; }
  .auth-card .input { font-size: 16px; padding: 12px 14px; }
  .auth-card .btn-lg { padding: 14px 24px; }
  .auth-switch { margin-top: 18px; font-size: 13px; }
  .demo-hint { margin-top: 16px; font-size: 11.5px; padding: 10px 14px; }
  .cta-band { padding: 40px 26px; }
  .cta-band h2 { font-size: 22px; }
  .legal-hero h1 { font-size: 24px; }
  .legal-table th { width: 120px; white-space: normal; }
  .modal-plan { padding: 28px 20px 22px; }
  .modal-plan .pricing-grid { max-width: none; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  .hero-copy h1 { font-size: 29px; }
  .hero-stats > div { padding-right: 16px; margin-right: 16px; }
  .hero-stats .v { font-size: 18px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .cat-tile { padding: 16px 6px 13px; }
  .cat-tile .ct-ic { width: 38px; height: 38px; border-radius: 12px; }
  .cat-tile .ct-name { font-size: 11.5px; }
  .feature-grid { grid-template-columns: 1fr; }
  .phone { width: 260px; }
  .float-card { padding: 9px 12px; }
  .float-ai { top: 16px; left: -4px; }
  .float-cat { bottom: 30px; right: -4px; }

  .app-main { padding: 20px 0 110px; }
  .app-greet h1 { font-size: 19px; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 15px 16px; }
  .stat-card .s-value { font-size: 21px; }
  .panel-head { padding: 15px 16px 0; }
  .panel-body { padding: 15px 16px 18px; }
  .bill-row { gap: 10px; }
  .bill-ic { width: 36px; height: 36px; }
  .bill-amt .b-val { font-size: 14px; }
  .bill-act .btn-icon { padding: 7px; }
  .export-grid { grid-template-columns: 1fr; }
  .mr-grid { grid-template-columns: 1fr; }
  .bottom-nav { display: flex; }
  .demo-switch { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast-root { top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .user-chip .uname { display: none; }
  .logo { font-size: 17px; gap: 7px; }
  .logo small { display: none; }
  .logo-mark { width: 30px; height: 30px; border-radius: 9px; }
  .logo-mark .icon { width: 16px; height: 16px; }
  .ub-txt { display: none; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 8px 12px; font-size: 12.5px; }
  .badge { font-size: 11px; padding: 4px 8px; }
  .modal-result { padding: 24px 20px 20px; }
  .auth-brand h2 { font-size: 20px; }
  .auth-brand { padding-left: 18px; padding-right: 18px; }
  .auth-panel { padding: 0 12px 32px; }
  .auth-card { padding: 22px 18px 20px; border-radius: 18px; }
  .acc-q { padding: 16px 16px; font-size: 13.5px; }
  .acc-a-inner { padding: 0 16px 16px 42px; }
}