:root {
  --bg: #f6f0ed;
  --surface: #fffbf9;
  --ink: #2a2224;
  --muted: #8a7678;
  --line: #e8d5d2;
  --accent: #c17b85;
  --ice: #7a9bb8;
  --danger: #a05656;
  --cream: #f3e6e3;
  --shadow: 0 0 0 1px rgba(42, 34, 36, 0.06), 0 1px 2px -1px rgba(42, 34, 36, 0.06);
  --font: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --display: "Fraunces", ui-serif, Georgia, serif;
}
* { box-sizing: border-box; }
html, body, #app {
  height: var(--tg-viewport-stable-height, 100dvh);
  max-height: var(--tg-viewport-stable-height, 100dvh);
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  position: relative;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.15; margin: 0; font-weight: 500; }
p { margin: 0; }
img { max-width: 100%; display: block; }
.shell { position: relative; max-width: 28rem; margin: 0 auto; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.header { flex: 0 0 auto; padding: 12px 1.25rem 8px; }
.header .brand { font-family: var(--display); font-size: 1.25rem; }
.scroll { flex: 1; min-height: 0; overflow-x: clip; overflow-y: auto; padding: 0 1.25rem 16px; }
.muted { color: var(--muted); }
.kicker { font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 1rem; }
.cream { background: var(--cream); border-radius: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 0.95rem; }
.btn.outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 36px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; }
.tabs {
  flex: 0 0 auto;
  z-index: 80;
  display: flex;
  gap: 2px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  box-shadow: 0 -1px 0 var(--line);
}
.tabs button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 6px 2px; }
.tabs button.on { color: var(--ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--cream); white-space: nowrap; font-size: 14px; }
.chip.on { background: var(--accent); color: var(--bg); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sq { aspect-ratio: 1; background: var(--cream); overflow: hidden; }
.sq img { width: 100%; height: 100%; object-fit: cover; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { height: 40px; border-radius: 10px; font-size: 14px; }
.day.lit { background: var(--cream); }
.day.sel { background: var(--ink); color: var(--bg); }
.day.mute { color: var(--muted); opacity: 0.5; }
.day.strike { text-decoration: line-through; }
.overlay { position: absolute; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; }
.overlay .body { flex: 1; min-height: 0; overflow: auto; padding: 0 1.25rem 1.5rem; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; flex: 0 0 auto; }
.switch.on { background: var(--accent); }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: transform 160ms; }
.switch.on i { transform: translateX(18px); }
.field { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; background: var(--cream); border: 0; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--cream); }
.badge.danger { background: #f3d6d6; color: var(--danger); }
.toast { position: absolute; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 50; white-space: nowrap; }
.hero { width: 100%; height: 160px; object-fit: cover; border-radius: 16px; }
.photo { width: 100%; height: auto; border-radius: 16px; display: block; object-fit: contain; }
.space { display: flex; flex-direction: column; gap: 20px; padding-top: 4px; }
.admin-link { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 16px; border-radius: 12px; background: var(--cream); }
.h3 { font-size: 1.5rem; }
.h2 { font-size: 1.85rem; }
.tiny { font-size: 12px; }
.sm { font-size: 14px; }
.mt { margin-top: 8px; }
.hidden { display: none !important; }
