/* ============================================================
   NEXREY — style.css v30
   - Tambah .portfolio-subtitle untuk subjudul cerita di portfolio
   ============================================================ */

:root {
  --bg: #FAFAF7;
  --bg-2: #F2F1EB;
  --surface: #FFFFFF;
  --surface-2: #F7F6F1;
  --ink: #0A0A0A;
  --ink-2: #4A4A48;
  --ink-3: #8A8A85;
  --line: #E5E3DB;
  --line-2: #CFCEC5;
  --accent: #FFE500;
  --wa-green: #25D366;
  --green: #067A46;
  --green-bg: #E6F7EC;
  --success: #067A46;
  --success-bg: #E6F7EC;
  --danger: #B42318;
  --danger-bg: #FEF3F2;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 100px;

  --max-w: 1080px;
  --nav-h: 60px;

  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0A0A0A;
  --bg-2: #121212;
  --surface: #141414;
  --surface-2: #1B1B1B;
  --ink: #F5F4EF;
  --ink-2: #A8A6A0;
  --ink-3: #6E6C68;
  --line: #262624;
  --line-2: #333330;
  --green: #6EE7A6;
  --green-bg: #0F2A1A;
  --success: #6EE7A6;
  --success-bg: #0F2A1A;
  --danger: #FF9B94;
  --danger-bg: #2A0E0B;
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { background: var(--bg); scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
  font-weight: 400;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }
[hidden] { display: none !important; }

/* ═══ BOOT ═══ */
.boot {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  perspective: 1200px;
}
.boot.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.boot::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at center, #000 20%, transparent 70%);
  mask-image: radial-gradient(circle at center, #000 20%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.boot::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 45%,
    color-mix(in srgb, var(--accent) 12%, transparent) 0%,
    transparent 55%);
  pointer-events: none;
}

.boot-stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 48px;
  z-index: 2;
  width: 100%; max-width: 440px;
  padding: 0 24px;
}

.boot-orbit {
  position: absolute;
  top: 0; left: 50%;
  width: 260px; height: 260px;
  margin-left: -130px;
  margin-top: -50px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  pointer-events: none;
  transform-style: preserve-3d;
}
.boot-orbit::after {
  content: '';
  position: absolute;
  top: 50%; left: -3px;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--accent) 60%, transparent);
}
.boot-orbit--1 { animation: orbitSpin 12s linear infinite; }
.boot-orbit--2 {
  width: 320px; height: 320px;
  margin-left: -160px; margin-top: -80px;
  border-color: color-mix(in srgb, var(--ink) 8%, transparent);
  animation: orbitSpin 18s linear infinite reverse;
}
.boot-orbit--2::after {
  background: var(--ink);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--ink) 40%, transparent);
}
.boot-orbit--3 {
  width: 380px; height: 380px;
  margin-left: -190px; margin-top: -110px;
  border-color: color-mix(in srgb, var(--ink) 5%, transparent);
  border-style: dashed;
  animation: orbitSpin 30s linear infinite;
}
.boot-orbit--3::after { background: var(--ink-3); box-shadow: none; }

@keyframes orbitSpin {
  from { transform: rotate3d(1, 0.15, 0, 0deg); }
  to   { transform: rotate3d(1, 0.15, 0, 360deg); }
}

.boot-card-wrap {
  position: relative;
  width: 128px; height: 128px;
  z-index: 3;
  perspective: 900px;
  perspective-origin: center center;
  filter: drop-shadow(0 30px 40px color-mix(in srgb, var(--ink) 20%, transparent));
}
.boot-card {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: cardSpin 6s linear infinite;
  will-change: transform;
}
.boot-card-face {
  position: absolute; inset: 0;
  border-radius: 22px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.boot-card-face img { width: 100%; height: 100%; object-fit: cover; }
.boot-card-face--front {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 2px 0 color-mix(in srgb, var(--ink) 8%, transparent);
}
.boot-card-face--back { transform: rotateY(180deg); }
.boot-card-shine {
  position: absolute;
  top: 0; left: -60%;
  width: 60%; height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.55) 55%,
    transparent 100%
  );
  pointer-events: none;
  animation: shineSweep 3.6s ease-in-out infinite;
  animation-delay: 1s;
}
@keyframes shineSweep {
  0%, 60% { left: -60%; }
  100%    { left: 120%; }
}
@keyframes cardSpin {
  0%   { transform: rotateY(0deg) rotateX(6deg); }
  100% { transform: rotateY(360deg) rotateX(6deg); }
}

