:root {
  --paper: #f4efe6;
  --paper-2: #fbf8f1;
  --ink: #24211d;
  --muted: #72695f;
  --line: #d7cbbb;
  --brown: #6d4f32;
  --gold: #b99863;
  --red: #9d332c;
  --green: #284f42;
  --blue: #1f4568;
  --black: #08090d;
  --mono: "Consolas", "SFMono-Regular", monospace;
  --sans: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", Georgia, serif;
  --phone-shell: #12161c;
  --phone-shell-dark: #05070a;
  --phone-accent: #2267d8;
  --phone-accent-2: #18b56f;
  --phone-surface: #f7f8fa;
  --phone-line: #e4e8ee;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.92);
  backdrop-filter: blur(12px);
}

.site-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 700;
}

.site-id h1 {
  margin: 0;
  font-size: 18px;
  white-space: nowrap;
}

.site-id p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plain-link,
.btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
}

.btn.primary {
  border-color: var(--brown);
  background: var(--brown);
  color: #fffaf0;
}

.enter-main {
  min-height: 58px;
  padding: 15px 34px;
  border-color: #d8bd82;
  background: #8a623b;
  font-size: 20px;
  letter-spacing: 4px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.enter-main:hover {
  background: #9d7246;
}

.entry-panel {
  width: min(900px, 100%);
  margin: 54px auto 0;
  border: 1px solid rgba(185, 152, 99, 0.34);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.62), rgba(255,250,238,0.86)),
    var(--paper-2);
  box-shadow: 0 22px 60px rgba(56, 43, 28, 0.1);
}

.entry-heading {
  margin: 0 auto 24px;
  text-align: center;
}

.entry-heading span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
}

.entry-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
}

.entry-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.enter-area {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(220px, 1fr) minmax(120px, 170px);
  align-items: center;
  justify-items: center;
  gap: 26px;
  justify-content: center;
  width: min(780px, 100%);
  margin: 0 auto;
}

