/* =====================================================================
   Lingkar — gaya tampilan
   ===================================================================== */

:root {
  --bg: #F5F6F2;
  --surface: #FFFFFF;
  --surface-2: #EEF0EB;
  --ink: #1C2321;
  --ink-2: #3E4845;
  --ink-3: #5E6864;
  --line: #E4E7E1;
  --line-2: #D3D8D0;
  --accent: #D9472B;
  --accent-ink: #FFFFFF;
  --accent-soft: #FBE7E2;
  --accent-glow: rgba(217, 71, 43, 0.33);
  --green: #1F4D45;
  --ok: #2E7D5B;
  --ok-bg: #E3F1EA;
  --ok-line: #9CCBB3;
  --danger: #B3261E;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(28, 35, 33, 0.05), 0 8px 24px rgba(28, 35, 33, 0.06);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --tabbar-h: 72px;
  color-scheme: light;
  font-size: 16px;
}

html.simple { font-size: 19px; }

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
body.no-scroll { overflow: hidden; }

a { color: #B83A22; }
a:hover { color: #8F2C18; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.strong { font-weight: 600; }
.ink { color: var(--ink); }
.block { display: block; }
.center { text-align: center; }
.grow { flex: 1 1 auto; min-width: 0; text-align: left; }
.accent { color: var(--accent); }
.emoji { font-size: 1.15em; line-height: 1; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row-gap { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ------------------------------------------------------------------ kerangka */

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}
.boot { display: grid; place-items: center; min-height: 100vh; }

.demo-banner {
  background: #FFF4D6;
  color: #6B4E00;
  font-size: 0.8rem;
  text-align: center;
  padding: 6px 12px;
  border-bottom: 1px solid #F1DFA8;
}

.screen { padding: 0 16px 24px; }

.screen-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0 12px;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 5;
}
.screen-header-text { flex: 1; min-width: 0; }
.screen-sub { font-size: 0.875rem; color: var(--ink-3); }
.screen-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.screen-actions { display: flex; gap: 6px; align-items: center; }
.screen-header .icon-btn + .screen-header-text .screen-title { font-size: 1.35rem; }

.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.small-icon { width: 36px; height: 36px; background: transparent; color: var(--ink-3); }
.icon-btn-spacer { width: 44px; height: 44px; }
.badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.badge-inline {
  display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 18px;
}

/* ------------------------------------------------------------------ tab bar */

.tabbar {
  position: fixed;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 100%; max-width: 520px;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 20;
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--ink-3);
  font-size: 0.72rem; font-weight: 500;
  padding: 6px 0;
  min-height: 48px;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); font-weight: 700; }
.tab-icon { position: relative; display: inline-flex; }
.tab-icon .badge { top: -6px; right: -10px; }
.tab-plus { flex: 0 0 auto; padding: 0 6px; }
.plus-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px var(--accent-glow);
}

/* ------------------------------------------------------------------ tombol & isian */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem;
  cursor: pointer; text-decoration: none;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-block { width: 100%; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 0.875rem; border-radius: 12px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #C23D23; color: var(--accent-ink); }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #2B3532; color: #FFFFFF; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn-ghost-danger { background: transparent; color: var(--danger); }

.link-plain {
  background: none; border: none; padding: 4px 0; cursor: pointer;
  color: #B83A22; font-weight: 600; text-align: left;
}
.link-plain.strong { color: var(--ink); font-weight: 700; padding: 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 0.8rem; color: var(--ink-3); }
.field input, .field textarea, .inline-form input, input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  outline: none;
}
.field textarea { resize: vertical; min-height: 72px; }
.field input:focus, .field textarea:focus, .inline-form input:focus, input[type="search"]:focus { border-color: var(--ink); }
.code-input { letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-2); }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }

/* ------------------------------------------------------------------ autentikasi */

.auth { padding: 28px 24px 40px; display: flex; flex-direction: column; gap: 18px; min-height: 100vh; }
.auth-top { display: flex; align-items: center; gap: 8px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }
.display { font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1.08; letter-spacing: -0.03em; }
.display.small { font-size: 1.7rem; }
.lead { font-size: 1.05rem; color: var(--ink-2); }
.welcome { justify-content: flex-end; }
.welcome-art { flex: 1; display: grid; place-items: center; min-height: 300px; }
.demo-note {
  display: flex; gap: 8px; align-items: flex-start;
  background: #FFF4D6; color: #5B4300; border-radius: 12px; padding: 10px 12px; font-size: 0.875rem;
}
.demo-note svg { flex-shrink: 0; margin-top: 1px; }
.prose h2 { font-size: 1.05rem; margin-top: 8px; }
.prose p { color: var(--ink-2); }

