/* Private phone controller and its personal deed wallet. */
#pad {
    --sp-ink: #162f39;
    --sp-sheet: #fff7e6;
    --sp-mid: #625e51;
    --sp-line: #d3c4a8;
    --sp-wine: #802c36;
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
    padding: 14px max(12px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    color: var(--sp-ink);
    font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}
#pad * { box-sizing: border-box }
#pad .wallet {
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 14px;
    padding: 17px 19px 16px;
    border: 1px solid #b9935b;
    color: #fff4d8;
    background: linear-gradient(115deg,#431b28 0%,#722f3a 77%,#974751 100%);
    box-shadow: inset 0 0 0 4px #602735, inset 0 0 0 5px #b58b5f69, 0 8px 18px #091c232e;
}
#pad .wallet::after {
    content: "";
    z-index: -1;
    position: absolute;
    inset: -50% -11% -88% 55%;
    transform: rotate(30deg);
    background: repeating-radial-gradient(ellipse at center, transparent 0 7px,#f6cb8c30 7px 8px,transparent 8px 12px);
    pointer-events: none;
}
#pad .wallet > small, #pad .sp-label {
    display: block;
    font: 800 10px/1.25 "Avenir Next","Segoe UI",Arial,sans-serif;
    text-transform: uppercase;
    letter-spacing: .14em;
}
#pad .wallet > small { position: absolute; right: 19px; top: 20px; color: #ffe3b4 }
#pad .wallet h1 { margin: 0; font: 500 18px/1.2 Georgia,serif; color: #fff5df }
#pad #balance { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-top: 16px; }
#pad #balance:empty { margin-top: 0 }
#pad .sp-identity { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; min-width: 0 }
#pad .sp-avatar { display: grid; place-items: center; font-size: 23px; border: 1px solid #dcbd85; border-radius: 50%; width: 40px; height: 40px; background: #f4dfb9; grid-row: span 2 }
#pad .sp-player { font-weight: 750; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere }
#pad .sp-role { font: 12px/1.2 Georgia,serif; color: #e6d4bb; }
#pad .sp-bank { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
#pad .sp-cash { font: 500 clamp(29px,8vw,40px)/1 Georgia,serif; letter-spacing: -.06em; }
#pad .sp-change { border-radius: 15px; margin-top: 4px; padding: 2px 6px; font-size: 11px; line-height: 1.3; animation: sp-credit-in .5s ease-out both }
#pad .sp-credit { background: #d3ebcd; color: #214f39 } #pad .sp-debit { background: #ffe2cc; color: #663329 }
#pad #controls, #pad #portfolio { position: relative; padding: 0; }
#pad .sp-band { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 3px 8px; color: #e8d8ba; }
#pad .sp-band .sp-label { color: #e8d8ba; flex-shrink: 0; }
#pad .sp-band strong { font: normal 14px/1.25 Georgia,serif; color: #fff3da; text-align: right; }
#pad .sp-card { background: var(--sp-sheet); color: var(--sp-ink); padding: 19px 18px 17px; border: 1px solid var(--sp-line); border-radius: 14px; box-shadow: 0 5px 16px #091c2329; }
#pad .sp-card > .sp-label { color: var(--sp-wine); }
#pad #controls h2 { margin: 6px 0 8px; font: 500 clamp(25px,6.8vw,34px)/1.1 Georgia,serif; letter-spacing: -.035em; color: var(--sp-ink); overflow-wrap: anywhere; }
#pad .sp-card p { margin: 0 0 12px; }
#pad .sp-sub, #pad .sp-stage, #pad .sp-note, #pad .sp-rules { color: var(--sp-mid); font-size: 14px; line-height: 1.4; }
#pad .sp-stage { font-weight: 650; color: var(--sp-ink) }
#pad .sp-district { font-size: 13px; font-weight: 600; color: var(--sp-mid) }
#pad [data-district="0"] { --sp-district: #b1724f } #pad [data-district="1"] { --sp-district: #438283 }
#pad [data-district="2"] { --sp-district: #987294 } #pad [data-district="3"] { --sp-district: #647d55 }
#pad .sp-deed { border-top: 8px solid var(--sp-district); }
#pad .sp-stats { display: grid; grid-template-columns: 1fr 1fr; padding: 9px 0; margin: 10px 0; border-top: 1px solid var(--sp-line); border-bottom: 1px solid var(--sp-line); }
#pad .sp-stat + .sp-stat { border-left: 1px solid var(--sp-line); padding-left: 15px; }
#pad .sp-stat dt, #pad .sp-secondary-text { font-size: 12px; color: var(--sp-mid) }
#pad .sp-stat dd { margin: 3px 0 0; font: 500 24px/1.05 Georgia,serif; }
#pad button, #pad select, #pad input { min-height: 46px; border-radius: 8px; font: 700 16px/1.2 "Avenir Next","Segoe UI",Arial,sans-serif; }
#pad button { background: #82323c; color: #fff6de; border: 1px solid #7d3540; box-shadow: inset 0 1px 0 #f2bf9966; }
#pad button:active { transform: translateY(1px); }
#pad button:disabled { background: #e5ddcb; border-color: #c9bca1; color: #655e52; opacity: 1; box-shadow: none; }
#pad button.sp-secondary, #pad button.sp-permit { color: var(--sp-ink); background: transparent; border: 1px solid #b9af9a; box-shadow: none; }
#pad .sp-button { display: block; width: 100%; margin: 8px 0 0; touch-action: manipulation; }
#pad .sp-dice { display: flex; align-items: center; gap: 2px; padding-top: 8px; color: var(--sp-wine); }
#pad .sp-die { color: var(--sp-wine); font: 34px/1 Georgia,serif; }
#pad .sp-jump { margin-left: 8px; color: var(--sp-mid); font-size: 13px; }
#pad #portfolio { margin: 12px 0 0; background: #f3ead6; border-radius: 12px; padding: 0 15px; }
#pad #portfolio:empty { display: none; }
#pad .sp-disclosure + .sp-disclosure { border-top: 1px solid var(--sp-line); }
#pad summary { position: relative; min-height: 47px; display: flex; align-items: center; padding: 8px 28px 8px 0; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; }
#pad summary::-webkit-details-marker { display: none; }
#pad summary::after { content: "+"; color: var(--sp-wine); position: absolute; right: 2px; font: 21px Georgia,serif; }
#pad details[open] > summary::after { content: "−"; }
#pad .sp-disclosure > .sp-note { padding-bottom: 12px; margin:0; }
#pad .sp-rules { margin: 0; padding: 0 0 14px 19px; }
#pad .sp-rules li + li { margin-top: 6px; }
#pad .sp-entries { list-style: none; padding: 0 0 8px; margin: 0; }
#pad .sp-entry { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
#pad .sp-entry + .sp-entry { border-top: 1px solid #d5c6ab; }
#pad .sp-entry > strong, #pad .sp-rent { margin-left: auto; font-size: 15px; white-space: nowrap; }
#pad .sp-entry.sp-self { color: var(--sp-wine); }
#pad .sp-rank { min-width: 24px; font: 16px Georgia,serif; }
#pad .sp-name { overflow-wrap: anywhere; min-width: 0; }
#pad .sp-property { border-left: 3px solid var(--sp-district); padding-left: 8px; }
#pad .sp-secondary-text { display: block; } #pad .sp-rent { text-align: right; }
#pad .sp-permits { margin-top: 9px; } #pad .sp-permits > summary { color: var(--sp-wine); }
#pad #controls > h2 { margin-top: 16px; padding: 11px 12px 0; border-radius: 12px 12px 0 0; color: #fff4db; }
#pad #controls > input, #pad #controls > select { font-weight: 500; background: #fff6df; color: var(--sp-ink); border: 1px solid var(--sp-line); }
#pad :focus-visible { outline: 3px solid #d49343; outline-offset: 3px; }
#pad .sp-appear { animation: sp-arrive .25s ease-out both; }
@keyframes sp-credit-in { from { opacity: .2; transform: translateY(6px) scale(.93); } to { opacity: 1; transform: none; } }
@keyframes sp-arrive { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #pad *, #pad *::before, #pad *::after { animation: none !important; transition: none !important; } }
#pad #controls > input, #pad #controls > select, #pad #controls > button { display: block; width: 100%; margin-top: 9px; padding: 11px 13px; }
#pad input, #pad select { color-scheme: light; }
#pad .sp-offer-model{float:right;width:clamp(68px,21vw,95px);height:auto;margin:2px -3px 4px 5px}#pad .sp-deed .sp-stats{clear:both}
