:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --surface-3: #eef2f7;
  --text: #111827;
  --muted: #6b7280;
  --line: #dbe2ea;
  --green: #2bb673;
  --green-deep: #1d8d58;
  --blue: #3078ff;
  --red: #ef4444;
  --orange: #ff7d4d;
  --shadow: 0 18px 48px rgba(15, 23, 42, .08);
  --shadow-sm: 0 8px 18px rgba(15, 23, 42, .08);
  --radius: 24px;
  --radius-md: 18px;
  --mono: 'IBM Plex Mono', monospace;
  --display: 'Archivo', sans-serif;
  --hand: 'Kalam', cursive;
}

body.theme-dark {
  --bg: #0b1220;
  --surface: #111827;
  --surface-2: #0f172a;
  --surface-3: #0b1220;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: #22314a;
  --green: #31d18c;
  --green-deep: #1ba36a;
  --blue: #5ea5ff;
  --red: #fb7185;
  --orange: #ff9c66;
  --shadow: 0 22px 52px rgba(0, 0, 0, .32);
  --shadow-sm: 0 8px 18px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--display);
  background: radial-gradient(circle at top, rgba(48,120,255,.08), transparent 28%), var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
body.page-locked { overflow: hidden; }
img, video { display: block; max-width: 100%; }
button { font: inherit; }
a { color: inherit; }

