:root {
  --bg: #F7F3EC;
  --surface: #FFFFFF;
  --surface-2: #F0EBE2;
  --line: #E3DCD0;
  --ink: #23201C;
  --ink-2: #5E574D;
  --ink-3: #8C8478;
  --accent: #2F6FDE;
  --good: #23955C;
  --warn: #C9861A;
  --bad: #C8443A;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif,
          "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-weight: 600;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }

/* modal sheet, shared by wall and parent pages */
.scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(35, 32, 28, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.sheet {
  background: var(--surface); border-radius: 20px;
  width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 24px;
}
.sheet h2 { margin: 0 0 16px; font-size: 1.3rem; }
.sheet .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* PIN pad */
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 8px 0 18px; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pin-pad button {
  height: 64px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: 1.5rem; font-weight: 600;
}
.pin-pad button:active { background: var(--line); }
.pin-msg { text-align: center; min-height: 1.4em; color: var(--bad); margin-top: 12px; font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; max-width: calc(100% - 32px); text-align: center;
}