.enter-core {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.enter-core p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.qr-card figcaption {
  display: grid;
  gap: 2px;
}

.qr-card figcaption strong {
  color: var(--ink);
  font-size: 14px;
}

.qr-card figcaption span {
  font-size: 11px;
}

.qr-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(104px, 12vw, 148px);
  aspect-ratio: 1;
  border: 1px solid rgba(185, 152, 99, 0.45);
  border-radius: 8px;
  padding: 8px;
  background: #fffdf8;
  box-shadow: 0 12px 30px rgba(56, 43, 28, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.qr-card:hover .qr-frame {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(56, 43, 28, 0.14);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.qr-frame.missing img {
  display: none;
}

.qr-frame.missing::after {
  content: "二维码图片\\A待放置";
  white-space: pre;
  text-align: center;
  color: #9a8b76;
  font-size: 12px;
  line-height: 1.6;
}

.small-btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.layout {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.wide-layout {
  width: min(1340px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(rgba(20, 17, 13, 0.24), rgba(20, 17, 13, 0.58)),
    radial-gradient(circle at 50% 20%, rgba(218, 193, 137, 0.22), transparent 36%),
    linear-gradient(145deg, #211b16, #675039 45%, #15120f);
  color: #fff8ea;
  overflow: hidden;
}

.hero-inner {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0;
}

.hero-kicker {
  font-family: var(--mono);
  letter-spacing: 4px;
  color: #d9c49d;
  font-size: 12px;
}

.hero h1 {
  margin: 18px 0;
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 500;
}

.hero-quote {
  max-width: 720px;
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.55;
}

.intro-band {
  background: var(--paper);
  padding: 88px 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.intro-card,
.panel,
.result,
.post,
.mail-item,
.file-row,
.doc {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-2);
  padding: 20px;
}

.intro-card h2,
.panel h2,
.doc h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.author-credit {
  margin: 56px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.seo-info {
  display: grid;
  gap: 14px;
  width: min(900px, 100%);
  margin: 42px auto 0;
  color: #3f372f;
}

.seo-info h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
}

.seo-info p {
  margin: 0;
  line-height: 1.8;
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.faq-list article {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  background: var(--paper-2);
}

.faq-list h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
}

.serif {
  font-family: var(--serif);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.search-form,
.login-form,
.answer-form {
  display: grid;
  gap: 10px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 10px;
  background: #fffdfa;
  color: var(--ink);
}

textarea {
  min-height: 220px;
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

th,
td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #efe4d3;
}

.bad td,
.warning {
  background: #fff0ec;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: #fffdfa;
  font-size: 12px;
}

.tag.red {
  border-color: #deb2ac;
  color: var(--red);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: min(420px, calc(100% - 32px));
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 12px 14px;
  background: #fff7df;
  color: #4d3820;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.threat-barrage {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(330px, calc(100% - 36px));
  pointer-events: none;
}

.threat-sms {
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(15, 18, 22, 0.9);
  color: white;
  box-shadow: 0 16px 42px rgba(0,0,0,0.28);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(14px);
}

.threat-sms.show {
  opacity: 1;
  transform: translateY(0);
}

.threat-sms strong {
  color: #ff5967;
  font-size: 12px;
}

.threat-sms p {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.threat-call {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,0.44);
  backdrop-filter: blur(10px);
}

.threat-call.shake .threat-call-card {
  animation: callShake 0.24s linear 3;
}

.threat-call-card {
  width: min(330px, 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 28px;
  padding: 28px 22px;
  background: linear-gradient(180deg, rgba(24,28,34,0.96), rgba(5,7,10,0.96));
  color: white;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0,0,0,0.42);
}

.threat-call-avatar {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #1d232c;
  color: #ff5967;
  font-size: 42px;
  font-weight: 800;
}

.threat-call-card p {
  margin: 0;
  color: #aeb7c3;
}

.threat-call-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.threat-call-card span {
  display: block;
  margin-top: 6px;
  color: #d5d9df;
  font-family: var(--mono);
}

.threat-call-actions {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 28px;
}

.threat-call-actions button {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 0;
}

.threat-call-actions button::before {
  font-size: 24px;
}

.threat-call-actions .decline {
  background: #e33d4f;
}

.threat-call-actions .decline::before {
  content: "×";
}

.threat-call-actions .accept {
  background: #19b86b;
}

.threat-call-actions .accept::before {
  content: "✓";
}

.knockout-screen {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(95, 0, 0, 0.18), transparent 24%),
    #000;
  color: #e8e4d8;
  animation: blackoutIn 1.4s ease both;
}

.knockout-screen div {
  max-width: 520px;
  text-align: center;
  line-height: 1.9;
}

.knockout-screen p {
  margin: 0 0 14px;
  opacity: 0.82;
}

.knockout-screen strong {
  display: block;
  margin-top: 22px;
  color: #ff5967;
  font-family: var(--mono);
  letter-spacing: 0;
}

@keyframes callShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

@keyframes blackoutIn {
  from {
    opacity: 0;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.game-widget {
  position: fixed;
  right: 14px;
  top: 72px;
  z-index: 80;
  display: grid;
  gap: 8px;
  width: 190px;
}

.widget-card {
  border: 1px solid rgba(215, 203, 187, 0.88);
  border-radius: 4px;
  padding: 10px;
  background: rgba(251, 248, 241, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.stage-num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
}

.note-panel {
  position: fixed;
  right: 14px;
  top: 170px;
  z-index: 90;
  width: min(420px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--paper-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.note-panel[hidden] {
  display: none;
}

.note-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.note-head h2 {
  margin: 0 0 4px;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.evidence-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.evidence-list li.done {
  color: var(--green);
}

.chat-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(42, 89, 142, 0.28), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(106, 88, 62, 0.22), transparent 26%),
    linear-gradient(145deg, #090c11, #171d24 54%, #050608);
  padding: 26px 0;
}

.phone-stage {
  display: grid;
  grid-template-columns: minmax(300px, 380px);
  gap: 22px;
  align-items: start;
  justify-items: center;
  justify-content: center;
  width: min(620px, calc(100% - 28px));
  min-height: calc(100vh - 52px);
  margin: 0 auto;
  padding-top: 6vh;
}

.mi-phone {
  position: relative;
  width: min(372px, 100%);
  aspect-ratio: 9 / 19.5;
  border: 10px solid var(--phone-shell);
  border-radius: 44px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.1), transparent 22%),
    var(--phone-shell);
  overflow: hidden;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255,255,255,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.12),
    inset 0 0 0 3px rgba(0,0,0,0.24);
}

.mi-phone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 70;
  width: 94px;
  height: 25px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 72% 50%, #20252c 0 4px, #050608 5px 8px, transparent 9px),
    linear-gradient(180deg, #14171d, #050608);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.08), 0 1px 8px rgba(0,0,0,0.38);
  transform: translateX(-50%);
  pointer-events: none;
}

.phone-island {
  display: none !important;
}

.mi-phone::after {
  content: "";
  position: absolute;
  z-index: 60;
  width: 24px;
  height: 24px;
  left: var(--launch-x, 50%);
  top: var(--launch-y, 50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.1);
}

.mi-phone.launching::after {
  animation: appLaunchRipple 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes appLaunchRipple {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.1);
  }
  80% {
    opacity: 0.18;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(26);
  }
}

.mi-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 34px;
  background: #f4f5f4;
  touch-action: none;
}

.mi-screen * {
  scrollbar-width: none;
}

.mi-screen *::-webkit-scrollbar {
  display: none;
}

.mi-screen.screen-enter {
  animation: screenEnter 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes screenEnter {
  from {
    opacity: 0.2;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lock-screen,
.home-screen {
  color: white;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.14) 42%, rgba(0,0,0,0.56)),
    radial-gradient(circle at 28% 18%, rgba(98, 145, 183, 0.46), transparent 20%),
    radial-gradient(circle at 70% 60%, rgba(190, 154, 92, 0.32), transparent 26%),
    linear-gradient(145deg, #17202a, #263949 48%, #071014);
  background-size: cover;
  background-position: center;
}

.home-screen::before,
.lock-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.11), transparent 24% 76%, rgba(255,255,255,0.04)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 10px);
  opacity: 0.52;
}

.statusbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 15px 22px 0;
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  text-shadow: 0 1px 8px rgba(0,0,0,0.42);
}

.lock-time {
  position: relative;
  z-index: 2;
  padding: 118px 28px 0;
  text-align: center;
}

.lock-clock {
  font-size: 66px;
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: 0;
}

.lock-date {
  margin-top: 12px;
  color: rgba(255,255,255,0.82);
  font-size: 15px;
}

.lock-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 3;
  display: flex;
  justify-content: center;
}

.unlock-track {
  display: grid;
  place-items: center;
  width: 190px;
  height: 150px;
  touch-action: none;
}

.unlock-button {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 999px;
  padding: 8px 26px;
  background: rgba(255,255,255,0.14);
  color: white;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 14px 30px rgba(0,0,0,0.22);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease, background 0.18s ease;
  touch-action: none;
  will-change: transform, opacity;
}

.unlock-button:active {
  background: rgba(255,255,255,0.22);
}

.home-apps {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 12px;
  padding: 30px 22px 0;
}

.home-date {
  position: relative;
  z-index: 2;
  padding: 58px 30px 0;
  color: rgba(255,255,255,0.92);
  font-size: 20px;
  font-weight: 450;
  text-shadow: 0 2px 12px rgba(0,0,0,0.42);
}

.pull-zone {
  position: absolute;
  top: 0;
  z-index: 12;
  width: 50%;
  height: 88px;
  touch-action: none;
}

.pull-zone.left {
  left: 0;
}

.pull-zone.right {
  right: 0;
}

.shade-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.shade-layer[hidden] {
  display: none;
}

.shade-layer.shade-open {
  animation: shadeDrop 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes shadeDrop {
  from {
    opacity: 0;
    transform: translateY(-34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.control-center,
.notification-center {
  border-radius: 24px;
  padding: 16px;
  color: #111;
  background: rgba(245, 247, 250, 0.88);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.cc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cc-tile {
  min-height: 74px;
  border: 0;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
  color: #222;
  text-align: left;
}

.cc-tile.on {
  background: #2d83f7;
  color: white;
}

.cc-tile span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.78;
}

.slider-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.notice-card {
  margin-top: 10px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.82);
}

.notice-card p {
  margin: 4px 0 0;
  color: #555;
  font-size: 13px;
}

.app-icon {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: white;
  text-shadow: 0 1px 8px rgba(0,0,0,0.72);
  transform: translateY(0) scale(1);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.18s ease;
  will-change: transform;
}

.app-icon[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  right: 7px;
  top: -6px;
  z-index: 2;
  min-width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.95);
  border-radius: 999px;
  padding: 0 5px;
  background: #ff3045;
  color: white;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-shadow: none;
  box-shadow: 0 6px 12px rgba(255,48,69,0.28);
}

.app-icon:hover {
  transform: translateY(-7px) scale(1.055);
  filter: brightness(1.08);
}

.app-icon:active {
  transform: translateY(-2px) scale(0.92);
  filter: brightness(1.15);
}

.app-icon span {
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  border-radius: 17px;
  font-weight: 800;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -12px 22px rgba(0,0,0,0.12);
}

.app-icon span i {
  font-style: normal;
  font-size: 24px;
  line-height: 1;
}

.app-icon strong {
  max-width: 68px;
  color: rgba(255,255,255,0.96);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0,0,0,0.72);
}

.wechat-icon span,
.green {
  background: #1ec45a;
}

.browser-icon span,
.blue {
  background: #3487f6;
}

.contacts-icon span {
  background: linear-gradient(145deg, #2e8dff, #005ed9);
}

.mail-icon span {
  background: linear-gradient(145deg, #ff5a55, #d91d1d);
}

.sms-icon span {
  background: linear-gradient(145deg, #35d66f, #0e9f43);
}

.gallery-icon span,
.orange {
  background: #f08a34;
}

.camera-icon span {
  background: linear-gradient(145deg, #2e333b, #090a0d);
}

.map-icon span {
  background: linear-gradient(145deg, #38c46a, #159543);
}

.notes-icon span {
  background: #f0c748;
}

.settings-icon span {
  background: linear-gradient(145deg, #a9a9a9, #5b5b5b);
}

.dock {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 22px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 18px 40px rgba(0,0,0,0.22);
}

.dock-icon {
  min-height: 54px;
  border: 0;
  border-radius: 17px;
  background: rgba(255,255,255,0.9);
  color: #1d2630;
  font-size: 28px;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.16s ease;
}

.dock-icon:hover {
  transform: translateY(-5px) scale(1.04);
  background: rgba(255,255,255,0.9);
}

.dock-icon:active {
  transform: scale(0.92);
}

.gesture-bar {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 118px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  transform: translateX(-50%);
}

.wechat-screen,
.browser-screen,
.app-screen {
  background: var(--phone-surface);
  color: #111;
}

.app-screen {
  display: flex;
  flex-direction: column;
}

.app-screen[hidden] {
  display: none;
}

.app-head {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 80px;
  padding: 30px 12px 8px;
  border-bottom: 1px solid var(--phone-line);
  background: rgba(250, 251, 252, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.72);
}

.app-head::after {
  content: "";
}

.app-head strong,
.wechat-head strong {
  justify-self: center;
  font-size: 16px;
  font-weight: 700;
  color: #1a1d22;
}

.app-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
}

.app-list article,
.app-card {
  border: 1px solid rgba(18, 27, 38, 0.06);
  border-radius: 12px;
  padding: 14px;
  background: white;
  box-shadow: 0 8px 22px rgba(18, 27, 38, 0.06);
}

.app-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.app-list span,
.app-tip {
  color: #777;
  font-size: 12px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
  overflow-y: auto;
}

.photo-grid button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.28), transparent 42%),
    linear-gradient(145deg, #b7c3ca, #748893);
  color: white;
  font-weight: 700;
  text-align: left;
  text-shadow: 0 1px 4px rgba(0,0,0,0.34);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.photo-grid .locked-photo {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 8px),
    linear-gradient(145deg, #2b2d32, #111);
}

.album-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 14px 0;
  padding: 4px;
  border-radius: 12px;
  background: #dfe3e6;
}

.album-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-weight: 700;
}

.album-tabs button.active {
  background: white;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.photo-grid button span,
.photo-grid button em {
  display: block;
}

.photo-grid button em {
  margin-top: 5px;
  font-size: 10px;
  font-style: normal;
  opacity: 0.78;
}

.photo-detail,
.mail-detail,
.map-result {
  margin: 0 14px 14px;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 14px;
  background: white;
  box-shadow: 0 10px 24px rgba(30, 36, 42, 0.07);
}

.photo-detail h2,
.mail-detail h2,
.map-result h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.photo-detail p,
.mail-detail p,
.map-result p {
  margin: 8px 0;
  color: #555;
  font-size: 13px;
  line-height: 1.65;
}

.sudoku-app {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
}

.sudoku-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: #dfe3e6;
}

.sudoku-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-weight: 700;
}

.sudoku-tabs button.active {
  background: white;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.sudoku-tabs button.locked {
  color: #9a9a9a;
  opacity: 0.55;
}

.sudoku-meta {
  color: #666;
  font-size: 13px;
}

.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(var(--sudoku-size, 4), 1fr);
  gap: 2px;
  padding: 8px;
  border-radius: 12px;
  background: #1a2026;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.sudoku-cell {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 0;
  border-radius: 6px;
  background: white;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: #111;
}

.sudoku-grid.size-8 .sudoku-cell {
  min-height: 32px;
  border-radius: 4px;
  font-size: 15px;
}

.sudoku-cell.given {
  background: #dfe7ef;
  color: #111;
}

.sudoku-cell.editable {
  cursor: pointer;
}

.sudoku-cell.selected {
  outline: 3px solid #d9a441;
  outline-offset: -3px;
  background: #fff6d8;
}

.sudoku-cell.box-right {
  margin-right: 3px;
}

.sudoku-cell.box-bottom {
  margin-bottom: 3px;
}

.number-pad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.number-pad button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-weight: 700;
}

.phone-app-toast {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
  z-index: 20;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(20, 22, 26, 0.86);
  color: white;
  text-align: center;
  box-shadow: 0 14px 32px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
}

.phone-app-toast[hidden] {
  display: none;
}

.phone-app-toast.show {
  animation: phoneToastIn 0.2s ease;
}

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

.wechat-head {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 80px;
  padding: 30px 12px 8px;
  border-bottom: 1px solid var(--phone-line);
  background: rgba(250, 251, 252, 0.94);
  backdrop-filter: blur(18px);
}

.wechat-search {
  margin: 8px 12px;
  border-radius: 999px;
  padding: 10px 14px;
  background: #f0edf0;
  color: #8a8a8a;
  font-size: 13px;
}

.mini-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #333;
  text-decoration: none;
  font-size: 24px;
}

.mini-back:hover {
  background: rgba(0,0,0,0.06);
}

.wechat-list {
  overflow-y: auto;
  height: calc(100% - 120px);
  -webkit-overflow-scrolling: touch;
}

.chat-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 44px;
  gap: 10px;
  width: 100%;
  min-height: 70px;
  border: 0;
  border-bottom: 1px solid var(--phone-line);
  padding: 10px 12px;
  background: rgba(255,255,255,0.92);
  text-align: left;
  transition: background 0.12s ease, transform 0.12s ease;
  color: #111;
  text-decoration: none;
}

.chat-row:active {
  background: #e9e9e9;
  transform: scale(0.99);
}

.chat-row.pinned {
  background: rgba(255,255,255,0.98);
}

.chat-row.unread strong::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: #f04444;
  vertical-align: 1px;
}

.chat-row em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #777;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row time {
  color: #999;
  font-size: 11px;
  text-align: right;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: white;
  font-weight: 700;
}

