/* Shagunly playable demo — a simplified web version of the app's Home, People
   and New Shagun screens, in the app's own night palette. */
.sg-demo {
  --bg: #0D0D14; --panel: #14141E; --card: #1B1B26; --line: rgba(255, 255, 255, 0.10); --line-soft: rgba(255, 255, 255, 0.06);
  --text: #F4F3F7; --muted: #9A9AA8; --purple: #7158D7; --purple-soft: #8E7BF0; --green: #40C486; --coral: #EC6A7C; --gold: #E8B04B;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  width: min(340px, 100%);
  margin-inline: auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sg-phone {
  position: relative; aspect-ratio: 340 / 700; border: 9px solid #18181a; border-radius: 46px; overflow: hidden;
  background: linear-gradient(180deg, #17172a 0%, var(--bg) 26%); color: var(--text);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column;
}
.sg-phone button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sg-phone button:focus-visible, .sg-phone input:focus-visible { outline: 2px solid var(--purple-soft); outline-offset: 2px; }

.sg-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 26px 2px; font-size: 13px; font-weight: 600; flex: none; }
.sg-bar .sg-island { width: 78px; height: 22px; border-radius: 12px; background: #000; }
.sg-bar span:last-child { font-size: 11px; }

.sg-view { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 96px; scrollbar-width: none; }
.sg-view::-webkit-scrollbar { display: none; }
.sg-view[hidden] { display: none; }

.sg-hello { font-size: 13px; color: var(--muted); margin: 0; }
.sg-phone .sg-name { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.15; margin: 0 0 4px; letter-spacing: 0; color: var(--text); }
.sg-balance { font-size: 12px; margin: 0 0 14px; color: var(--green); }
.sg-balance.sg-neg { color: var(--coral); }
.sg-balance.sg-even { color: var(--muted); }

.sg-upcoming { border-radius: 20px; padding: 14px 16px 16px; background: linear-gradient(135deg, #6A5AD0 0%, #6B4FE0 50%, #A056E0 100%); margin-bottom: 16px; }
.sg-up-top { display: flex; justify-content: space-between; align-items: center; font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.85; }
.sg-up-top b { background: #fff; color: #3d2fa0; border-radius: 99px; padding: 4px 9px; font-size: 10.5px; letter-spacing: 0; text-transform: none; opacity: 1; }
.sg-phone .sg-up-title { font-family: var(--serif); font-size: 20px; font-weight: 700; margin: 8px 0 2px; color: #fff; letter-spacing: 0; line-height: 1.2; }
.sg-up-meta { font-size: 12px; margin: 0; opacity: 0.9; }
.sg-up-state { font-size: 12px; margin: 8px 0 12px; opacity: 0.85; }
.sg-up-state::before { content: "● "; font-size: 8px; vertical-align: 1px; }
.sg-up-state.sg-planned { opacity: 1; font-weight: 600; }
.sg-phone .sg-plan { width: 100%; height: 40px; border-radius: 12px; background: #fff; color: #3d2fa0; font-size: 14px; font-weight: 600; }
.sg-plan[hidden] { display: none; }

.sg-section-head { display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 2px 8px; }
.sg-section-head::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--purple); margin-right: 8px; }
.sg-section-head span { flex: 1; }

.sg-list { background: var(--card); border: 1px solid var(--line-soft); border-radius: 18px; padding: 2px 12px; list-style: none; margin: 0; }
.sg-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); margin: 0; }
.sg-list li:last-child { border-bottom: 0; }
.sg-list li.sg-new { animation: sg-in 0.4s ease; }
@keyframes sg-in { from { opacity: 0; transform: translateY(-8px); } }
.sg-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; background: color-mix(in srgb, var(--av, var(--purple)) 26%, #1b1b26); color: var(--av, var(--purple)); }
.sg-who { flex: 1; min-width: 0; }
.sg-who strong { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-who small { font-size: 11.5px; color: var(--muted); }
.sg-amt { text-align: right; }
.sg-amt strong { display: block; font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--green); white-space: nowrap; }
.sg-amt.sg-neg strong { color: var(--coral); }
.sg-amt small { font-size: 10.5px; color: var(--muted); }

.sg-phone .sg-title { font-family: var(--serif); font-size: 28px; font-weight: 700; margin: 6px 0 0; color: var(--text); letter-spacing: 0; }
.sg-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }
.sg-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sg-people li { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 18px; padding: 12px; margin: 0; }

.sg-phone .sg-fab { position: absolute; right: 18px; bottom: 84px; z-index: 2; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, #5B48D0, #8A5BE8); color: #fff; font-size: 28px; font-weight: 300; line-height: 1; box-shadow: 0 10px 24px -6px rgba(113, 88, 215, 0.8); transition: transform 0.15s ease; }
.sg-fab:active { transform: scale(0.93); }
.sg-tabs { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px; border-radius: 28px; background: rgba(34, 34, 46, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); }
.sg-phone .sg-tabs button { height: 48px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 500; }
.sg-tabs svg { width: 20px; height: 20px; }
.sg-tabs button.sg-active { background: rgba(255, 255, 255, 0.10); color: var(--purple-soft); }

.sg-toast { position: absolute; left: 16px; right: 16px; top: 46px; z-index: 6; background: #2a2a38; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 12.5px; text-align: center; transform: translateY(-160%); opacity: 0; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease; }
.sg-toast.sg-show { transform: none; opacity: 1; }

.sg-sheet-wrap { position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, 0.5); display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.sg-sheet-wrap.sg-show { opacity: 1; pointer-events: auto; }
.sg-sheet { width: 100%; max-height: 92%; overflow-y: auto; scrollbar-width: none; background: linear-gradient(180deg, #17172a 0%, var(--bg) 40%); border-radius: 26px 26px 0 0; padding: 18px 16px 20px; transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sg-sheet::-webkit-scrollbar { display: none; }
.sg-sheet-wrap.sg-show .sg-sheet { transform: none; }
.sg-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; }
.sg-phone .sg-sheet-head h4 { font-family: var(--serif); font-size: 23px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: 0; text-transform: none; }
.sg-sheet-head p { font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.sg-phone .sg-close { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); font-size: 16px; color: var(--muted); }
.sg-prefill { display: inline-block; margin-top: 10px; font-size: 11.5px; color: var(--purple-soft); background: rgba(113, 88, 215, 0.14); border-radius: 99px; padding: 5px 10px; }
.sg-prefill[hidden] { display: none; }
.sg-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sg-phone .sg-dir button { height: 40px; border-radius: 13px; background: var(--card); border: 1px solid var(--line-soft); color: var(--muted); font-size: 14px; font-weight: 600; transition: background 0.2s ease, color 0.2s ease; }
.sg-phone .sg-dir button[aria-pressed="true"][data-dir="received"] { background: var(--green); color: #06291a; border-color: transparent; }
.sg-phone .sg-dir button[aria-pressed="true"][data-dir="given"] { background: var(--coral); color: #fff; border-color: transparent; }
.sg-label { font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; display: block; }
.sg-amount { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 14px; padding: 0 14px; height: 50px; }
.sg-amount span { font-size: 18px; }
.sg-phone .sg-amount input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-family: var(--serif); font-size: 22px; font-weight: 600; padding: 0; -moz-appearance: textfield; appearance: textfield; }
.sg-amount input::-webkit-outer-spin-button, .sg-amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sg-amount input::placeholder { color: #5b5b6a; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sg-phone .sg-chips button { height: 32px; padding: 0 11px; border-radius: 99px; background: rgba(113, 88, 215, 0.14); border: 1px solid rgba(113, 88, 215, 0.35); color: #b3a6f5; font-family: var(--serif); font-size: 13.5px; font-weight: 600; transition: background 0.2s ease, color 0.2s ease; }
.sg-phone .sg-chips.sg-persons button { font-family: inherit; font-size: 12.5px; font-weight: 500; background: var(--card); border-color: var(--line-soft); color: var(--text); }
.sg-phone .sg-chips button[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.sg-phone .sg-save { width: 100%; height: 46px; margin-top: 16px; border-radius: 14px; background: linear-gradient(90deg, #4E3CC8, #6B4FE0 55%, #A056E0); color: #fff; font-size: 15px; font-weight: 600; transition: opacity 0.2s ease; }
.sg-save:disabled { opacity: 0.4; cursor: default; }

.sg-demo-note { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin-top: 1rem; font-family: var(--font-mono); letter-spacing: 0.04em; }

@media (prefers-reduced-motion: reduce) {
  .sg-phone, .sg-phone * { transition: none !important; animation: none !important; }
}
