:root {
    --ink: #173e32;
    --green: #194c39;
    --orange: #ff914d;
    --line: #dbe3db;
    --muted: #586c61;
    font: 100%/1.5 "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #fafbf7;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #417d62; outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.icon { width: 1.22em; height: 1.22em; flex-shrink: 0; vertical-align: middle; }
.mast { background: white; border-bottom: 1px solid var(--line); }
.mast-actions { display: flex; align-items: center; gap: 10px; }
.mast-actions [hidden] { display: none; }
.offline-card { width: min(440px,calc(100% - 32px)); margin: 12vh auto 32px; padding: clamp(24px,5vw,40px); display: grid; justify-items: start; gap: 16px; border: 1px solid var(--line); border-radius: 22px; background: white; }
.offline-card img { border-radius: 16px; }
.offline-card p { color: var(--muted); }
@media (max-width: 560px) {
    .mast-inner:has(.install:not([hidden])) .brand-label,
    .mast-actions:has(.install:not([hidden])) .private { display: none; }
}
.mast-inner { max-width: 1280px; min-height: 78px; margin: auto; padding: 0 clamp(20px,5vw,72px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand, .private, .quiet, .back { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--green); color: #fff8d9; transform: rotate(-4deg); }
.brand-mark .icon { width: 25px; height: 25px; }
.brand b { font-size: 1.9rem; letter-spacing: -2px; line-height: 1; }
.brand-label { font-size: .9rem; color: var(--muted); padding-left: 14px; margin-left: 5px; border-left: 1px solid #d3dcd3; }
.private { font-size: .85rem; font-weight: 600; color: var(--green); background: #eef4eb; border: 1px solid #dce6d9; border-radius: 40px; padding: 7px 13px; }
.outside { background-color: #f9faf5; background-image: radial-gradient(#cfdace 1px,transparent 1px); background-size: 18px 18px; }
.login-wrap { min-height: calc(100svh - 79px); display: grid; align-items: center; padding: clamp(22px,5vh,64px) clamp(20px,6vw,80px); }
.login-card { width: min(100%,1080px); margin: auto; display: grid; grid-template-columns: 1.08fr 1fr; overflow: hidden; background: white; border: 1px solid #c6d4c8; border-radius: 26px; box-shadow: 0 12px 35px #183d3210, 0 3px 0 #dfe7db; }
.login-panel { padding: clamp(28px,4.2vw,64px); align-self: center; }
h1,h2,p { margin: 0; }
h1 { font-size: clamp(2.2rem,4.1vw,3.45rem); line-height: 1.05; letter-spacing: -.06em; }
h1 span { color: #ec7940; }
.key-tile,.empty-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #ffead8; color: #92511f; margin-bottom: 15px; }
.key-tile .icon { width: 25px; height: 25px; }
.pin-form { margin-top: 25px; }
.field-caption, .dialog-form label { display: block; font-size: .9rem; font-weight: 650; }
.pin-control { position: relative; margin-top: 7px; }
input:not([type=hidden]), textarea { display: block; width: 100%; padding: 10px 12px; background: #fff; color: var(--ink); border: 1px solid #b9cabc; border-radius: 9px; min-height: 46px; }
.pin-slots,.keypad { display: none; }
.enhanced .pin-control input { position: absolute; inset: 0; height: 100%; opacity: 0; z-index: 1; cursor: text; }
.enhanced .pin-slots { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.pin-slots span { display: grid; place-items: center; min-height: 49px; border-radius: 10px; border: 1.5px solid #c6d3c7; background: #fbfcf9; }
.pin-slots span:empty::before { content: ''; width: 8px; height: 2px; border-radius: 4px; background: #bdc9be; }
.pin-control:focus-within .current,.pin-control:focus-within .pin-slots span:last-child:not(:empty) { outline: 2px solid var(--green); }
.enhanced .keypad { margin: 15px 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.keypad button { min-height: 56px; background: #f5f7f2; border: 1px solid #e3e8df; border-radius: 8px; font-weight: 650; font-size: 1.75rem; line-height: 1.2; }
.keypad button:hover { background: #e7efe4; }
.keypad button[data-key=clear],.keypad button[data-key=erase] { font-size: .9rem; background: transparent; border-color: transparent; }
.keypad button[data-key=erase] .icon { width: 24px; height: 24px; }
.primary,.secondary,.light,.quiet,.manage,.icon-btn { display: inline-flex; justify-content: center; align-items: center; gap: 9px; border-radius: 10px; font-weight: 650; padding: 11px 17px; min-height: 44px; line-height: 1.3; border: 1px solid transparent; }
.primary { background: var(--orange); color: #2e2d1f; border-color: #f58443; }
.primary:hover { background: #ffa368; }
.secondary,.light { background: white; color: var(--green); border-color: var(--line); }
.secondary:hover,.light:hover,.quiet:hover { background: #eff4ed; }
.enter { width: 100%; min-height: 47px; margin-top: 6px; }
.alert { border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; background: #e6f3e6; color: #225537; }
.bad { background: #fff0e9; color: #953d27; }
.login-panel .alert { margin: 12px 0; }

/* A spiral-bound buku 555 on a sheet of squared paper. */
.art { position: relative; overflow: hidden; isolation: isolate; container-type: inline-size; min-height: 100%; background-color: #deead8; background-image: linear-gradient(#abc6a961 1px,transparent 1px),linear-gradient(90deg,#abc6a961 1px,transparent 1px); background-size: 26px 26px; }
.art::before { content: ''; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; left: 10%; top: 50%; transform: translateY(-50%); background: #c1d8b7a6; }
.notebook,.receipt,.pencil,.coin { position: absolute; }
.notebook { width: 50%; height: auto; aspect-ratio: .76; left: 23%; top: 50%; transform: translateY(-50%) rotate(-12deg); border-radius: 4% 8% 7% 3%; background: linear-gradient(100deg,#27634a,#164634 82%); border: 2px solid #123c2c; box-shadow: 2px 3px #f3e5b8,3px 5px #908e69,4px 8px #f0ddb2,6px 11px #203f2f,12px 19px 14px #284b3d38; }
.book-spine { position: absolute; inset: 0 auto 0 0; width: 12%; background: #113e2e; border-right: 2px solid #ffffff16; }
.cover-frame { position: absolute; inset: 7% 8% 7% 17%; border: 2px solid #e9e3b6; outline: 1px solid #e2daa9a6; outline-offset: -6px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff0c6; }
.book-label { font-size: 2.4cqw; font-weight: 700; letter-spacing: .17em; }
.cover-number { font-family: Georgia,serif; font-size: 18cqw; line-height: 1.2; letter-spacing: -.09em; font-weight: 700; padding-right: .08em; text-shadow: 1px 2px #406a4d; }
.cover-lines { width: 36%; height: 6px; border-top: 1px solid; border-bottom: 1px solid; }
.cover-star { position: absolute; bottom: 6%; font-size: 3cqw; }
.binding { position: absolute; z-index: 2; inset: 7% auto 7% -5%; width: 13%; display: flex; flex-direction: column; justify-content: space-between; }
.binding i { height: 3.2%; border-radius: 40%; background: linear-gradient(#323e30,#e1d9b7 40%,#777963 60%,#2c3b2c); box-shadow: 1px 1px 1px #101e15; border: 1px solid #394634; }
.receipt { width: 31%; aspect-ratio: .7; left: 55%; top: 49%; transform: rotate(14deg); background: repeating-linear-gradient(white 0 16px,#dbe4d8 17px 18px); box-shadow: 4px 5px 8px #45664a30; padding: 8% 4% 2%; }
.receipt i { display: block; margin-bottom: 14%; width: 85%; height: 2px; background: #9cafa1; }.receipt strong { float: right; font: italic bold 3.5cqw Georgia; color: #698671; }
.pencil { width: 4.2%; aspect-ratio: .072; left: 78%; top: 22%; transform: rotate(23deg); background: linear-gradient(90deg,#cb692a 0 22%,#ffab50 23% 64%,#ef8234 65%); box-shadow: 4px 4px 3px #365a3938; border-radius: 5px 5px 0 0; }
.pencil::before { content: ''; position: absolute; inset: 0 0 auto; height: 11%; border-radius: 5px 5px 0 0; background: linear-gradient(#d78876 0 48%,#aaa993 49% 62%,#d4d6bb 63% 86%,#8a9985 87%); }
.pencil::after { content: ''; position: absolute; top: 99%; width: 100%; height: 13%; clip-path: polygon(0 0,100% 0,50% 100%); background: linear-gradient(#ebc99c 70%,#354438 71%); }
.coin { top: 72%; left: 63%; width: 14%; aspect-ratio: 1; display: grid; place-items: center; border: 3px solid #bd6b28; background: #ffba63; border-radius: 50%; color: #9d551f; font: bold 3.5cqw Georgia; outline: 2px dashed #d3853b; outline-offset: -8px; transform: rotate(13deg) scaleY(.86); box-shadow: 1px 4px #b16f30,2px 7px 4px #3955353b; }
.coin.small { width: 9%; top: 79%; left: 57%; transform: rotate(-12deg) scaleY(.85); }
.spark { position: absolute; color: #517956; font-family: Georgia,serif; line-height: 1; }.s1 { left: 15%; top: 22%; font-size: 9cqw; }.s2 { right: 17%; top: 14%; font-size: 6cqw; }.s3 { left: 18%; bottom: 18%; font-size: 5cqw; color: #be742d; }
.sketch-loop { position: absolute; width: 32%; aspect-ratio: 2; border: 2px dashed #6e9474; border-radius: 50%; transform: rotate(-32deg); left: 5%; top: 62%; }

.dashboard { width: min(calc(100% - 40px),980px); margin: 48px auto 72px; }
.page-title,.dialog-head,.dialog-actions,.action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-title { margin-bottom: 24px; flex-wrap: wrap; }
.page-title h1 { overflow-wrap: anywhere; }
.summary { position: relative; isolation: isolate; overflow: hidden; padding: clamp(24px,4vw,40px); border-radius: 22px; background: var(--green); color: #fff; }
.summary::after { content: ''; position: absolute; inset: 0 0 0 55%; z-index: -1; opacity: .12; background-image: linear-gradient(#d4efd4 1px, transparent 1px),linear-gradient(90deg,#d4efd4 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(90deg,transparent,#000); }
.summary-label { display: flex; align-items: center; gap: 9px; color: #e2ecd9; }
.summary strong { display: block; font-size: clamp(2rem,5.4vw,3.8rem); line-height: 1.2; letter-spacing: -.055em; margin: 10px 0; }
.summary-book { position: absolute; z-index: -1; width: 104px; height: 138px; right: 8%; top: 22%; border-radius: 5px 14px 10px 4px; background: #fa9c58; box-shadow: 2px 4px #f3dfb3,3px 7px #113725; border-left: 10px solid #d17a3d; transform: rotate(14deg); padding: 10px; }
.summary-book b { border: 2px double #85471d; color: #643e22; height: 100%; display: grid; place-items: center; font: bold 32px Georgia; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin: 26px 0 18px; }
.tabs a,.back { display: inline-flex; align-items: center; gap: 8px; padding: 10px 4px; color: var(--muted); }
.tabs a[aria-current] { color: var(--green); border-bottom: 3px solid var(--green); font-weight: 700; }
.empty,.people,.history { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.empty { padding: 42px 20px; text-align: center; }
.empty h2 { font-size: 1.3rem; }.empty p,.context { color: var(--muted); margin-top: 5px; }
.empty-icon { background: #edf4e8; color: var(--green); }
.people,.history { list-style: none; padding: 0; margin: 0; overflow: hidden; }
.people a,.history li { padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.people li+li,.history li+li { border-top: 1px solid var(--line); }
.people a:hover { background: #f5f8f2; }
.people li,.profile-actions { display: flex; align-items: center; gap: 8px; }
.profile-actions { flex-wrap: wrap; }
.people li { flex-wrap: wrap; row-gap: 0; }
.bank-details, .bank-fields { background: #f4f8f2; border: 1px solid #d5e2d4; border-radius: 14px; min-width: 0; }
.bank-details { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; column-gap: 12px; padding: 12px 14px; }
.people .bank-details { flex-basis: 100%; margin: 0 12px 12px; }
.page-title + .bank-details { margin: -6px 0 20px; }
.bank-symbol { display: grid; place-items: center; width: 36px; height: 36px; background: #e1ecdf; border-radius: 10px; color: var(--green); }
.bank-info { display: grid; gap: 2px; overflow-wrap: anywhere; }
.bank-details .bank-info strong { white-space: normal; }
.account-number { font: 1rem/1.5 ui-monospace, Consolas, monospace; color: var(--ink); }
.copy-account { padding: 6px 12px; font-size: .875rem; }
.copy-status { grid-column: 2 / -1; justify-self: end; font-size: .875rem; color: var(--green); }
.copy-status:empty { display: none; }
.bank-fields { display: grid; gap: 10px; margin: 0; padding: 10px 14px 14px; }
.bank-fields legend { padding: 0 5px; font-size: .9rem; font-weight: 650; }
.people a { flex: 1; min-width: 0; }
.people .trash { flex: 0 0 44px; margin-right: 8px; padding: 0; }
.trash { color: #943f32; border-color: #ead0ca; }
.trash:hover { background: #fcf0ec; }
.primary.danger { background: #9f4031; border-color: #9f4031; color: white; }
.primary.danger:hover { background: #82372b; }
#delete-title { overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: #ffebdc; color: #995124; }
.people b,.entry-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.paid { background: #e4efdf; }.paid,.paid-text { color: #276543; }
.history strong,.people strong { white-space: nowrap; }
.entry-info time,.entry-info p { display: block; font-size: .88rem; color: var(--muted); }.entry-info p { white-space: pre-wrap; }
.section-title { margin: 28px 0 12px; font-size: 1.4rem; letter-spacing: -.035em; }
[data-more-history] { margin-top: 14px; }
[data-history-status]:not(:empty) { margin-top: 8px; font-size: .88rem; color: var(--muted); }
.quiet,.manage,.icon-btn { background: transparent; }
.back { padding: 0; margin-bottom: 18px; }.back .icon { width: 16px; }
.action-row { justify-content: flex-start; flex-wrap: wrap; margin-top: 20px; }
.manage { color: var(--muted); text-decoration: underline; margin-top: 14px; }
dialog { width: min(440px,calc(100% - 32px)); border: 1px solid var(--line); border-radius: 20px; padding: 25px; color: var(--ink); box-shadow: 0 20px 70px #132e3240; }
dialog::backdrop { background: #152f26a8; }
.dialog-form { display: grid; gap: 16px; }.dialog-form label input,.dialog-form textarea { margin-top: 5px; font-weight: 400; }
.dialog-form textarea { resize: vertical; }.dialog-form .alert,.dialog-form .context { margin: 0; }
.dialog-head h2 { font-size: 1.5rem; letter-spacing: -.04em; }
.icon-btn { width: 40px; padding: 0; }.dialog-actions { justify-content: flex-end; margin-top: 5px; }
@media (max-width: 720px) {
    .mast-inner { min-height: 62px; }.login-wrap { padding: 20px 16px 32px; min-height: calc(100svh - 63px); }
    .login-card { max-width: 450px; grid-template-columns: 1fr; border-radius: 20px; }
    .art { min-height: 0; height: 150px; container-type: normal; background-size: 20px 20px; }
    .notebook { width: 106px; left: calc(50% - 68px); }.book-label { font-size: 6px; }.cover-number { font-size: 39px; }.cover-star { font-size: 8px; }
    .receipt { width: 70px; left: 54%; top: 27%; padding: 16px 8px; }.receipt strong { font-size: 12px; }
    .pencil { width: 9px; left: 71%; top: 6%; }.coin { width: 36px; font-size: 12px; left: 66%; top: 65%; }.coin.small { width: 25px; top: 78%; left: 61%; }
    .s1 { font-size: 27px; left: 20%; }.s2 { font-size: 19px; }.s3 { font-size: 18px; }.sketch-loop { width: 84px; left: 14%; }
    .login-panel { padding: 24px; }.key-tile { display: none; }.login-heading h1 { font-size: 2.4rem; }
    .pin-form { margin-top: 18px; }
    .dashboard { margin-top: 28px; }.summary-book { width: 62px; height: 86px; right: 6%; top: 15%; }.summary-book b { font-size: 18px; }
}
@media (max-width: 460px) {
    .brand-label { font-size: .82rem; padding-left: 9px; }.private { font-size: .77rem; padding: 6px 9px; }
    .dashboard { width: calc(100% - 32px); }.people a,.history li { padding: 14px 11px; gap: 8px; }.history strong,.people strong { font-size: .9rem; }
    .history .avatar { width: 30px; height: 32px; }.summary-book { opacity: .22; }.quiet { padding-inline: 0; }
}