.family {
  background: #a16b45;
}

.love {
  background: #dc5f86;
}

.dark {
  background: #30343b;
}

.wechat-detail {
  height: calc(100% - 54px);
  overflow-y: auto;
  padding: 12px;
  background: #e8ece8;
  -webkit-overflow-scrolling: touch;
}

.chat-page .wechat-detail {
  height: calc(100% - 112px);
  padding: 16px 12px 20px;
}

.wechat-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 58px;
  border-top: 1px solid #d8d8d8;
  background: #f8f8f8;
}

.wechat-tabs button,
.wechat-tabs a {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 12px;
  text-decoration: none;
}

.wechat-tabs button.active,
.wechat-tabs a.active {
  color: #14b64a;
  font-weight: 700;
}

.wechat-messages {
  display: grid;
  gap: 12px;
  align-content: start;
}

.message-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.message-line.me {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.message-line.me .msg-avatar {
  order: 2;
}

.message-line.me .bubble {
  justify-self: end;
}

.msg-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #dfe5e8;
  color: #222;
  font-weight: 800;
  font-size: 15px;
}

.message-line.me .msg-avatar {
  background: #2f8f48;
  color: white;
}

.bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 12px;
  background: white;
  line-height: 1.55;
}

.bubble.me {
  background: #9fe27e;
}