.site-main { width: min(1180px, calc(100% - 24px)); margin: 0 auto; padding: 14px 0 32px; position: relative; z-index: 2; }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .05; background-image: radial-gradient(#000 0.4px, transparent 0.4px); background-size: 4px 4px; z-index: 0; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

.floating-actions {
  position: fixed; top: 12px; right: 12px; z-index: 30; display: flex; gap: 8px;
}
.sound-toggle, .theme-toggle {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(10px); color: var(--text); box-shadow: var(--shadow-sm); display: grid; place-items: center; cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.sound-toggle:hover, .theme-toggle:hover, .sound-toggle:active, .theme-toggle:active { transform: translateY(-1px) scale(1.02); }
.sound-toggle.is-muted { color: var(--red); }

.gate {
  min-height: calc(100vh - 28px); display: grid; place-items: center; position: relative; overflow: hidden;
}
.gate-grid { position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(99,102,241,.08) 1px, transparent 1px), linear-gradient(to bottom, rgba(99,102,241,.08) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.95), rgba(0,0,0,.55)); }
.system-header, .system-footer {
  position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 2px 2px; color: var(--muted); z-index: 1;
}
.system-header { top: 10px; }
.system-footer { bottom: 10px; font-family: var(--mono); font-size: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand span:last-child { display: flex; flex-direction: column; }
.brand b { font-size: 15px; color: var(--text); }
.brand small, .secure, .system-kicker, .loading-log, .scan-lines, .system-footer { font-family: var(--mono); }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); background: #dbeafe; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.secure { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.secure i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(43,182,115,.12); }
.gate-stage { width: min(100%, 860px); padding: 84px 0 44px; }
.verify-card {
  background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 32px; padding: 28px; position: relative; overflow: hidden;
}
.verify-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(48,120,255,.08), transparent 36%, rgba(43,182,115,.08)); pointer-events: none; }
.verify-card.is-flipping { animation: flipAway .8s ease forwards; }
.system-kicker { margin: 0 0 12px; color: var(--green-deep); letter-spacing: .12em; font-size: 12px; }
#verify-title { margin: 0; font-size: clamp(28px, 6vw, 54px); line-height: .95; letter-spacing: -.03em; }
.caret { animation: blink 1s step-end infinite; }
.system-subtitle { margin: 10px 0 22px; color: var(--muted); font-size: 14px; }
.loading-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-family: var(--mono); font-size: 13px; margin-bottom: 8px; }
.loading-track { height: 12px; border-radius: 999px; background: var(--surface-3); overflow: hidden; border: 1px solid var(--line); }
.loading-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #69d9a0); box-shadow: 0 0 18px rgba(43,182,115,.22) inset; }
.loading-log { margin-top: 16px; min-height: 104px; max-height: 110px; overflow: auto; padding: 14px; background: var(--surface-2); border-radius: 18px; border: 1px solid var(--line); font-size: 12px; line-height: 1.7; }
.loading-log .ok { color: var(--green); }
.loading-log .wait { color: var(--orange); }
.loading-log .error { color: var(--red); }
.scan-lines { display: grid; gap: 10px; margin-top: 18px; }
.scan-lines div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); padding-top: 10px; border-top: 1px dashed var(--line); animation: quickType 2.5s ease-in-out infinite; }
.scan-lines div:nth-child(2) { animation-delay: .3s; }
.scan-lines div:nth-child(3) { animation-delay: .6s; }
.verified-badge { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.verified-badge > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: rgba(43,182,115,.14); color: var(--green-deep); font-size: 32px; font-weight: 900; }
.verified-badge h2 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 42px); }
.verified-badge p { margin: 0; color: var(--muted); }
.certificate-data { display: grid; gap: 12px; margin: 0; }
.certificate-data div { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.certificate-data dt { color: var(--muted); font-size: 13px; }
.certificate-data dd { margin: 0; text-align: right; font-weight: 700; }
.certificate-data dd span { color: var(--green-deep); background: rgba(43,182,115,.14); border: 1px solid rgba(43,182,115,.28); padding: 6px 10px; border-radius: 999px; }
.view-details { margin-top: 20px; width: 100%; border: 0; border-radius: 18px; padding: 16px 18px; background: linear-gradient(135deg, var(--green), #62d69b); color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 800; box-shadow: 0 14px 24px rgba(43,182,115,.25); cursor: pointer; }
.view-details i { font-style: normal; }

.scrapbook { padding-top: 54px; }
.app-topbar {
  display: flex; justify-content: flex-start; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.app-brand { display: flex; align-items: center; gap: 12px; }
.top-avatar { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.app-brand b { display: block; font-size: 16px; }
.app-brand small { color: var(--muted); }
.dashboard-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.25), transparent 42%); }
.dark-card { background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 95%, #000 5%), color-mix(in srgb, var(--surface) 100%, transparent)); }
.card-span-2 { grid-column: span 1; }
.section-label, .section-label-dark {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  position: relative;
  z-index: 2;
}
.section-label span, .section-label-dark span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--line) 88%, #94a3b8);
}
.section-label b, .section-label-dark b {
  padding: 8px 13px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .035em;
  text-transform: uppercase;
  box-shadow: 0 5px 14px rgba(15,23,42,.12);
}
.hero-section-label { margin-bottom: 15px; }
.hero { display: grid; gap: 18px; align-items: center; background: linear-gradient(135deg, rgba(48,120,255,.05), rgba(255,255,255,0) 42%), var(--surface); }
.hero-kicker { margin: 0; font-family: var(--mono); color: var(--blue); font-size: 12px; letter-spacing: .12em; }
.hero-title { margin: 0; display: grid; gap: 6px; }
.hero-title span { font-size: clamp(34px, 9vw, 60px); line-height: .9; font-weight: 900; letter-spacing: -.05em; }
.hero-title em { font-size: clamp(20px, 5vw, 28px); font-style: normal; font-weight: 800; color: var(--text); }
.hero-copy { margin: 0; color: var(--muted); max-width: 48ch; }
.degree-card { border: 1px dashed color-mix(in srgb, var(--green) 42%, var(--line)); border-radius: 22px; padding: 18px; background: linear-gradient(180deg, rgba(43,182,115,.08), transparent); }
.degree-card small { color: var(--muted); }
.degree-card div { display: grid; gap: 4px; margin: 10px 0 8px; }
.degree-card span { color: var(--muted); font-size: 14px; }
.degree-card strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: clamp(28px, 7vw, 48px); }
.degree-card del { color: #d85d5d; text-decoration-thickness: 3px; }
.degree-card ins { color: var(--green-deep); text-decoration: none; }
.degree-card p { margin: 0; font-family: var(--mono); font-size: 12px; }

.profile-stack { display: grid; gap: 16px; }
.profile-photo { width: min(260px, 100%); margin: 0 auto; background: #fff; padding: 12px 12px 44px; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; transform: rotate(-2deg); }
.profile-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 4px; background: #f3f4f6; }
.profile-photo .stamp { position: absolute; right: 12px; bottom: 12px; transform: rotate(-8deg); padding: 7px 10px; border: 2px solid #e54b4b; color: #e54b4b; font-weight: 800; font-size: 15px; line-height: .95; }
.paperclip { position: absolute; top: -9px; right: 18px; width: 20px; height: 40px; border: 3px solid #808080; border-radius: 999px; }
.profile-copy { color: var(--text); }
.profile-copy p { margin: 0 0 12px; line-height: 1.75; }
.profile-copy p:last-child { margin-bottom: 0; }

.progress-sheet { display: grid; gap: 14px; position: relative; overflow: hidden; }
.progress-sheet::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,.48) 48%, transparent 78%);
  transform: translateX(-125%);
}
.progress-sheet.is-animated::after { animation: progressSheen 1.45s .3s ease forwards; }
.progress-row { display: grid; grid-template-columns: 100px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.progress-row b { font-size: 14px; }
.progress-row > div { height: 10px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); overflow: hidden; position: relative; }
.progress-row > div i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--green)); box-shadow: 0 0 10px rgba(48,120,255,.18); transition: width 1.85s cubic-bezier(.22,1,.36,1); }
.progress-row span { color: var(--muted); font-size: 12px; }
.progress-row.is-loading > div i { background: repeating-linear-gradient(135deg, rgba(48,120,255,.65), rgba(48,120,255,.65) 10px, rgba(48,120,255,.24) 10px, rgba(48,120,255,.24) 20px); background-size: 28px 28px; animation: progressStripe .8s linear infinite; }

