/* Uber Bold Transit / Ở Ghép — fresh single-source styles. */
:root{
  --bg:#fff;--text:#161616;--body-text:#4b4b4b;--hover:#e2e2e2;--chip:#efefef;--muted:#777;
  --surface:#fff;--black:#111;--border:#e2e2e2;--shadow-light:rgba(0,0,0,.12);--shadow-medium:rgba(0,0,0,.16);
  --radius-pill:999px;--radius-card:12px;--radius-sm:8px;--content:1280px;--ease:cubic-bezier(.2,.8,.2,1);
  color-scheme:light;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:95px}
body{margin:0;min-width:0;color:var(--text);background:var(--bg);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
body,button,input,select{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}
a{color:inherit;text-decoration:none}a:hover{text-decoration:none}
svg{display:block;flex:none}img{max-width:100%}
h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.08;letter-spacing:-.045em}
h1{font-size:clamp(2.75rem,5vw,4.5rem);font-weight:750}h2{font-size:clamp(1.8rem,3vw,2.65rem);font-weight:720}
h3{font-size:1.2rem;font-weight:700}
:focus-visible{outline:2px solid #111;outline-offset:3px}
::selection{background:#bcbcbc;color:#111}
.hidden,[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.container{width:min(calc(100% - 48px),var(--content));margin-inline:auto}
.label-caps,.eyebrow{font-size:.75rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.section-spacing{padding-block:clamp(4rem,8vw,7rem)}
.section-kicker{display:inline-flex;align-items:center;gap:8px;font-size:.75rem;letter-spacing:.14em;font-weight:750;text-transform:uppercase;margin-bottom:18px}
.section-kicker::before{content:"";width:18px;height:2px;background:currentColor}
.section-heading{max-width:780px;margin-bottom:32px}
.section-heading h2{margin-bottom:15px}
.section-heading p{color:var(--body-text);max-width:66ch}
.btn,.button,.ghost,.week-choice,.mini,.add,.delete-person{
  transition:background-color .2s ease,color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s var(--ease)
}
.btn,.button{display:inline-flex;justify-content:center;align-items:center;gap:10px;border-radius:var(--radius-pill);padding:12px 23px;min-height:46px;border:1.5px solid transparent;font-size:.91rem;line-height:1.25;font-weight:650;white-space:nowrap;text-align:center}
.btn:hover:not(:disabled),.button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 5px 15px var(--shadow-light)}
.btn:active:not(:disabled),.button:active:not(:disabled){transform:translateY(1px)}
.btn-primary,.button.primary{background:var(--black);color:#fff}
.btn-primary:hover:not(:disabled),.button.primary:hover:not(:disabled){background:#303030}
.btn-white{background:#fff;color:#111;border-color:#fff}
.btn-white:hover{background:var(--chip)}
.btn-outline,.button.secondary,.ghost{background:#fff;border-color:#c9c9c9;color:#111}
.btn-outline:hover,.button.secondary:hover,.ghost:hover{background:var(--chip);border-color:#a5a5a5}
.btn-outline-dark{color:#fff;border-color:#686868;background:transparent}
.btn-outline-dark:hover{background:#333}
.btn svg{width:17px;height:17px}
.tag{display:inline-flex;align-items:center;gap:6px;font-size:.76rem;font-weight:650;color:#303030;border-radius:var(--radius-pill);background:var(--chip);padding:6px 12px}
.tag-inverse{color:#fff;background:#333}
.site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.97);border-bottom:1px solid #eee;backdrop-filter:blur(12px)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:76px}
.brand{display:inline-flex;align-items:center;gap:10px;font-weight:850;font-size:1.35rem;letter-spacing:-.06em;white-space:nowrap}
.brand-mark{display:grid;place-items:center;width:38px;height:38px;background:#111;color:#fff;border-radius:10px;font-size:.76rem;letter-spacing:.04em}
.brand-sub{font-size:.75rem;color:#777;font-weight:500;letter-spacing:0}
.nav-links,.nav-actions{display:flex;align-items:center;gap:6px}
.nav-links a{font-size:.84rem;font-weight:600;padding:10px 15px;border-radius:999px;transition:background-color .2s ease}
.nav-links a:hover,.nav-links a:focus-visible{background:var(--chip)}
.nav-actions{gap:12px}
.connection-pill{display:inline-flex;align-items:center;gap:7px;color:#555;background:#f4f4f4;border:1px solid #ebebeb;border-radius:999px;font-size:.72rem;font-weight:650;padding:8px 11px;white-space:nowrap}
.connection-pill::before{content:"";width:7px;height:7px;border-radius:50%;background:#888}
.connection-pill.connected::before{background:#2f8f62}
.nav-signout{padding:10px 16px;font-size:.8rem;border-radius:999px;background:#fff;border:1.5px solid #ccc;font-weight:650}
.nav-signout:hover{background:#eee}
.hero-wrap{padding-top:24px}
.hero-stage{position:relative;display:grid;grid-template-columns:1.14fr .86fr;min-height:540px;overflow:hidden;background:#141414;color:#fff;border-radius:16px}
.hero-copy{position:relative;z-index:1;padding:clamp(32px,6vw,76px);display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.hero-eyebrow{color:#c9c9c9;margin:0 0 20px}
.hero-copy h1{max-width:11ch;margin-bottom:22px;line-height:1.03}
.hero-copy p{font-size:1rem;max-width:46ch;color:#cbcbcb;line-height:1.75}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}
.hero-meta{display:flex;align-items:center;gap:12px;margin-top:32px;color:#b8b8b8;font-size:.75rem}
.hero-meta .line{width:32px;height:1px;background:#8b8b8b}
.hero-art{position:relative;min-width:0;isolation:isolate;overflow:hidden;background:radial-gradient(circle at 55% 42%,#444 0%,#232323 43%,#141414 76%)}
.hero-art::before{content:"";position:absolute;width:400px;height:400px;top:16%;left:10%;border:1px solid #595959;border-radius:50%;box-shadow:0 0 0 65px rgba(255,255,255,.027),0 0 0 130px rgba(255,255,255,.022)}
.hero-art::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#141414 0%,transparent 25%)}
.route-line{position:absolute;z-index:1;top:12%;left:47%;width:6px;height:78%;background:linear-gradient(#fefefe,#9e9e9e);transform:rotate(26deg);border-radius:99px;box-shadow:0 0 0 7px rgba(255,255,255,.08)}
.route-dot{position:absolute;z-index:2;border:7px solid #fff;background:#181818;border-radius:50%;width:26px;height:26px;box-shadow:0 0 0 7px #ffffff22}
.route-dot.first{top:19%;left:40%}.route-dot.last{bottom:17%;left:70%}
.route-card{position:absolute;z-index:3;width:205px;border:1px solid #e2e2e2;background:#fff;color:#111;padding:20px;border-radius:12px;box-shadow:0 20px 50px #0005;transform:rotate(-5deg);top:24%;left:5%}
.route-card strong{display:block;font-size:2.1rem;letter-spacing:-.05em;line-height:1.1}
.route-card span{font-size:.7rem;color:#686868;text-transform:uppercase;letter-spacing:.07em}
.route-card.right{top:auto;bottom:16%;left:auto;right:8%;transform:rotate(6deg);background:#ebebeb;width:180px}
.route-card.right strong{font-size:1.4rem}
.strip-icon{display:grid;place-items:center;width:33px;height:33px;border-radius:50%;background:#111;color:#fff;margin-bottom:14px}
.strip-icon svg{width:18px;height:18px}
.section-feature{background:#fff}
.feature-grid{display:grid;grid-template-columns:1.14fr .86fr;grid-template-rows:repeat(2,minmax(180px,auto));gap:16px}
.feature-card{position:relative;overflow:hidden;padding:32px;border:1px solid var(--border);border-radius:var(--radius-card);background:#f7f7f7;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:24px}
.feature-card.lead{grid-row:span 2;background:#111;color:#fff;min-height:410px}
.feature-card .symbol{width:47px;height:47px;display:grid;place-items:center;border-radius:12px;background:#e9e9e9;color:#111}
.feature-card.lead .symbol{color:#111;background:#fff}
.feature-card .symbol svg{width:25px;height:25px}
.feature-card h3{font-size:clamp(1.25rem,2vw,1.75rem);margin-bottom:10px}
.feature-card p{color:#666;max-width:43ch;margin-bottom:0;font-size:.9rem}
.feature-card.lead p{color:#cacaca}
.feature-card .feature-index{position:absolute;top:26px;right:27px;font-size:.8rem;color:#888;font-weight:700}
.feature-card.lead .feature-index{color:#aaa}
.dashboard-wrap{background:#f5f5f5;padding-block:clamp(3rem,6vw,5rem)}
.dashboard-wrap h2{margin-bottom:8px}
.dashboard-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:22px}
.dashboard-head p{margin:0;color:#686868;font-size:.9rem}
.dashboard-head .tag{white-space:nowrap}
.login-panel,.panel{background:#fff;border:1px solid #e5e5e5;border-radius:var(--radius-card);box-shadow:0 2px 12px rgba(0,0,0,.05)}
.login-panel{max-width:510px;margin:26px auto 0;padding:clamp(25px,4vw,44px)}
.login-panel h3{font-size:1.85rem;margin-bottom:8px}
.login-panel p{font-size:.9rem;color:#666}
.login-form label{display:block;font-weight:650;font-size:.85rem;margin:20px 0 8px}
.control,.moneybox{min-height:48px;width:100%;border:1px solid #d6d6d6;border-radius:8px;background:#fff;color:#111;outline:none}
.control{padding:10px 14px}
.control:focus,.moneybox:focus-within,.member-name:focus,.day-choice:focus{outline:2px solid #5e5e5e;outline-offset:2px;border-color:#9c9c9c}
.control::placeholder,.moneybox input::placeholder{color:#939393}
.login-form .button{width:100%;margin-top:12px}
.authmsg{font-size:.85rem;min-height:25px;color:#444;margin:12px 0 0;line-height:1.65}
.data-note{font-size:.75rem;color:#818181;line-height:1.8;margin:16px 0 0}
.loading{padding:20px;text-align:center;font-size:.9rem;color:#555}
.workflow{display:grid;gap:16px}
.panel{padding:26px}
.panel-header{display:flex;align-items:center;gap:13px;margin-bottom:22px}
.step-number{width:35px;height:35px;display:grid;place-items:center;flex:none;border-radius:999px;background:#111;color:#fff;font-size:.76rem;font-weight:700}
.panel-header h3{margin:0 0 4px;font-size:1.17rem;letter-spacing:-.02em}
.panel-header p{color:#888;font-size:.76rem;margin:0}
.bill-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr);gap:16px}
.field{display:block;min-width:0}
.field>span:first-child{display:block;font-size:.8rem;font-weight:680;color:#3d3d3d;margin-bottom:8px}
.moneybox{display:flex;align-items:center;padding:0 14px;gap:8px}
.moneybox input{background:none;border:0;outline:0;min-width:0;width:100%;font-weight:700;font-size:1.3rem;appearance:textfield}
.moneybox input::-webkit-outer-spin-button,.moneybox input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.moneybox strong{font-size:.9rem;color:#777}
.table-intro{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.8rem;color:#777;margin-bottom:13px}
.table-intro strong{color:#151515}
.member-board{border:1px solid var(--border);border-radius:var(--radius-card);overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.member-table{min-width:860px;width:100%;border-collapse:collapse;table-layout:fixed}
.member-table th{color:#6e6e6e;font-size:.73rem;text-align:center;padding:14px 5px;background:#f1f1f1;border-bottom:1px solid var(--border);font-weight:700}
.member-table td{padding:11px 5px;text-align:center;border-bottom:1px solid #ededed;vertical-align:middle}
.member-table tbody tr:last-child td{border-bottom:0}
.member-table th:first-child,.member-table td:first-child{text-align:left;padding-left:14px}
.member-table th:last-child,.member-table td:last-child{text-align:right;padding-right:14px}
.member-table .person-heading{width:168px}.member-table .week-heading{width:84px}.member-table .custom-heading{width:113px}
.member-table .share-heading{width:170px}.member-table .delete-heading{width:50px}
.member-name{width:100%;min-width:0;background:transparent;border:1px solid transparent;padding:8px 5px;font-size:.88rem;font-weight:650;border-radius:8px;outline:none;color:#222}
.member-name:hover{background:#f5f5f5}
.week-choice{display:inline-flex;align-items:center;justify-content:center;width:72px;min-height:37px;padding:6px 8px;font-size:.76rem;font-weight:700;border:1px solid #dbdbdb;border-radius:999px;background:#fff;color:#555}
.week-choice:hover{background:#eaeaea;border-color:#aaa}.week-choice.active{background:#171717;color:#fff;border-color:#171717}
.day-choice{width:79px;height:38px;text-align:center;border:1px solid #d5d5d5;border-radius:999px;background:#fff;color:#111;outline:0;font-size:.85rem}
.day-choice.active{border:2px solid #111;background:#f7f7f7}
.person-share{display:block;font-size:.88rem;white-space:nowrap;color:#161616}
.person-days{display:block;font-size:.68rem;color:#777}
.delete-person{background:none;border:0;min-width:36px;min-height:36px;font-size:1.45rem;color:#888;border-radius:999px}
.delete-person:hover{background:#f4e9e9;color:#9c2828}
.add{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:40px;margin-top:17px;padding:10px 20px;border:1.5px solid #bfbfbf;background:#fff;color:#111;border-radius:999px;font-size:.8rem;font-weight:650}
.add:hover{background:#eee}
.sum-grid{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#f5f5f5;border:1px solid #eaeaea;border-radius:12px;padding:18px 22px}
.sum-stat span{display:block;font-size:.75rem;color:#666}
.sum-stat strong{display:block;margin-top:2px;font-size:1.5rem;letter-spacing:-.05em;line-height:1.35}
.sum-actions{display:flex;gap:9px;flex-wrap:wrap}
.sum-actions button{width:auto;margin:0;min-width:156px}
.summary-error{font-size:.8rem;color:#b3261e;min-height:17px;margin:13px 0 0}
.history-panel{margin-top:16px}
.history-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:19px}
.history-head h3{font-size:1.15rem;margin:0 0 4px}
.history-head p{margin:0;font-size:.76rem;color:#888}
.history-head>span{font-size:.78rem;font-weight:700;padding:6px 12px;background:var(--chip);border-radius:999px}
.history{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bill{background:#fff;border:1px solid #e2e2e2;border-radius:12px;padding:17px;min-width:0}
.bill-line{display:flex;align-items:center;justify-content:space-between;gap:10px}
.bill-desc{flex:1;min-width:0}.bill-desc strong{display:block;font-size:.84rem;overflow-wrap:anywhere}
.bill-desc small{font-size:.72rem;color:#777;display:block;margin-top:4px}
.bill-money{font-size:.83rem;font-weight:800;white-space:nowrap}
.bill-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:7px;margin-top:15px}
.mini{border:1px solid #ccc;border-radius:999px;background:#fff;color:#222;padding:7px 14px;font-weight:650;font-size:.73rem}
.mini:hover{background:#eee}.mini.red{border-color:#e9b3b3;color:#9c2828}.mini.red:hover{background:#fff1f1}
.bill-detail{border-top:1px dashed #ddd;padding-top:10px;margin-top:15px}
.paid-row{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:.78rem;padding:8px 0}
.paid-row label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;color:#555}
.paid-row input{accent-color:#111;width:16px;height:16px;cursor:pointer}
.muted{font-size:.86rem;color:#777}
.story-section{background:#f5f5f5}
.story-grid{display:grid;grid-template-columns:1.08fr .96fr .96fr;gap:16px}
.story-card{padding:28px;background:#fff;border:1px solid var(--border);border-radius:12px;display:flex;flex-direction:column;gap:26px;min-height:250px;box-shadow:0 2px 12px #00000008}
.story-card:first-child{background:#171717;color:#fff}
.story-card p{font-size:1.08rem;line-height:1.55;font-weight:580;letter-spacing:-.025em;margin:0}
.story-card .story-note{font-size:.72rem;font-weight:650;text-transform:uppercase;letter-spacing:.1em;margin-top:auto;color:#888}
.story-card:first-child .story-note{color:#aaa}
.pricing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.price-card{border:1px solid #dadada;border-radius:12px;padding:28px;min-height:325px;display:flex;flex-direction:column;gap:16px;background:#fff}
.price-card.featured{background:#171717;color:#fff;border-color:#171717;box-shadow:0 5px 24px var(--shadow-medium)}
.price-card h3{font-size:1.3rem;margin:0}.price-card .price-label{font-size:.7rem;letter-spacing:.12em;font-weight:700;text-transform:uppercase;color:#777}
.price-card.featured .price-label{color:#bfbfbf}
.price-card .price{font-size:2.3rem;line-height:1.1;letter-spacing:-.04em;font-weight:800}
.price-card p{font-size:.86rem;color:#686868;margin:0}
.price-card.featured p{color:#c9c9c9}
.price-card .price-link{margin-top:auto;align-self:flex-start}
.pricing-disclosure{margin-top:15px;font-size:.78rem;color:#7a7a7a}
.final-wrap{padding-bottom:clamp(4rem,8vw,7rem)}
.final-cta{position:relative;overflow:hidden;border-radius:16px;background:#151515;color:#fff;padding:clamp(34px,6vw,70px);display:flex;justify-content:space-between;align-items:center;gap:30px}
.final-cta::after{content:"";pointer-events:none;position:absolute;width:400px;height:400px;border:1px solid #3e3e3e;border-radius:50%;right:20%;top:20%;box-shadow:0 0 0 75px #ffffff06}
.final-cta .copy{position:relative;z-index:2;max-width:650px}
.final-cta h2{margin-bottom:13px}
.final-cta p{margin-bottom:0;color:#c1c1c1;font-size:.92rem}
.final-cta .btn{z-index:2;flex:none}
.site-footer{background:#111;color:#fff;padding:54px 0 23px}
.footer-top{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr) minmax(0,.7fr);gap:35px}
.site-footer .brand{color:#fff}.site-footer .brand-mark{background:#fff;color:#111}
.footer-description{margin:16px 0 0;max-width:40ch;font-size:.8rem;color:#aaa}
.footer-list h3{font-size:.85rem;margin-bottom:14px;letter-spacing:0}
.footer-list a{display:block;font-size:.8rem;color:#bbb;padding:5px 0}
.footer-list a:hover{color:#fff}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:38px;padding-top:22px;border-top:1px solid #333;font-size:.74rem;color:#aaa}
.footer-bottom .socials{display:flex;align-items:center;gap:12px}
.socials a{display:inline-flex;align-items:center;gap:7px;color:#ddd;border:1px solid #444;padding:7px 12px;border-radius:999px}
.socials a:hover{background:#303030}
.socials svg{width:15px;height:15px}
.legal-notes{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}
.legal-notes details{font-size:.72rem;color:#858585}
.legal-notes summary{cursor:pointer;font-weight:650;color:#ccc;margin-bottom:8px}
.legal-notes p{line-height:1.6;margin:0}
.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,16px);max-width:min(90vw,520px);padding:13px 20px;color:#fff;background:#171717;border:1px solid #555;box-shadow:0 16px 36px #0004;border-radius:10px;z-index:500;font-size:.85rem;text-align:center;pointer-events:none;opacity:0;transition:opacity .22s,transform .22s}
.toast.show{opacity:1;transform:translate(-50%,0)}
.fade-up{animation:enter-up .42s var(--ease) both}
.fade-up.delay-1{animation-delay:.08s}.fade-up.delay-2{animation-delay:.16s}
@keyframes enter-up{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1020px){
  .nav-links{gap:0}.nav-links a{padding:9px 10px}
  .hero-stage{min-height:470px;grid-template-columns:1.15fr .85fr}
  .hero-copy{padding:36px}
  .route-card{left:2%;width:175px}
  .route-card.right{right:2%;width:158px}
  .bill-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bill-grid .amount-field{grid-column:1/-1}
  .member-table{min-width:810px}
}
@media(max-width:767px){
  html{scroll-padding-top:74px}
  .container{width:min(calc(100% - 32px),var(--content))}
  .header-inner{min-height:65px}
  .nav-links,.nav-actions .connection-pill{display:none}
  .brand{font-size:1.14rem}.brand-sub{display:none}
  .nav-actions .btn{min-height:40px;padding:9px 15px}
  .hero-wrap{padding-top:12px}
  .hero-stage{grid-template-columns:1fr;min-height:auto}
  .hero-copy{padding:38px 28px 28px}
  .hero-copy h1{font-size:clamp(2.65rem,8vw,4rem)}
  .hero-art{min-height:225px}.hero-art::after{background:linear-gradient(180deg,#141414 0%,transparent 35%)}
  .route-card{top:13%;left:20%;width:160px;padding:14px}
  .route-card.right{bottom:12%;right:12%;width:160px}
  .route-card strong{font-size:1.5rem}
  .feature-grid{grid-template-columns:1fr;grid-template-rows:auto}
  .feature-card.lead{grid-row:auto;min-height:260px}
  .feature-card{min-height:200px}
  .dashboard-head{align-items:start;flex-direction:column;gap:10px}
  .bill-grid{grid-template-columns:1fr 1fr}
  .member-board{overflow:visible;border:0;border-radius:0}
  .member-table{min-width:0;display:block}
  .member-table thead{display:none}
  .member-table tbody{display:grid;gap:12px}
  .member-table tr{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:14px;background:#fafafa;border:1px solid #e4e4e4;border-radius:12px}
  .member-table tr td{display:flex;flex-direction:column;justify-content:center;padding:0!important;border:0!important;text-align:initial!important;min-width:0}
  .member-table tr td:first-child{grid-column:1/-1;padding-right:42px!important}
  .member-table tr td:nth-child(n+2):nth-child(-n+5){grid-column:span 1}
  .member-table tr td:nth-child(6){grid-column:span 2;justify-content:end}

  .member-table tr td:nth-child(7){grid-column:span 2;align-items:flex-end}

  .member-table tr td:nth-child(8){position:absolute;top:10px;right:12px}
  .member-table .member-name{font-size:1.02rem;font-weight:750;padding-left:0}
  .week-choice{width:100%;padding:8px 2px;font-size:.72rem;white-space:nowrap}
  .day-choice{height:37px;width:100%;max-width:105px}
  .person-share{font-size:.95rem}
  .history{grid-template-columns:1fr}
  .story-grid{grid-template-columns:1fr}
  .story-card{min-height:180px}
  .pricing-grid{grid-template-columns:1fr}
  .price-card{min-height:250px}
  .final-cta{align-items:flex-start;flex-direction:column}
  .final-cta::after{right:-130px}
  .footer-top{grid-template-columns:1fr 1fr}
  .footer-top>div:first-child{grid-column:1/-1}
  .legal-notes{grid-template-columns:1fr}
}
@media(max-width:480px){
  .container{width:min(calc(100% - 24px),var(--content))}
  .hero-copy{padding:31px 22px 25px}
  .hero-copy h1{font-size:2.55rem}
  .hero-actions{width:100%}.hero-actions .btn{flex:1;min-width:0}
  .hero-meta{margin-top:21px}
  .panel{padding:18px 15px}
  .bill-grid{grid-template-columns:1fr}
  .bill-grid .amount-field{grid-column:auto}
  .billing-period{flex-wrap:wrap}
  .sum-grid{align-items:stretch}
  .sum-stat{width:100%}
  .sum-actions{width:100%}.sum-actions button{flex:1;min-width:0;font-size:.78rem;padding-inline:12px}
  .footer-top{grid-template-columns:1fr}
  .footer-top>div:first-child{grid-column:auto}
  .footer-bottom{align-items:flex-start;flex-direction:column}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .fade-up{animation:none}
  .btn,.button,.ghost,.week-choice,.mini,.add,.delete-person,.toast{transition:none}
}

/* Apartment accounts, invitations, payment workflow */
.apartment-choice{width:100%;text-align:left;padding:15px 20px;border:1px solid #d5d5d5;border-radius:12px;background:#fff;color:#111;font-weight:700;cursor:pointer;transition:background .2s,transform .2s}
.apartment-choice:hover{background:#efefef;transform:translateY(-1px)}
.apartment-list{display:grid;gap:10px;margin:18px 0}
.create-apartment-form{display:grid;gap:16px;max-width:600px;margin-top:20px}
.create-apartment-form .button{justify-self:start}
.checkline{display:flex;gap:10px;align-items:start;font-size:.83rem;color:#4b4b4b}
.checkline input{width:17px;height:17px;margin-top:3px;accent-color:#111;flex:none}
.invite-banner,.invite-fallback{background:#f3f3f3;border:1px solid #d9d9d9;border-radius:12px;padding:19px;margin:17px 0}
.invite-banner p,.invite-fallback p{font-size:.86rem;color:#555;margin:8px 0 14px}
.apartment-toolbar{display:flex;gap:25px;justify-content:space-between;align-items:center;flex-wrap:wrap}
.apartment-current h3{font-size:1.65rem;margin:2px 0 12px}
.apartment-current .section-kicker{margin:0}
.meta-row{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.apartment-switcher{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.apartment-switcher label{font-size:.8rem;color:#656565;font-weight:650}
.apartment-switcher .control{width:auto;min-width:190px;max-width:300px}
.access-item button{flex:none}
.advanced-period{margin-top:15px;border-top:1px solid #ebebeb;padding-top:12px}
.advanced-period summary{cursor:pointer;font-size:.8rem;font-weight:650;color:#555}
.range-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px;max-width:480px;margin-top:17px}
.payment-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.payment-badge{display:inline-flex;align-items:center;border-radius:999px;font-size:.7rem;font-weight:650;padding:5px 10px;background:#f1f1f1;color:#5b5b5b}
.payment-badge.submitted{background:#fff2d7;color:#714900}
.payment-badge.confirmed{background:#e2f2e9;color:#1f6842}
.payment-amount{display:block;color:#777;margin-top:3px;font-size:.76rem}
#apartment-app{display:grid;gap:16px;min-width:0}
#apartment-gate{margin-bottom:5px}
.member-table input:disabled{opacity:1;cursor:default;color:#181818}
.member-table .week-choice:disabled{opacity:.55}
.member-table .week-choice.active:disabled{opacity:1}
@media(max-width:900px){
  .apartment-toolbar{align-items:flex-start}
}
@media(max-width:767px){
 .apartment-switcher{width:100%;align-items:stretch;flex-direction:column}
 .apartment-switcher .control{width:100%;max-width:none}
     .range-fields{grid-template-columns:1fr}
 .payment-actions{flex-direction:column;align-items:flex-end}
 .paid-row{align-items:flex-start}
}


/* Reusable Ở Ghép modal — replaces default browser dialogs. */
.og-modal{
  position:fixed;
  inset:0;
  box-sizing:border-box;
  margin:auto;
  padding:0;
  width:min(480px,calc(100vw - 32px));
  max-height:min(86dvh,720px);
  overflow:auto;
  border:1px solid #e1e1e1;
  border-radius:18px;
  background:#fff;
  color:#161616;
  box-shadow:0 22px 70px rgba(0,0,0,.23);
}
.og-modal[open]{
  animation:og-modal-in .24s cubic-bezier(.2,.8,.2,1) both;
}
.og-modal::backdrop{
  background:rgba(14,14,14,.57);
  -webkit-backdrop-filter:blur(3px);
  backdrop-filter:blur(3px);
}
.og-modal__content{padding:clamp(22px,4vw,34px)}
.og-modal__header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:22px;
}
.og-modal__symbol{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  flex:none;
  color:#fff;
  background:#191919;
  border-radius:13px;
}
.og-modal__symbol svg{width:23px;height:23px}
.og-modal[data-tone="danger"] .og-modal__symbol{
  background:#f6eceb;
  color:#a03930;
}
.og-modal__close{
  display:grid;
  place-items:center;
  flex:none;
  width:36px;
  height:36px;
  border:0;
  border-radius:999px;
  background:#f0f0f0;
  color:#424242;
  cursor:pointer;
  transition:background-color .2s ease,transform .2s ease;
}
.og-modal__close:hover{background:#dfdfdf}
.og-modal__close:active{transform:scale(.96)}
.og-modal__close svg{width:17px;height:17px}
.og-modal__title{
  margin:0 0 10px;
  font-size:clamp(1.45rem,3vw,1.8rem);
  font-weight:750;
  letter-spacing:-.04em;
  line-height:1.18;
}
.og-modal__description{
  margin:0;
  color:#626262;
  font-size:.92rem;
  line-height:1.65;
  white-space:pre-line;
  overflow-wrap:anywhere;
}
.og-modal__actions{
  display:flex;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:10px;
  margin-top:29px;
}
.og-modal__button{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:45px;
  padding:11px 22px;
  border:1.5px solid transparent;
  border-radius:999px;
  background:#161616;
  color:#fff;
  font:600 .88rem/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
  transition:background-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
.og-modal__button:hover{background:#363636;box-shadow:0 5px 14px rgba(0,0,0,.12);transform:translateY(-1px)}
.og-modal__button:active{transform:translateY(1px)}
.og-modal__button--cancel{
  border-color:#d2d2d2;
  background:#fff;
  color:#252525;
}
.og-modal__button--cancel:hover{background:#efefef;box-shadow:none}
.og-modal[data-tone="danger"] .og-modal__button--confirm{background:#95392f}
.og-modal[data-tone="danger"] .og-modal__button--confirm:hover{background:#7b2e27}
.og-modal__button:focus-visible,
.og-modal__close:focus-visible{outline:2px solid #111;outline-offset:3px}
@keyframes og-modal-in{
  from{opacity:0;transform:translateY(14px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@media(max-width:480px){
  .og-modal__actions{flex-direction:column-reverse}
  .og-modal__button{width:100%}
}
@media(prefers-reduced-motion:reduce){
  .og-modal[open]{animation:none}
  .og-modal__button,.og-modal__close{transition:none}
}


/* Header language switch — stays visible on desktop and mobile. */
.lang-switch{
 display:inline-flex;align-items:center;gap:2px;flex:none;padding:3px;
 background:#efefef;border:1px solid #dedede;border-radius:999px;
}
.lang-switch__button{
 display:inline-flex;justify-content:center;align-items:center;
 min-width:36px;min-height:32px;padding:6px 9px;
 background:transparent;border:0;border-radius:999px;
 color:#555;font-size:.72rem;line-height:1.2;font-weight:750;
 cursor:pointer;transition:background-color .2s ease,color .2s ease,box-shadow .2s ease;
}
.lang-switch__button:hover:not([aria-pressed="true"]){background:#ddd;color:#111}
.lang-switch__button[aria-pressed="true"]{background:#161616;color:white;box-shadow:0 2px 7px #0002}
.lang-switch__button:focus-visible{outline:2px solid #111;outline-offset:3px}
@media(max-width:820px){
 .nav-actions{gap:7px}
 .lang-switch__button{min-width:33px;padding:6px 7px}
}
@media(max-width:560px){
 .nav-actions>.btn{display:none}
 .header-inner{gap:9px}
 .nav-signout{padding:9px 11px;font-size:.75rem}
}
@media(max-width:360px){
 .brand{gap:6px;font-size:1.05rem}
 .brand-mark{width:33px;height:33px}
 .lang-switch__button{min-width:30px;padding:6px 5px}
}
@media(prefers-reduced-motion:reduce){
 .lang-switch__button{transition:none}
}


/* Unified household member manager */
.household-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.household-head .panel-header{margin-bottom:0}
.household-add-button{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.household-add-button svg{width:17px;height:17px}
.household-summary{font-size:.79rem;color:#626262;margin:20px 0 12px;font-weight:550}
.household-list{border:1px solid #e6e6e6;border-radius:14px;overflow:hidden;background:#fff}
.household-row{display:flex;align-items:center;gap:13px;padding:15px 18px;min-height:74px}
.household-row+.household-row{border-top:1px solid #ededed}
.household-avatar{display:grid;place-items:center;flex:none;width:42px;height:42px;background:#eee;border-radius:999px;color:#171717;font-size:.81rem;font-weight:750;letter-spacing:-.03em}
.household-person{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0;line-height:1.35}
.household-person strong{font-size:.91rem;overflow-wrap:anywhere}
.household-person small{font-size:.74rem;color:#858585;overflow-wrap:anywhere}
.household-status{flex:none;padding:5px 11px;background:#f1f1f1;border-radius:999px;color:#555;font-size:.7rem;font-weight:650;white-space:nowrap}
.household-status--joined{background:#e9f2ec;color:#27583d}
.household-status--invited{background:#fff2dc;color:#835c22}
.household-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:125px}
.household-row-actions .mini{white-space:nowrap;border-radius:999px;min-height:34px;cursor:pointer}
.household-row-action{background:#181818!important;color:#fff!important;border-color:#181818!important;padding-inline:16px}
.household-row-action:hover{background:#353535!important}
.household-empty{padding:33px 24px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:6px}
.household-empty strong{font-size:1.03rem}
.household-empty p{margin:0;font-size:.83rem;color:#707070}
.og-member-modal .og-modal__content{padding:clamp(20px,4vw,32px)}
.member-dialog-form{display:grid;gap:17px;margin-top:23px}
.member-dialog-form .field{display:grid;gap:7px}
.member-dialog-form .field span{font-size:.82rem;font-weight:650}
.member-dialog-form .control{width:100%}
.member-dialog-form input[readonly]{background:#f5f5f5;color:#666}
.member-form-error{font-size:.8rem;line-height:1.55;color:#a43832;margin:0}
.member-dialog-actions{margin-top:10px}
.member-dialog-actions .og-modal__button{font-size:.8rem;padding-inline:17px}
#invite-fallback{margin:16px 0 0}
@media(max-width:767px){
 .household-head{align-items:flex-start}
 .household-row{gap:10px;padding:13px 12px;flex-wrap:wrap}
 .household-avatar{width:38px;height:38px}
 .household-row-actions{min-width:0;margin-left:auto}
 .household-status{font-size:.67rem}
}
@media(max-width:480px){
 .household-add-button{width:100%;justify-content:center}
 .household-person{flex-basis:calc(100% - 64px)}
 .household-status{margin-left:50px}
 .household-row-actions{flex:1;justify-content:flex-end}
 .household-row-actions .mini{font-size:.74rem}
 .member-dialog-actions{display:grid;grid-template-columns:1fr 1fr}
 .member-dialog-actions #member-dialog-cancel{grid-column:1/-1;order:2}
 .member-dialog-actions #member-add-only{order:0}
 .member-dialog-actions #member-add-invite{order:1}
 .member-dialog-actions .og-modal__button{width:100%;padding:12px 10px}
 .member-dialog-actions #member-add-only[hidden]{display:none}
 .member-dialog-actions #member-add-only[hidden]+#member-add-invite{grid-column:1/-1}
}

/* Apartment owner is always an authenticated member, even when not charged. */
.household-row--owner{
  background:#f9f9f9;
  border-bottom:1px solid #e5e5e5;
}
.household-row--owner .household-avatar{
  background:#171717;
  color:white;
}
.household-owner-included{
  font-size:.73rem;
  color:#4b4b4b;
  font-weight:600;
  text-align:right;
}
.og-member-modal .member-dialog-form .field.hidden{display:none!important}


/* Batch onboarding and share controls */
.household-head-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.household-head-actions .button{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.household-head-actions svg,.share-button svg{width:17px;height:17px;flex:none}
.share-button{display:inline-flex;gap:7px;align-items:center;justify-content:center}
.history-live-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.history-live-actions button{cursor:pointer}
.og-bulk-modal{width:min(540px,calc(100vw - 32px))}
.bulk-member-names{box-sizing:border-box;min-height:170px;resize:vertical;font:inherit;line-height:1.55;border-radius:12px!important}
.bulk-member-names:focus{outline:2px solid #171717;outline-offset:2px}
.og-bulk-modal .member-dialog-form{gap:13px}
@media(max-width:600px){
 .household-head-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
 .household-head-actions .button{justify-content:center;width:100%;font-size:.8rem;padding:10px 9px}
 .household-add-button{width:auto}
 .history-live-actions{justify-content:flex-end}
 .sum-actions{flex-wrap:wrap}
}
@media(max-width:390px){
 .household-head-actions{grid-template-columns:1fr}
}

/* Manual synchronization guidance near the Refresh control. */
.refresh-note{font-size:.74rem;color:#777;line-height:1.4;max-width:260px}
@media(max-width:600px){.history-live-actions{justify-content:flex-start}.refresh-note{flex-basis:100%}}


/* Multi-fee billing — black/white shared-apartment design system. */
.fee-workspace{min-width:0}
.fee-mode-controls{display:inline-flex;gap:4px;padding:4px;background:#efefef;border:1px solid #dedede;border-radius:999px;margin:6px 0 20px}
.fee-mode-button{cursor:pointer;border:0;background:transparent;border-radius:999px;padding:10px 20px;font-size:.82rem;font-weight:700;color:#5d5d5d;transition:background-color .2s,color .2s}
.fee-mode-button.active{background:#171717;color:#fff}
.fee-editor{display:grid;gap:22px}
.fee-start{padding:20px;background:#f5f5f5;border-radius:14px}
.fee-start-head h4,.fee-line-header h4,.fee-history-head h4{font-weight:760;letter-spacing:-.02em;font-size:1.15rem;margin:0 0 4px}
.fee-start-head p,.fee-history-head p{color:#777;font-size:.82rem;margin:0}
.fee-start-tools{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;margin-top:18px}
.fee-start-tools .field{flex:1 1 240px;min-width:0}
.fee-start-tools .button{flex:0 0 auto;min-height:46px}
.fee-period-fields{display:grid;grid-template-columns:minmax(0,240px) minmax(0,1fr);gap:15px}
.fee-line-header,.fee-history-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.fee-items{display:grid;gap:12px}
.fee-item{border:1px solid #dedede;border-radius:14px;overflow:hidden;background:#fff}
.fee-item-top{padding:15px;display:grid;grid-template-columns:minmax(0,1.7fr) minmax(125px,.8fr) minmax(145px,1fr) auto;gap:12px;align-items:end}
.fee-item label,.fee-period-fields label,.fee-start-tools label,.fee-template-save label{display:grid;gap:6px}
.fee-item .field span,.fee-period-fields .field span,.fee-start-tools .field span,.fee-template-save .field span{font-size:.76rem;font-weight:650}
.fee-item .control{width:100%;min-width:0;box-sizing:border-box}
.fee-item-delete{align-self:end;min-height:42px;padding:0 14px;cursor:pointer;border:1px solid #ddd;background:white;color:#7e2626;border-radius:999px;font-weight:650}
.fee-item-details{border-top:1px solid #eee;padding:12px 15px;background:#fafafa}
.fee-item-details>summary{font-size:.82rem;font-weight:700;cursor:pointer;color:#3e3e3e}
.fee-people-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:16px 0 8px}
.fee-person{display:flex;align-items:center;gap:9px;min-width:0;background:#fff;border:1px solid #e3e3e3;border-radius:11px;padding:10px 12px}
.fee-person>label{display:flex;gap:8px;align-items:center;min-width:0;flex:1;font-size:.8rem}
.fee-person input[type=checkbox]{width:17px;height:17px;accent-color:#171717;flex:none}
.fee-person-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fee-person small{font-size:.71rem;color:#777}
.fee-person input[type=number]{width:75px;min-width:0;padding:9px 8px;border:1px solid #ddd;border-radius:8px;text-align:right;background:#fff}
.fee-person input[type=number]:focus,.fee-item .control:focus{outline:2px solid #171717;outline-offset:1px}
.fee-rule-note{font-size:.76rem;color:#777;line-height:1.5;margin:0 0 10px}
.fee-item-preview{padding:12px 15px;border-top:1px solid #eee;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center}
.fee-item-preview small{color:#666;font-size:.76rem}
.fee-item-preview strong{font-weight:750}
.fee-total{display:flex;justify-content:space-between;gap:15px;border-top:1px solid #e4e4e4;padding:18px 3px;font-weight:700}
.fee-total strong{font-size:1.4rem}
.fee-editor-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.fee-template-save{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap;padding:20px;background:#f5f5f5;border-radius:13px}
.fee-template-save>.field{flex:1 1 230px}
.fee-template-save .data-note{flex-basis:100%;margin:4px 0 0}
.fee-history-wrap{margin-top:26px;padding-top:20px;border-top:1px solid #e6e6e6}
.fee-history{display:grid;gap:10px;margin-top:14px}
.fee-history-card{border:1px solid #e1e1e1;border-radius:13px;overflow:hidden;background:#fff}
.fee-history-summary{padding:15px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.fee-history-summary strong{font-weight:750}
.fee-history-summary small{color:#777}
.fee-history-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.fee-history-details{padding:16px;border-top:1px solid #eee;background:#fafafa}
.fee-history-charge{display:flex;justify-content:space-between;gap:12px;padding:8px 0;font-size:.84rem}
.fee-history-charge+.fee-history-charge{border-top:1px dashed #ddd}
.fee-history-payment{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid #ececec}
.fee-history-payment>div:first-child{min-width:0}
.fee-history-payment strong,.fee-history-payment small{display:block}
.fee-history-payment small{font-size:.74rem;color:#777;margin-top:4px}
.fee-history-payment-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.fee-hint{color:#777;font-size:.76rem}
.fee-template-save .mini,.fee-history-actions .mini,.fee-history-payment-actions .mini{cursor:pointer}
@media(max-width:850px){
 .fee-item-top{grid-template-columns:minmax(0,1fr) minmax(125px,.65fr)}
 .fee-item-delete{justify-self:end}
}
@media(max-width:600px){
 .fee-workspace{padding-inline:15px}
 .fee-mode-controls{display:flex;width:100%;box-sizing:border-box}
 .fee-mode-button{flex:1;padding:11px 8px}
 .fee-period-fields{grid-template-columns:1fr}
 .fee-start-tools{flex-direction:column;align-items:stretch}
 .fee-start-tools>*{width:100%;box-sizing:border-box}
 .fee-item-top{grid-template-columns:1fr}
 .fee-item-delete{justify-self:stretch}
 .fee-people-list{grid-template-columns:1fr}
 .fee-editor-actions .button{width:100%}
 .fee-template-save>.button{width:100%}
 .fee-history-summary{align-items:flex-start}
 .fee-history-actions{width:100%}
}
@media(prefers-reduced-motion:reduce){
 .fee-mode-button{transition:none}
}

.fee-breakdown{border:1px solid #e3e3e3;border-radius:13px;padding:16px;background:#fff}
.fee-breakdown h4{font-size:1rem;margin:0 0 12px;font-weight:750}
.fee-breakdown-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:9px 0;font-size:.9rem}
.fee-breakdown-row+.fee-breakdown-row{border-top:1px solid #eee}
.fee-breakdown-row strong{white-space:nowrap;font-weight:760}

.fee-person-breakdown{margin-top:9px;font-size:.77rem}
.fee-person-breakdown summary{cursor:pointer;color:#4d4d4d;font-weight:650}
.fee-person-breakdown-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0}
.fee-person-breakdown-row strong{font-size:.77rem;white-space:nowrap}


/* Mobile billing layout fixes — the editor and saved snapshots share these rules. */
.member-table .cell-caption{display:none}
.share-target-note{
 margin:12px 0 0;
 padding:10px 14px;
 font-size:.8rem;
 line-height:1.55;
 color:#454545;
 background:#f4f4f4;
 border:1px solid #e6e6e6;
 border-radius:10px;
 overflow-wrap:anywhere;
}
.bill-action-export{font-weight:700}
.bill-actions button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:767px){
 .member-table .cell-caption{
  display:block;
  margin-bottom:5px;
  color:#666;
  font-size:.72rem;
  font-weight:500;
  line-height:1.3;
 }
 .member-table tr td:nth-child(6)::before,
 .member-table tr td:nth-child(7)::before{content:none!important}
 .member-table tr td:nth-child(6){align-items:flex-start}
 .member-table tr td:nth-child(7){align-items:flex-end}
 .member-table tr td:nth-child(7) .cell-caption{text-align:right}
 .member-table tr td:nth-child(6) .day-choice{width:min(100%,112px)}
 .member-table tr td:nth-child(7) .person-share{font-size:.99rem}
 .member-table tr td:nth-child(7) .person-days{font-size:.72rem}
 .history-head{flex-direction:column;align-items:stretch;gap:11px}
 .history-live-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:9px;width:100%}
 .history-live-actions .refresh-note{order:3;flex-basis:100%;max-width:none;line-height:1.45;margin:0}
 .bill{min-width:0}
 .bill-line{min-width:0;align-items:flex-start}
 .bill-desc{min-width:0;overflow-wrap:anywhere}
 .bill-money{flex:none;font-size:.9rem;max-width:44%;text-align:right;white-space:normal;overflow-wrap:anywhere}
 .bill-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  justify-content:stretch;
  margin-top:18px;
 }
 .bill-actions .mini{
  display:inline-flex;align-items:center;justify-content:center;
  width:100%;min-width:0;min-height:42px;
  white-space:normal;text-align:center;overflow-wrap:anywhere;
  line-height:1.25;padding:10px 9px;
 }
 .bill-detail{margin-top:16px;padding-top:6px}
 .paid-row{
  display:grid;grid-template-columns:minmax(0,1fr) auto;
  gap:12px;align-items:center;padding:13px 0;
  min-width:0;
 }
 .paid-row+.paid-row{border-top:1px solid #f0f0f0}
 .paid-row>div:first-child{min-width:0;overflow-wrap:anywhere}
 .paid-row>div:first-child strong{font-size:.83rem;line-height:1.45}
 .paid-row .payment-amount{margin-top:5px;font-size:.78rem}
 .paid-row .payment-actions{
  display:flex;align-items:flex-end;justify-content:center;
  flex-direction:column;gap:7px;min-width:0;
 }
 .paid-row .payment-badge{
  display:inline-block;
  max-width:145px;
  box-sizing:border-box;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.35;
  padding:7px 10px;
  font-size:.71rem;
 }
 .paid-row .payment-actions .mini{max-width:145px;white-space:normal;line-height:1.3}
}
@media(max-width:600px){
 #summary-panel .sum-grid{
  box-sizing:border-box;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px 12px;
  align-items:start;
  padding:17px 15px;
 }
 #summary-panel .sum-stat{width:auto;min-width:0}
 #summary-panel .sum-stat strong{
  font-size:clamp(1.12rem,4.6vw,1.55rem);
  line-height:1.3;
  overflow-wrap:anywhere;
  letter-spacing:-.04em;
 }
 #summary-panel .sum-actions{
  grid-column:1/-1;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  width:100%;min-width:0;
  gap:9px;
 }
 #summary-panel .sum-actions .button{
  box-sizing:border-box;
  display:inline-flex;
  justify-content:center;align-items:center;
  gap:5px;
  margin:0;
  width:100%;min-width:0!important;max-width:100%;
  min-height:46px;
  padding:9px 7px;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:center;
  line-height:1.25;
  font-size:clamp(.75rem,2.9vw,.87rem);
 }
 #summary-panel .sum-actions #save{grid-column:1/-1}
 #summary-panel .sum-actions .share-button svg{width:16px;height:16px;flex:none}
 #summary-panel .sum-actions .share-button span{min-width:0}
}
@media(max-width:360px){
 #summary-panel .sum-grid{padding:13px 10px;gap:12px 8px}
 #summary-panel .sum-actions{gap:7px}
 #summary-panel .sum-actions .button{font-size:.75rem;padding:9px 5px}
 .member-table tr{padding:12px 10px;gap:6px}
 .week-choice{font-size:.68rem;padding-inline:2px}
 .bill-actions{gap:7px}
 .bill-actions .mini{font-size:.73rem}
 .paid-row{gap:8px}
 .paid-row .payment-badge{max-width:115px;font-size:.67rem}
}


/* Saved multi-fee bills use the same mobile action grid as regular bills. */
@media(max-width:600px){
 .fee-history-card{min-width:0}
 .fee-history-summary{gap:10px;padding:14px}
 .fee-history-summary>div:first-child{min-width:0;overflow-wrap:anywhere}
 .fee-history-summary>strong{overflow-wrap:anywhere}
 .fee-history-actions{
  width:100%;min-width:0;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
 }
 .fee-history-actions .mini{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:0;min-height:42px;width:100%;
  padding:9px 8px;line-height:1.3;
  text-align:center;white-space:normal;overflow-wrap:anywhere;
 }
 .fee-history-details{padding:13px}
 .fee-history-payment{
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:9px;
  padding:12px 0;
 }
 .fee-history-payment>div:first-child{min-width:0;overflow-wrap:anywhere}
 .fee-history-payment-actions{
  display:flex;flex-direction:column;align-items:flex-end;
  gap:7px;max-width:145px;
 }
 .fee-history-payment-actions .payment-badge{
  box-sizing:border-box;white-space:normal;text-align:center;overflow-wrap:anywhere;
  padding:7px 10px;font-size:.7rem;line-height:1.35;
 }
 .fee-history-payment-actions .mini{white-space:normal;line-height:1.3}
}


/* Mobile-first bill action polish (2026-11): keep actions usable at narrow widths.
   This block comes last so legacy desktop styles cannot force pill overflow. */
@media(max-width:767px){
  #residents-panel,#summary-panel,.history-panel{min-width:0}
  #residents-panel .member-board{max-width:100%;min-width:0}
  #residents-panel .member-table tr{
    box-sizing:border-box;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:9px 7px;
    padding:14px 12px;
    min-width:0;
  }
  #residents-panel .member-table tr td{min-width:0;max-width:100%}
  #residents-panel .member-table .week-choice{
    box-sizing:border-box;
    width:100%;
    min-width:0;
    min-height:44px;
    height:auto;
    padding:7px 3px;
    white-space:normal;
    overflow-wrap:break-word;
    line-height:1.2;
    font-size:clamp(.69rem,2.4vw,.8rem);
    cursor:pointer;
  }
  #residents-panel .member-table tr td:nth-child(6),
  #residents-panel .member-table tr td:nth-child(7){min-width:0}
  #residents-panel .member-table .day-choice{
    box-sizing:border-box;
    min-height:42px;
    width:100%;
    max-width:130px;
    font-size:.85rem;
  }
  #residents-panel .member-table .delete-person{
    min-width:40px;min-height:40px;
    display:inline-flex;align-items:center;justify-content:center;
    border-radius:999px;
    cursor:pointer;
  }
  .history-panel .history-head,.history-panel .history-live-actions{min-width:0}
  .history-panel .bill-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .history-panel .bill-actions .mini{
    box-sizing:border-box;
    width:100%;
    min-width:0;
    min-height:44px;
    font-size:.79rem;
    line-height:1.35;
    padding:10px 8px;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .history-panel .paid-row>div{min-width:0}
  .history-panel .payment-badge{max-width:100%;line-height:1.4}
  .history-panel .payment-actions .mini{min-height:40px;max-width:100%}
}
@media(max-width:430px){
  #summary-panel .sum-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:12px;
    padding:18px 16px;
    min-width:0;
  }
  #summary-panel .sum-stat{
    min-width:0;
    width:100%;
    display:block;
  }
  #summary-panel .sum-stat+.sum-stat{
    padding-top:11px;
    border-top:1px solid #dedede;
  }
  #summary-panel .sum-stat strong{
    font-size:clamp(1.22rem,5.2vw,1.55rem);
    letter-spacing:-.035em;
    overflow-wrap:anywhere;
  }
  #summary-panel .sum-actions{
    display:grid;
    grid-column:1/-1;
    grid-template-columns:minmax(0,1fr);
    gap:9px;
    width:100%;
    min-width:0;
    margin-top:3px;
  }
  #summary-panel .sum-actions #save{grid-column:1}
  #summary-panel .sum-actions .button{
    width:100%;
    min-width:0!important;
    max-width:100%;
    min-height:46px;
    box-sizing:border-box;
    font-size:.89rem;
    line-height:1.3;
    padding:11px 14px;
    justify-content:center;
    text-align:center;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  #summary-panel .share-target-note{
    font-size:.8rem;
    margin-top:13px;
    overflow-wrap:anywhere;
  }
  .history-panel .bill{padding:15px 13px}
  .history-panel .bill-line{align-items:flex-start;gap:9px}
  .history-panel .bill-money{max-width:46%;font-size:.84rem}
  .history-panel .paid-row{grid-template-columns:minmax(0,1fr) minmax(0,auto);gap:9px}
  .history-panel .payment-actions{max-width:125px}
  .history-panel .payment-badge{font-size:.72rem;padding:7px 9px}
}


/* Full-period shortcut (28–31 calendar days, or exact meter-reading range).
   Keep 4-week choice separate: it always means 28 days. */
.member-table{min-width:950px}
.member-table .full-heading{width:103px}
.member-table .full-period-cell{padding-inline:3px}
.member-table .full-period-choice{
 display:inline-flex;flex-direction:column;align-items:center;justify-content:center;
 gap:1px;width:96px;min-height:45px;max-width:100%;
 padding:5px 6px;line-height:1.2;white-space:normal;
 cursor:pointer;
}
.member-table .full-period-days{
 display:block;font-size:.64rem;line-height:1.25;font-weight:500;
 color:inherit;opacity:.77;
}
.member-table .full-period-choice.active .full-period-days{opacity:.86}
.member-table .full-period-choice:focus-visible{
 outline:2px solid #111;outline-offset:2px;
}
@media(min-width:768px) and (max-width:1020px){
 .member-table{min-width:950px}
}
@media(max-width:767px){
 #residents-panel .member-table tr td:nth-child(6){
  grid-column:span 2;
  position:static;align-items:stretch;justify-content:center;
 }
 #residents-panel .member-table tr td:nth-child(7){
  grid-column:span 2;
  position:static;align-items:stretch;justify-content:center;
 }
 #residents-panel .member-table tr td:nth-child(8){
  position:static;top:auto;right:auto;
  grid-column:1/-1;box-sizing:border-box;
  max-width:100%;min-width:0;
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto);
  gap:3px 9px;align-items:center;
  padding-top:10px!important;margin-top:2px;
  border-top:1px solid #dedede!important;
 }
 #residents-panel .member-table tr td:nth-child(8) .cell-caption{
  grid-row:1/span 2;grid-column:1;text-align:left;margin:0;
 }
 #residents-panel .member-table tr td:nth-child(8) .person-share{
  grid-column:2;text-align:right;overflow-wrap:anywhere;white-space:normal;
 }
 #residents-panel .member-table tr td:nth-child(8) .person-days{
  grid-column:2;text-align:right;
 }
 #residents-panel .member-table tr td:nth-child(9){
  position:absolute;top:10px;right:12px;grid-column:auto;
 }
 #residents-panel .member-table tr td:nth-child(7) .day-choice{
  width:100%;max-width:none;min-height:44px;
 }
 #residents-panel .member-table tr td:nth-child(7) .cell-caption{
  text-align:left;
 }
 #residents-panel .member-table .full-period-choice{
  width:100%;min-width:0;max-width:none;min-height:44px;
  padding:5px 6px;font-size:clamp(.72rem,2.6vw,.85rem);
 }
 #residents-panel .member-table .full-period-days{font-size:.67rem}
}
@media(max-width:380px){
 #residents-panel .member-table .full-period-choice{
  font-size:.72rem;padding:5px 3px;
 }
}


/* Unified billing flow — compact on mobile, no separate multi-fee tab. */
#bill-details-panel,#summary-panel{display:none!important}
#residents-panel .share-heading,#residents-panel .share-cell{display:none!important}
#fee-mode-controls{display:none!important}
.ub-intro,.ub-add-row,.ub-summary-head,.ub-form-head,.ub-dialog-head{display:flex;align-items:end;justify-content:space-between;gap:16px}
.ub-intro{margin:0 0 16px;align-items:center}
.ub-intro h4,.ub-summary h4,.ub-form h4{margin:0;font-size:1.18rem}
.ub-intro p{margin:6px 0 0;color:var(--muted,#666);line-height:1.5}
.ub-month-label{max-width:205px;flex:0 0 205px}
.ub-add-row{align-items:end}
.ub-category{min-width:0;flex:1}
.ub-add-row>.button{flex:0 0 auto;min-height:48px}
.ub-category-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 6px}
.ub-category-actions .mini{min-height:38px}
.ub-form{border:1.5px solid #1d1d1d;border-radius:16px;margin:20px 0;padding:18px;background:var(--surface,#fff)}
.ub-form-head{align-items:center;margin-bottom:18px}
.ub-fee-field{padding:14px 0;border-top:1px solid #e9e9e9}
.ub-fee-field:first-child{border-top:0;padding-top:0}
.ub-fee-settings{display:flex;gap:10px;margin-top:9px}
.ub-fee-settings>.field{flex:1}
.ub-resident-details{margin-top:12px;border:1px solid #e4e4e4;border-radius:10px;padding:10px 12px}
.ub-resident-details summary{cursor:pointer;font-weight:650}
.ub-person-row{display:flex;align-items:center;gap:12px;margin:9px 0;min-height:40px}
.ub-person-row input[type=checkbox]{width:20px;height:20px;accent-color:#111}
.ub-person-row input[type=number]{max-width:140px;margin-left:auto}
.ub-person-row small{margin-left:auto;color:#666}
.ub-form-total,.ub-summary-total{display:flex;justify-content:space-between;gap:14px;border-top:1px solid #e4e4e4;padding:16px 0}
.ub-form-total strong{font-size:1.35rem}
.ub-summary{margin-top:22px;padding-top:20px;border-top:1px solid #dfdfdf}
.ub-summary-head{align-items:center;margin-bottom:14px}
.ub-summary-head .tag{min-width:30px;text-align:center}
.ub-list{display:grid;gap:10px}
.ub-bill-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;align-items:center;gap:10px;border:1px solid #ddd;border-radius:12px;padding:12px}
.ub-bill-row>input[type=checkbox]{height:22px;width:22px;accent-color:#141414}
.ub-bill-description{display:grid;gap:3px;min-width:0}
.ub-bill-description strong{overflow-wrap:anywhere}
.ub-bill-description small{font-size:.79rem;color:#696969;line-height:1.45}
.ub-bill-amount{white-space:nowrap;font-size:.96rem}
.ub-excluded{opacity:.54}
.ub-summary-total{background:#f6f6f6;padding:16px;border-radius:12px;margin-top:17px;border:0;flex-wrap:wrap}
.ub-summary-total>div{display:grid;gap:6px}
.ub-summary-total span{font-size:.82rem;color:#555}
.ub-summary-total strong{font-size:1.34rem}
.ub-summary-total>div:nth-child(2) strong{font-size:1.03rem;color:#555}
.ub-summary .fee-breakdown{margin:18px 0}
.ub-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ub-actions #ub-copy-last{grid-column:1/-1}
.ub-actions #ub-save{grid-column:1/-1}
.ub-type-dialog{width:min(580px,calc(100vw - 30px))}
.ub-type-dialog .og-modal__content{max-height:calc(100dvh - 52px);overflow:auto}
.ub-dialog-head{align-items:center;margin-bottom:12px}
.ub-dialog-head h3{margin:0}
.ub-type-line{display:flex;gap:8px;align-items:center;margin-bottom:10px}
.ub-type-line input{min-width:0;flex:1}
#ub-type-items{margin-bottom:16px}
#ub-type-save{width:100%;margin-top:14px}
#residents-panel .member-table{min-width:650px}
@media(max-width:680px){
 .ub-intro{display:grid}
 .ub-month-label{max-width:none;flex:auto}
 .ub-add-row{display:grid;grid-template-columns:minmax(0,1fr)}
 .ub-add-row>.button{width:100%}
 .ub-category-actions{display:grid;grid-template-columns:1fr}
 .ub-form{padding:13px;margin:15px 0}
 .ub-bill-row{grid-template-columns:22px minmax(0,1fr) auto;gap:8px}
 .ub-bill-amount{grid-column:3;grid-row:1;font-size:.87rem}
 .ub-bill-row>.mini{grid-row:2}
 .ub-bill-row>.mini:nth-last-child(2){grid-column:2}
 .ub-bill-row>.mini:last-child{grid-column:3}
 .ub-actions{grid-template-columns:1fr}
 .ub-actions>*{grid-column:auto!important}
 .ub-summary-total strong{font-size:1.16rem}
}
@media(max-width:380px){
 .ub-summary-total{display:grid}
 .ub-bill-row{padding:10px;gap:6px}
}

/* Preserve edit access for historical standalone bills without an extra main tab. */
body.legacy-edit-active #bill-details-panel,
body.legacy-edit-active #summary-panel{display:block!important}


/* Three-section authenticated workspace: keep public landing content visible only
   for signed-out visitors, without changing the underlying app or stored data. */
body.app-active .hero-wrap,
body.app-active #features,
body.app-active #stories,
body.app-active #pricing,
body.app-active .final-wrap,
body.app-active .site-footer{display:none!important}
body.app-active .nav-links,
body.app-active .nav-actions>.btn{display:none!important}
body.app-active .dashboard-wrap{min-height:calc(100vh - 86px);padding-block:28px 64px}
body.app-active .dashboard-head{margin-bottom:16px}
body.app-active .dashboard-head .tag{display:none}
body.app-active #dashboard-title{font-size:clamp(1.5rem,2.7vw,2.1rem)}
body.app-active #apartment-app{min-width:0}
.app-nav{display:flex;align-items:center;gap:7px;min-width:0}
.app-nav-link{
 display:inline-flex;align-items:center;gap:7px;
 color:#3b3b3b;text-decoration:none;white-space:nowrap;
 font-size:.82rem;font-weight:720;line-height:1.2;padding:10px 12px;
 border-radius:999px;transition:background .15s,color .15s;
}
.app-nav-link:hover,.app-nav-link:focus-visible{background:#eee;color:#111}
.app-nav-index{
 display:inline-flex;align-items:center;justify-content:center;
 width:23px;height:23px;border-radius:50%;background:#141414;color:white;
 font-size:.68rem;font-weight:800;
}
.app-nav-link:focus-visible{outline:2px solid #111;outline-offset:3px}
#owner-panel,#fee-workspace,#billing-history-panel{scroll-margin-top:104px}
body.app-active #fee-workspace{min-width:0}
body.app-active #fee-workspace>.panel-header{margin-bottom:16px}
body.app-active #fee-workspace>.panel-header h3{font-size:1.22rem}
body.app-active #fee-editor{gap:16px}
body.app-active #fee-editor>.ub-intro{
 display:flex;align-items:center;justify-content:space-between;gap:18px;
 padding:15px 17px;background:#f6f6f6;border-radius:12px;margin:0;
}
body.app-active #fee-editor>.ub-intro h4{font-size:1.02rem}
body.app-active #fee-editor>.ub-intro p{font-size:.79rem;color:#666;line-height:1.4;max-width:48ch}
body.app-active #fee-editor .ub-month-label{min-width:175px;max-width:220px}
.bill-days-step{display:block;min-width:0;border:1px solid #dedede;border-radius:12px;background:#fff;overflow:clip}
.bill-days-toggle{
 cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:14px;
 min-height:74px;padding:17px;list-style:none;user-select:none;
}
.bill-days-toggle::-webkit-details-marker{display:none}
.bill-days-toggle:hover{background:#fafafa}
.bill-days-toggle:focus-visible{outline:2px solid #141414;outline-offset:-2px}
.bill-days-toggle-title{display:grid;gap:5px;min-width:0}
.bill-days-toggle-title strong{font-size:1.02rem;font-weight:760}
.bill-days-toggle-title small{font-size:.78rem;color:#777}
.bill-days-toggle-side{display:flex;align-items:center;gap:16px;flex:0 0 auto}
.bill-days-count{font-size:.78rem;color:#555;font-weight:650;white-space:nowrap}
.bill-days-chevron{width:9px;height:9px;border:solid #333;border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .2s}
.bill-days-step[open] .bill-days-chevron{transform:rotate(225deg)}
.bill-days-step[open]>.bill-days-toggle{border-bottom:1px solid #e8e8e8}
body.app-active .bill-resident-board.panel{margin:0;padding:16px;border:0;box-shadow:none;border-radius:0;background:transparent}
body.app-active .bill-resident-board>.panel-header{display:none}
body.app-active .bill-resident-board>.table-intro{margin-top:0}
body.app-active .bill-resident-board .member-board{margin:0}
.bill-stage-heading{padding-top:20px;border-top:1px solid #ececec;display:grid;gap:5px}
.bill-stage-heading h4{margin:0;font-size:1.07rem;font-weight:780;letter-spacing:-.015em}
.bill-stage-heading p{margin:0;color:#737373;font-size:.8rem;line-height:1.5}
body.app-active #fee-editor>.ub-summary{margin:0;padding:0;border:0}
body.app-active #fee-editor .ub-summary-head{margin:0 0 10px}
body.app-active #fee-editor .ub-add-row{margin-top:0}
body.app-active #fee-editor .ub-category-actions{margin-top:0}
body.app-active #fee-editor #ub-save{min-height:48px}
body.app-active #fee-editor .fee-breakdown{margin:16px 0}
body.app-active #billing-history-panel{min-width:0}
body.app-active #bill-history-current{margin:0 0 20px;padding:0;border:0}
body.app-active #bill-history-current .fee-history-head{margin:0 0 12px}
body.app-active #bill-history-current .fee-history-head h4{font-size:.91rem;margin:0}
body.app-active #bill-history-current .fee-history-head p,
body.app-active #bill-history-current #fee-refresh{display:none!important}
.bill-history-group-title{font-size:.91rem;font-weight:760;margin:14px 0 12px}
.bill-history-empty{padding:12px 0 6px}
.bill-legacy-history .history{margin-top:0}
@media(max-width:1040px){
 .app-nav-link{padding:9px 8px;font-size:.75rem}
}
@media(max-width:850px){
 body.app-active .header-inner{flex-wrap:wrap;gap:8px;padding-block:8px}
 body.app-active .header-inner>.brand{flex:1}
 body.app-active .header-inner>.nav-actions{margin-left:auto}
 .app-nav{order:5;width:100%;justify-content:space-between;border-top:1px solid #ededed;padding-top:5px;gap:4px}
 .app-nav-link{flex:1;justify-content:center;padding:9px 3px;font-size:.75rem;gap:6px}
 .app-nav-index{width:21px;height:21px;flex:0 0 21px}
 body.app-active .dashboard-wrap{padding-block:22px 45px}
}
@media(max-width:680px){
 body.app-active #fee-editor>.ub-intro{display:grid;gap:10px;padding:14px}
 body.app-active #fee-editor .ub-month-label{min-width:0;max-width:none}
 .bill-days-toggle{padding:14px 12px;min-height:65px;gap:8px}
 .bill-days-toggle-title strong{font-size:.92rem}
 .bill-days-toggle-title small{font-size:.72rem}
 .bill-days-toggle-side{gap:9px}
 .bill-days-count{font-size:.7rem;white-space:normal;text-align:right;max-width:112px}
 body.app-active .bill-resident-board.panel{padding:12px}
 body.app-active .bill-resident-board .member-board{overflow:visible}
 body.app-active .bill-resident-board .member-table{min-width:0!important;width:100%;display:block}
 body.app-active .bill-resident-board .member-table tbody{display:grid;gap:10px}
 body.app-active .bill-resident-board .member-table tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:12px 9px}
 body.app-active .bill-resident-board .member-table td:nth-child(8){display:none!important}
 body.app-active .bill-resident-board .member-table td:nth-child(9){
  position:absolute;top:8px;right:7px;width:40px;align-items:center
 }
 body.app-active .bill-resident-board .member-table td:nth-child(6),
 body.app-active .bill-resident-board .member-table td:nth-child(7){grid-column:span 2}
 body.app-active .bill-resident-board .member-table .week-choice{min-width:0;width:100%;padding:7px 2px}
 body.app-active .bill-resident-board .member-table .full-period-choice{min-height:48px}
 body.app-active .bill-resident-board .member-table .delete-person{min-width:36px;min-height:36px}
 .bill-stage-heading{padding-top:16px}
 .bill-stage-heading h4{font-size:.99rem}
 #billing-history-panel .history-head{gap:12px}
 #billing-history-panel .history-live-actions{max-width:100%}
}
@media(max-width:380px){
 .app-nav-link{font-size:.69rem;gap:4px}
 .app-nav-index{width:19px;height:19px;flex-basis:19px;font-size:.62rem}
 .bill-days-toggle-side{gap:5px}
 .bill-days-count{max-width:82px}
}

/* At the 681–767px tablet range, preserve the card layout and keep the
   delete button anchored to the resident row's top-right (ninth cell). */
@media(min-width:681px) and (max-width:767px){
 body.app-active .bill-resident-board .member-table{min-width:0!important;display:block}
 body.app-active .bill-resident-board .member-table td:nth-child(8){display:none!important}
 body.app-active .bill-resident-board .member-table td:nth-child(9){
  position:absolute;top:10px;right:9px;min-width:38px;min-height:38px;
  display:flex;align-items:center;justify-content:center
 }
 body.app-active .bill-resident-board .member-table tr td:nth-child(6),
 body.app-active .bill-resident-board .member-table tr td:nth-child(7){grid-column:span 2}
}


/* 2026 unified UI polish: preserve the approved resident-days table. */
body.app-active .dashboard-head{display:none!important}
body.app-active .apartment-toolbar{
 display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;
 gap:19px;padding:clamp(18px,2.6vw,28px);
 border:1px solid #e1e1e1;border-radius:20px;
 box-shadow:0 5px 22px rgba(0,0,0,.035);
}
.apartment-card-head{
 display:flex;align-items:center;justify-content:space-between;gap:16px;
 padding:0 0 16px;border-bottom:1px solid #ededed
}
.apartment-card-head .section-kicker{margin-bottom:8px}
.apartment-card-head h2{font-size:clamp(1.25rem,2.2vw,1.65rem);margin:0 0 5px!important;letter-spacing:-.04em}
.apartment-card-head p{font-size:.81rem;line-height:1.5;color:#707070;margin:0}
.apartment-card-main{display:flex;gap:18px;align-items:center;justify-content:space-between;min-width:0}
body.app-active .apartment-current{min-width:0}
body.app-active .apartment-current h3{
 font-size:clamp(1.35rem,2.8vw,1.9rem);letter-spacing:-.035em;line-height:1.2;
 margin:4px 0 12px;overflow-wrap:anywhere;
}
body.app-active .apartment-card-main .meta-row{gap:7px}
body.app-active .apartment-card-main .meta-row .tag{
 display:inline-flex;align-items:center;min-height:31px;
 background:#f3f3f3;border-radius:999px;font-size:.75rem;padding:5px 12px;
}
body.app-active .apartment-switcher{display:block;flex:0 1 300px;min-width:200px}
body.app-active .apartment-switcher .control{
 width:100%;min-width:0;max-width:none;border-radius:12px;
 min-height:46px;background:#fff;white-space:nowrap;text-overflow:ellipsis;
}
.apartment-card-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
body.app-active .apartment-card-actions .mini{
 min-height:40px;border-radius:11px;padding:9px 15px;
 font-size:.78rem;background:#fff;border:1px solid #d9d9d9;
}
body.app-active .apartment-card-actions .mini:hover{background:#f6f6f6}
body.app-active #owner-panel,
body.app-active #fee-workspace,
body.app-active #billing-history-panel{border-radius:20px;box-shadow:0 5px 22px rgba(0,0,0,.035)}
/* Uniform, restrained input vocabulary matching the simple UI examples. */
body.app-active #fee-editor .control,
body.app-active #fee-editor .button,
body.app-active #fee-editor .mini,
body.app-active #fee-editor .ub-bill-row{
 transition:border-color .17s ease,background-color .17s ease,box-shadow .17s ease,transform .17s ease
}
body.app-active #fee-editor .control{
 border:1px solid #d8d8d8;border-radius:12px;
 min-height:46px;background:#fff;color:#171717;font-size:.9rem;
}
body.app-active #fee-editor .control:focus{
 border-color:#505050;outline:none;box-shadow:0 0 0 3px rgba(0,0,0,.095);
}
body.app-active #fee-editor .button{border-radius:12px;min-height:46px}
body.app-active #fee-editor .mini{border-radius:10px;padding:10px 14px}
body.app-active #fee-editor>.ub-intro{
 background:#f7f7f7;border:1px solid #eee;border-radius:16px;
 display:flex;gap:20px;align-items:center;padding:18px;
}
body.app-active #fee-editor>.ub-intro>div:first-child{flex:1;min-width:0}
body.app-active .ub-period-tools{
 display:grid;grid-template-columns:minmax(0,1fr);gap:10px;
 width:min(100%,300px);flex:0 0 300px;
}
body.app-active .ub-period-tools .ub-month-label{max-width:none!important;min-width:0!important;flex:none}
body.app-active .ub-copy-previous{
 width:100%;min-width:0;white-space:normal;
 justify-content:center;font-size:.79rem;padding:10px 13px;border:1px solid #d9d9d9;
 background:#fff;color:#111;
}
body.app-active .ub-copy-previous svg,
body.app-active .ub-actions svg{width:17px;height:17px;flex:none}
body.app-active #fee-editor .ub-form{
 border:1px solid #dedede;border-radius:18px;padding:clamp(15px,2.4vw,23px);
 background:#fff;box-shadow:0 9px 25px rgba(0,0,0,.035);
}
body.app-active .ub-form-head{align-items:center;margin-bottom:17px}
body.app-active .ub-form-head h4{font-size:1.17rem;font-weight:800}
body.app-active #ub-form-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body.app-active #ub-form-items .ub-fee-field{
 padding:14px;margin:0;background:#fafafa;
 border:1px solid #ececec;border-radius:13px;min-width:0;
}
body.app-active .ub-fee-field .field{display:grid;gap:8px}
body.app-active .ub-fee-field .field>span{
 font-size:.8rem;font-weight:680;line-height:1.5;min-height:2.4em;
}
body.app-active .ub-group-rule{
 grid-column:1/-1;display:grid;gap:11px;
 margin-top:3px;padding-top:17px;border-top:1px solid #ebebeb;
}
body.app-active .ub-group-method{display:grid;gap:8px}
body.app-active .ub-group-method>span{font-size:.82rem;font-weight:740}
body.app-active .ub-default-note{
 display:flex;align-items:flex-start;gap:12px;padding:14px 16px;
 border:1px solid #e8e8e8;border-radius:13px;background:#f7f7f7;
}
body.app-active .ub-note-check{
 flex:0 0 22px;width:22px;height:22px;display:grid;place-items:center;
 border-radius:50%;background:#181818;color:#fff;font-size:.75rem;font-weight:850;
}
body.app-active .ub-note-content{display:grid;gap:4px;min-width:0}
body.app-active .ub-note-content strong{font-size:.84rem;font-weight:760}
body.app-active .ub-note-content small{font-size:.78rem;color:#646464;line-height:1.55}
body.app-active .ub-legacy-note{border:1px solid #dedede;border-radius:12px;background:#fafafa;padding:13px;font-size:.82rem;line-height:1.55}
body.app-active .ub-resident-details{
 border:1px solid #e2e2e2;border-radius:13px;background:#fff;
 padding:12px 14px;margin:0;
}
body.app-active .ub-resident-details>summary{font-size:.82rem}
body.app-active .ub-group-people{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px;
}
body.app-active .ub-group-people .ub-person-row{
 border:1px solid #ececec;border-radius:11px;background:#fafafa;
 padding:10px 12px;margin:0;min-width:0;
}
body.app-active .ub-person-row>span{min-width:0;overflow-wrap:anywhere;font-size:.8rem}
body.app-active .ub-group-people input[type=number]{max-width:110px;min-width:70px}
body.app-active .ub-form-total{padding:17px 0;align-items:center;margin-top:5px}
body.app-active #fee-editor .ub-bill-row:hover{border-color:#bfbfbf;background:#fafafa}
body.app-active #fee-editor .ub-summary-total{
 background:#f7f7f7;border:1px solid #ececec;border-radius:15px;
}
body.app-active .ub-actions{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;
 border-top:1px solid #ededed;padding-top:18px;
}
body.app-active .ub-actions #ub-save{
 grid-column:1/-1;grid-row:1;min-height:50px;width:100%;
}
body.app-active .ub-actions #ub-copy-result,
body.app-active .ub-actions #ub-share{
 display:flex;justify-content:center;align-items:center;gap:9px;
 width:100%;min-width:0;padding:11px 12px;line-height:1.35;white-space:normal;
}
body.app-active .ub-actions .button:disabled{opacity:.5;box-shadow:none;transform:none}
body.app-active #ub-info{text-align:center;font-size:.71rem;line-height:1.7;color:#777}
body.app-active #ub-type-dialog .control{border-radius:12px}
@media(max-width:900px){
 body.app-active .apartment-card-main{align-items:flex-start}
}
@media(max-width:680px){
 body.app-active .apartment-toolbar{padding:17px;gap:16px}
 .apartment-card-head{padding-bottom:13px}
 .apartment-card-main{display:grid;gap:14px}
 body.app-active .apartment-switcher{width:100%;min-width:0}
 .apartment-card-actions .mini{flex:1;justify-content:center}
 body.app-active #fee-editor>.ub-intro{display:grid;gap:13px}
 body.app-active #fee-editor>.ub-intro>div:first-child{width:100%}
 body.app-active .ub-period-tools{width:100%;grid-template-columns:1fr;flex:auto}
 body.app-active #ub-form-items{grid-template-columns:1fr}
 body.app-active .ub-fee-field .field>span{min-height:0}
 body.app-active .ub-group-people{grid-template-columns:1fr}
 body.app-active .ub-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.app-active .ub-actions #ub-save{grid-column:1/-1!important}
 body.app-active .ub-actions #ub-copy-result,
 body.app-active .ub-actions #ub-share{grid-column:auto!important}
}
@media(max-width:390px){
 body.app-active .ub-actions{grid-template-columns:1fr}
 body.app-active .ub-actions #ub-save,
 body.app-active .ub-actions #ub-copy-result,
 body.app-active .ub-actions #ub-share{grid-column:1/-1!important}
}
@media(prefers-reduced-motion:reduce){
 body.app-active #fee-editor .control,
 body.app-active #fee-editor .button,
 body.app-active #fee-editor .mini{transition:none}
}