.wechat-call {
  justify-self: center;
  min-width: 188px;
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.68);
  color: #666;
  text-align: center;
  font-size: 12px;
}

.wechat-call.call-missed {
  color: #d64040;
}

.system-msg {
  justify-self: center;
  color: #777;
  font-size: 12px;
}

.chat-time {
  justify-self: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(0,0,0,0.08);
  color: #777;
  font-size: 11px;
}

.moments-feed {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 12px 12px 72px;
}

.moments-feed article {
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.moments-feed p {
  margin: 6px 0;
}

.moments-feed em {
  color: #888;
  font-size: 12px;
  font-style: normal;
}

.moments-cover {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 150px;
  padding: 18px;
  color: white;
  background:
    linear-gradient(rgba(0,0,0,0.04), rgba(0,0,0,0.48)),
    var(--phone-wallpaper, url("assets/lockscreen.jpg")),
    linear-gradient(145deg, #344052, #13161c);
  background-size: cover;
  background-position: center;
}

.moments-cover div {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.55);
}

.moments-cover span {
  font-size: 12px;
  opacity: 0.82;
}

.wechat-composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  border-top: 1px solid #d4d4d4;
  background: #f7f7f7;
}

.wechat-composer button {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  background: #ececec;
  color: #333;
  font-size: 20px;
}

