/* SG Kindness — app styles. Six palette colors come from Kindness › Settings; everything else is blended from them. */
#sgk-app {
	--sgk-ink: #1C1D3B; --sgk-bg: #F3F4F8; --sgk-accent: #D6335A; --sgk-violet: #3441A8; --sgk-green: #16704A; --sgk-yellow: #FFC93C;
	--sgk-muted: color-mix(in srgb, var(--sgk-ink) 72%, var(--sgk-bg));
	--sgk-muted-2: color-mix(in srgb, var(--sgk-ink) 80%, var(--sgk-bg));
	--sgk-line: color-mix(in srgb, var(--sgk-ink) 9%, var(--sgk-bg));
	--sgk-line-2: color-mix(in srgb, var(--sgk-ink) 18%, var(--sgk-bg));
	--sgk-seg: color-mix(in srgb, var(--sgk-ink) 6%, var(--sgk-bg));
	--sgk-page: color-mix(in srgb, var(--sgk-ink) 6%, var(--sgk-bg));
	--sgk-on-ink: color-mix(in srgb, var(--sgk-ink) 32%, white);
	--sgk-ink-2: color-mix(in srgb, var(--sgk-ink) 86%, white);
	--sgk-ink-3: color-mix(in srgb, var(--sgk-ink) 82%, var(--sgk-violet));
	--sgk-ink-4: color-mix(in srgb, var(--sgk-ink) 65%, black);
	--sgk-accent-soft: color-mix(in srgb, var(--sgk-accent) 15%, white);
	--sgk-accent-deep: color-mix(in srgb, var(--sgk-accent) 80%, black);
	--sgk-violet-soft: color-mix(in srgb, var(--sgk-violet) 18%, white);
	--sgk-violet-deep: color-mix(in srgb, var(--sgk-violet) 85%, black);
	--sgk-green-soft: color-mix(in srgb, var(--sgk-green) 20%, white);
	--sgk-green-mid: color-mix(in srgb, var(--sgk-green) 32%, white);
	--sgk-green-light: color-mix(in srgb, var(--sgk-green) 55%, white);
	--sgk-green-deep: color-mix(in srgb, var(--sgk-green) 55%, black);
	--sgk-green-dark: color-mix(in srgb, var(--sgk-green) 35%, black);
	--sgk-yellow-soft: color-mix(in srgb, var(--sgk-yellow) 45%, white);
	--sgk-yellow-mid: color-mix(in srgb, var(--sgk-yellow) 70%, white);
	--sgk-yellow-deep: color-mix(in srgb, var(--sgk-yellow) 35%, black);
	--sgk-yellow-dark: color-mix(in srgb, var(--sgk-yellow) 22%, black);
	--sgk-yellow-edge: color-mix(in srgb, var(--sgk-yellow) 85%, black);
	--sgk-font-display: 'Unbounded', 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--sgk-font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--sgk-safe-top: env(safe-area-inset-top, 0px);
	--sgk-safe-bottom: env(safe-area-inset-bottom, 0px);
}
#sgk-app *, #sgk-app *::before, #sgk-app *::after { box-sizing: border-box; }
body.sgk-standalone { margin: 0; background: #E9EBF3; -webkit-text-size-adjust: 100%; }
/* ---- Theme isolation (theme mode) ---- */
#sgk-app, #sgk-app *, #sgk-app *::before, #sgk-app *::after { box-sizing: border-box; }
#sgk-app h1, #sgk-app h2, #sgk-app h3, #sgk-app p, #sgk-app blockquote, #sgk-app figure { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-transform: none; letter-spacing: normal; text-shadow: none; }
#sgk-app h1::before, #sgk-app h1::after, #sgk-app h2::before, #sgk-app h2::after, #sgk-app blockquote::before, #sgk-app blockquote::after { content: none; }
#sgk-app button, #sgk-app input, #sgk-app textarea, #sgk-app select { margin: 0; font: inherit; color: inherit; text-transform: none; letter-spacing: normal; text-shadow: none; box-shadow: none; line-height: 1.25; width: auto; max-width: 100%; }
#sgk-app a, #sgk-app a:where(:hover, :focus, :visited) { color: inherit; text-decoration: none; text-transform: none; letter-spacing: normal; box-shadow: none; border-bottom: 0; }
#sgk-app img, #sgk-app svg { max-width: none; box-shadow: none; border: 0; }
#sgk-app button:where(:hover, :focus) { text-decoration: none; }
#sgk-app { color: var(--sgk-ink); font-family: var(--sgk-font-body); font-size: 15px; line-height: 1.4; text-align: left; }
#sgk-app button, #sgk-app input, #sgk-app textarea, #sgk-app select { font: inherit; color: inherit; }
#sgk-app button { cursor: pointer; }
#sgk-app button:disabled { cursor: not-allowed; opacity: .5; }
#sgk-app a { color: inherit; }
#sgk-app img { max-width: 100%; }
#sgk-app :focus-visible { outline: 2px solid var(--sgk-violet); outline-offset: 2px; }
#sgk-app .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sgk-noscript { padding: 40px 20px; text-align: center; font-family: system-ui, sans-serif; }

#sgk-app .app { position: relative; max-width: 460px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--sgk-bg); padding: calc(var(--sgk-safe-top) + 24px) 20px calc(var(--sgk-safe-bottom) + 112px); }
#sgk-app .app.no-tabs { padding-bottom: calc(var(--sgk-safe-bottom) + 32px); }
@media (min-width: 520px) { #sgk-app .app { box-shadow: 0 0 0 1px var(--sgk-line); } }
#sgk-app .screen { display: flex; flex-direction: column; gap: 14px; }
#sgk-app .screen:focus { outline: none; }

/* Type */
#sgk-app .display { margin: 0; font-family: var(--sgk-font-display); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; }
#sgk-app .display.xl { font-size: 32px; line-height: 1.08; }
#sgk-app .display.lg { font-size: 26px; }
#sgk-app .display.md { font-size: 22px; letter-spacing: -.025em; }
#sgk-app .lede { margin: -6px 0 0; font-size: 16px; color: var(--sgk-muted); }
#sgk-app .muted { color: var(--sgk-muted); }
#sgk-app .section-title { margin: 12px 0 0; font-size: 15px; font-weight: 700; }
#sgk-app .footnote { margin: 2px 0 0; text-align: center; font-size: 13px; color: var(--sgk-muted); }

/* Icons & avatars */
#sgk-app .ic { display: inline-flex; flex-shrink: 0; }
#sgk-app .ic svg { display: block; }
#sgk-app .avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
#sgk-app .avatar.lg { width: 64px; height: 64px; font-size: 24px; }
#sgk-app .tone-0 { background: var(--sgk-yellow-soft); color: var(--sgk-yellow-deep); }
#sgk-app .tone-1 { background: var(--sgk-accent-soft); color: var(--sgk-accent-deep); }
#sgk-app .tone-2 { background: var(--sgk-green-soft); color: var(--sgk-green); }
#sgk-app .tone-3 { background: var(--sgk-violet-soft); color: var(--sgk-violet); }

/* Buttons */
#sgk-app .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 0; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
#sgk-app .btn-lg { min-height: 56px; width: 100%; font-size: 17px; }
#sgk-app .btn-sm { min-height: 44px; padding: 0 14px; font-size: 13px; }
#sgk-app .btn-primary { background: var(--sgk-accent); color: #fff; }
#sgk-app .btn-dark { background: var(--sgk-ink); color: #fff; }
#sgk-app .btn-light { background: #fff; color: var(--sgk-ink); border: 1px solid var(--sgk-line-2); }
#sgk-app .btn-outline { background: transparent; color: var(--sgk-ink); border: 1.5px solid var(--sgk-ink); }
#sgk-app .btn-block { width: 100%; }
#sgk-app .icon-btn { flex-shrink: 0; width: 44px; height: 44px; padding: 0; border-radius: 999px; border: 1px solid var(--sgk-line); background: #fff; color: var(--sgk-ink); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
#sgk-app .icon-btn.ghost { border-color: transparent; background: transparent; color: var(--sgk-muted); }
#sgk-app .link-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--sgk-muted-2); font-size: 13px; font-weight: 600; text-decoration: none; }
#sgk-app .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Top of Today */
#sgk-app .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#sgk-app .hello { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 16px; font-weight: 600; }
#sgk-app .hello span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hero points card */
#sgk-app .hero { position: relative; overflow: hidden; min-height: 168px; padding: 20px 22px; border-radius: 32px; background: var(--sgk-ink); color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
#sgk-app .hero-art { position: absolute; right: -54px; top: -26px; pointer-events: none; }
#sgk-app .hero-art .r1 { stroke: var(--sgk-violet); stroke-opacity: .35; }
#sgk-app .hero-art .r2 { stroke: var(--sgk-violet); stroke-opacity: .55; }
#sgk-app .hero-art .disc { fill: var(--sgk-green-soft); }
#sgk-app .hero-art .stem { stroke: var(--sgk-green); }
#sgk-app .hero-art .leaf { fill: var(--sgk-green-light); stroke: var(--sgk-green); }
#sgk-app .hero-num { position: relative; font-family: var(--sgk-font-display); font-size: 64px; line-height: .95; font-weight: 600; letter-spacing: -.04em; }
#sgk-app .hero-label { position: relative; margin-top: 8px; color: var(--sgk-on-ink); }
#sgk-app .pill-dark { position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--sgk-ink-2); font-size: 13px; font-weight: 600; }
#sgk-app .pill-dark .ic { color: var(--sgk-green-light); }

/* Tiles */
#sgk-app .tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#sgk-app .tile { min-height: 122px; padding: 16px; border-radius: 24px; border: 0; text-align: left; text-decoration: none; color: var(--sgk-ink); display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
#sgk-app .tile-top { display: flex; justify-content: space-between; align-items: flex-start; }
#sgk-app .tile-icon { width: 38px; height: 38px; border-radius: 999px; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
#sgk-app .tile-title { display: block; font-size: 16px; font-weight: 700; }
#sgk-app .tile-sub { display: block; margin-top: 2px; font-size: 13px; line-height: 1.3; }
#sgk-app .tile.violet { background: var(--sgk-violet-soft); }
#sgk-app .tile.violet .tile-icon, #sgk-app .tile.violet .tile-sub, #sgk-app .tile.violet .tile-arrow { color: var(--sgk-violet); }
#sgk-app .tile.green { background: var(--sgk-green-soft); }
#sgk-app .tile.green .tile-icon, #sgk-app .tile.green .tile-sub, #sgk-app .tile.green .tile-arrow { color: var(--sgk-green); }

/* Challenge */
#sgk-app .challenge { padding: 18px; border-radius: 24px; background: var(--sgk-yellow-soft); color: var(--sgk-yellow-dark); display: flex; flex-direction: column; gap: 14px; }
#sgk-app .challenge-head { display: flex; align-items: center; gap: 12px; }
#sgk-app .challenge-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 16px; background: #fff; color: var(--sgk-yellow-deep); display: inline-flex; align-items: center; justify-content: center; }
#sgk-app .eyebrow { font-size: 13px; font-weight: 700; color: var(--sgk-yellow-deep); }
#sgk-app .challenge-title { margin-top: 3px; font-family: var(--sgk-font-display); font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
#sgk-app .challenge-bonus { margin-top: 3px; font-size: 13px; font-weight: 700; color: var(--sgk-accent-deep); }
#sgk-app .progress { display: flex; align-items: center; gap: 12px; }
#sgk-app .segments { flex-grow: 1; display: flex; gap: 6px; }
#sgk-app .segments span { flex: 1; height: 8px; border-radius: 999px; background: var(--sgk-yellow-mid); }
#sgk-app .segments span.on { background: var(--sgk-ink); }
#sgk-app .progress-label { font-size: 13px; font-weight: 700; color: var(--sgk-yellow-deep); }
#sgk-app .challenges { display: flex; flex-direction: column; gap: 12px; }
#sgk-app .challenge-text { margin: -4px 0 0; font-size: 14px; line-height: 1.4; color: var(--sgk-yellow-dark); white-space: pre-line; }
#sgk-app .bar-track { flex-grow: 1; height: 8px; border-radius: 999px; background: var(--sgk-yellow-mid); overflow: hidden; }
#sgk-app .bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--sgk-ink); }
#sgk-app .challenge-btn { align-self: flex-start; }
#sgk-app .challenge-done { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--sgk-yellow-deep); }
#sgk-app .challenge.is-done .challenge-icon { background: var(--sgk-ink); color: var(--sgk-yellow); }

/* Bars */
#sgk-app .bar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
#sgk-app .bar-title { font-size: 16px; font-weight: 700; }
#sgk-app .bar-spacer { width: 44px; }

/* Log form */
#sgk-app .options { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 24px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 10px 6px 6px; border: 0; border-radius: 18px; background: transparent; text-align: left; }
#sgk-app .opt:hover { background: var(--sgk-bg); }
#sgk-app .opt-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
#sgk-app .opt-text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
#sgk-app .opt-label { font-size: 15px; font-weight: 600; }
#sgk-app .opt-sub { font-size: 12px; color: var(--sgk-muted); }
#sgk-app .opt-pts { font-size: 14px; font-weight: 700; color: var(--sgk-green); }
#sgk-app .opt-radio { flex-shrink: 0; width: 22px; height: 22px; border-radius: 999px; border: 1.5px solid var(--sgk-line-2); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
#sgk-app .opt-radio .ic { visibility: hidden; }
#sgk-app .opt[aria-pressed="true"] { background: var(--sgk-ink); color: #fff; }
#sgk-app .opt[aria-pressed="true"] .opt-sub { color: var(--sgk-on-ink); }
#sgk-app .opt[aria-pressed="true"] .opt-pts { color: var(--sgk-green-light); }
#sgk-app .opt[aria-pressed="true"] .opt-radio { border: 0; background: var(--sgk-accent); }
#sgk-app .opt[aria-pressed="true"] .opt-radio .ic { visibility: visible; }
#sgk-app .c-stranger { background: var(--sgk-green-soft); color: var(--sgk-green); }
#sgk-app .c-known { background: var(--sgk-violet-soft); color: var(--sgk-violet); }
#sgk-app .c-family { background: var(--sgk-accent-soft); color: var(--sgk-accent-deep); }
#sgk-app .c-avoid { background: var(--sgk-yellow-soft); color: var(--sgk-yellow-deep); }
#sgk-app .c-self { background: var(--sgk-violet-soft); color: var(--sgk-violet); }
#sgk-app .field { display: flex; flex-direction: column; gap: 8px; }
#sgk-app .field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
#sgk-app .field-label { font-size: 14px; font-weight: 700; }
#sgk-app .field-label .muted { font-weight: 500; }
#sgk-app .count { font-size: 12px; color: var(--sgk-muted); }
#sgk-app .input { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--sgk-line); background: #fff; font-size: 16px; }
#sgk-app textarea.input { min-height: 76px; resize: vertical; line-height: 1.4; }
#sgk-app .input::placeholder { color: var(--sgk-muted); opacity: .8; }
#sgk-app .save-wrap { position: sticky; bottom: calc(var(--sgk-safe-bottom) + 16px); margin-top: 6px; z-index: 5; }

/* Segmented controls & chips */
#sgk-app .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--sgk-seg); }
#sgk-app .seg > * { min-height: 44px; padding: 0 6px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; background: transparent; color: var(--sgk-muted-2); font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; }
#sgk-app .seg > [aria-pressed="true"], #sgk-app .seg > [aria-current="page"] { background: var(--sgk-ink); color: #fff; font-weight: 700; }
#sgk-app .seg.light > [aria-pressed="true"] { background: #fff; color: var(--sgk-ink); }
#sgk-app .seg.small > * { font-size: 13px; }
#sgk-app .chips { display: flex; flex-wrap: wrap; gap: 8px; }
#sgk-app .chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--sgk-line-2); background: #fff; font-size: 14px; font-weight: 600; }
#sgk-app .chip[aria-pressed="true"] { background: var(--sgk-green); border-color: var(--sgk-green); color: #fff; font-weight: 700; }

/* Quote */
#sgk-app .quote-card { position: relative; overflow: hidden; padding: 22px 22px 26px; border-radius: 32px; background: var(--sgk-yellow-soft); color: var(--sgk-yellow-dark); }
#sgk-app .quote-sun { position: absolute; top: -22px; right: -22px; pointer-events: none; }
#sgk-app .quote-sun .core { fill: var(--sgk-yellow); }
#sgk-app .quote-sun .rays { stroke: var(--sgk-yellow-edge); }
#sgk-app .quote-sun .face { fill: var(--sgk-yellow-deep); }
#sgk-app .quote-sun .smile { stroke: var(--sgk-yellow-deep); }
#sgk-app .quote-text { margin: 40px 0 0; font-family: var(--sgk-font-display); font-size: 22px; line-height: 1.28; letter-spacing: -.02em; font-weight: 500; max-width: 300px; overflow-wrap: anywhere; }
#sgk-app .quote-author { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--sgk-yellow-deep); }
#sgk-app .quote-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#sgk-app .quote-nav .center { font-size: 13px; font-weight: 700; }

/* Rows & cards */
#sgk-app .setting-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .setting-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; background: var(--sgk-bg); display: inline-flex; align-items: center; justify-content: center; }
#sgk-app .setting-label { flex-grow: 1; font-weight: 600; }
#sgk-app .switch { position: relative; flex-shrink: 0; width: 52px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: var(--sgk-line-2); }
#sgk-app .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 999px; background: #fff; transition: transform .15s ease; }
#sgk-app .switch[aria-checked="true"] { background: var(--sgk-green); }
#sgk-app .switch[aria-checked="true"]::after { transform: translateX(20px); }
#sgk-app .voice-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 24px; background: var(--sgk-green-soft); color: var(--sgk-ink); }
#sgk-app .voice-text { flex-grow: 1; min-width: 0; }
#sgk-app .voice-open { display: flex; align-items: center; gap: 14px; flex-grow: 1; min-width: 0; padding: 0; border: 0; border-radius: 18px; background: transparent; color: inherit; text-align: left; }
#sgk-app .kicker { font-size: 12px; font-weight: 700; color: var(--sgk-green); }
#sgk-app .voice-name { margin-top: 2px; font-size: 17px; font-weight: 700; }
#sgk-app .voice-sub { font-size: 14px; color: var(--sgk-green-deep); }
#sgk-app .voice-meta { margin-top: 3px; display: flex; gap: 10px; font-size: 12px; font-weight: 600; color: var(--sgk-green-deep); }
#sgk-app .photo { flex-shrink: 0; width: 64px; height: 64px; border-radius: 20px; object-fit: cover; background: var(--sgk-green); color: var(--sgk-green-soft); display: inline-flex; align-items: center; justify-content: center; font-family: var(--sgk-font-display); font-weight: 600; font-size: 20px; overflow: hidden; }
#sgk-app .photo.round { width: 48px; height: 48px; border-radius: 999px; font-size: 15px; }
#sgk-app .photo.xl { width: 96px; height: 96px; border-radius: 28px; font-size: 28px; }
#sgk-app .play { flex-shrink: 0; width: 52px; height: 52px; border-radius: 999px; border: 0; background: var(--sgk-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
#sgk-app .play.sm { width: 44px; height: 44px; }
#sgk-app .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--sgk-muted); }
#sgk-app .meta strong { color: var(--sgk-ink); font-weight: 600; }

#sgk-app .video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 28px; overflow: hidden; background: var(--sgk-ink-3); color: #fff; text-align: left; }
#sgk-app .video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#sgk-app .video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--sgk-ink) 75%, transparent), transparent 60%); }
#sgk-app .video .ripple { position: absolute; inset: 0; width: 100%; height: 100%; }
#sgk-app .video .ripple circle { stroke: var(--sgk-yellow); fill: none; }
#sgk-app .video .ripple .dot { fill: var(--sgk-yellow); stroke: none; }
#sgk-app .video-play { position: absolute; left: 18px; top: 18px; z-index: 1; width: 52px; height: 52px; border-radius: 999px; background: #fff; color: var(--sgk-ink); display: flex; align-items: center; justify-content: center; }
#sgk-app .video-title { position: absolute; left: 20px; right: 84px; bottom: 18px; z-index: 1; font-family: var(--sgk-font-display); font-size: 19px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; }
#sgk-app .duration { position: absolute; right: 14px; bottom: 14px; z-index: 1; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--sgk-ink-4); font-size: 12px; font-weight: 700; display: flex; align-items: center; }
#sgk-app .item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 22px; background: #fff; border: 1px solid var(--sgk-line); color: var(--sgk-ink); text-align: left; text-decoration: none; }
#sgk-app .item.violet { background: var(--sgk-violet-soft); border-color: transparent; }
#sgk-app .item.dashed { background: transparent; border: 1.5px dashed var(--sgk-line-2); }
#sgk-app .item-thumb { flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px; overflow: hidden; background: var(--sgk-violet); color: var(--sgk-violet-soft); display: inline-flex; align-items: center; justify-content: center; }
#sgk-app .item-thumb img { width: 100%; height: 100%; object-fit: cover; }
#sgk-app .item-thumb.pink { background: var(--sgk-accent-soft); color: var(--sgk-accent-deep); width: 42px; height: 42px; border-radius: 14px; }
#sgk-app .item-text { flex-grow: 1; min-width: 0; }
#sgk-app .item-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; }
#sgk-app .item-sub { display: block; font-size: 13px; color: var(--sgk-muted); }
#sgk-app .item.violet .item-sub { color: var(--sgk-violet-deep); }

/* Ideas */
#sgk-app .idea { padding: 20px; border-radius: 32px; background: var(--sgk-green-soft); color: var(--sgk-green-dark); display: flex; flex-direction: column; gap: 12px; }
#sgk-app .idea-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#sgk-app .idea-icon { position: relative; width: 52px; height: 52px; border-radius: 18px; background: #fff; color: var(--sgk-ink); display: inline-flex; align-items: center; justify-content: center; }
#sgk-app .idea-icon .heart { position: absolute; top: 6px; right: 5px; color: var(--sgk-accent); }
#sgk-app .idea-title { margin: 0; font-family: var(--sgk-font-display); font-size: 22px; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; color: var(--sgk-ink); }
#sgk-app .idea-text { margin: 6px 0 0; font-size: 15px; line-height: 1.4; color: var(--sgk-green-deep); }
#sgk-app .idea .input { border-color: var(--sgk-green-mid); }
#sgk-app .tag { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
#sgk-app .tag span { font-weight: 600; }
#sgk-app .tag.white { background: #fff; color: var(--sgk-green); }

/* Community */
#sgk-app .me-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 14px; border-radius: 26px; background: var(--sgk-ink); color: #fff; text-decoration: none; }
#sgk-app .me-card .small { display: block; font-size: 13px; color: var(--sgk-on-ink); }
#sgk-app .me-card .num { display: block; margin-top: 2px; font-family: var(--sgk-font-display); font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
#sgk-app .me-card .grow { flex-grow: 1; min-width: 0; }
#sgk-app .me-card .go { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; }
#sgk-app .post { padding: 14px 14px 14px 16px; border-radius: 24px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .post-head { display: flex; align-items: center; gap: 10px; }
#sgk-app .post-who { flex-grow: 1; min-width: 0; }
#sgk-app .post-name { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sgk-app .post-pts { display: block; font-size: 12px; color: var(--sgk-muted); }
#sgk-app .post-title { margin: 10px 0 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
#sgk-app .post-note { margin: 3px 0 0; font-size: 14px; line-height: 1.4; color: var(--sgk-muted-2); overflow-wrap: anywhere; white-space: pre-line; }
#sgk-app .post-foot { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
#sgk-app .spacer { flex-grow: 1; }
#sgk-app .like { min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--sgk-accent-soft); color: var(--sgk-accent-deep); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
#sgk-app .like[aria-pressed="true"] { background: var(--sgk-accent); color: #fff; }
#sgk-app .t-stranger { background: var(--sgk-green-soft); color: var(--sgk-green); }
#sgk-app .t-known, #sgk-app .t-self { background: var(--sgk-violet-soft); color: var(--sgk-violet-deep); }
#sgk-app .t-family { background: var(--sgk-accent-soft); color: var(--sgk-accent-deep); }
#sgk-app .t-avoid { background: var(--sgk-yellow-soft); color: var(--sgk-yellow-deep); }
#sgk-app .badge { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border-radius: 999px; background: var(--sgk-seg); color: var(--sgk-muted-2); font-size: 11px; font-weight: 700; }
#sgk-app .badge.warn { background: var(--sgk-accent-soft); color: var(--sgk-accent-deep); }
#sgk-app .invite { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 24px; background: var(--sgk-yellow-soft); }
#sgk-app .invite .heart { color: var(--sgk-accent); }
#sgk-app .invite-text { flex-grow: 1; min-width: 0; font-weight: 700; line-height: 1.25; color: var(--sgk-yellow-dark); }
#sgk-app .empty { padding: 24px 20px; border-radius: 24px; border: 1.5px dashed var(--sgk-line-2); text-align: center; color: var(--sgk-muted); }
#sgk-app .empty strong { display: block; margin-bottom: 4px; color: var(--sgk-ink); }

/* Profile */
#sgk-app .profile-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 28px; background: var(--sgk-ink); color: #fff; }
#sgk-app .profile-card .name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
#sgk-app .profile-card .pts { margin-top: 2px; color: var(--sgk-on-ink); }
#sgk-app .profile-card .pts strong { font-family: var(--sgk-font-display); color: #fff; font-weight: 600; }
#sgk-app .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#sgk-app .stat { padding: 14px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .stat-num { display: block; font-family: var(--sgk-font-display); font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
#sgk-app .stat-label { display: block; font-size: 12px; color: var(--sgk-muted); }
#sgk-app .inline-form { display: flex; gap: 8px; }
#sgk-app .inline-form .input { flex: 1; min-width: 0; }
#sgk-app .act-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .act-row .grow { flex-grow: 1; min-width: 0; }
#sgk-app .act-row .title { font-weight: 700; overflow-wrap: anywhere; }
#sgk-app .act-row .note { font-size: 13px; color: var(--sgk-muted-2); overflow-wrap: anywhere; white-space: pre-line; }
#sgk-app .act-row .row-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--sgk-muted); }

/* Tab bar */
#sgk-app .tabbar { position: fixed; left: 50%; bottom: calc(var(--sgk-safe-bottom) + 16px); z-index: 20; transform: translateX(-50%); width: min(420px, calc(100% - 40px)); height: 64px; padding: 8px; border-radius: 999px; background: var(--sgk-ink); display: flex; align-items: center; justify-content: space-between; box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--sgk-ink) 70%, transparent); }
#sgk-app .tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 52px; height: 48px; border-radius: 999px; color: var(--sgk-on-ink); text-decoration: none; font-size: 14px; font-weight: 700; }
#sgk-app .tab .tab-label { display: none; }
#sgk-app .tab[aria-current="page"] { padding: 0 18px; background: #fff; color: var(--sgk-ink); }
#sgk-app .tab[aria-current="page"] .tab-label { display: inline; }

/* Sheets (native <dialog>) */
#sgk-app .sheet { width: min(460px, 100%); max-width: 100%; max-height: min(88dvh, 760px); margin: auto auto 0; padding: 0; border: 0; border-radius: 28px 28px 0 0; background: var(--sgk-bg); color: var(--sgk-ink); overflow: auto; }
@media (min-width: 520px) { #sgk-app .sheet { margin: auto; border-radius: 28px; } }
#sgk-app .sheet::backdrop { background: color-mix(in srgb, var(--sgk-ink) 55%, transparent); }
#sgk-app .sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 8px 20px; background: var(--sgk-bg); }
#sgk-app .sheet-title { margin: 0; font-size: 17px; font-weight: 700; }
#sgk-app .sheet-body { padding: 4px 20px calc(var(--sgk-safe-bottom) + 22px); display: flex; flex-direction: column; gap: 10px; }
#sgk-app .frame16 { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
#sgk-app .frame16 iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#sgk-app .menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: 16px; background: #fff; color: var(--sgk-ink); font-weight: 600; text-align: left; text-decoration: none; }
#sgk-app .menu-item.danger { color: var(--sgk-accent-deep); }
#sgk-app .note-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: #fff; }
#sgk-app .note-item .grow { flex-grow: 1; min-width: 0; font-size: 14px; }
#sgk-app .note-item .when { display: block; font-size: 12px; color: var(--sgk-muted); }
#sgk-app audio { width: 100%; }

/* Toast, loading, banners */
#sgk-app .toast { position: fixed; left: 50%; top: calc(var(--sgk-safe-top) + 16px); z-index: 60; transform: translate(-50%, -16px); max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 999px; background: var(--sgk-ink); color: #fff; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
#sgk-app .toast.show { opacity: 1; transform: translate(-50%, 0); }
#sgk-app .toast.error { background: var(--sgk-accent-deep); }
#sgk-app .skeleton { min-height: 120px; border-radius: 24px; background: var(--sgk-seg); animation: sgk-pulse 1.2s ease-in-out infinite; }
#sgk-app .skeleton.short { min-height: 60px; }
@keyframes sgk-pulse { 50% { opacity: .55; } }
#sgk-app .banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--sgk-accent-soft); color: var(--sgk-accent-deep); font-weight: 600; }
#sgk-app .banner .grow { flex-grow: 1; }

/* Welcome */
#sgk-app .welcome { min-height: calc(100dvh - 140px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
#sgk-app .welcome .hero { min-height: 220px; }
#sgk-app .welcome .actions { display: flex; flex-direction: column; gap: 10px; }
#sgk-app .welcome-forgot { align-self: center; }

@media (prefers-reduced-motion: reduce) { #sgk-app *, #sgk-app *::before, #sgk-app *::after { animation: none !important; transition: none !important; } }

/* ---- Mascot ---- */
#sgk-app .hero-mascot { position: absolute; right: -24px; top: -16px; width: 220px; height: 220px; pointer-events: none; }
#sgk-app .hero-mascot .hero-art { left: 0; top: 0; right: auto; }
#sgk-app .hero-mascot img { position: absolute; left: 30px; top: 34px; width: 150px; height: 150px; object-fit: contain; }
#sgk-app .mascot-float { animation: sgk-float 3.2s ease-in-out infinite; }
@keyframes sgk-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }

/* ---- Celebration ---- */
#sgk-app dialog.celebrate { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 20px; border: 0; background: transparent; overflow: hidden; }
#sgk-app dialog.celebrate[open] { display: flex; align-items: center; justify-content: center; }
#sgk-app dialog.celebrate::backdrop { background: color-mix(in srgb, var(--sgk-ink) 55%, transparent); }
#sgk-app .confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
#sgk-app .cel-card { position: relative; z-index: 1; width: min(340px, 100%); padding: 24px 22px 22px; border-radius: 32px; background: #fff; color: var(--sgk-ink); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--sgk-ink) 70%, transparent); animation: sgk-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
#sgk-app .cel-mascot { width: 170px; height: 170px; object-fit: contain; margin: -78px 0 2px; filter: drop-shadow(0 10px 14px color-mix(in srgb, var(--sgk-ink) 25%, transparent)); }
#sgk-app .cel-mascot.hop { animation: sgk-hop .9s cubic-bezier(.3, 0, .3, 1) infinite; }
#sgk-app .cel-art { position: relative; width: 120px; height: 120px; margin: -64px 0 0; border-radius: 999px; background: var(--sgk-ink); overflow: hidden; }
#sgk-app .cel-art .hero-art { right: -50px; top: -50px; }
#sgk-app .cel-title { margin: 4px 0 0; font-family: var(--sgk-font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
#sgk-app .cel-points { font-family: var(--sgk-font-display); font-size: 52px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--sgk-accent); animation: sgk-count .6s .15s cubic-bezier(.2, 1.6, .4, 1) both; }
#sgk-app .cel-points span { font-family: var(--sgk-font-body); font-size: 16px; font-weight: 700; letter-spacing: 0; color: var(--sgk-muted); }
#sgk-app .cel-line { margin: 0 0 8px; font-size: 15px; line-height: 1.35; color: var(--sgk-muted-2); overflow-wrap: anywhere; }
#sgk-app .celebrate.big .cel-card { background: var(--sgk-yellow-soft); }
#sgk-app .celebrate.big .cel-title { color: var(--sgk-yellow-dark); }
#sgk-app .cel-card .btn { margin-top: 6px; }
@keyframes sgk-pop { from { opacity: 0; transform: translateY(24px) scale(.88); } to { opacity: 1; transform: none; } }
@keyframes sgk-count { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes sgk-hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.08, .9); } 45% { transform: translateY(-22px) scale(.95, 1.06); } 75% { transform: translateY(0) scale(1.05, .94); } }

/* ---- Rich text (voice bios) ---- */
#sgk-app .rich { font-size: 15px; line-height: 1.5; color: var(--sgk-muted-2); overflow-wrap: anywhere; }
#sgk-app .rich p { margin: 0 0 10px; }
#sgk-app .rich p:last-child { margin-bottom: 0; }
#sgk-app .rich strong { color: var(--sgk-ink); font-weight: 700; }
#sgk-app .rich em { font-style: italic; }
#sgk-app .rich a { color: var(--sgk-violet); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
#sgk-app .rich ul, #sgk-app .rich ol { margin: 0 0 10px; padding-left: 22px; }
#sgk-app .rich li { margin: 0 0 4px; }

/* ---- Audio players ---- */
#sgk-app .frame-audio { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: var(--sgk-seg); }
#sgk-app .frame-audio iframe { display: block; width: 100%; border: 0; }
#sgk-app .frame-spotify iframe { height: 232px; }
#sgk-app .frame-apple iframe { height: 175px; }
#sgk-app .frame-soundcloud iframe { height: 166px; }
#sgk-app .audio-problem p { margin: 0 0 8px; color: var(--sgk-muted-2); }

/* ---- Profile email ---- */
#sgk-app .email-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 6px 4px 16px; border-radius: 16px; border: 1px solid var(--sgk-line); background: #fff; }
#sgk-app .email-value { flex-grow: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sgk-app .email-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 16px; border-radius: 20px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .email-form .input { margin-bottom: 6px; }
#sgk-app .banner.pending { background: var(--sgk-violet-soft); color: var(--sgk-violet-deep); font-weight: 500; }
#sgk-app .banner.pending strong { font-weight: 700; overflow-wrap: anywhere; }

/* ---- Rules of the Game ---- */
#sgk-app .rules-btn { color: var(--sgk-ink); }
#sgk-app .rules-btn .ic { color: var(--sgk-violet); }
#sgk-app .rules-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#sgk-app .rules-mascot { flex-shrink: 0; width: 92px; height: 92px; object-fit: contain; margin: -8px -6px -8px 0; }
#sgk-app .rules-card { padding: 22px 20px; border-radius: 28px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .rules-text { font-size: 15.5px; line-height: 1.55; color: var(--sgk-ink); }
#sgk-app .rules-text h2 { margin: 26px 0 8px; font-family: var(--sgk-font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--sgk-ink); }
#sgk-app .rules-text h3 { margin: 18px 0 6px; font-size: 16px; font-weight: 700; color: var(--sgk-ink); }
#sgk-app .rules-text > h2:first-child, #sgk-app .rules-text > h3:first-child { margin-top: 0; }
#sgk-app .rules-text p, #sgk-app .rules-text ul, #sgk-app .rules-text ol { color: var(--sgk-muted-2); }
#sgk-app .rules-text li { margin-bottom: 8px; }
#sgk-app .rules-text strong { color: var(--sgk-ink); }

/* ---- Manage members ---- */
#sgk-app .invite-form { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 24px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .invite-form .section-title { margin: 0 0 4px; }
#sgk-app .invite-form .input { margin-bottom: 4px; }
#sgk-app .member-row .item-sub + .item-sub { margin-top: 2px; }
#sgk-app .manage-item { background: var(--sgk-violet-soft); }
#sgk-app input[type="search"].input { -webkit-appearance: none; appearance: none; }

/* ---- People ---- */
#sgk-app [hidden] { display: none !important; }
#sgk-app .people-search { position: relative; display: flex; align-items: center; }
#sgk-app .people-search > .ic { position: absolute; left: 16px; color: var(--sgk-muted); pointer-events: none; }
#sgk-app .people-search .input { padding-left: 44px; padding-right: 48px; border-radius: 999px; -webkit-appearance: none; appearance: none; }
#sgk-app .people-search .input::-webkit-search-cancel-button { display: none; }
#sgk-app .people-search .clear { position: absolute; right: 2px; }
#sgk-app .person-row { padding: 10px 12px; }
#sgk-app .person-open { display: flex; align-items: center; gap: 12px; flex-grow: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
#sgk-app .person-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 24px; background: #fff; border: 1px solid var(--sgk-line); }
#sgk-app .person-card .grow { flex-grow: 1; min-width: 0; }
#sgk-app .person-name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
#sgk-app .person-sub { font-size: 13px; color: var(--sgk-muted); }
#sgk-app .post-author { display: flex; align-items: center; gap: 10px; flex-grow: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
#sgk-app button.post-author { cursor: pointer; border-radius: 14px; }
#sgk-app button.post-author:hover .post-name { text-decoration: underline; text-underline-offset: 2px; }
#sgk-app .following-row .item-thumb { background: var(--sgk-violet-soft); color: var(--sgk-violet); }
#sgk-app .stat-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; }
#sgk-app .stat-btn:hover { border-color: var(--sgk-line-2); }

/* ---- Loading line (shown only until the app starts) ---- */
#sgk-app .sgk-loading { display: block; padding: 40px 20px; text-align: center; font-size: 14px; color: var(--sgk-muted); }

/* ---- Theme mode layout ---- */
#sgk-app.sgk-embedded { position: relative; }
#sgk-app.sgk-embedded .app { min-height: 0; background: transparent; box-shadow: none; padding: 8px 0 16px; }
#sgk-app.sgk-embedded.sgk-bg-app .app { background: var(--sgk-bg); border-radius: 32px; padding: 24px 20px 16px; }
#sgk-app.sgk-embedded .tabbar { position: sticky; left: auto; transform: none; width: min(420px, 100%); margin: 12px auto 0; bottom: calc(var(--sgk-safe-bottom) + 16px); }
#sgk-app.sgk-embedded .welcome { min-height: 0; padding: 12px 0; }
#sgk-app .toast { z-index: 100000; }
body.admin-bar #sgk-app .toast { top: 48px; }

/* === FEEDBACK (beta) — "Send feedback" button at the bottom of each screen. Remove with the
   feedback feature (search "FEEDBACK" in app.js and includes/feedback.php). ================= */
#sgk-app .fb-btn { margin-top: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); }
#sgk-app .fb-btn .ic { color: var(--sgk-accent); }
#sgk-app .fb-btn:active { transform: translateY(1px); }
/* === end FEEDBACK ===================================================================== */