.ring-art { position: relative; width: 300px; height: 300px; }
.ring-art-outer { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed var(--line-2); }
.ring-art-inner { position: absolute; inset: 60px; border-radius: 50%; border: 1.5px solid var(--line); }
.ring-art-me {
  position: absolute; left: 118px; top: 118px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: #FFFFFF; display: grid; place-items: center; font-weight: 700;
}
.ring-art-dot {
  position: absolute; border-radius: 50%; display: grid; place-items: center;
  color: #FFFFFF; font-weight: 700; font-size: 0.85rem;
  animation: float 6s ease-in-out infinite;
}
.ring-art-dot.is-light { color: var(--ink-2); border: 1.5px solid var(--line-2); font-size: 0.75rem; }
.ring-art-dot:nth-child(5) { animation-delay: -1s; }
.ring-art-dot:nth-child(6) { animation-delay: -2s; }
.ring-art-dot:nth-child(7) { animation-delay: -3s; }
.ring-art-dot:nth-child(8) { animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ------------------------------------------------------------------ avatar */

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  font-weight: 700; letter-spacing: 0.02em;
  transition: box-shadow .25s ease;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ Kabar */

.ring-wrap { display: flex; justify-content: center; padding: 4px 0 8px; }
.ring { position: relative; width: min(340px, 100%); aspect-ratio: 1; }
.ring-track { position: absolute; inset: 12%; border-radius: 50%; border: 1.5px dashed var(--line-2); }
.ring-me {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--line-2);
  transition: box-shadow .3s ease;
}
.ring-me.is-ok { box-shadow: 0 0 0 6px var(--bg), 0 0 0 9px var(--ok); }
.ring-me.is-quiet { box-shadow: 0 0 0 6px var(--bg), 0 0 0 9px #8A8FB8; }
.face {
  position: absolute; transform: translate(-50%, -28px);
  width: 76px; border: none; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
}
.face-avatar { position: relative; display: inline-flex; border-radius: 50%; }
.face.status-news .face-avatar { animation: glow 2.6s ease-in-out infinite; }
.face.status-none .avatar { opacity: 0.42; }
@keyframes glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.face-name {
  font-size: 0.75rem; font-weight: 600; color: var(--ink);
  max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.face.status-none .face-name { color: var(--ink-3); font-weight: 500; }
.face-badge {
  position: absolute; right: -4px; bottom: -4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.face-badge.kind-ok { color: var(--ok); }
.face-badge.kind-wake { color: #C47F14; }
.face-badge.kind-quiet, .face-badge.kind-sleep { color: #5E6488; }
.rest-row {
  display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 14px;
  scrollbar-width: thin;
}
.mini-face { border: none; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; }
.mini-face.status-none .avatar { opacity: 0.42; }
.mini-face .face-name { max-width: 64px; }
.kabar-detail { scroll-margin-top: 90px; }
.hint-card { background: var(--surface); border-radius: var(--radius); padding: 16px; color: var(--ink-2); }
.detail-card { background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.detail-head { display: flex; align-items: center; gap: 10px; }
.detail-head strong { flex: 1; }
.detail-list { display: flex; flex-direction: column; gap: 12px; }
.progress-line { text-align: center; margin: 14px 0 0; font-size: 0.9rem; color: var(--ink-3); display: flex; align-items: center; justify-content: center; gap: 6px; }
.progress-line.is-done { color: var(--ok); font-weight: 700; }

.status-bar { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.status-btn {
  width: 100%; min-height: 60px; border-radius: 16px;
  background: var(--ink); color: #FFFFFF; border: 1.5px solid transparent;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1.05rem; font-weight: 700; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.status-btn.is-on { background: var(--ok-bg); color: #1F5E43; border-color: var(--ok-line); }
.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiet-btn {
  min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface);
  display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  padding: 0 10px;
}
.quiet-btn.is-on { background: #ECEDF7; border-color: #B9BCD9; color: #3F4470; }

/* ------------------------------------------------------------------ momen */

.feed { display: flex; flex-direction: column; gap: 12px; }
.moment-card {
  background: var(--surface); border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.moment-card.is-unseen { box-shadow: inset 3px 0 0 var(--accent); }
.moment-head { display: flex; gap: 10px; align-items: center; }
.moment-author { border: none; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.moment-meta { flex: 1; min-width: 0; }
.moment-line { font-size: 0.95rem; line-height: 1.3; }
.moment-time { font-size: 0.8rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.audience { display: inline-flex; gap: 4px; align-items: center; }
.kind-dot {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem;
}
.kind-dot.kind-ok { background: var(--ok-bg); color: var(--ok); }
.kind-dot.kind-wake { background: #FDF1D8; color: #C47F14; }
.kind-dot.kind-sleep, .kind-dot.kind-quiet { background: #ECEDF7; color: #5E6488; }
.kind-dot.kind-place { background: #E5EEFA; color: #2F5DA8; }
.moment-content { display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.moment-body { font-size: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.moment-body.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.tagged { font-size: 0.85rem; color: var(--ink-3); }
.memory-card { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.memory-card img { width: 100%; max-height: 520px; object-fit: cover; }
.memory-chips {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chip-glass {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(20, 24, 22, 0.62); color: #FFFFFF;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 999px; padding: 5px 10px; font-size: 0.78rem; font-weight: 600;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.music-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border-radius: 14px; padding: 10px 12px;
}
.music-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.music-text { flex: 1; min-width: 0; }
.music-text > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moment-foot { display: flex; align-items: center; gap: 4px; }
.foot-btn {
  min-height: 40px; padding: 0 12px; border-radius: 20px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; cursor: pointer;
}
.moment-foot > .foot-btn { border-color: transparent; }
.foot-btn.is-active { border-color: var(--accent); background: var(--accent-soft); color: #8F2C18; font-weight: 700; }
.reaction-summary { margin-left: auto; font-size: 0.85rem; color: var(--ink-3); }
.reaction-wrap { position: relative; }
.reaction-picker {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 10;
  display: flex; gap: 2px; padding: 6px;
  background: var(--surface); border-radius: 999px; box-shadow: 0 8px 28px rgba(28, 35, 33, 0.18);
  animation: pop .14s ease-out;
}
.reaction-picker[hidden] { display: none; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.reaction-opt {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem;
  transition: transform .1s ease;
}
.reaction-opt:hover, .reaction-opt:focus-visible { transform: scale(1.18); background: var(--surface-2); }
.reaction-opt.is-active { background: var(--accent-soft); }
.end-note { text-align: center; color: var(--ink-3); font-size: 0.9rem; padding: 12px 0; }

/* ------------------------------------------------------------------ detail momen & komentar */

.detail-wrap { display: flex; flex-direction: column; gap: 18px; padding-bottom: 80px; }
.section-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.section-label .small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-bubble { flex: 1; min-width: 0; background: var(--surface); border-radius: 4px 16px 16px 16px; padding: 10px 12px; }
.comment-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.comment-bubble p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.comment-form {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: 520px; z-index: 15;
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 16px; background: var(--bg); border-top: 1px solid var(--line);
}
.comment-form textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 140px;
  padding: 11px 14px; border-radius: 22px; border: 1.5px solid var(--line-2); background: var(--surface); outline: none;
}
.comment-form textarea:focus { border-color: var(--ink); }
.send-btn { background: var(--accent); color: #FFFFFF; }
.send-btn:hover { background: #C23D23; }

/* ------------------------------------------------------------------ chips & segmented */

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.chip {
  flex-shrink: 0; min-height: 38px; padding: 0 14px; border-radius: 19px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; font-weight: 500; cursor: pointer;
}
.chip.is-active { background: var(--ink); color: #FFFFFF; border-color: var(--ink); font-weight: 600; }
.chip.static { cursor: default; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.segmented { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 2px; margin-bottom: 16px; overflow-x: auto; }
.segmented button {
  flex: 1; min-height: 40px; border: none; background: none; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; padding: 0 8px;
}
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ------------------------------------------------------------------ bagikan momen */

.compose-body { padding-bottom: 20px; }
.compose-me { display: flex; gap: 12px; align-items: flex-start; }
.compose-text {
  flex: 1; border: none; background: transparent; resize: none; outline: none;
  font-size: 1.2rem; line-height: 1.4; padding: 8px 0; min-height: 80px;
}
.kind-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kind-opt {
  min-height: 72px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.kind-opt.is-active { border: 2px solid var(--accent); color: #8F2C18; background: var(--accent-soft); }
.photo-drop {
  display: block; border-radius: 16px; border: 1.5px dashed var(--line-2); background: var(--surface);
  overflow: hidden; cursor: pointer; min-height: 180px;
}
.photo-drop.has-photo { border-style: solid; }
.photo-drop img { width: 100%; max-height: 420px; object-fit: cover; }
.photo-drop-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-3); font-size: 0.9rem; padding: 16px; text-align: center; }
.mood-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mood-opt {
  min-height: 70px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 0.8rem; cursor: pointer;
}
.mood-opt .emoji { font-size: 1.5rem; }
.mood-opt.is-active { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 700; }

.settings-list, .card {
  background: var(--surface); border-radius: var(--radius); padding: 6px 16px;
}
.card { padding: 16px; margin-bottom: 14px; }
.settings-item {
  width: 100%; min-height: 56px; border: none; background: none; padding: 0;
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.settings-item:last-child { border-bottom: none; }
.settings-item .value { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 0.9rem; }
.settings-item .value.accent { color: var(--accent); font-weight: 600; }
.settings-item.danger { color: var(--danger); }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice {
  min-height: 56px; width: 100%; padding: 10px 14px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
}
.choice.is-active { border-color: var(--accent); background: var(--accent-soft); }
.choice.danger { color: var(--danger); }
.check-list { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; }
.check-item { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-item input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ------------------------------------------------------------------ profil */

.profile-head { display: flex; gap: 16px; align-items: center; padding: 6px 0 12px; }
.profile-id { flex: 1; min-width: 0; }
.profile-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }
.profile-bio { margin-top: 6px; color: var(--ink-2); }
.profile-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border-radius: 19px; background: var(--surface); border: 1.5px solid var(--line-2); font-size: 0.9rem; font-weight: 600;
}
.pill-ok { background: var(--ok-bg); border-color: var(--ok-line); color: #1F5E43; }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 10px 0 6px; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.memory-banner { background: var(--green); color: #FFFFFF; border-radius: var(--radius); padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.memory-label { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #CFE0DA; }
.memory-item { display: flex; gap: 12px; align-items: center; border: none; background: rgba(255,255,255,.08); border-radius: 12px; padding: 8px; cursor: pointer; color: #FFFFFF; text-align: left; }
.memory-item img, .memory-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.memory-thumb { background: #3C6B61; display: inline-flex; align-items: center; justify-content: center; }
.memory-text { display: flex; flex-direction: column; gap: 2px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.memory-year { font-family: var(--font); font-size: 0.8rem; font-weight: 500; color: #CFE0DA; }

.calendar { padding: 12px 12px 16px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 1.05rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.cal-dow { font-size: 0.75rem; color: var(--ink-3); padding: 4px 0; }
.cal-cell {
  height: 2.5rem; border-radius: 10px; border: none; background: none;
  font-size: 0.85rem; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2);
}
.cal-cell[disabled] { cursor: default; }
.cal-cell.has { background: var(--accent); color: #FFFFFF; font-weight: 700; cursor: pointer; }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; }
.cal-cell.selected { background: var(--ink); color: #FFFFFF; }

/* ------------------------------------------------------------------ teman */

.person-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); padding: 0 12px; margin-bottom: 16px; }
.person-row {
  display: flex; align-items: center; gap: 12px; min-height: 64px; width: 100%;
  border: none; background: none; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left;
}
.person-row:last-child { border-bottom: none; }
.person-row.static { cursor: default; }
.circle-dots { display: flex; gap: 4px; }
.find-card { display: flex; flex-direction: column; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .at { font-weight: 700; color: var(--ink-3); }
.inline-form input { flex: 1; }
input[type="search"] { margin-bottom: 12px; }
.code-badge { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; letter-spacing: 0.12em; background: var(--surface-2); border-radius: 8px; padding: 6px 10px; }
.invite-explain h2 { font-family: var(--display); font-size: 1.25rem; margin-bottom: 6px; }
.invite-explain p { margin-bottom: 14px; }
.circle-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.circle-row {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px;
  background: var(--surface); border: none; border-radius: var(--radius); cursor: pointer; width: 100%;
}
.circle-swatch { width: 14px; height: 40px; border-radius: 7px; flex-shrink: 0; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer; }
.swatch.is-active { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }

/* ------------------------------------------------------------------ notifikasi & pengaturan */

.notif-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.notif {
  display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 14px;
  border: none; background: none; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%;
}
.notif:last-child { border-bottom: none; }
.notif.is-unread { background: #FFF8F5; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch-row input {
  appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px;
  background: var(--line-2); position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s;
}
.switch-row input::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.switch-row input:checked { background: var(--ok); }
.switch-row input:checked::after { transform: translateX(20px); }
.version { padding: 8px 0 16px; }

/* ------------------------------------------------------------------ status: memuat, kosong */

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--ink-3); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); }
.empty h2 { font-family: var(--display); font-size: 1.2rem; }
.empty p { color: var(--ink-3); max-width: 340px; }

/* ------------------------------------------------------------------ toast & sheet */

.toast-host {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  width: min(480px, calc(100% - 32px)); z-index: 100;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--ink); color: #FFFFFF; padding: 12px 16px; border-radius: 14px; font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--danger); }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 20, 18, 0);
  display: flex; align-items: flex-end; justify-content: center; transition: background .2s;
}
.sheet-backdrop.open { background: rgba(15, 20, 18, 0.42); }
.sheet {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%); transition: transform .22s ease-out;
}
.sheet-backdrop.open .sheet { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 6px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sheet-head h2 { font-family: var(--display); font-size: 1.25rem; }

/* ------------------------------------------------------------------ layar lebar */

@media (min-width: 760px) {
  body { background: #E9ECE6; }
  .app { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
}

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

/* ------------------------------------------------------------------ obrolan */

.foot-label { display: inline; }
@media (max-width: 380px) { .foot-label { display: none; } }

.conv-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.conv-row {
  display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.conv-row:last-child { border-bottom: none; }
.conv-row:hover { background: var(--surface-2); color: var(--ink); }
.conv-text { display: flex; flex-direction: column; gap: 3px; }
.conv-top, .conv-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conv-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { font-size: 0.78rem; color: var(--ink-3); flex-shrink: 0; }
.conv-preview { flex: 1; min-width: 0; font-size: 0.9rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-row.is-unread .conv-preview { color: var(--ink); font-weight: 600; }
.conv-row.is-unread .conv-time { color: var(--accent); font-weight: 600; }
.group-avatar { border-radius: 16px; }

.app.in-room { display: flex; flex-direction: column; min-height: 0; height: 100vh; height: 100dvh; height: var(--vvh, 100dvh); padding-bottom: 0; overflow: hidden; }
.app.in-room .view { flex: 1; min-height: 0; display: flex; }
.chat-room { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.chat-header {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.chat-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: none; background: none; padding: 4px; border-radius: 12px; cursor: pointer; text-align: left; }
.chat-who:hover { background: var(--surface-2); }
.chat-name { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sub { display: block; font-size: 0.8rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.chat-empty { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; color: var(--ink-2); }
.older-btn { margin: 4px auto 8px; }
.day-sep { display: flex; justify-content: center; margin: 12px 0 6px; }
.day-sep span { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }

.msg { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.msg.mine { justify-content: flex-end; }
.msg-avatar-space { width: 30px; flex-shrink: 0; }
.msg-col { display: flex; flex-direction: column; gap: 2px; max-width: min(78%, 420px); min-width: 0; }
.msg.mine .msg-col { align-items: flex-end; }
.msg-sender { font-size: 0.75rem; font-weight: 700; margin: 6px 0 0 10px; }
.msg-bubble {
  position: relative; padding: 8px 12px 6px; border-radius: 18px; background: var(--surface);
  display: flex; flex-direction: column; gap: 6px; min-width: 64px; max-width: 100%;
  box-shadow: 0 1px 1px rgba(28, 35, 33, 0.06); user-select: text; -webkit-touch-callout: none;
}
.msg.theirs .msg-bubble { border-bottom-left-radius: 6px; }
.msg.mine .msg-bubble { background: var(--accent); color: #FFFFFF; border-bottom-right-radius: 6px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.38; }
.msg-time { align-self: flex-end; font-size: 0.68rem; color: var(--ink-3); line-height: 1; margin-top: -2px; }
.msg.mine .msg-time { color: rgba(255, 255, 255, 0.82); }
.msg-deleted { display: flex; align-items: center; gap: 6px; font-style: italic; color: var(--ink-3); font-size: 0.9rem; }
.msg.mine .msg-deleted { color: rgba(255, 255, 255, 0.85); }
.msg-photo { border: none; padding: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; margin: 0 -6px; }
.msg-photo img { width: 100%; max-height: 320px; object-fit: cover; }
.msg-moment {
  display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink);
  background: var(--surface-2); border-radius: 12px; padding: 6px; margin: 0 -6px; min-width: 0;
}
.msg.mine .msg-moment { background: rgba(255, 255, 255, 0.92); }
.msg-moment img, .msg-moment-icon { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.msg-moment-icon { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: #8F2C18; }
.msg-moment-author { display: block; font-size: 0.75rem; font-weight: 700; color: var(--ink-3); }
.msg-moment-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.88rem; }
.msg-moment.unavailable { gap: 6px; font-size: 0.85rem; color: var(--ink-3); padding: 8px 10px; }

.composer-wrap { background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.chat-composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; }
.chat-composer textarea {
  flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 140px; padding: 11px 14px;
  border-radius: 22px; border: 1.5px solid var(--line-2); background: var(--bg); outline: none; line-height: 1.35;
}
.chat-composer textarea:focus { border-color: var(--ink); }
.attach-btn { background: transparent; color: var(--ink-2); cursor: pointer; }
.attach-preview { display: flex; align-items: center; gap: 10px; padding: 8px 12px 0; }
.attach-preview[hidden] { display: none; }
.attach-preview img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.chat-readonly {
  display: flex; align-items: center; gap: 8px; justify-content: center; text-align: center;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--surface-2); color: var(--ink-2); font-size: 0.88rem;
}
.photo-view img { width: 100%; border-radius: 12px; }
.share-preview { display: flex; gap: 10px; align-items: center; background: var(--surface); border-radius: 14px; padding: 8px; }
.share-preview img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; }
.sheet input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); outline: none;
}
.sheet input:focus { border-color: var(--ink); }

/* ------------------------------------------------------------------ cerita 24 jam */

.stories-bar {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; margin: 0 -16px 4px; padding-left: 16px; padding-right: 16px;
  scrollbar-width: none; align-items: flex-start;
}
.stories-bar::-webkit-scrollbar { display: none; }
.story-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; width: 72px; }
.story-bubble { border: none; background: none; padding: 5px; border-radius: 50%; cursor: pointer; }
.story-add {
  position: absolute; top: 48px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #FFFFFF; border: 2.5px solid var(--bg);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.story-name { font-size: 0.75rem; font-weight: 600; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stories-empty { align-self: center; padding: 0 4px 18px; max-width: 220px; }

.story-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.story-face.is-photo img { width: 100%; height: 100%; object-fit: cover; }
.story-face.is-text { padding: 12%; }
.story-text {
  font-family: var(--display); font-weight: 700; line-height: 1.18; text-align: center; letter-spacing: -0.01em;
  white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: balance;
}
.story-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 92px;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent); color: #FFFFFF; font-size: 1.05rem; text-align: center;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

.story-viewer {
  position: fixed; inset: 0; z-index: 80; background: rgba(8, 10, 9, 0.96);
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .18s ease;
}
.story-viewer.open { opacity: 1; }
.story-frame {
  position: relative; width: min(100vw, calc(100vh * 9 / 16), 520px); height: min(100vh, calc(100vw * 16 / 9));
  max-height: 100dvh; overflow: hidden; background: #000; color: #FFFFFF;
}
@media (min-width: 560px) { .story-frame { border-radius: 18px; height: min(92vh, 900px); width: min(calc(92vh * 9 / 16), 506px); } }
.story-stage { position: absolute; inset: 0; touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; }
.story-bars { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.story-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.story-bar-fill { display: block; height: 100%; background: #FFFFFF; }
.story-top {
  position: absolute; top: calc(20px + env(safe-area-inset-top, 0px)); left: 6px; right: 6px; z-index: 3;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.story-author { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: none; color: #FFFFFF; padding: 6px; cursor: pointer; text-align: left; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.story-author strong { display: block; font-size: 0.92rem; }
.story-time { display: block; font-size: 0.75rem; opacity: .85; }
.story-icon { background: rgba(0,0,0,.25); color: #FFFFFF; }
.story-icon:hover { background: rgba(0,0,0,.45); }
.story-music-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 60%;
  background: rgba(0,0,0,.42); color: #FFFFFF; border: none; border-radius: 999px; padding: 6px 12px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.story-music-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-music-chip .muted-x { opacity: .75; font-weight: 500; }
.story-music-chip.static { position: absolute; top: 14px; left: 14px; z-index: 2; cursor: default; }
.story-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 12px 12px calc(14px + env(safe-area-inset-bottom, 0px)); }
.story-reply-form { display: flex; gap: 8px; align-items: center; }
.story-reply {
  flex: 1; min-width: 0; min-height: 46px; border-radius: 23px; border: 1.5px solid rgba(255,255,255,.6);
  background: rgba(0,0,0,.25); color: #FFFFFF; padding: 0 16px; outline: none;
}
.story-reply::placeholder { color: rgba(255,255,255,.8); }
.story-reply:focus { border-color: #FFFFFF; background: rgba(0,0,0,.45); }
.story-send { background: rgba(255,255,255,.18); color: #FFFFFF; }
.story-own-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.8rem; text-shadow: 0 1px 3px rgba(0,0,0,.5); }

.story-editor-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 20px; }
@media (min-width: 480px) { .story-editor-body { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.story-preview {
  position: relative; width: min(100%, 260px); aspect-ratio: 9 / 16; max-width: 100%; justify-self: center;
  border-radius: 18px; overflow: hidden; background: #111; color: #FFFFFF; font-size: 13px; box-shadow: var(--shadow);
}
.story-preview .story-caption { padding: 30px 12px 16px; font-size: 0.95rem; }
.story-preview.is-placeholder .story-text { opacity: .6; }
.story-pick-photo {
  position: absolute; inset: 0; z-index: 2; border: none; background: rgba(0,0,0,.35); color: #FFFFFF;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 600; cursor: pointer;
}
.bg-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.bg-swatch { width: 42px; height: 42px; border-radius: 12px; border: none; cursor: pointer; }
.bg-swatch.is-active { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.story-editor .field textarea { font-size: 1.05rem; }
.story-cta {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--ink); border: 1.5px dashed var(--line-2);
}
.story-cta:hover { color: var(--ink); border-color: var(--accent); }
.story-cta-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: #8F2C18; display: inline-flex; align-items: center; justify-content: center; }

.track-list { display: flex; flex-direction: column; gap: 10px; }
.track-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1.5px solid transparent; }
.track-row.is-chosen { border-color: var(--accent); background: var(--accent-soft); }
.track-play { width: 44px; height: 44px; border-radius: 12px; border: none; background: var(--ink); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.license-note { margin-top: 4px; }

.msg-quote {
  display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; opacity: .85;
  border-left: 3px solid currentColor; padding-left: 8px; margin: 2px 0 0;
}

/* ---------- Penyimpanan di HP & mode offline ---------- */
.offline-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 12px; font-size: 0.85rem; font-weight: 600;
  background: #3A3F3D; color: #F4F1EA;
}
.offline-banner[hidden] { display: none; }
.storage-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.storage-stats div { background: var(--surface-2, rgba(0,0,0,0.04)); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.storage-stats dt { font-size: 0.78rem; color: var(--ink-3); }
.storage-stats dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.storage-meter { height: 8px; border-radius: 99px; background: var(--line, rgba(0,0,0,0.08)); overflow: hidden; }
.storage-meter span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.ok-line { display: flex; gap: 8px; align-items: center; color: var(--ok); }
.tip { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, rgba(0,0,0,0.04)); margin: 0; }
.tip svg { flex: none; margin-top: 2px; }
.device-storage .choice-list { border-top: 1px solid var(--line, rgba(0,0,0,0.08)); padding-top: 4px; }

/* ---------- Video ---------- */
.video-box { position: relative; background: #111; display: flex; align-items: center; justify-content: center; }
.video-box video { width: 100%; max-height: 560px; object-fit: contain; display: block; background: #111; }
.memory-card.is-video .video-box video { aspect-ratio: 9 / 12; object-fit: cover; }
.video-play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; border: none; cursor: pointer;
  background: rgba(20, 22, 21, 0.55); color: #fff; backdrop-filter: blur(6px);
}
.video-play svg { margin-left: 4px; }
.video-sound {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; border: none; cursor: pointer;
  background: rgba(20, 22, 21, 0.6); color: #fff;
}
.video-chips { position: absolute; left: 10px; bottom: 10px; right: 56px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.video-time { font-size: 0.75rem; font-weight: 600; color: #fff; background: rgba(20, 22, 21, 0.55); border-radius: 99px; padding: 3px 8px; }
.memory-chips.top { top: 10px; bottom: auto; }
.music-chip-btn { cursor: pointer; border: none; font: inherit; pointer-events: auto; }
.video-preview video { width: 100%; max-height: 420px; border-radius: 14px; background: #111; display: block; }
.video-preview p { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; }
.story-face.is-video video { width: 100%; height: 100%; object-fit: cover; }
.story-pick-photo .small { font-size: 0.8rem; opacity: 0.8; }
.card-row { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.comment-off { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 14px 16px; color: var(--ink-3); font-size: 0.9rem; border-top: 1px solid var(--line); background: var(--surface); margin: 0; }
button.photo-drop { width: 100%; font: inherit; color: inherit; }

/* ---------- Pengaturan Lingkar ---------- */
html.text-large { font-size: 18px; }
html.text-xlarge { font-size: 20px; }
html.simple.text-large, html.simple.text-xlarge { font-size: 20px; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.settings-body { padding: 8px 16px 32px; display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.settings-body > .card { margin-bottom: 0; }
.settings-search {
  width: 100%; box-sizing: border-box; min-height: 44px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235E6864' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center;
  padding: 0 14px 0 38px; font: inherit; color: var(--ink);
}
.settings-group { display: flex; flex-direction: column; gap: 6px; }
.settings-group .section-label { margin: 6px 4px 0; }
.settings-groups { display: flex; flex-direction: column; gap: 14px; }
.card-list { padding: 2px 16px; }
.settings-item.static { cursor: default; }
.settings-item.tall { min-height: 68px; padding: 8px 0; }
.settings-item svg:first-child { flex: none; color: var(--ink-2); }
.settings-item.danger svg:first-child { color: var(--danger); }
.account-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.account-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 4px; text-align: center; }
.account-head strong { font-size: 1.15rem; margin-top: 6px; }
.radio-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.chip.removable { display: inline-flex; align-items: center; gap: 6px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.mute-opts { display: flex; gap: 14px; font-size: 0.85rem; color: var(--ink-2); margin-top: 4px; }
.mute-opts label { display: inline-flex; align-items: center; gap: 6px; }
.person-row.wrap { align-items: flex-start; }
.empty-note { text-align: center; color: var(--ink-3); padding: 24px 8px; background: var(--surface); border-radius: var(--radius); margin: 0; }
.dot.big { width: 14px; height: 14px; }
.time-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.time-range input { min-height: 40px; border-radius: 10px; border: 1px solid var(--line-2); padding: 0 10px; font: inherit; background: var(--surface); color: var(--ink); }
.switch-row select { min-height: 40px; border-radius: 10px; border: 1px solid var(--line-2); padding: 0 10px; font: inherit; background: var(--surface); color: var(--ink); max-width: 48%; }
.preview-text { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; }
.checklist li svg { flex: none; margin-top: 3px; color: var(--ok); }
.checklist.danger li svg { color: var(--danger); }
.usage-avg { font-size: 1.6rem; font-family: var(--display); }
.usage-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 140px; align-items: end; }
.usage-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.usage-bar { width: 100%; max-width: 28px; border-radius: 6px 6px 3px 3px; background: var(--line-2); }
.usage-col.is-today .usage-bar { background: var(--accent); }
.usage-day { font-size: 0.72rem; color: var(--ink-3); }
.privacy-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); text-decoration: none;
}
.privacy-card > svg { color: var(--green); flex: none; }
.status-ok { align-items: center; text-align: center; }
.status-badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq details p { margin: 8px 0 0; color: var(--ink-2); }
.about .display.small { font-size: 1.4rem; }

/* ---------- Kebijakan ---------- */
.policy-body { padding: 8px 16px 40px; max-width: 680px; margin: 0 auto; box-sizing: border-box; width: 100%; }
.policy-body section { margin-top: 18px; }
.policy-body h2 { font-family: var(--display); font-size: 1.12rem; margin: 0 0 6px; }
.policy-body p, .policy-body li { line-height: 1.6; color: var(--ink-2); }
.policy-body ul { padding-left: 20px; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.policy-note { display: flex; gap: 8px; align-items: flex-start; background: #FFF5DD; color: #5B4512 !important; border-radius: 12px; padding: 12px 14px; font-size: 0.9rem; }
.policy-note svg { flex: none; margin-top: 3px; }
.policy-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.policy-toc a { font-size: 0.8rem; padding: 5px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.policy-foot { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 14px; }
a.settings-item, a.settings-item:visited, a.privacy-card, a.privacy-card:visited, a.account-card, a.account-card:visited { color: var(--ink); }
a.settings-item:hover, a.privacy-card:hover, a.account-card:hover { color: var(--ink); background-color: transparent; }
a.privacy-card:hover, a.account-card:hover { box-shadow: 0 0 0 2px var(--line-2); }
.time-range input { width: 128px; }

/* Ruang-ruang pengaturan: ubin berwarna, bukan daftar panjang. */
.lingkar-settings .settings-body { gap: 16px; }
.me-card {
  display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 22px; text-decoration: none;
  background: linear-gradient(135deg, #1F4D45 0%, #2B6B5F 100%); color: #F4F1EA;
}
a.me-card, a.me-card:visited, a.me-card:hover { color: #F4F1EA; }
.me-card .muted { color: rgba(244, 241, 234, 0.75); }
.me-avatar { position: relative; width: 84px; height: 84px; display: grid; place-items: center; flex: none; }
.me-avatar > .avatar, .me-avatar > img, .me-avatar > span:not(.me-ring) { position: relative; z-index: 1; }
.me-ring { position: absolute; inset: 0; width: 84px; height: 84px; transform: rotate(-90deg); }
.me-ring-track { fill: none; stroke: rgba(255, 255, 255, 0.18); stroke-width: 6; }
.me-ring-fill { fill: none; stroke: #F2A65A; stroke-width: 6; stroke-linecap: round; }
.me-name { font-family: var(--display); font-size: 1.2rem; }
.me-count { display: block; margin-top: 6px; font-size: 0.8rem; color: #F7D9B5; }
.me-link { display: inline-flex; align-items: center; gap: 2px; font-size: 0.85rem; font-weight: 600; align-self: flex-start; white-space: nowrap; }
.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.glance-item {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; text-decoration: none;
  background: var(--surface); border: 1px dashed var(--line-2); color: var(--ink); min-width: 0;
}
a.glance-item:visited, a.glance-item:hover { color: var(--ink); }
.glance-item strong { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rooms { display: flex; flex-direction: column; gap: 18px; }
.room-head h2 { font-family: var(--display); font-size: 1.1rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.room-head h2::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--room); }
.room-head p { margin: 2px 0 0; font-size: 0.85rem; color: var(--ink-3); }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.settings-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; min-height: 104px; box-sizing: border-box;
  background: var(--surface); color: var(--ink); text-decoration: none; border: 1px solid var(--line);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
a.settings-tile:visited { color: var(--ink); }
.settings-tile:hover { border-color: var(--room); color: var(--ink); }
.settings-tile:active { transform: scale(0.98); }
.tile-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--room-soft); color: var(--room); }
.tile-label { font-weight: 650; line-height: 1.25; }
.tile-value { font-size: 0.8rem; color: var(--room); font-weight: 600; margin-top: auto; }
.tone-green { --room: #1F4D45; --room-soft: #E2EFEA; }
.tone-blue { --room: #2F5DA8; --room-soft: #E3EAF7; }
.tone-clay { --room: #B5562F; --room-soft: #F8E6DD; }
.tone-violet { --room: #7A4AA0; --room-soft: #EFE5F6; }
.tone-gold { --room: #8F6A1F; --room-soft: #F6EDD6; }
.settings-exit { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.danger-text { color: var(--danger) !important; }
@media (max-width: 340px) { .tile-grid, .glance { grid-template-columns: 1fr; } }
.glance-item strong { white-space: normal; line-height: 1.25; }
.glance-item .small { font-size: 0.75rem; }
.me-card { position: relative; }
.me-link { position: absolute; top: 14px; right: 16px; }
.me-card .grow { padding-right: 4px; }
.me-name { padding-right: 64px; }

/* ---------- Latar profil beranimasi ---------- */
.banner { position: relative; overflow: hidden; width: 100%; height: 100%; background: var(--profile, #1F4D45); isolation: isolate; }
.banner .pt { position: absolute; left: var(--x); top: var(--y); pointer-events: none; }
.banner-polos { background: linear-gradient(135deg, var(--profile, #1F4D45), color-mix(in srgb, var(--profile, #1F4D45) 70%, #000)); }
.banner-photo { width: 100%; height: 100%; object-fit: cover; animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, 1%); } }

.banner-senja { background: linear-gradient(120deg, #F7B267, #F25C54, #8E3B60, #F79D65, #F7B267); background-size: 300% 300%; animation: drift 16s ease-in-out infinite; }
@keyframes drift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.banner-laut { background: linear-gradient(180deg, #8FD3E8 0%, #3E8FC2 55%, #1D4E89 100%); }
.banner-laut .wave {
  position: absolute; left: -50%; width: 200%; height: 60%; bottom: -30%;
  border-radius: 45%; background: rgba(255, 255, 255, 0.18); animation: wave 9s linear infinite;
}
.banner-laut .w2 { bottom: -36%; background: rgba(255, 255, 255, 0.12); animation-duration: 13s; animation-direction: reverse; }
.banner-laut .w3 { bottom: -42%; background: rgba(15, 50, 100, 0.35); animation-duration: 17s; }
@keyframes wave { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.banner-malam { background: radial-gradient(ellipse at 70% 120%, #3B3A78 0%, #17163A 55%, #0B0A1F 100%); }
.banner-malam .moon { position: absolute; right: 12%; top: 18%; width: 34px; height: 34px; border-radius: 50%; box-shadow: -8px 4px 0 0 #F7E7B4; transform: rotate(-20deg); }
.pt-star { width: calc(3px * var(--s)); height: calc(3px * var(--s)); border-radius: 50%; background: #FFF6D8; animation: twinkle var(--d) ease-in-out var(--delay) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; transform: scale(1.4); } }

.banner-hujan { background: linear-gradient(180deg, #5D6D7E 0%, #34495E 100%); }
.pt-drop { top: -20%; width: 1.5px; height: calc(18px * var(--s)); background: linear-gradient(transparent, rgba(220, 235, 255, 0.85)); animation: rain calc(var(--d) / 4) linear var(--delay) infinite; }
@keyframes rain { to { transform: translateY(260px) translateX(-24px); } }

.banner-aurora { background: #0E1F2F; }
.banner-aurora .glow { position: absolute; width: 70%; height: 140%; top: -20%; border-radius: 50%; filter: blur(30px); opacity: 0.7; mix-blend-mode: screen; animation: aurora 12s ease-in-out infinite alternate; }
.banner-aurora .g1 { left: -10%; background: #3DDC97; }
.banner-aurora .g2 { left: 30%; background: #4C6EF5; animation-duration: 15s; animation-delay: -4s; }
.banner-aurora .g3 { left: 55%; background: #C77DFF; animation-duration: 18s; animation-delay: -8s; }
@keyframes aurora { from { transform: translateX(-12%) skewX(-10deg); } to { transform: translateX(12%) skewX(10deg); } }

.banner-batik {
  background-color: #6B3E1D;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(251, 235, 211, 0.22) 0 14%, transparent 15%),
    radial-gradient(circle at 75% 25%, rgba(251, 235, 211, 0.22) 0 14%, transparent 15%),
    radial-gradient(circle at 25% 75%, rgba(251, 235, 211, 0.22) 0 14%, transparent 15%),
    radial-gradient(circle at 75% 75%, rgba(251, 235, 211, 0.22) 0 14%, transparent 15%),
    radial-gradient(circle at 50% 50%, rgba(232, 168, 88, 0.35) 0 8%, transparent 9%);
  background-size: 64px 64px; animation: batik 30s linear infinite;
}
@keyframes batik { to { background-position: 64px 64px; } }

.banner-kelopak { background: linear-gradient(160deg, #FFE3EC 0%, #F7A8C3 100%); }
.pt-petal {
  top: -15%; width: calc(12px * var(--s)); height: calc(9px * var(--s)); border-radius: 80% 0 80% 0;
  background: #FFFFFF; opacity: 0.9; box-shadow: inset -2px -2px 0 rgba(233, 120, 160, 0.35);
  animation: fall var(--d) linear var(--delay) infinite;
}
@keyframes fall {
  0% { transform: translateY(0) translateX(0) rotate(var(--r)); }
  50% { transform: translateY(130px) translateX(24px) rotate(calc(var(--r) + 180deg)); }
  100% { transform: translateY(260px) translateX(-10px) rotate(calc(var(--r) + 360deg)); }
}

.banner-kunang { background: radial-gradient(ellipse at 50% 120%, #2E4A36 0%, #142318 60%, #0A130C 100%); }
.pt-firefly { width: calc(5px * var(--s)); height: calc(5px * var(--s)); border-radius: 50%; background: #F5F28A; box-shadow: 0 0 10px 3px rgba(245, 242, 138, 0.7); animation: firefly var(--d) ease-in-out var(--delay) infinite alternate; }
@keyframes firefly { 0% { transform: translate(0, 0); opacity: 0.2; } 50% { opacity: 1; } 100% { transform: translate(28px, -22px); opacity: 0.3; } }

/* Efek profil (di atas kepala profil) */
.profile-effect { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.profile-effect .pt { position: absolute; left: var(--x); top: var(--y); }
.pt-spark { width: calc(10px * var(--s)); height: calc(10px * var(--s)); background: #FFE08A;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: spark var(--d) ease-in-out var(--delay) infinite; }
@keyframes spark { 0%, 70%, 100% { opacity: 0; transform: scale(0.2) rotate(0); } 80% { opacity: 1; transform: scale(1) rotate(45deg); } }
.pt-confetti { top: -10%; width: calc(6px * var(--s)); height: calc(10px * var(--s)); background: hsl(var(--h) 85% 60%); border-radius: 2px; animation: confetti var(--d) linear var(--delay) infinite; }
@keyframes confetti { to { transform: translateY(420px) rotate(calc(var(--r) + 720deg)); } }
.fx-kelopak .pt-petal { background: #F7A8C3; }
.pt-bubble { top: auto; bottom: -10%; width: calc(14px * var(--s)); height: calc(14px * var(--s)); border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.12); animation: bubble var(--d) ease-in var(--delay) infinite; }
@keyframes bubble { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-380px) translateX(18px); opacity: 0; } }
.pt-snow { top: -10%; width: calc(6px * var(--s)); height: calc(6px * var(--s)); border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 4px rgba(255, 255, 255, 0.8); animation: fall calc(var(--d) * 1.6) linear var(--delay) infinite; }

html.reduce-motion .banner *, html.reduce-motion .banner, html.reduce-motion .profile-effect * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .banner, .banner *, .profile-effect * { animation: none !important; } }

/* ---------- Kepala profil bergaya kartu ---------- */
.profile-hero { position: relative; border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 14px; }
.profile-hero .hero-banner { height: 148px; position: relative; }
.hero-edit { position: absolute; top: 10px; right: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: none; cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 600; background: rgba(15, 18, 17, 0.55); color: #fff; backdrop-filter: blur(6px); }
.hero-body { position: relative; padding: 0 18px 18px; }
.hero-avatar { position: relative; z-index: 2; margin-top: -48px; width: max-content; border-radius: 50%; padding: 5px; background: var(--surface); }
.hero-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; margin: 8px 0 0; }
.hero-status {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; max-width: 100%;
  padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); border: none; font: inherit; color: var(--ink); text-align: left;
}
button.hero-status { cursor: pointer; }
.hero-status .emoji { font-size: 1.15rem; }
.hero-status .st-text { overflow: hidden; text-overflow: ellipsis; }
.hero-status .st-left { font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; }
.hero-status.is-empty { color: var(--ink-3); border: 1.5px dashed var(--line-2); background: transparent; }
.hero-status-row { position: absolute; top: 12px; left: 118px; right: 14px; }
.profile-hero .profile-bio { margin-top: 8px; }

/* Editor tampilan */
.look-preview { height: 132px; border-radius: 18px; overflow: hidden; position: relative; }
.banner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.banner-opt { border: 2px solid transparent; border-radius: 14px; padding: 0; overflow: hidden; cursor: pointer; background: none; display: flex; flex-direction: column; font: inherit; color: var(--ink); }
.banner-opt .banner { height: 58px; }
.banner-opt span.opt-label { font-size: 0.75rem; padding: 4px 6px; text-align: center; }
.banner-opt.is-active { border-color: var(--accent); }
.effect-row { display: flex; flex-wrap: wrap; gap: 8px; }
.status-emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.status-emojis button { width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 1.3rem; cursor: pointer; }
.status-emojis button.is-active { border-color: var(--accent); background: var(--accent-soft); }
.friend-status { display: block; font-size: 0.8rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.photo-pick { height: 58px; display: grid; place-items: center; color: #fff; }

/* ---------- Status sosial ---------- */
.hero-top { display: flex; align-items: flex-end; gap: 10px; }
.hero-thought { flex: 1; min-width: 0; padding-bottom: 6px; position: relative; z-index: 2; }
.hero-thought .hero-status { margin-top: 0; box-shadow: 0 2px 10px rgba(28, 35, 33, 0.08); background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; position: relative; }
.hero-thought .hero-status::before { content: ''; position: absolute; left: -9px; bottom: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.hero-thought .hero-status.is-empty { box-shadow: none; background: transparent; }
.hero-thought .hero-status.is-empty::before { display: none; }
.hero-status .st-main { display: flex; flex-direction: column; min-width: 0; }
.hero-status .st-text { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.hero-status .st-left { font-size: 0.74rem; color: var(--ink-3); white-space: normal; }
.hero-status.is-ghost .st-text { color: var(--ink-3); font-weight: 500; }
.status-card { display: flex; flex-direction: column; gap: 6px; }
.echo-line { margin: 0; font-size: 0.8rem; color: var(--ink-2); padding-left: 4px; }
.status-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.status-actions .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.82rem; }
.echo-btn.is-active { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.status-sheet .status-input { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 6px 10px 6px 6px; background: var(--surface); }
.status-sheet .status-input input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; color: var(--ink); min-height: 40px; }
.status-sheet .status-input:focus-within { border-color: var(--accent); }
.emoji-btn { width: 42px; height: 42px; border-radius: 12px; border: none; background: var(--surface-2); font-size: 1.35rem; cursor: pointer; flex: none; }
.st-count { font-size: 0.75rem; color: var(--ink-3); }
.status-emojis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.status-emojis button { width: 100%; aspect-ratio: 1; height: auto; }
.status-emojis .no-emoji { grid-column: span 2; aspect-ratio: auto; font-size: 0.8rem; border-radius: 12px; border: 1.5px dashed var(--line-2); background: none; cursor: pointer; }
.status-preview { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.preview-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 700; }
.status-preview .hero-status { margin-top: 0; background: var(--surface); border: 1px solid var(--line); }
.preset-chips .chip { font-size: 0.85rem; }
.face-avatar { position: relative; display: inline-block; }
.face-status {
  position: absolute; left: -4px; top: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.85rem; background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); z-index: 2;
}
.face-status.is-quiet::after { content: '🔕'; position: absolute; right: -8px; bottom: -6px; font-size: 0.6rem; }
.kabar-status .status-card { margin-top: 10px; }
.partner-status { display: flex; gap: 8px; align-items: center; margin: 0 12px 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 0.85rem; color: var(--ink-2); }
.partner-status.is-quiet { background: #EEF0F6; }
.hero-thought .status-actions { flex-wrap: nowrap; }
.hero-thought .status-actions .chip { padding: 5px 10px; min-height: 32px; font-size: 0.78rem; white-space: nowrap; }
.hero-thought .echo-line { margin: 4px 0 6px 4px; }
/* Pemeriksaan langsung di formulir pendaftaran */
.field-status { font-size: 0.82rem; line-height: 1.35; color: var(--ink-3); }
.field-status:empty { display: none; }
.field-status.is-ok { color: var(--ok); }
.field-status.is-ok::before { content: '✓ '; }
.field-status.is-error { color: var(--danger, #B42318); }
.field input[aria-invalid="true"] { border-color: var(--danger, #B42318); }

/* ---------- Latar & efek khusus Lingkar Plus ---------- */
.banner-emas { background: linear-gradient(115deg, #7A4E12 0%, #C99A3B 30%, #F6DE9A 48%, #C99A3B 62%, #6B4210 100%); background-size: 220% 220%; animation: drift 14s ease-in-out infinite; }
.banner-emas .sheen { position: absolute; inset: -40% -60%; background: linear-gradient(100deg, transparent 40%, rgba(255, 249, 225, 0.55) 50%, transparent 60%); animation: sheen 6s ease-in-out infinite; }
@keyframes sheen { from { transform: translateX(-40%); } to { transform: translateX(40%); } }
.pt-glint { width: calc(7px * var(--s)); height: calc(7px * var(--s)); background: #FFF6D0; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: spark var(--d) ease-in-out var(--delay) infinite; }
.banner-galaksi { background: radial-gradient(ellipse at 30% 40%, #2B1B5A 0%, #0D0A24 55%, #05040F 100%); }
.banner-galaksi .nebula { position: absolute; inset: -30%; background:
  radial-gradient(ellipse at 35% 45%, rgba(214, 86, 160, 0.45), transparent 45%),
  radial-gradient(ellipse at 65% 55%, rgba(76, 110, 245, 0.45), transparent 45%);
  filter: blur(18px); animation: nebula 30s linear infinite; }
@keyframes nebula { to { transform: rotate(360deg); } }
.banner-lentera { background: linear-gradient(180deg, #1B1237 0%, #3A1F45 60%, #6A2E3A 100%); }
.pt-lantern { top: auto; bottom: -20%; width: calc(12px * var(--s)); height: calc(16px * var(--s)); border-radius: 40% 40% 45% 45%;
  background: radial-gradient(circle at 50% 60%, #FFE6A0, #F29A3E 70%); box-shadow: 0 0 14px 4px rgba(255, 170, 70, 0.55);
  animation: lantern calc(var(--d) * 2.2) ease-in var(--delay) infinite; }
@keyframes lantern { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(-300px) translateX(30px); opacity: 0; } }
.pt-meteor { top: -10%; width: calc(70px * var(--s)); height: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #FFFFFF); border-radius: 2px;
  transform: rotate(-35deg); animation: meteor calc(var(--d) * 1.2) linear var(--delay) infinite; opacity: 0; }
@keyframes meteor { 0% { opacity: 0; transform: rotate(-35deg) translateX(0); } 5% { opacity: 1; } 30% { opacity: 0; transform: rotate(-35deg) translateX(-260px); } 100% { opacity: 0; transform: rotate(-35deg) translateX(-260px); } }
.pt-burst { width: 4px; height: 4px; border-radius: 50%; color: hsl(var(--h) 90% 65%); background: currentColor;
  box-shadow: 0 -22px 0 currentColor, 0 22px 0 currentColor, -22px 0 0 currentColor, 22px 0 0 currentColor,
    16px 16px 0 currentColor, -16px 16px 0 currentColor, 16px -16px 0 currentColor, -16px -16px 0 currentColor;
  animation: burst calc(var(--d) * 0.6) ease-out var(--delay) infinite; }
@keyframes burst { 0% { transform: scale(0.1); opacity: 0; } 15% { opacity: 1; } 60% { transform: scale(var(--s)); opacity: 0.9; } 100% { transform: scale(calc(var(--s) * 1.3)); opacity: 0; } }
.plus-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 99px; color: #5B3A08; background: linear-gradient(120deg, #F6DE9A, #E3B65A); }

/* ---------- Lencana bergaya Lingkar ---------- */
.badge-icons { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; vertical-align: -2px; }
.badge-icons svg { flex: none; }
.hero-name .badge-icons { vertical-align: -1px; }
.known-line { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; font-size: 0.86rem; color: var(--ink-3); }
.known-line svg { flex: none; margin-top: 1px; opacity: 0.55; }
.known-line.is-known { color: var(--ok); }
.known-line.is-known svg { opacity: 1; }
.known-box { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.vouch-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; }
.vouch-btn.is-active { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }

/* ---------- Linimasa: Lingkaran | Serambi ---------- */
.feed-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 4px 0 14px; border-radius: 14px; background: var(--surface-2); }
.feed-switch-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 11px; font-weight: 600; font-size: 0.92rem; color: var(--ink-3); text-decoration: none; }
.feed-switch-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(28, 35, 33, 0.12); }

/* ---------- Serambi ---------- */
.serambi-mine { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; background: linear-gradient(120deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); }
.serambi-mine.is-closed { background: var(--surface); border-style: dashed; }
.serambi-mine strong svg { margin-left: 6px; vertical-align: -3px; }
.serambi-owner { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; flex: 1; }
.serambi-title { font-weight: 700; display: inline-flex; align-items: center; flex-wrap: wrap; }
.serambi-post { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.serambi-post-head { display: flex; align-items: center; gap: 8px; }
.serambi-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.serambi-photo { width: 100%; border-radius: 14px; display: block; max-height: 520px; object-fit: cover; background: var(--surface-2); }
.serambi-post-foot { display: flex; gap: 8px; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; }
.like-btn.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.like-btn.is-active svg { fill: currentColor; }
.serambi-tile { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.serambi-tile-bio { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.86rem; color: var(--ink-3); margin-top: 2px; }
.serambi-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 22px; }
.serambi-hero-title { font-family: var(--display); font-size: 1.45rem; letter-spacing: -0.02em; margin: 6px 0 0; display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; }
.serambi-hero-bio { margin: 4px 0; max-width: 34ch; }
.serambi-hero p { margin: 0; }
.verified-note { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 600; color: var(--accent); }
.serambi-composer textarea { width: 100%; resize: vertical; }
.serambi-preview img { width: 100%; border-radius: 12px; max-height: 300px; object-fit: cover; }

/* ---------- Lingkar Plus ---------- */
.plus-hero { border: 1px solid #EAD08F; background: linear-gradient(160deg, #FFF8E6, var(--surface) 55%); }
.plus-hero.is-active { border-color: #D9A93E; }
.plus-title { font-family: var(--display); font-size: 1.25rem; }
.plus-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plus-previews figure { margin: 0; }
.plus-previews .banner { height: 64px; border-radius: 10px; }
.plus-previews figcaption { font-size: 0.74rem; color: var(--ink-3); margin-top: 4px; text-align: center; }
.opt-label .plus-tag, .chip .plus-tag { margin-left: 4px; font-size: 0.6rem; padding: 1px 5px; }
.tip .plus-tag { flex: none; }
.code-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.code-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.code-list li.is-used { opacity: 0.6; }
.code-list code { font-weight: 700; letter-spacing: 0.04em; }
.row-gap input[type="number"] { width: 72px; }

/* ---------- Penyusun momen (tampilan baru) ---------- */
[hidden] { display: none !important; }
.compose-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; }
.kind-bar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x proximity; }
.kind-bar::-webkit-scrollbar { display: none; }
.kind-pill {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 99px; scroll-snap-align: start;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.kind-pill.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.compose-card { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.compose-author { display: flex; align-items: center; gap: 12px; }
.compose-author-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.compose-author-text strong { font-size: 0.98rem; }
.audience-pill {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 10px; border-radius: 99px; cursor: pointer;
  border: none; background: var(--accent-soft); color: #8F2C18; font: inherit; font-size: 0.78rem; font-weight: 600;
}
.audience-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-card .compose-text {
  width: 100%; border: none; outline: none; resize: none; background: transparent; padding: 0; min-height: 72px;
  font: inherit; font-size: 1.12rem; line-height: 1.45; color: var(--ink);
}
.compose-card .compose-text::placeholder { color: #9AA39F; }
.media-drop {
  width: 100%; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  border: 1.5px dashed var(--line-2); border-radius: 18px; font: inherit; color: var(--ink-2); padding: 20px;
  background: linear-gradient(160deg, #FAFBF8 0%, #F0F2ED 100%); transition: border-color .15s, background .15s;
}
.media-drop:hover { border-color: var(--accent); }
.media-drop-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--accent); box-shadow: 0 2px 10px rgba(28,35,33,.08); margin-bottom: 4px; }
.media-drop-title { font-weight: 700; font-size: 1rem; color: var(--ink); }
.media-drop-hint { font-size: 0.82rem; color: var(--ink-3); }
.media-drop.is-loading { cursor: default; }
.media-frame { position: relative; border-radius: 18px; overflow: hidden; background: #111; }
.media-frame img { display: block; width: 100%; max-height: 460px; object-fit: cover; }
.media-frame.video-preview video { border-radius: 0; max-height: 460px; }
.media-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.media-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: none; cursor: pointer;
  background: rgba(15, 18, 17, 0.62); color: #fff; font: inherit; font-size: 0.8rem; font-weight: 600; backdrop-filter: blur(8px);
}
.media-btn.icon-only { padding: 7px; }
.media-meta { position: absolute; left: 10px; top: 10px; margin: 0; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 99px; background: rgba(15,18,17,.6); color: #fff; font-size: 0.75rem; font-weight: 600; }
.extras-panel { background: var(--surface-2); border-radius: 16px; padding: 12px; }
.tool-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.tool-row > svg { flex: none; color: var(--ink-2); }
.compose-tools { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.compose-tools-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.compose-tools-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 8px 13px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 0.86rem; font-weight: 600;
}
.tool-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.tool-chip.is-on { border-color: var(--accent); background: var(--accent-soft); color: #8F2C18; }
.compose-body .story-cta { margin: 0; }

/* Editor cerita: alat yang sama */
.story-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.story-editor .story-preview { box-shadow: 0 10px 30px rgba(28,35,33,.18); }

/* ---------- Video: tombol putar hilang saat diputar ---------- */
.video-play[hidden] { display: none !important; }
.video-box.is-playing .video-play { display: none; }

/* ---------- Efek profil tetap di dalam bingkai latar ---------- */
.profile-hero .hero-banner { overflow: hidden; isolation: isolate; }

/* ---------- Kata sandi: lihat / sembunyikan ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; border: none; background: transparent; color: var(--ink-3); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: var(--surface-2); }
.extras-panel input, .extras-panel textarea { width: 100%; }

/* ---------- Centang pesan ala WhatsApp ---------- */
.msg-time { display: inline-flex; align-items: center; gap: 3px; }
.msg-ticks { display: inline-flex; line-height: 0; }
.msg.mine .msg-ticks { color: rgba(255, 255, 255, 0.78); }
.msg.mine .msg-ticks.is-read { color: #A6E6FF; }
.conv-preview .msg-ticks { color: var(--ink-3); vertical-align: -1px; margin-right: 3px; }
.conv-preview .msg-ticks.is-read { color: #2B9FD8; }
.tick-blue { color: #2B9FD8; font-weight: 700; }