.wechat-composer input {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: white;
}

.wechat-contact-list,
.call-list {
  display: grid;
  overflow-y: auto;
  padding-bottom: 88px;
  background: #fff;
}

.contact-row,
.call-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid var(--phone-line);
  padding: 11px 14px;
  color: #111;
  text-decoration: none;
}

.contact-row em,
.call-row em {
  display: block;
  margin-top: 4px;
  color: #6f7782;
  font-size: 12px;
  font-style: normal;
}

.call-row time {
  color: #9099a4;
  font-size: 11px;
}

.call-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e9edf2;
  color: #333;
  font-weight: 800;
}

.call-row.missed strong,
.call-row.missed em {
  color: #d64040;
}

.call-avatar.unknown {
  background: #30343b;
  color: white;
}

.browser-card {
  margin: 18px;
  border-radius: 12px;
  padding: 14px;
  background: white;
}

.browser-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 12px 14px 2px;
}

.browser-search input {
  min-width: 0;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 999px;
  padding: 11px 14px;
  background: #ffffff;
  color: #111;
  font-size: 12px;
  box-shadow: 0 5px 14px rgba(30,36,42,0.06);
}

.browser-search button {
  border: 0;
  border-radius: 999px;
  background: var(--phone-accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.browser-history,
.browser-page {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}

.browser-history[hidden],
.browser-page[hidden] {
  display: none;
}

.browser-history h2 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.browser-history button,
.browser-page article {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(18,27,38,0.06);
  border-radius: 10px;
  padding: 14px;
  background: white;
  color: #111;
  text-align: left;
  box-shadow: 0 8px 22px rgba(18,27,38,0.06);
}

.browser-history button:active,
.mail-list .mail-preview:active,
.photo-grid button:active,
.map-pin:active {
  transform: scale(0.985);
}

.browser-history span {
  overflow: hidden;
  color: #777;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-history h2,
.mail-detail h2,
.photo-detail h2,
.map-result h2 {
  color: #15181d;
}

.browser-page-head,
.sms-thread-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
}

.camera-app {
  display: flex;
  flex-direction: column;
  background: #050609;
  color: white;
}

.camera-topbar {
  display: grid;
  grid-template-columns: 44px repeat(3, auto);
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 18px 14px 8px;
  background: #08090d;
}

.camera-topbar .mini-back {
  color: white;
}

.camera-topbar button {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 12px;
}

.camera-viewfinder {
  position: relative;
  flex: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 42%, rgba(74, 82, 91, 0.18), transparent 12%),
    radial-gradient(circle at 52% 56%, rgba(8, 18, 28, 0.9), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 11px),
    #010205;
}

.camera-viewfinder::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(28deg, transparent 0 47%, rgba(190, 218, 255, 0.16) 48%, transparent 49% 100%),
    linear-gradient(132deg, transparent 0 39%, rgba(255,255,255,0.09) 40%, transparent 41% 100%),
    linear-gradient(81deg, transparent 0 58%, rgba(255,255,255,0.08) 59%, transparent 60% 100%);
  filter: blur(0.4px);
  opacity: 0.8;
}

