:root{font:16px/1.5 "Segoe UI",system-ui,sans-serif;color:#2f2840;background:#f7f4ec}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}header,main{max-width:44rem;margin:auto;padding:1.2rem}header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #d8d0c4}a{color:inherit}header a:first-child{font:bold 1.55rem Georgia;text-decoration:none}header a:last-child{font-size:.85rem}nav ol{list-style:none;display:flex;gap:6px;margin:0 0 2rem;padding:0}nav li{flex:1;border-top:3px solid #d4cec6;padding-top:.4rem;font-size:.78rem;color:#625c68}nav li[aria-current]{border-color:#57375d;font-weight:bold;color:#432848}h1,h2{font-family:Georgia,serif;font-weight:normal;line-height:1.08}h1{font-size:clamp(2.3rem,7vw,3.7rem);margin:.4rem 0 1rem}h2{font-size:1.5rem}p{color:#514857}button,select,input{font:inherit}button,select,input{border:1px solid #a69aa9;background:#fffdfa;color:inherit;border-radius:.65rem;padding:.6rem .9rem;min-height:44px}button,summary{cursor:pointer}button:disabled{opacity:.55}button.primary{display:block;background:#49304e;border-color:#49304e;color:white;font-weight:650;width:100%;margin:1rem 0}.back{border:0;background:none;padding-left:0}.label,label{display:block;font-weight:600}.hint,small{color:#625766;font-size:.85rem}.photo,.line,.charge,.grand,.party-head,.result summary{display:flex;align-items:center;justify-content:space-between;gap:.65rem}.photo,.line,.charge,.result,.grand{padding:.8rem .15rem;border-bottom:1px solid #d7cfc5}.photo small,.line small,.result small{display:block}.line .price{margin-left:auto;white-space:nowrap}.line strong{overflow-wrap:anywhere}.dot{display:inline-block;vertical-align:middle;width:1.15rem;height:1.15rem;border:1px solid #66576c;border-radius:50%;flex:none}.dotbtn{border:0;background:transparent;min-width:48px;padding:.5rem}.dotbtn .dot{width:1.45rem;height:1.45rem}.chip .dot{margin-right:.4rem}#colors,#options,.actions,#choices{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}.round{border-radius:50%;width:44px;padding:0;font-size:1.35rem}#charges,.grand{margin-top:1.3rem}details{margin:1rem 0}summary{padding:.65rem 0}label input,label select{display:block;margin:.3rem 0 .75rem;width:100%}.charge input,.party-head input{width:6rem;text-align:right}.party-head label{font-size:.85rem}.party-head input{margin-bottom:0}.result{background:#fffdfa;padding:1rem;border-radius:.8rem;margin-top:.8rem}.result summary{font-weight:600}.result summary:before{content:"▸"}.result details[open] summary:before{content:"▾"}.result details{margin:.4rem 0 0}.result summary strong{margin-left:auto;font-size:1.4rem}.result ul{padding-left:1.3rem}.grand strong{font-size:1.6rem}dialog{width:min(92vw,28rem);border:1px solid #bcafbf;border-radius:1rem;padding:1.4rem;color:inherit}dialog::backdrop{background:#21182da8}dialog h2{margin-top:0}.actions{margin-top:1rem}.actions .primary{width:auto;margin:0}button[aria-pressed=true]{outline:2px solid #47324e}#status,#warning{font-weight:600}:focus-visible{outline:3px solid #864d86;outline-offset:2px}

.file-action { position:relative; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:.6rem .9rem; border:1px solid #a69aa9; border-radius:.65rem; background:#fffdfa; overflow:hidden; cursor:pointer; }
.file-action.primary { display:flex; width:100%; margin:1rem 0; color:white; background:#49304e; border-color:#49304e; }
.file-action input[type=file] { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.file-action:focus-within { outline:3px solid #864d86; outline-offset:2px; }

.mode-switch{display:flex;gap:.2rem;padding:.2rem;border:1px solid #bcb1c0;border-radius:2rem}.mode-switch button{border:none;border-radius:2rem;min-height:44px;background:transparent}.mode-switch button[aria-pressed=true]{background:#49304e;color:white;outline:none}header>strong{font:bold 1.45rem Georgia}#basic-frame{display:block;border:0;width:100%;height:calc(100dvh - 6rem)}#reset-pro{margin-top:1.2rem;color:#6a4955;text-decoration:underline}#reset-dialog p{line-height:1.5}

:root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#28243d}
header,main{max-width:64rem;padding:1.25rem clamp(1rem,4vw,2rem)}
header{border-bottom:0}
header a.brand{font-family:inherit;font-weight:900;font-size:18px;letter-spacing:.14em}
.brand span{display:block;font-size:9px;letter-spacing:.25em}
.intro{margin:.5rem 0 1.75rem}
h1,h2,h3{font-family:inherit;font-weight:750;letter-spacing:-.035em}
.intro h1{font-size:clamp(2.35rem,6vw,3.8rem);margin:0 0 .8rem}
.intro h1 span{color:#817147}
.intro p{margin:0}
nav ol{gap:0;margin:0}
nav li{border:0;padding:0}
nav button{width:100%;background:transparent;border:0;border-radius:0;border-bottom:3px solid #d6cfbf;font-weight:650;padding:.7rem .3rem}
nav button[aria-current]{color:#28243d;border-color:#817147;background:#eee9dc}
nav button:disabled{color:#77716a;opacity:.72;cursor:default}
#pro-main>section{padding:clamp(1rem,4vw,2.25rem);background:#fffefa;border:1px solid #e2ddcf;border-radius:16px;box-shadow:0 14px 38px #28243d09}
#allowance:empty{margin:.8rem 0}
#pro-main h2{margin:.1rem 0 .8rem;font-size:clamp(1.6rem,4vw,2.2rem)}
.result{border:1px solid #d6cfbf;background:#faf8f1;padding:1rem}
.party-head strong .dot{margin-right:.55rem}
.payment-lines{margin:.8rem 0 0;font-variant-numeric:tabular-nums}
.payment-lines div,.table-slip div{display:flex;justify-content:space-between;align-items:baseline;gap:.75rem;padding:.45rem 0}
.payment-lines dd{margin:0;font-weight:700}
.payment-lines div:last-child,.table-slip .final-line{border-top:1px dashed #aaa18c;margin-top:.45rem;font-weight:750}
.payment-lines div:last-child dd,.table-slip .final-line strong{font-size:1.5rem}
.result summary{justify-content:flex-start;color:#514857;font-size:.9rem}
.table-slip{margin-top:1.5rem;border-radius:12px;padding:1.25rem;background:#28243d;color:#fffefa;font-variant-numeric:tabular-nums}
.table-slip h3{margin:0 0 .5rem;color:#e5c47c}
button.primary,.file-action.primary,.mode-switch button[aria-pressed=true]{background:#28243d}
#basic-frame:not(.ready){visibility:hidden}
@media(min-width:800px){#cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}#pro-main>section{max-width:58.5rem}}


header .brand{display:inline-flex;align-items:center;gap:.6rem}header .brand img{display:block;flex:none;object-fit:contain}header .brand .wordmark{font:inherit;letter-spacing:inherit}

.line .item-error{color:#922f25;font-weight:650}.line:has(.item-error:not([hidden])){background:#fff2e6}

/* Product signature on the receipt and even-split calculators. */
header .tips-signature { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tips-signature img { display: block; width: 37px; height: 42px; }
header .tips-signature .tips-name { display: block; font: bold 21px/1.1 Georgia, serif; letter-spacing: -.035em; color: #28243d; }
header .tips-signature .tips-maker { display: block; font: 11px/1.55 "Segoe UI", sans-serif; color: #574e60; text-decoration: none; }
.tips-signature .tips-maker:hover { text-decoration: underline; }
@media(max-width: 410px) {
  header:has(.tips-signature) { flex-wrap: wrap; gap: 8px; padding-inline: 14px; }
  .tips-signature img { width: 29px; height: 35px; }
  header .tips-signature .tips-name { font-size: 18px; }
}