.achievement-board { padding: 16px; border-radius: 20px; background: color-mix(in srgb, var(--surface-2) 92%, transparent); border: 1px solid var(--line); }
#achievement-list { list-style: none; display: grid; gap: 10px; padding: 0; margin: 0; }
#achievement-list li { display: flex; align-items: flex-start; gap: 10px; opacity: .48; transform: translateY(6px); transition: .28s ease; }
#achievement-list li.is-earned { opacity: 1; transform: none; }
#achievement-list i { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; border-radius: 999px; background: rgba(43,182,115,.16); color: var(--green); font-style: normal; font-weight: 900; }
#achievement-list span { line-height: 1.5; }

.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.stat-card { padding: 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); min-height: 130px; display: flex; flex-direction: column; justify-content: space-between; cursor: default; transition: transform .2s ease, box-shadow .2s ease; }
.stat-card[role='button'] { cursor: pointer; }
.stat-card:hover, .stat-card:active { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-card small { color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 34px; line-height: 1; margin: 10px 0; letter-spacing: -.04em; }
.stat-card strong.blue { color: var(--blue); }
.stat-card code { color: var(--muted); font-size: 11px; font-family: var(--mono); white-space: normal; }
.stat-text { font-size: 28px !important; }

.terminal { position: relative; background: #081015; color: #39d98a; border-radius: 18px; border: 1px solid #183544; padding: 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02); }
.terminal-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #94a3b8; font-size: 12px; }
.terminal-top span { width: 10px; height: 10px; border-radius: 999px; display: block; background: #ef4444; }
.terminal-top span:nth-child(2) { background: #f59e0b; }
.terminal-top span:nth-child(3) { background: #22c55e; }
.terminal-top b { margin-left: auto; font-family: var(--mono); font-weight: 500; }
.activity-log { min-height: 168px; font-family: var(--mono); font-size: 13px; line-height: 1.65; }
.activity-log .time { color: #5eead4; }
.activity-log .error { color: #f87171; }
.terminal-cursor { position: absolute; right: 16px; bottom: 18px; width: 10px; height: 16px; background: #39d98a; animation: blink 1s step-end infinite; }
.revision-alert { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: #fff4ea; color: #a44514; border: 1px solid #ffd2b3; transform: translateY(10px); opacity: 0; transition: .3s ease; }
.revision-alert.is-visible { transform: none; opacity: 1; }
.revision-alert small { display: block; color: #d27744; margin-bottom: 4px; }
.revision-alert b { display: block; margin-bottom: 3px; }

.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.media-card { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; box-shadow: var(--shadow-sm); min-height: 160px; }
.media-card img, .media-card video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.play-overlay { position: absolute; inset: auto auto 10px 10px; width: 42px; height: 42px; border-radius: 999px; border: 0; background: rgba(17,24,39,.72); color: #fff; cursor: pointer; }
.video-card.is-playing .play-overlay { opacity: .3; }

.prank-flow { display: grid; gap: 14px; }
.download-card, .secret-card { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); }
.download-card small, .secret-card small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em; }
#download-button, .hold-secret {
  width: 100%; min-height: 58px; border-radius: 18px; border: 0; font-weight: 800; color: #fff; cursor: pointer;
}
#download-button { background: linear-gradient(135deg, #ff5f5f, #ff7f54); box-shadow: 0 14px 24px rgba(255,95,95,.22); }
.hold-secret { background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--text) 82%, #475569)); }
.download-progress { margin-top: 14px; display: grid; gap: 10px; }
.download-progress > div { height: 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.download-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--red), var(--orange)); }
.download-progress b { font-family: var(--mono); color: var(--muted); }
.download-error { margin-top: 14px; border: 1px solid #fecaca; background: #fff1f1; color: #b42318; border-radius: 18px; padding: 16px; }
.download-error span { display: inline-block; font-weight: 900; font-size: 22px; margin-bottom: 8px; }
.download-error p { margin: 0 0 6px; font-weight: 700; }
.download-error small { margin: 0; color: #c2410c; }
.download-card.shake { animation: shake .55s ease; }
.secret-card p { margin: 0 0 14px; color: var(--muted); }
.hold-meter { height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); margin-top: 12px; }
.hold-meter i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .08s linear; }
.real-gift-card { margin-top: 14px; border-radius: 18px; padding: 16px; color: #fff; background: radial-gradient(circle at top, rgba(255,255,255,.16), transparent 40%), linear-gradient(135deg, #111827, #1e293b 70%, #0ea5a4); }
.real-gift-card b { display: block; margin-bottom: 8px; font-size: 22px; }
.real-gift-card p { margin: 0; color: rgba(255,255,255,.88); }

.closing-section { background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 96%, transparent)); }
.closing-text { min-height: 116px; white-space: pre-wrap; font-size: 15px; line-height: 1.8; color: var(--text); margin-bottom: 14px; }
.voice-button { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; color: var(--text); box-shadow: var(--shadow-sm); }
.voice-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; background: var(--green); color: #fff; font-weight: 900; }
.voice-button > span:nth-child(2) { font-weight: 700; }
.voice-button i { margin-left: auto; display: flex; align-items: end; gap: 4px; height: 26px; }
.voice-button i b { display: block; width: 4px; border-radius: 999px; background: var(--blue); animation: wave 1s ease-in-out infinite; }
.voice-button i b:nth-child(1) { height: 9px; }
.voice-button i b:nth-child(2) { height: 16px; animation-delay: .1s; }
.voice-button i b:nth-child(3) { height: 11px; animation-delay: .2s; }
.voice-button i b:nth-child(4) { height: 19px; animation-delay: .3s; }
.voice-button.is-playing .voice-icon { background: var(--red); }
.watermark { margin-top: 14px; text-align: center; color: var(--muted); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 18px); background: #111827; color: #fff; border-radius: 999px; padding: 12px 16px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 40; white-space: nowrap; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .72s ease, transform .72s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes flipAway { to { opacity: 0; transform: rotateX(20deg) scale(.92); filter: blur(8px); } }
@keyframes shake { 15% { transform: translateX(-7px); } 30% { transform: translateX(6px); } 45% { transform: translateX(-5px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes wave { 50% { transform: scaleY(1.3); opacity: .7; } }
@keyframes quickType { 0%,100% { opacity: .55; } 50% { opacity: 1; transform: translateX(2px); } }
@keyframes progressStripe { to { background-position: 28px 0; } }
@keyframes progressSheen { to { transform: translateX(125%); } }

@media (min-width: 760px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-span-2 { grid-column: span 2; }
  .hero { grid-template-columns: 1.2fr .8fr; }
  .profile-stack { grid-template-columns: .88fr 1fr; align-items: center; }
  .gallery-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .prank-flow { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 759px) {
  .system-header, .system-footer { padding-inline: 2px; }
  .verify-card { padding: 22px 18px; border-radius: 24px; }
  #verify-title { font-size: 32px; }
  .certificate-data div { grid-template-columns: 1fr; }
  .certificate-data dd { text-align: left; }
  .hero-title span { font-size: 42px; }
  .hero-title em { font-size: 24px; }
}

/* =========================================================
   V11.1 — MOBILE-FIRST FLOW REFINEMENTS
   ========================================================= */
@media (max-width: 759px) {
  .site-main {
    width: min(100% - 14px, 560px);
    padding-top: 7px;
  }

  .floating-actions {
    top: 9px;
    right: 9px;
    gap: 6px;
  }

  .sound-toggle,
  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .scrapbook {
    padding-top: 48px;
  }

  .app-topbar {
    position: sticky;
    top: 7px;
    z-index: 12;
    margin-bottom: 10px;
    padding: 10px 11px;
    border-radius: 16px;
    backdrop-filter: blur(14px);
  }

  .top-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .app-brand b {
    font-size: 13px;
    line-height: 1.2;
  }

  .app-brand small {
    font-size: 10px;
  }


  .dashboard-grid {
    gap: 10px;
  }

  .card {
    padding: 15px;
    border-radius: 20px;
  }

  .section-label,
  .section-label-dark {
    margin-bottom: 13px;
  }

  .section-label span,
  .section-label-dark span {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border-radius: 7px;
    font-size: 10px;
  }

  .section-label b,
  .section-label-dark b {
    padding: 7px 11px;
    font-size: 10px;
  }

  .hero {
    gap: 14px;
  }

  .hero-kicker {
    font-size: 10px;
  }

  .hero-title span {
    font-size: clamp(39px, 13vw, 54px);
  }

  .hero-title em {
    font-size: clamp(22px, 7.2vw, 29px);
  }

  .hero-copy {
    font-size: 13px;
    line-height: 1.6;
  }

  .degree-card {
    padding: 15px;
    border-radius: 17px;
  }

  .profile-stack {
    gap: 14px;
  }

  .profile-photo {
    width: min(72vw, 232px);
    padding-bottom: 40px;
  }

  .profile-copy {
    font-size: 13px;
  }

  .progress-row {
    grid-template-columns: 78px minmax(0, 1fr) 46px;
    gap: 8px;
  }

  .progress-row b {
    font-size: 12px;
  }

  .progress-row span {
    font-size: 10px;
  }

  .achievement-board {
    padding: 14px;
  }

  #achievement-list {
    gap: 9px;
  }

  #achievement-list span {
    font-size: 12px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-card {
    min-height: 112px;
    padding: 13px;
    border-radius: 16px;
  }

  .stat-card small {
    font-size: 10px;
  }

  .stat-card strong {
    font-size: 28px;
  }

  .stat-text {
    font-size: 20px !important;
  }

  .stat-card code {
    font-size: 9px;
  }

  .terminal {
    padding: 13px;
  }

  .activity-log {
    min-height: 158px;
    font-size: 10px;
  }

  /* Mobile gallery: horizontal carousel, swipe + automatic slide. */
  .gallery-section {
    padding-inline: 0;
  }

  .gallery-section > .section-label {
    padding-inline: 15px;
  }

  .gallery-grid {
    display: flex;
    gap: 11px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 2px 15px 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    mask-image: linear-gradient(90deg, transparent 0, #000 13px, #000 calc(100% - 13px), transparent 100%);
  }

  .gallery-grid::-webkit-scrollbar {
    display: none;
  }

  .media-card {
    flex: 0 0 min(78vw, 292px);
    min-height: 195px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    border-radius: 18px;
  }

  .media-card img,
  .media-card video {
    aspect-ratio: 4 / 3;
  }

  .prank-section {
    overflow: visible;
  }

  .download-card {
    padding: 15px;
    border-radius: 18px;
  }

  #download-button,
  .hold-secret {
    min-height: 54px;
    font-size: 12px;
    padding: 12px;
  }

  .download-error,
  .stubborn-error {
    padding: 14px;
  }

  .closing-text {
    min-height: 150px;
    font-size: 12px;
  }
}

.retry-area {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.retry-area > small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.retry-area > p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.hold-secret {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.hold-secret.is-holding {
  transform: scale(.985);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
}

.stubborn-error {
  margin-top: 14px;
  border: 1px solid #fecaca;
  background: #fff1f1;
  color: #b42318;
  border-radius: 18px;
  padding: 16px;
}

body.theme-dark .download-error,
body.theme-dark .stubborn-error {
  background: rgba(127, 29, 29, .23);
  color: #fecaca;
  border-color: rgba(248, 113, 113, .36);
}

.stubborn-error span {
  display: block;
  margin-bottom: 7px;
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 900;
  letter-spacing: -.03em;
}

.stubborn-error p {
  margin: 0 0 5px;
  font-weight: 800;
}

.stubborn-error small {
  margin: 0;
  color: currentColor;
  opacity: .72;
}

@media (min-width: 760px) {
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
    mask-image: none;
  }

  .media-card {
    min-height: 170px;
  }

  .prank-section .download-card {
    width: min(100%, 760px);
    margin-inline: auto;
  }
}

/* V11.3 — hanya scratch download dan tampilan voice note */
.scratch-card {
  position: relative;
  min-height: 190px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  isolation: isolate;
}

.scratch-card .stubborn-error {
  min-height: 190px;
  margin: 0;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

#scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  transition: opacity .35s ease;
}

.scratch-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: min(86%, 330px);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.52);
  background: rgba(17,24,39,.82);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  backdrop-filter: blur(7px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.scratch-status span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .01em;
}

.scratch-status b {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 13px;
}

.scratch-card.is-revealed .scratch-status {
  opacity: 0;
  transform: translate(-50%, -42%);
}

.voice-button {
  min-height: 72px;
  padding: 10px 14px 10px 10px;
}

.voice-avatar {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.voice-avatar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.voice-avatar .voice-icon {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
}

.voice-message {
  min-width: 0;
  display: grid;
  gap: 3px;
  text-align: left;
}

.voice-message b {
  font-size: 12px;
}

.voice-message small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.voice-wave {
  flex: 0 0 auto;
}

.voice-button.is-playing .voice-avatar .voice-icon {
  background: var(--red);
}

@media (max-width: 380px) {
  .scratch-status {
    width: calc(100% - 24px);
  }

  .scratch-status span {
    font-size: 10px;
  }

  .voice-avatar,
  .voice-avatar img {
    width: 48px;
    height: 48px;
  }
}
