:root{font-family:ui-rounded,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#191919;background:#f8f5ef;font-synthesis:none}*{box-sizing:border-box}body{margin:0}.brand,main,body>footer{max-width:680px;margin:auto;padding:24px}.brand{display:flex;align-items:center;justify-content:space-between;gap:16px}.brand a{font-size:26px;font-weight:800;color:inherit;text-decoration:none}.brand span{font-size:13px}.brand a span{color:#387c59;font-size:30px}h1{font-size:clamp(28px,7vw,40px);line-height:1.12;overflow-wrap:anywhere;margin:12px 0 20px}h2{font-size:20px;margin:0 0 16px}p{line-height:1.55}.muted,small{color:#62615d}.card{background:#fff;border:2px solid #191919;border-radius:24px;box-shadow:5px 6px 0 #191919;padding:22px;margin:20px 5px 28px 0}.hero{background:#ece3fc}.eyebrow{font-size:12px;letter-spacing:.12em;text-transform:uppercase;font-weight:750}.amount{font-size:clamp(26px,8vw,44px);font-weight:800;overflow-wrap:anywhere}.row{display:flex;align-items:center;justify-content:space-between;gap:14px}.row>*{min-width:0}.stack{display:grid;gap:12px}.participants{display:flex;flex-wrap:wrap;gap:8px}.person{display:inline-flex;align-items:center;gap:7px;border:1px solid #c8c2b8;background:#f8f5ef;border-radius:24px;padding:6px 10px;overflow-wrap:anywhere}.avatar{display:grid;place-items:center;background:#d5ebdc;border-radius:50%;width:28px;height:28px;flex-shrink:0;font-weight:700}.item{border-top:1px solid #ddd;padding:14px 0;align-items:start}.item:first-of-type{border-top:0}.item label{display:flex;align-items:start;gap:12px;min-height:44px;flex:1;cursor:pointer}.item label span{overflow-wrap:anywhere}.item .price{white-space:nowrap;font-variant-numeric:tabular-nums}input[type=checkbox]{accent-color:#191919;width:24px;height:24px;flex-shrink:0;margin:2px 0}input:not([type=checkbox]),select,textarea{width:100%;font:inherit;font-size:16px;border:2px solid #45433e;border-radius:12px;background:#f8f5ef;color:inherit;padding:12px;min-height:48px}label{font-weight:600;display:block;margin-bottom:6px}button,.button{font:inherit;font-weight:700;border:2px solid #191919;border-radius:14px;background:#191919;color:white;padding:12px 18px;min-height:48px;cursor:pointer;text-align:center;text-decoration:none;display:inline-block}button.secondary{background:#f8f5ef;color:#191919}button:disabled,input:disabled,select:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible,a:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #7443bf;outline-offset:4px}.actions{display:flex;gap:10px;flex-wrap:wrap}.actions>*{flex:1}.status{display:inline-flex;gap:8px;align-items:center;font-size:13px}.status::before{content:"";width:8px;height:8px;background:#63846b;border-radius:50%}.notice{border-inline-start:4px solid #875c17;background:#fff1d2;padding:16px;border-radius:8px;margin:16px 0;overflow-wrap:anywhere}.error{background:#ffe8e4;border-color:#ad3721}.success{background:#deefe1;border-color:#347747}body>footer{font-size:13px;color:#62615d;text-align:center}summary{cursor:pointer;min-height:44px;display:list-item;font-weight:650;padding:12px 0}pre{white-space:pre-wrap;overflow-wrap:anywhere}textarea{min-height:96px}button.small{font-size:14px;padding:8px 12px}.pending{background:#fff1d2}a{color:#305c46}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:380px){.brand,main{padding:18px}.brand>span{display:none}.card{padding:18px}.item{flex-wrap:wrap}.item .price{margin-inline-start:36px}.actions{flex-direction:column}}@media(prefers-reduced-motion:no-preference){button{transition:background-color .15s}/* KK-156 (Carl's lap): iOS keeps :hover after a tap, so a tapped light button stayed dark. Hover is a mouse thing. */@media(hover:hover) and (pointer:fine){button:hover:not(:disabled){background:#38352f}button.secondary:hover:not(:disabled),.assign:hover:not(:disabled){background:#ece6da}}}[hidden]{display:none!important}

.card form{margin-bottom:12px}@media(max-width:380px){.item label{flex-basis:100%}}

.row button{flex-shrink:0}

.receipt-mask,.receipt-image{display:block;max-width:100%;height:auto;border:1px solid #888;border-radius:8px;margin:12px 0}.receipt-mask{touch-action:none;cursor:crosshair}

/* Amounts and URLs keep a stable reading order within the Arabic page. */
.amount,.price,.money-value{direction:ltr;unicode-bidi:isolate;text-align:start}
:root[dir=rtl] .amount,:root[dir=rtl] .price,:root[dir=rtl] .money-value{text-align:right}
:root[dir=rtl] .card{box-shadow:-5px 6px 0 #191919;margin-left:0;margin-right:5px}
.brand a{direction:ltr;unicode-bidi:isolate}

.avatar{position:relative;overflow:hidden}.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* Expense Editor parity (KK-123): chips, field boxes, participants, receipt lines, bottom bar. */
main.editor{padding-bottom:120px}
.editor-head{margin:4px 5px 16px 0}
.chips{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:flex-end}
.chip-group{display:grid;gap:4px}
.chip-label{font-size:13px;color:#62615d;font-weight:600}
.chip,select.chip{display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border:2px solid #191919;border-radius:14px;background:#f6f1e7;color:#191919;font-weight:700;font-size:17px;width:auto;box-shadow:2px 3px 0 #191919}
select.chip{padding-inline-end:10px}
.chip-group .small{margin-top:4px}
.editor-status{margin:12px 0 4px;font-size:14px;color:#62615d;display:flex;flex-wrap:wrap;gap:4px}
.ok{color:#2f7d4f;font-weight:700}.warn{color:#875c17;font-weight:700}
.live{margin-top:6px}
.field-card{padding:18px 20px}
.field-label{margin:0 0 8px;font-size:15px;color:#62615d;font-weight:600}
.field-box{display:block;background:#e8f0fb;border-radius:12px;padding:12px 14px;font-weight:800;border:0;min-height:52px}
h1.field-box.title{font-size:clamp(24px,6.5vw,34px);margin:0;line-height:1.15}
.amount-row{display:flex;align-items:center;justify-content:center;gap:12px}
.currency-badge{display:grid;place-items:center;min-width:56px;height:56px;padding:0 10px;border:2px solid #191919;border-radius:14px;background:#f6f1e7;font-weight:800;font-size:20px;box-shadow:2px 3px 0 #191919}
.amount-row .amount{font-size:clamp(30px,9vw,44px);padding:6px 16px;min-height:0}
.converted{text-align:center;margin:10px 0 0}
.participant{padding:10px 0;align-items:center} /* KK-147: no rule between people (Carl's lap) */
.participant .person{border:0;background:transparent;padding:0;gap:12px}
.participant .avatar{width:40px;height:40px;font-size:17px}
.stack.tight{gap:2px}
.share-form{display:flex;gap:8px;align-items:center;margin:0;flex-wrap:wrap;justify-content:flex-end}
.share-form input.field-box{width:120px;text-align:end;font-size:18px;padding:10px 12px;min-height:48px}
.allocated{margin:12px 0 0;display:flex;align-items:center;gap:8px}.allocated::before{content:"✓";display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#2f7d4f;color:#fff;font-size:14px}
.hint{margin-top:-8px}
.lines{display:grid}
.line{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-top:1px solid #e4e0d8;cursor:pointer;min-height:56px}
.line:first-child{border-top:0}
.line input[type=checkbox]{appearance:none;-webkit-appearance:none;width:26px;height:26px;border:2px solid #191919;border-radius:50%;margin:0;display:grid;place-items:center;flex-shrink:0;background:#fff}
.line input[type=checkbox]:checked{background:#2f7d4f;border-color:#2f7d4f}
.line input[type=checkbox]:checked::after{content:"✓";color:#fff;font-weight:800;font-size:15px}
.line.mine{background:#f0f7f2;margin:0 -12px;padding-inline:12px;border-radius:12px}
.line-text{display:grid;gap:2px;flex:1;min-width:0}.line-text bdi{font-size:18px;overflow-wrap:break-word;text-wrap:balance} /* KK-147: one size, balanced lines, never split inside a word that fits */
.line .price{font-weight:600;color:#62615d;text-align:end;white-space:nowrap}
.line.rest{cursor:default}.line.rest .line-text span{font-size:18px}
/* KK-154: the payer's one door, at the bottom of the bill. */
.payer-door{display:grid;gap:12px;margin:8px 0 16px}

.bottom-bar{position:sticky;bottom:0;display:flex;gap:10px;padding:12px 0 16px;background:linear-gradient(to top,#f8f5ef 70%,rgba(248,245,239,0));z-index:2}
.bottom-bar button{flex:1;min-height:56px;border-radius:18px;font-size:18px}
.lobby-title{font-size:22px;font-weight:800;margin:0;overflow-wrap:break-word;text-wrap:balance}
button.small{min-height:40px}
:root[dir=rtl] .chip,:root[dir=rtl] .currency-badge{box-shadow:-2px 3px 0 #191919}
.chips{align-items:flex-start}
.participant{flex-wrap:wrap}.participant .person{flex:1;min-width:140px}.participant .person bdi{overflow-wrap:normal}.share-form{margin-inline-start:auto}
#qr-page-heading:focus{outline:none}
.own-share{display:grid;gap:6px;justify-items:end}.own-share .amount{font-size:20px}

.amount-with-percent{display:grid;justify-items:end;gap:2px}.percent-label{color:#62615d;font-weight:600}.share-form input.percent{width:72px}.equal-row{margin-top:12px;align-items:center}.equal-row small{flex:1}
.category-row{margin:-8px 5px 20px 0}.chip.category{gap:6px}

/* KK-131 parity round two: the app logo, a payer tree, inline share boxes, claim assignment, photo lightbox. */
.brand a{display:inline-flex;align-items:center;gap:10px}.brand .logo{width:36px;height:36px;border-radius:9px;box-shadow:1px 2px 0 #191919;border:1.5px solid #191919}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;flex-wrap:wrap}.card-head h2{margin:0}.card-head .actions{flex:0 0 auto;display:flex;gap:8px}.card-head .actions>*{flex:0 0 auto}
.participant{gap:10px;flex-wrap:wrap;align-items:center}.participant .person{align-items:center;min-width:100px;flex:1 1 100px;gap:8px}.participant .avatar{width:34px;height:34px;font-size:14px}.participant .person .stack{min-width:auto}.participant .person bdi{display:block;overflow-wrap:break-word;text-wrap:balance} /* KK-147: a name is never cut to '...'; it wraps between words */
.participant.branch{position:relative;padding-inline-start:18px}.participant.branch::before{content:"";position:absolute;inset-inline-start:5px;top:-8px;bottom:50%;border-inline-start:2px solid #d9d4ca;border-bottom:2px solid #d9d4ca;border-end-start-radius:10px;width:9px}.participant.branch.last-branch::before{bottom:auto;height:calc(50% + 8px)}
.participant.branch+.participant.branch::before{top:-14px}
.share-fields{display:flex;gap:4px;align-items:center;flex:0 0 auto;margin-inline-start:auto;flex-wrap:nowrap;justify-content:flex-end}.share-col{display:grid;gap:4px;justify-items:end}
.unit-box{display:inline-flex;gap:3px;background:#e8f0fb;border-radius:12px;padding:0 6px;min-height:44px;align-items:center}.unit-box input{width:3ch;min-width:1.6ch;background:transparent;border:0;padding:8px 0;min-height:44px;font-weight:800;font-size:15px;text-align:end;color:inherit}.unit-box input:focus-visible{outline:none}.unit-box:focus-within{outline:3px solid #7443bf;outline-offset:2px}.unit-box .unit{color:#62615d;font-weight:600;font-size:12px}.card.participants{display:block;padding-inline:16px}.unit-box.readonly{background:#f1ede4}.unit-box .value{font-weight:800;font-size:15px;padding:8px 0}
.converted-line{font-size:14px;color:#62615d;text-align:end;font-variant-numeric:tabular-nums}
.clear-share{width:22px;height:22px;border-radius:50%;border:0;background:#e1ddd4;color:#62615d;padding:0;min-height:0;font-size:13px;line-height:1;display:grid;place-items:center;align-self:center;flex:0 0 auto}@media(hover:hover) and (pointer:fine){.clear-share:hover:not(:disabled){background:#c9c3b8}}
/* KK-156 (Carl's lap): "Who paid?" in the page's top-right corner, one compact line. */
.top-controls{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin:0 0 12px}
.top-controls .chip-label{font-size:14px}
.top-controls select.chip{min-height:38px;padding:4px 10px;font-size:15px;max-width:60%}
/* KK-156: every row keeps the clear button's place, so the boxes line up; read-only figures sit at the end. */
.clear-slot{width:22px;flex:0 0 22px}
.unit-box .value{display:inline-block;text-align:end}
.share-form{flex-wrap:nowrap;margin:0;gap:4px}
.allocated.fully{margin-top:14px;font-weight:700;color:#62615d}
.left-line{margin:12px 0 0;color:#875c17;font-weight:700}
.status-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px}
.line .assign{width:34px;height:34px;border-radius:50%;padding:0;min-height:0;background:#f6f1e7;color:#191919;border:2px solid #191919;flex:0 0 auto;display:grid;place-items:center}
.line .assign svg{display:block;transition:transform .15s}
.line .assign[aria-expanded=true] svg{transform:rotate(180deg)}
@media(prefers-reduced-motion:reduce){.line .assign svg{transition:none}}
.lines-head{display:flex;justify-content:flex-end;margin:2px 0 -6px}
.who-else{font-size:12px;letter-spacing:.04em;text-transform:uppercase;font-weight:700;color:#62615d;padding-inline-end:4px}
.recovery-row{justify-content:flex-end;margin:4px 5px 8px 0}
.recovery-row .recovery-link{flex:0 0 auto}
.popover{border:2px solid #191919;border-radius:16px;background:#fff;box-shadow:4px 5px 0 #191919;padding:14px 16px;margin:6px 0 12px}.popover h3{margin:0 0 8px;font-size:16px}.popover label{display:flex;align-items:center;gap:12px;min-height:44px;font-weight:600;margin:0}.popover input[type=checkbox]{width:24px;height:24px;margin:0}
.photos{display:flex;gap:10px;flex-wrap:wrap;margin:4px 0 8px}.photo-thumb{border:2px solid #191919;border-radius:12px;padding:0;background:#fff;width:96px;height:96px;overflow:hidden;min-height:0;box-shadow:3px 4px 0 #191919}.photo-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.lightbox{position:fixed;inset:0;background:rgba(20,18,14,.92);display:grid;place-items:center;z-index:20;padding:24px}.lightbox img{max-width:100%;max-height:100%;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.5)}.lightbox .close{position:absolute;top:16px;inset-inline-end:16px;width:44px;height:44px;border-radius:50%;padding:0;min-height:0;background:#fff;color:#191919;font-size:20px}
.line.pressing{background:#f0ede6}
@media(max-width:380px){.participant{flex-wrap:wrap}.participant .person{flex-basis:100%}.share-fields{margin-inline-start:auto}.unit-box input{font-size:16px}.participant.branch{padding-inline-start:20px}}
.describe-row{display:flex;align-items:center;gap:12px}.describe-row .title{flex:1;min-width:0}
.merchant-logo{width:46px;height:46px;border-radius:12px;object-fit:contain;background:#fff;border:1.5px solid #e4e0d8;flex:0 0 auto;padding:3px}
.category-icon{width:26px;height:26px;object-fit:contain;display:block}
.chip.category{padding-inline-start:8px}
.lines-head{display:flex;align-items:baseline;gap:10px;margin:6px 0 0;font-size:12px;letter-spacing:.04em;text-transform:uppercase;font-weight:700;color:#62615d}
.lines-head .col-item{flex:1;padding-inline-start:38px}.lines-head .col-price{text-align:end}.lines-head .col-who{width:34px;text-align:center;flex:0 0 auto}
.payer-row{margin-top:14px;gap:10px}.payer-row .chip-label{margin:0}
.pay-screen{background:#ece3fc}.pay-screen .amount{margin:0 0 18px}
.pay-screen button,.pay-screen .button{width:100%;margin-top:10px}
/* KK-147 (Carl's lap, 2026-09-23): the lobby is who invites you, the bill, and a join row: a round
   selfie button beside the name, then the button and one line on who sees what. */
.lobby h1{font-size:clamp(24px,6vw,30px);line-height:1.2;margin:0 0 16px;overflow-wrap:break-word;text-wrap:balance}
.lobby-bill{display:flex;align-items:center;gap:12px;margin:0 0 14px}.lobby-bill .lobby-title{flex:1;min-width:0}
.lobby .category-row{margin:0 0 12px}.lobby .amount{margin:0 0 18px}
.join-who{display:flex;align-items:flex-end;gap:12px;margin:0 0 14px}.join-name{flex:1;min-width:0}
.selfie{width:64px;height:64px;border-radius:50%;border:2px dashed #45433e;background:#f8f5ef;display:grid;place-items:center;cursor:pointer;margin:0;flex:0 0 auto;overflow:hidden;color:#191919}
.selfie:focus-within,.join-who input[type=file]:focus-visible+.selfie{outline:3px solid #7443bf;outline-offset:3px}
.selfie .photo-preview{width:100%;height:100%;object-fit:cover}.selfie:has(.photo-preview){border-style:solid}
.join-form button[type=submit]{width:100%}.fine-print{font-size:13px;margin:10px 0 0;text-align:center}
/* The creditor's side of the same screen: one row per person, a tick and a cross. */
.screen{display:block}
.screen-back{width:100%;margin-top:14px}
.confirm-row{gap:12px;padding:14px 0;border-top:1px solid #d9cfee;align-items:center}
.confirm-row:first-of-type{border-top:0}
.confirm-row .person{flex:1;min-width:0;display:grid;gap:2px}
.confirm-row .person bdi{font-size:18px;overflow-wrap:anywhere}
.confirm-row .person small{color:#62615d}.confirm-row .person small.ok{color:#2f7d4f}
.confirm-row .person{border:0;background:transparent;padding:0;gap:10px;display:flex;align-items:center}
.confirm-row .avatar{width:38px;height:38px;font-size:16px}
.confirm-row .person .stack{min-width:0;flex:1}
.marks{display:flex;gap:10px;flex:0 0 auto}
/* Morning (Carl, 2026-09-18): ink outline, offset ink shadow, the app's own green and cream. */
.marks .mark{width:46px;height:46px;min-height:0;padding:0;border-radius:14px;font-size:19px;font-weight:800;line-height:1;box-shadow:2px 3px 0 #191919}
.marks .mark.yes{background:#2fb877;color:#191919;border-color:#191919}
.marks .mark.no{background:#faf6ef;color:#191919}
.pay-screen button,.pay-screen .button{border-radius:16px;box-shadow:3px 4px 0 #191919}
.pay-screen button:disabled{box-shadow:none}
/* The answer to "did you pay?", in the one place the question was asked. */
.pay-screen button.done{background:#2fb877;color:#191919;border-color:#191919;opacity:1;box-shadow:2px 3px 0 #191919}
.app-open{display:inline-flex!important;align-items:center;justify-content:center;gap:10px}
.app-open svg{flex:0 0 auto}
:root[dir=rtl] .marks .mark,:root[dir=rtl] .pay-screen button,:root[dir=rtl] .pay-screen .button,:root[dir=rtl] .pay-screen button.done{box-shadow:-2px 3px 0 #191919}
/* KK-144: a value to carry into another app by hand, with its copy button beside it. The button must
   NOT inherit the pay screen's full-width rule — in a flex row that squeezed the value itself to zero
   width, so the IBAN was on the page and unreadable. */
.copy-row{gap:12px;margin-top:10px;align-items:center}
.copy-row .money-value{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.pay-screen .copy-row button.copy{width:auto;margin-top:0;flex:0 0 auto;min-height:40px}
.lead{font-size:20px;font-weight:700;line-height:1.35;margin:0;text-wrap:balance} /* KK-147: the first thing to do, not a balance */
/* KK-148 (Carl's lap, 2026-09-23): a long name next to a typed share pushed the boxes over the name and
   the clear button out of the card. The name keeps its longest word's width; the boxes move to the next
   line instead of overlapping it. */
.participant .person{min-width:auto;flex:1 1 auto}.participant .share-fields{flex-wrap:nowrap;max-width:100%}
.selfie-field{display:grid;justify-items:center;gap:6px}.selfie-caption{font-weight:600;font-size:15px}
.rest-row{gap:10px;align-items:center}.rest-row p{margin:0}.undo-rest{flex:0 0 auto}
/* KK-149: a line someone has paid for is taken — shown, never tickable (outside an adjustment). */
.line.closed{cursor:default;opacity:.62}.line.closed input[type=checkbox]{border-style:dashed}
/* KK-157: payment apps with their official logos. On a light button the logo sits on white, as each brand
   asks; on the dark Open button it gets a small white plate (Swish: a coloured background needs a white plate). */
.actions.pay-methods{display:grid;grid-template-columns:1fr;gap:12px}
.pay-method{display:flex;align-items:center;justify-content:flex-start;gap:14px;width:100%;text-align:start;padding-inline:18px}
.pay-method .pay-logo{min-width:30px}
.pay-logo{height:26px;width:auto;flex:0 0 auto;display:block}
.pay-logo.venmo{height:16px}.pay-logo.bank{height:22px;width:22px}
.button.app-open .pay-logo:not(.bank){background:#fff;border-radius:6px;padding:3px;height:28px}