.boot-progress-block {
  width: 100%;
  max-width: 280px;
  display: flex; flex-direction: column;
  animation: fadeUp 0.9s ease 0.25s both;
}
.boot-progress-percent {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 400;
  color: var(--ink);
  text-align: center;
  margin-bottom: 18px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.boot-progress-track {
  width: 100%; height: 3px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.boot-progress-fill {
  height: 100%; width: 10%;
  background: var(--ink);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.boot-progress-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--accent) 60%, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.boot-progress-fill.active::after { opacity: 1; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ APP LAYOUT ═══ */
.app {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-bottom: 130px;
  animation: appFadeIn 0.5s ease both;
}
@keyframes appFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wrap {
  width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 20px;
}

/* ═══ FLOATING HEADER ═══ */
.site-header {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  padding: 0 12px;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.header-pill {
  pointer-events: auto;
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: 100px;
  box-shadow:
    0 16px 44px -22px rgba(0, 0, 0, 0.35),
    0 2px 8px -4px rgba(0, 0, 0, 0.12);
}

.brand { display: flex; align-items: center; gap: 10px; padding-left: 4px; flex-shrink: 0; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.site-nav {
  display: flex; align-items: center; gap: 6px;
  flex: 1; justify-content: center;
  min-width: 0;
}
.nav-item {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.nav-item:hover {
  color: var(--ink);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.nav-item:active { transform: scale(0.97); }
.nav-item.active {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

.header-tools { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--surface-2); }

.icon-btn--cs,
.icon-btn--donate {
  width: auto;
  padding: 0 12px 0 10px;
  gap: 6px;
  border-radius: var(--r-pill);
}
.icon-btn-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.icon-btn--cs { color: var(--wa-green); }
.icon-btn--cs .icon-btn-label { color: var(--ink); }
.icon-btn--cs:hover {
  border-color: var(--wa-green);
  background: color-mix(in srgb, var(--wa-green) 8%, var(--surface));
}
.icon-btn--donate { color: var(--danger); }
.icon-btn--donate .icon-btn-label { color: var(--ink); }
.icon-btn--donate:hover {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 6%, var(--surface));
}
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.view { flex: 1; padding: 32px 0 60px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  margin-top: 40px;
}
.footer-wrap {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.01em;
}
.footer-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 4px;
  letter-spacing: 0.05em;
}
.footer-right {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

/* ═══ HOME: BANNER ═══ */
.home-banner {
  margin: 0 0 24px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  aspect-ratio: 16 / 9;
}
.home-banner img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.home-banner-tag {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 8px 16px;
  background: rgba(10, 10, 10, 0.75);
  color: #FFFFFF;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ═══ INFO PENGUNJUNG CARD ═══ */
.device-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 22px 22px 20px;
  margin-bottom: 32px;
  position: relative;
}

.device-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.device-card-head-text { min-width: 0; }
.device-card-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 4px;
}
.device-card-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.device-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--accent);
  color: #0A0A0A;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 1.5px solid #0A0A0A;
  flex-shrink: 0;
}
.device-user-badge svg { width: 14px; height: 14px; }

.device-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.device-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  min-width: 0;
  transition: border-color 0.15s ease;
}
.device-box:hover { border-color: var(--line-2); }

.device-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #0A0A0A;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
}
.device-icon svg { width: 18px; height: 18px; }

.device-icon--green  { background: #4ADE80; }
.device-icon--purple { background: #A78BFA; }
.device-icon--blue   { background: #60A5FA; }
.device-icon--orange { background: #FB923C; }
.device-icon--yellow { background: #FCD34D; }
.device-icon--pink   { background: #F472B6; }
.device-icon--teal   { background: #2DD4BF; }
.device-icon--red    { background: #F87171; }

[data-theme="dark"] .device-icon {
  color: #0A0A0A;
  border-color: rgba(0, 0, 0, 0.4);
}

.device-meta {
  min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
}
.device-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.device-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.01em;
}
.device-sub {
  font-size: 10px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-value .status-dot { width: 7px; height: 7px; flex-shrink: 0; }

/* ═══ TERMINAL WELCOME (multi-line) ═══ */
.terminal-welcome { margin: 0 0 40px; }
.terminal-window {
  border-radius: var(--r-lg);
  background: #0E0E10;
  overflow: hidden;
  border: 1px solid #242428;
  box-shadow:
    0 24px 60px -30px rgba(0, 0, 0, 0.45),
    0 4px 12px -6px rgba(0, 0, 0, 0.2);
  font-family: var(--font-mono);
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: #17171A;
  border-bottom: 1px solid #242428;
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.term-dot--red { background: #FF5F56; }
.term-dot--yellow { background: #FFBD2E; }
.term-dot--green { background: #27C93F; }
.term-title {
  margin-left: 10px;
  font-size: 11px;
  color: #8A8A90;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-body {
  padding: 18px 18px 20px;
  background: #0E0E10;
  color: #E8E8EC;
  font-size: 13.5px;
  line-height: 1.7;
  min-height: 300px;
}

.term-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.term-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-height: 1.2em;
}
.term-line--kv .term-text--kv {
  color: #C7C7CF;
}
.term-line--out .term-text--out {
  color: #E8E8EC;
  font-weight: 500;
}

.term-prompt {
  color: #7ED957;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.term-text {
  color: #E8E8EC;
  word-break: break-word;
  white-space: pre-wrap;
}

.term-cursor {
  display: inline-block;
  color: #7ED957;
  font-weight: 400;
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.term-hint {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #242428;
  font-size: 11.5px;
  color: #5A5A60;
  letter-spacing: 0.02em;
}

/* ═══ HOME: TEXT BLOCK ═══ */
.home-text {
  padding: 8px 0 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.home-text-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.home-text-eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink);
  display: block;
}
.home-text-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 780px;
}
.home-text-title em { font-style: italic; font-weight: 400; }
.home-text-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 640px;
  margin-bottom: 16px;
}
.home-text-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.home-text-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: opacity 0.15s ease;
  cursor: pointer;
}
.home-text-cta:hover { opacity: 0.85; }
.home-text-cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.home-text-cta--ghost:hover { background: var(--surface-2); opacity: 1; }

/* ═══ HOME: PORTFOLIO ═══ */
.portfolio-section { margin-bottom: 64px; }
.portfolio-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 24px;
}
.portfolio-photo {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 4 / 5;
}
.portfolio-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.portfolio-photo-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 12px;
  background: rgba(10, 10, 10, 0.75);
  color: #FFFFFF;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.portfolio-content { padding-top: 8px; }
.portfolio-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 8px;
}
.portfolio-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.portfolio-subtitle {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 26px);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 32px 0 16px;
  line-height: 1.2;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.portfolio-subtitle:first-of-type {
  margin-top: 24px;
  padding-top: 0;
  border-top: none;
}
.portfolio-bio {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.portfolio-bio strong { color: var(--ink); font-weight: 600; }
.portfolio-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.portfolio-fact { display: flex; flex-direction: column; gap: 4px; }
.portfolio-fact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.portfolio-fact-value {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

/* ═══ SECTION HEAD ═══ */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px; flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-title em { font-style: italic; font-weight: 400; }
.section-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ═══ HOME: GUIDE TEASER ═══ */
.guide-teaser {
  border-top: 1px solid var(--line);
  padding-top: 48px;
  margin-bottom: 16px;
}
.guide-teaser-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 640px;
}

/* ═══ PANDUAN ═══ */
.guide-section {
  border-top: 1px solid var(--line);
  padding-top: 56px;
  margin-bottom: 56px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.guide-step {
  padding: 28px 22px 28px 0;
  border-right: 1px solid var(--line);
  position: relative;
}
.guide-step:last-child { border-right: none; padding-right: 0; }
.guide-step:not(:first-child) { padding-left: 22px; }
.guide-num {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  color: var(--ink-3);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  font-style: italic;
  font-weight: 400;
}
.guide-title {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.guide-desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.guide-note {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.guide-note-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 78px;
}

/* ═══ STORE ═══ */
.page-head {
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.page-head-left { flex: 1; min-width: 260px; }
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 10px;
}
.page-title em { font-style: italic; font-weight: 400; }
.page-lead {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 520px;
}

/* ═══ STORE: PRODUCT CARDS ═══ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 48px;
  max-width: 720px;
}

.cat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.18);
}
.cat-card:active { transform: translateY(0); }

.cat-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #34B6FF 0%, #4DDC8A 55%, #BDF23A 100%);
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .cat-card-media {
  background: linear-gradient(135deg, #0E2E4A 0%, #0E3A24 55%, #2C3A0E 100%);
}
.cat-card-media.cat-card--alight {
  background: linear-gradient(135deg, #7C3AED 0%, #A855F7 50%, #F472B6 100%);
}
[data-theme="dark"] .cat-card-media.cat-card--alight {
  background: linear-gradient(135deg, #2E1065 0%, #4C1D95 50%, #831843 100%);
}
.cat-card-media img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
  transition: transform 0.4s ease;
}
.cat-card:hover .cat-card-media img { transform: scale(1.05); }

.cat-card-badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--green);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cat-card-body {
  padding: 12px 14px 12px;
  display: flex; flex-direction: column;
  flex: 1;
}
.cat-card-cat {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.cat-card-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 6px;
}
.cat-card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.cat-card-desc {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.cat-card-stats {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
}
.cat-stat { display: inline-flex; align-items: center; gap: 4px; }
.cat-stat svg { width: 13px; height: 13px; }

.cat-card-share {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  border-radius: 50%;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.cat-card-share svg { width: 14px; height: 14px; }
.cat-card-share:hover { background: var(--surface-2); color: var(--ink); }

/* ═══ PRODUCT SHEET ═══ */
.sheet-bd {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sheet-bd.show { display: flex; opacity: 1; }

.sheet {
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid var(--line);
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0));
  max-height: 90dvh;
  overflow-y: auto;
  transform: translateY(28px);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.28);
}
.sheet-bd.show .sheet { transform: translateY(0); }

.sheet-handle {
  width: 44px; height: 4px;
  border-radius: 3px;
  background: var(--line-2);
  margin: 4px auto 12px;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  position: relative;
}
.sheet-thumb {
  width: 64px; height: 64px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #34B6FF 0%, #4DDC8A 55%, #BDF23A 100%);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.sheet-thumb img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}
.sheet-head-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
  padding-right: 32px;
}
.sheet-price {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.sheet-name {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sheet-x {
  position: absolute;
  top: 0; right: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.sheet-x:hover { background: var(--surface-2); }

.sheet-section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}

.sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.sheet-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 84px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
  font-family: var(--font-body);
}
.sheet-chip:active { transform: scale(0.97); }
.sheet-chip:hover { border-color: var(--line-2); }
.sheet-chip.is-active {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}
.sheet-chip-dur {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.sheet-chip.is-active .sheet-chip-dur { color: var(--green); }
.sheet-chip-price {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 500;
}
.sheet-chip.is-active .sheet-chip-price { color: var(--green); opacity: 0.85; }

.sheet-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  margin-bottom: 4px;
}
.sheet-qty-label {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.sheet-qty-stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  overflow: hidden;
}
.sheet-qty-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.sheet-qty-btn:hover { background: var(--surface-2); }
.sheet-qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.sheet-qty-value {
  min-width: 36px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 6px;
  user-select: none;
}

.sheet-cta {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  background: var(--green);
  color: #FFFFFF;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin-top: 8px;
  transition: opacity 0.15s ease, transform 0.1s ease;
  box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--green) 70%, transparent);
}
.sheet-cta:hover { opacity: 0.92; }
.sheet-cta:active { transform: scale(0.99); }
.sheet-cta svg { flex-shrink: 0; }

[data-theme="dark"] .sheet-cta { color: #0A0A0A; }

/* ═══ PACKAGE LIST IN MODAL ═══ */
.pkg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.pkg-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
.pkg-row:hover {
  border-color: var(--ink);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.pkg-row:active { transform: translateY(0); }
.pkg-row-left {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.pkg-row-title {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.pkg-row-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}
.pkg-row-right {
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.pkg-row-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.01em;
  line-height: 1;
}
.pkg-row-day {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* ═══ FREE ═══ */
.free-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}
.free-intro { padding-top: 8px; }
.free-price-line {
  display: flex; align-items: baseline; gap: 14px;
  margin: 24px 0 28px;
}
.free-price {
  font-family: var(--font-display);
  font-size: clamp(64px, 10vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.free-price-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.free-features {
  list-style: none;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  margin-bottom: 32px;
}
.free-features li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 12px;
}
.free-features li::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--ink);
  flex-shrink: 0;
}

/* ═══ FIELDS & BUTTONS ═══ */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  margin-top: 14px;
}
.field-hint {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 4px;
}
.field {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.field:focus { border-color: var(--ink); background: var(--surface); }
.field::placeholder { color: var(--ink-3); }
textarea.field { resize: vertical; min-height: 60px; font-family: var(--font-body); }

.btn-primary {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  margin-top: 20px;
  transition: opacity 0.15s ease;
  letter-spacing: -0.005em;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 12px;
  transition: background-color 0.15s ease;
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 12px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

/* ═══ QTY STEPPER (modal alight) ═══ */
.qty-stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  overflow: hidden;
  margin-top: 6px;
  width: fit-content;
}
.qty-btn {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.15s ease;
}
.qty-btn:hover { background: var(--surface-2); }
.qty-btn:active { background: var(--line); }
.qty-value {
  min-width: 48px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 8px;
  user-select: none;
}

/* ═══ MODALS ═══ */
.modal-bd {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 16px; z-index: 500;
  opacity: 0; transition: opacity 0.18s ease;
}
.modal-bd.show { display: flex; opacity: 1; }
.modal {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  width: 100%; max-width: 420px;
  max-height: 92dvh; overflow-y: auto;
  position: relative;
  transform: scale(0.98);
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.25);
}
.modal--wide { max-width: 480px; }
.modal-bd.show .modal { transform: scale(1); }
.modal-x {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  z-index: 2;
}
.modal-x:hover { background: var(--surface-2); }
.modal-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}
.modal-lead {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 20px;
}
.modal-footnote {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 14px;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.notice {
  border: 1px solid var(--ink);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--surface);
}
.notice--muted {
  border-color: var(--line);
  background: transparent;
}
.notice-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--ink);
}
.notice-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 6px;
}
.notice-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.notice-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 1px;
  background: var(--ink-3);
}

.order-head {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 20px;
  background: var(--surface);
}
.order-head-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.order-head-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 4px;
  color: var(--ink);
}
.order-head-price {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.method-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.method {
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s ease;
}
.method:hover { border-color: var(--line-2); }
.method--active { border-color: var(--ink); background: var(--surface-2); }
.method-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.method-sub {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.4;
}

.slot-info {
  font-size: 12px;
  color: var(--ink-2);
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-top: 6px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.slot-info b { color: var(--ink); font-weight: 700; }
.slot-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 8px;
}
.slot-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.slot-row .field { flex: 1; margin: 0; }

.amount-block {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  text-align: center;
  background: var(--surface);
  margin-bottom: 20px;
}
.amount-block-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.amount-block-value {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 10px;
}
.amount-block-id {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.section-mini-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  margin-top: 8px;
}

.transfer-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.transfer-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.transfer-row-name { flex: 1; min-width: 0; }
.transfer-row-name b {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}
.transfer-row-name span {
  font-size: 11.5px;
  color: var(--ink-3);
}
.transfer-row-copy {
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  transition: background-color 0.15s ease;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.transfer-row-copy:hover { background: var(--surface-2); }
.transfer-row-copy.copied {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
}

.upload-box {
  display: block;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  padding: 22px 16px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  margin-bottom: 8px;
}
.upload-box:hover { border-color: var(--ink); }
.upload-box--has-file {
  padding: 14px;
  border-style: solid;
  background: var(--surface);
}
.upload-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  color: var(--ink-2);
  text-align: center;
}
.upload-placeholder svg { color: var(--ink-3); }
.upload-text { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.upload-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}
.upload-preview { display: flex; gap: 12px; align-items: center; }
.upload-preview img {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.upload-preview-info { flex: 1; min-width: 0; }
.upload-filename {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.upload-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}
.upload-status.ok { color: var(--success); }
.upload-status.err { color: var(--danger); }

.qr-frame {
  margin: 20px 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  min-height: 240px;
}
.qr-frame img {
  width: 100%; max-width: 220px;
  aspect-ratio: 1;
  object-fit: contain;
}

.pay-meta {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 4px 16px;
  margin-bottom: 16px;
}
.pay-meta-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.pay-meta-row:last-child { border-bottom: none; }
.pay-meta-row span { color: var(--ink-3); }
.pay-meta-row b {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 700;
}

.pay-status {
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--ink-2);
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.pay-status.expired {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger);
}

.success-mark {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}

.receipt {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 4px 16px;
  margin: 16px 0 20px;
}
.receipt-row {
  display: flex; justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.receipt-row:last-child { border-bottom: none; }
.receipt-row span { color: var(--ink-3); }
.receipt-row b {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
  word-break: break-all;
  max-width: 60%;
}
.receipt-row b.ok {
  padding: 2px 10px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: var(--r-pill);
  border: 1px solid var(--success);
  max-width: none;
}

.msg {
  display: none;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin: 10px 0;
  border: 1px solid transparent;
  line-height: 1.5;
}
.msg.show { display: block; }
.msg.success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.msg.error   { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.msg.info    { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }

.drawer-bd {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
  z-index: 600;
}
.drawer-bd.show { display: flex; opacity: 1; }
.drawer {
  width: 100%; max-width: 520px;
  background: var(--bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-top: 1px solid var(--line);
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0));
  max-height: 85dvh; overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.drawer-bd.show .drawer { transform: translateY(0); }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.drawer-list { display: flex; flex-direction: column; gap: 8px; }
.drawer-row {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.drawer-row:hover { border-color: var(--line-2); }
.drawer-row-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.drawer-row-sub { font-size: 12px; color: var(--ink-3); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  padding: 11px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.btn-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 880px) {
  .device-grid { grid-template-columns: repeat(2, 1fr); }
  .free-grid { grid-template-columns: 1fr; gap: 24px; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-step { border-right: none; border-bottom: 1px solid var(--line); padding-right: 22px; }
  .guide-step:nth-child(2n) { padding-right: 0; padding-left: 22px; }
  .guide-step:nth-child(2n+1) { padding-left: 0; }
  .guide-step:nth-last-child(-n+2) { border-bottom: none; padding-bottom: 0; }
  .portfolio-grid { grid-template-columns: 220px 1fr; gap: 28px; }
  .cat-grid { max-width: 100%; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .view { padding: 20px 0 40px; }
  .app { padding-bottom: 170px; }

  .site-header { padding: 0 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .header-pill {
    flex-wrap: wrap;
    border-radius: 22px;
    padding: 10px;
    gap: 8px;
    max-width: 480px;
  }
  .brand { order: 1; padding-left: 0; }
  .brand-name { display: none; }
  .header-tools { order: 1; margin-left: auto; }

  .site-nav {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    gap: 4px;
    justify-content: space-between;
    margin-top: 2px;
  }
  .nav-item {
    flex: 1;
    text-align: center;
    padding: 7px 6px;
    font-size: 11.5px;
    border-radius: var(--r-pill);
  }

  .icon-btn--cs,
  .icon-btn--donate {
    padding: 0 10px 0 8px;
    gap: 5px;
  }
  .icon-btn--cs .icon-btn-label,
  .icon-btn--donate .icon-btn-label {
    font-size: 10px;
  }

  .device-card { padding: 18px 16px 16px; border-radius: 18px; margin-bottom: 24px; }
  .device-card-title { font-size: 22px; }
  .device-card-sub { font-size: 11.5px; }
  .device-user-badge { padding: 6px 10px; font-size: 10px; }
  .device-user-badge svg { width: 12px; height: 12px; }
  .device-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .device-box { padding: 10px 10px 10px 8px; gap: 8px; border-radius: 12px; }
  .device-icon { width: 32px; height: 32px; border-radius: 9px; }
  .device-icon svg { width: 16px; height: 16px; }
  .device-label { font-size: 9px; letter-spacing: 0.1em; }
  .device-value { font-size: 11.5px; }
  .device-sub { font-size: 9.5px; }

  /* Terminal mobile */
  .terminal-welcome { margin-bottom: 28px; }
  .terminal-body { padding: 14px 14px 16px; font-size: 11.5px; line-height: 1.6; min-height: 260px; }
  .term-lines { gap: 1px; }
  .term-hint { font-size: 10px; margin-top: 12px; padding-top: 10px; }
  .term-title { font-size: 10px; }

  .home-banner { border-radius: var(--r-lg); margin-bottom: 20px; }
  .home-banner-tag { left: 14px; bottom: 14px; font-size: 9.5px; padding: 6px 12px; }

  .home-text { padding: 4px 0 32px; margin-bottom: 32px; }
  .home-text-title { font-size: 32px; margin-bottom: 14px; }
  .home-text-lead { font-size: 14.5px; }
  .home-text-cta { padding: 11px 18px; font-size: 13px; }

  .portfolio-section { margin-bottom: 40px; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 20px; }
  .portfolio-photo { max-width: 240px; aspect-ratio: 1; }
  .portfolio-name { font-size: 26px; }
  .portfolio-subtitle { font-size: 20px; margin: 26px 0 12px; padding-top: 20px; }
  .portfolio-bio { font-size: 13.5px; }
  .portfolio-facts { grid-template-columns: 1fr; gap: 12px; }

  .guide-teaser { padding-top: 32px; }
  .guide-section { padding-top: 32px; margin-bottom: 32px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-step {
    padding: 20px 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .guide-step:not(:first-child) { padding-left: 0; }
  .guide-step:nth-child(2n) { padding-left: 0; padding-right: 0; }
  .guide-step:last-child { border-bottom: none; padding-bottom: 0; }
  .guide-num { font-size: 32px; margin-bottom: 12px; }
  .guide-note { flex-direction: column; gap: 8px; }
  .guide-note-label { min-width: auto; }

  .page-head { padding: 12px 0 24px; margin-bottom: 20px; }
  .page-title { font-size: 28px; }
  .page-lead { font-size: 14px; }

  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 100%;
  }
  .cat-card { border-radius: 12px; }
  .cat-card-media { aspect-ratio: 16 / 11; }
  .cat-card-media img { width: 68%; height: 68%; }
  .cat-card-badge { top: 8px; right: 8px; font-size: 8.5px; padding: 3px 8px; }
  .cat-card-body { padding: 10px 12px 10px; }
  .cat-card-cat { font-size: 9px; margin-bottom: 4px; }
  .cat-card-title { font-size: 12.5px; margin-bottom: 5px; }
  .cat-card-price { font-size: 13px; margin-bottom: 5px; }
  .cat-card-desc { font-size: 11px; -webkit-line-clamp: 3; margin-bottom: 10px; }
  .cat-card-foot { padding-top: 8px; }
  .cat-card-stats { font-size: 10px; gap: 10px; }
  .cat-stat svg { width: 12px; height: 12px; }
  .cat-card-share { width: 22px; height: 22px; }
  .cat-card-share svg { width: 13px; height: 13px; }

  .sheet {
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0));
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }
  .sheet-thumb { width: 56px; height: 56px; border-radius: 12px; }
  .sheet-price { font-size: 20px; }
  .sheet-name { font-size: 12px; }
  .sheet-chip { min-width: 74px; padding: 8px 12px; border-radius: 10px; }
  .sheet-chip-dur { font-size: 12px; }
  .sheet-chip-price { font-size: 10px; }
  .sheet-cta { padding: 14px 18px; font-size: 13.5px; }
  .sheet-qty-btn { width: 32px; height: 32px; font-size: 16px; }

  .free-price { font-size: 72px; }

  .modal { padding: 24px 18px 20px; border-radius: var(--r); }
  .modal-title { font-size: 22px; }
  .amount-block-value { font-size: 28px; }
  .qr-frame { min-height: 200px; }

  .method-grid { grid-template-columns: 1fr; }
  .transfer-row { padding: 10px 12px; gap: 10px; }
  .transfer-row-name b { font-size: 12px; }
  .transfer-row-copy { padding: 6px 10px; font-size: 10.5px; }

  .pkg-row { padding: 12px 14px; gap: 10px; }
  .pkg-row-title { font-size: 13.5px; }
  .pkg-row-price { font-size: 14px; }

  .boot-orbit { width: 200px; height: 200px; margin-left: -100px; }
  .boot-orbit--2 { width: 240px; height: 240px; margin-left: -120px; margin-top: -70px; }
  .boot-orbit--3 { width: 280px; height: 280px; margin-left: -140px; margin-top: -95px; }
  .boot-card-wrap { width: 104px; height: 104px; }
  .boot-card-face { border-radius: 18px; }
  .boot-progress-block { max-width: 240px; }
  .boot-progress-percent { font-size: 42px; margin-bottom: 14px; }

  .toast { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 380px) {
  .device-grid { grid-template-columns: 1fr; }
  .terminal-body { font-size: 10.5px; min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .boot-card { animation: none !important; }
  .boot-orbit { animation: none !important; }
  .boot-card-shine { animation: none !important; }
  .boot-progress-fill::after { animation: none !important; }
}