.camera-viewfinder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 50% 50%, transparent 0 40%, rgba(0,0,0,0.85) 70%);
  mix-blend-mode: screen;
  opacity: 0.46;
  animation: cameraNoise 0.18s steps(2, end) infinite;
}

.focus-box {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(255,255,255,0.34);
  transform: translate(-50%, -50%);
}

.camera-modebar {
  display: flex;
  justify-content: center;
  gap: 28px;
  min-height: 42px;
  align-items: center;
  background: #050609;
  font-size: 13px;
}

.camera-modebar strong {
  color: #ffd45b;
}

.camera-controls {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  align-items: center;
  min-height: 104px;
  padding: 14px 28px 18px;
  background: #050609;
}

.camera-switch,
.camera-album {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: white;
}

.camera-shutter {
  justify-self: center;
  width: 72px;
  height: 72px;
  border: 5px solid white;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,0.18);
}

.camera-album span {
  display: block;
  width: 38px;
  height: 38px;
  margin: 6px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.28), transparent 44%),
    linear-gradient(145deg, #101820, #020306);
  border: 1px solid rgba(255,255,255,0.28);
}

.app-lock {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.54);
  backdrop-filter: blur(10px);
}

.app-lock[hidden] {
  display: none;
}

.gallery-lock[hidden],
.gallery-content[hidden] {
  display: none;
}

.gallery-lock {
  display: grid;
  place-items: center;
  flex: 1;
  padding: 20px;
  background: #eef1f4;
}

.gallery-content {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-lock-card {
  width: 100%;
  border-radius: 18px;
  padding: 20px;
  background: rgba(248,248,248,0.96);
  color: #111;
  text-align: center;
  box-shadow: 0 22px 64px rgba(0,0,0,0.34);
}

.app-lock-card p,
.app-lock-card em {
  color: #777;
  font-size: 13px;
  font-style: normal;
}

.lock-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
}

.lock-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d8d8d8;
}

.lock-dots span.filled {
  background: #111;
}

.lock-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.lock-pad button {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  background: #ececec;
  color: #111;
  font-weight: 700;
}

.sms-app {
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
  color: #111;
}

.sms-list {
  display: grid;
  align-content: start;
  overflow-y: auto;
  background: #fff;
}

.sms-list[hidden],
.sms-thread[hidden] {
  display: none;
}

.sms-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  border: 0;
  border-bottom: 1px solid var(--phone-line);
  padding: 10px 12px;
  background: rgba(255,255,255,0.94);
  color: #111;
  text-align: left;
}

.sms-row.unread strong::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: #f04444;
}

.sms-row em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #6f7782;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sms-row time {
  color: #9099a4;
  font-size: 11px;
}

.sms-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #30343b;
  color: white;
  font-weight: 800;
}

