:root {
  --blue: #0088ff;
  --red: #ff383c;
  --text: #000000;
  --muted: #8e8e93;
  --line: #e5e5ea;
  --bg: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-edge: rgba(0, 0, 0, 0.07);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.06);
  --r-card: 26px;
  --r-field: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* ---------- liquid glass ---------- */

.nav-btn,
.stepper,
.toast,
.sheet {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-btn,
  .stepper,
  .toast,
  .sheet {
    background: rgba(255, 255, 255, 0.97);
  }
}

/* ---------- layout ---------- */

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 16px calc(132px + env(safe-area-inset-bottom));
}

.top h1 {
  margin: 28px 0 20px 4px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.nav-title {
  font-weight: 600;
}

.nav-btn {
  justify-self: start;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  color: var(--blue);
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 0 16px calc(14px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.bar .btn {
  max-width: 608px;
  margin: 0 auto;
  pointer-events: auto;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  background: #fff;
  transition: opacity 0.15s, transform 0.15s;
}

.btn.block {
  display: flex;
  width: 100%;
}

.btn.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 136, 255, 0.28);
}

.btn.tinted {
  border: 1px solid var(--line);
  color: var(--blue);
}

.btn.plain {
  color: var(--blue);
  font-weight: 400;
}

.btn.danger {
  margin-top: 8px;
  color: var(--red);
  font-weight: 400;
}

.btn:active {
  transform: scale(0.98);
}

.btn:active,
.link-btn:active,
.row:active,
.summary:active,
.nav-btn:active {
  opacity: 0.6;
}

.btn:disabled,
.stepper-btn:disabled,
.link-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.link-btn {
  min-height: 36px;
  padding: 0 6px;
  background: none;
  border: 0;
  color: var(--blue);
}

/* ---------- daftar ---------- */

.day {
  margin-top: 28px;
}

.day-title {
  margin: 0 0 8px 8px;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--muted);
}

.card {
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.card.pad {
  padding: 18px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 6px 20px;
}

.ig {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  font-size: 15px;
  color: var(--muted);
}

.chev {
  flex: none;
  display: inline-flex;
  color: #c7c7cc;
}

.empty {
  margin: 48px 0;
  padding: 0 8px;
  text-align: center;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ---------- form ---------- */

.field {
  display: block;
  margin-bottom: 16px;
}

.card.pad .field:last-child {
  margin-bottom: 0;
}

.label {
  display: block;
  margin: 0 0 6px 6px;
  font-size: 13px;
  color: var(--muted);
}

input[type="text"],
input[type="date"],
textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  font-size: 17px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"] {
  text-align: left;
}

textarea {
  min-height: 116px;
  resize: none;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
}

input::placeholder,
textarea::placeholder {
  color: #c7c7cc;
}

.prefix-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-field);
}

.prefix-wrap:focus-within {
  border-color: var(--blue);
}

.prefix {
  padding-left: 16px;
  color: var(--muted);
}

.prefix-wrap input {
  border: 0;
  padding-left: 4px;
}

.slide-title {
  margin: 0 0 14px 2px;
  font-size: 17px;
  font-weight: 600;
}

.hint {
  margin: 8px 0 0 6px;
  font-size: 15px;
  color: var(--muted);
}

.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
}

.stepper-btn {
  width: 60px;
  height: 52px;
  background: none;
  border: 0;
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
}

.stepper-value {
  min-width: 64px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  text-align: left;
}

.summary-action {
  color: var(--blue);
}

/* ---------- sheet dan toast ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

.sheet {
  width: calc(100% - 16px);
  max-width: 624px;
  margin: 0 8px calc(8px + env(safe-area-inset-bottom));
  padding: 24px 20px 20px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.9);
  animation: sheet-up 0.25s ease-out;
}

.sheet-title {
  margin: 0 0 4px 4px;
  font-size: 22px;
  font-weight: 700;
}

.sheet-sub {
  margin: 0 4px 16px;
  font-size: 15px;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 8px;
}

@keyframes sheet-up {
  from {
    transform: translateY(28px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top));
  z-index: 30;
  max-width: calc(100% - 32px);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .sheet {
    animation: none;
  }
  .toast,
  .btn {
    transition: none;
  }
}

/* ---------- halaman baca (link share) ---------- */

.reader .wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px calc(56px + env(safe-area-inset-bottom));
}

.r-head {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.r-eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.r-head h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.r-date {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.r-brief {
  margin-top: 8px;
}

.r-brief + .r-brief {
  margin-top: 40px;
  padding-top: 8px;
  border-top: 1px solid var(--text);
}

.r-brief-title {
  margin: 20px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.r-slide {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.r-slide:last-child {
  border-bottom: 0;
}

.r-label {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.r-headline {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.r-body {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.r-cta {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.r-cta .r-label {
  margin-bottom: 6px;
}