.sms-avatar.school {
  background: #1f4568;
}

.sms-avatar.carrier {
  background: #1ec45a;
}

.sms-thread {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  flex: 1;
  overflow-y: auto;
  padding: 10px 18px 76px;
  background: #f4f6f8;
}

.sms-date {
  justify-self: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.08);
  color: #777;
  font-size: 12px;
}

.sms-message {
  max-width: 86%;
  border-radius: 18px;
  padding: 13px 14px;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.sms-message p {
  margin: 7px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.sms-composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 9px 10px;
  border-top: 1px solid var(--phone-line);
  background: rgba(250,251,252,0.96);
}

.sms-composer input {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: white;
}

.sms-composer button {
  border: 0;
  border-radius: 999px;
  background: var(--phone-accent-2);
  color: white;
}

.notes-list {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
  background: #f3f1eb;
}

.note-item {
  border-radius: 16px;
  padding: 14px;
  background: #fffdf6;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.note-item.important {
  background: #fff5ba;
}

.note-item time {
  color: #888;
  font-size: 11px;
}

.note-item h2 {
  margin: 6px 0 8px;
  font-size: 18px;
}

.note-item p {
  margin: 4px 0;
  line-height: 1.65;
}

.phone-mail-login {
  display: grid;
  gap: 14px;
  align-content: start;
  flex: 1;
  padding: 26px 20px;
  background: #f5f6f8;
}

.phone-mail-login h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.phone-mail-login label {
  display: grid;
  gap: 6px;
  color: #666;
  font-size: 13px;
}

.mail-logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #1f4568;
  color: white;
  font-family: var(--mono);
  font-weight: 800;
}

.mail-error {
  min-height: 18px;
  margin: 0;
  color: #d64040;
  font-size: 13px;
}

.mail-preview {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 10px;
  padding: 12px;
  background: white;
  box-shadow: 0 8px 22px rgba(30,36,42,0.06);
}

.mail-preview span {
  color: #68717d;
  font-size: 13px;
}

.mail-preview em {
  color: #8a94a0;
  font-size: 11px;
  font-style: normal;
}

.mail-app {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.mail-app[hidden] {
  display: none;
}

.mail-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 14px 14px 0;
  -webkit-overflow-scrolling: touch;
}

.mail-list .mail-preview {
  text-align: left;
}

.map-app {
  background: var(--phone-surface);
}

.phone-map-canvas {
  position: relative;
  min-height: 330px;
  margin: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.56) 0 1px, transparent 1px 48px),
    linear-gradient(0deg, rgba(255,255,255,0.44) 0 1px, transparent 1px 48px),
    #d7e6dc;
  box-shadow: 0 12px 28px rgba(30,36,42,0.1);
}

.phone-map-canvas::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  top: 40%;
  height: 58px;
  border-radius: 999px;
  background: rgba(72, 129, 164, 0.58);
  transform: rotate(-12deg);
}

.map-river {
  position: absolute;
  left: 28%;
  top: 0;
  bottom: 0;
  width: 16px;
  background: rgba(72, 129, 164, 0.38);
}

.map-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid white;
  border-radius: 50%;
  background: #4f9a74;
  color: white;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.map-pin:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.26);
}

.map-pin.s04 {
  left: 42%;
  top: 54%;
}

.map-pin.s08 {
  left: 56%;
  top: 28%;
  background: #e35262;
}

.map-pin.b17 {
  left: 64%;
  top: 42%;
  background: #222632;
}

.map-pin.pump {
  left: 72%;
  top: 54%;
  width: 54px;
  height: 54px;
  background: #3c7781;
}

@keyframes cameraNoise {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(2px);
  }
}

.browser-bar {
  overflow: hidden;
  border-radius: 999px;
  padding: 10px 12px;
  background: #eef1f4;
  color: #667;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-note {
  display: none;
}

.phone-note h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 42px;
}

.phone-note p {
  color: #d6c7ad;
  line-height: 1.8;
}

body[data-page^="phone"] .game-widget {
  display: none;
}

body[data-page="archive"] .game-widget {
  display: none;
}

body[data-page^="phone"] .btn.primary,
.chat-shell .btn.primary {
  border-color: var(--phone-accent);
  background: var(--phone-accent);
  color: white;
}

.oldsite {
  background: #f3f3d9;
  font-family: "SimSun", serif;
}

.oldsite .site-top,
.oldsite .panel,
.oldsite .doc {
  background: #ffffe8;
}

.wall {
  background: #eef1f5;
}

.wall .post {
  background: white;
}

.nvr-page {
  background: #07090d;
  color: #d7dee8;
}

.nvr-page .site-top {
  border-color: #1e2a3a;
  background: #0d1420;
}

.nvr-page .panel,
.nvr-page .doc {
  border-color: #223047;
  background: #0f1724;
}

.nvr-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
}

.camera-screen {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid #26364e;
  background:
    linear-gradient(rgba(255,255,255,0.04) 50%, rgba(0,0,0,0.18) 50%) 0 0 / 100% 4px,
    radial-gradient(circle at 70% 65%, rgba(105, 132, 123, 0.36), transparent 8%),
    linear-gradient(145deg, #050606, #131c18 52%, #020202);
}

.camera-screen.night {
  filter: sepia(1) hue-rotate(70deg) saturate(2.2) brightness(1.1);
}

.camera-screen.ir {
  filter: grayscale(1) contrast(1.6) brightness(1.2);
}

.osd {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  font-family: var(--mono);
  color: #dbeafe;
  pointer-events: none;
}

.hidden-clue {
  position: absolute;
  right: 16%;
  bottom: 18%;
  display: none;
  font-family: var(--mono);
  color: #f8e58b;
  text-shadow: 0 0 8px #000;
}

.camera-screen.zoomed .hidden-clue {
  display: block;
}

.archive-page {
  background: #0b0c0f;
  color: #e8e4d8;
}

.archive-page .panel,
.archive-page .doc {
  border-color: #3a3128;
  background: #141313;
}

.archive-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archive-form button {
  grid-column: 1 / -1;
}

.ending {
  white-space: pre-line;
  line-height: 1.85;
  font-family: var(--serif);
  font-size: 18px;
}

.archive-app {
  background: #10151c;
  color: #e9edf4;
}

.archive-app .app-head {
  border-color: rgba(255,255,255,0.08);
  background: rgba(18, 23, 31, 0.92);
}

.archive-app .app-head strong,
.archive-app .mini-back {
  color: #edf2f7;
}

.archive-phone-feed {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 14px 14px 24px;
  -webkit-overflow-scrolling: touch;
}

.archive-phone-card,
.archive-phone-ending {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

.archive-phone-card.locked {
  opacity: 0.52;
}

.archive-phone-card span {
  color: #7dd3fc;
  font-family: var(--mono);
  font-size: 11px;
}

.archive-phone-card.locked span {
  color: #9aa4b2;
}

.archive-phone-card h2,
.archive-phone-ending h2 {
  margin: 6px 0 8px;
  font-size: 17px;
}

.archive-phone-card p,
.archive-phone-ending p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.7;
}

.archive-phone-ending {
  border-color: rgba(255,255,255,0.14);
}

.archive-phone-ending.rescue {
  background: linear-gradient(145deg, rgba(22,101,52,0.38), rgba(255,255,255,0.06));
}

.archive-phone-ending.truth {
  background: linear-gradient(145deg, rgba(30,64,175,0.34), rgba(255,255,255,0.06));
}

.archive-phone-ending.danger {
  background: linear-gradient(145deg, rgba(127,29,29,0.36), rgba(255,255,255,0.06));
}

@media (max-width: 900px) {
  .intro-grid,
  .grid,
  .three-grid,
  .nvr-grid {
    grid-template-columns: 1fr;
  }

  .game-widget {
    position: static;
    width: auto;
    margin: 12px;
  }

  .site-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .phone-stage {
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    padding-top: 5vh;
  }

  .mi-phone {
    width: min(360px, 100%);
    margin: 0 auto;
  }

  .phone-note {
    width: min(390px, 100%);
    margin: 0 auto;
  }

  .phone-note h1 {
    font-size: 30px;
  }

  .enter-area {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .enter-core {
    order: -1;
  }

  .entry-panel {
    padding: 22px 18px;
  }

  .qr-frame {
    width: min(148px, 46vw);
  }
}

@media (max-width: 420px) {
  .chat-shell {
    padding: 12px 0;
  }

  .phone-stage {
    width: min(100%, calc(100% - 16px));
    min-height: calc(100vh - 24px);
    padding-top: 1vh;
  }

  .mi-phone {
    width: min(352px, 100%);
    border-width: 8px;
  }

  .lock-time {
    padding-top: 104px;
  }

  .lock-clock {
    font-size: 58px;
  }

  .home-date {
    padding-top: 54px;
    font-size: 18px;
  }

  .home-apps {
    gap: 16px 10px;
    padding: 24px 18px 0;
  }

  .app-icon span {
    width: 52px;
    height: 52px;
    border-radius: 15px;
  }

  .dock {
    left: 16px;
    right: 16px;
    bottom: 20px;
    padding: 10px;
  }

  .photo-detail,
  .mail-detail,
  .map-result,
  .browser-history,
  .browser-page,
  .mail-list,
  .sudoku-app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .phone-map-canvas {
    min-height: 300px;
  }

  .archive-form {
    grid-template-columns: 1fr;
  }
}
