* {
  box-sizing: border-box;
}

:root {
  --ink: #1d1b19;
  --paper: #fff7ea;
  --line: #1f1f1f;
  --shadow: #bfae93;
  --shadow-deep: #8f7b5e;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 224, 104, 0.45), transparent 17%),
    radial-gradient(circle at 88% 12%, rgba(112, 202, 255, 0.34), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(255, 151, 201, 0.16), transparent 20%),
    linear-gradient(180deg, #fff8ef 0%, #f5ead9 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: 110px;
  width: 130px;
  height: 340px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.94;
  filter: drop-shadow(10px 14px 0 rgba(0, 0, 0, 0.14));
}

body::before {
  left: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 360'%3E%3Crect x='12' y='12' width='116' height='336' rx='12' fill='%23ffe88d' stroke='%231f1f1f' stroke-width='4'/%3E%3Ccircle cx='70' cy='80' r='28' fill='%23fff' stroke='%231f1f1f' stroke-width='4'/%3E%3Crect x='48' y='112' width='44' height='78' rx='18' fill='%23ffd651' stroke='%231f1f1f' stroke-width='4'/%3E%3Crect x='28' y='132' width='20' height='64' rx='8' fill='%23ffd651' stroke='%231f1f1f' stroke-width='4'/%3E%3Crect x='92' y='132' width='20' height='64' rx='8' fill='%23ffd651' stroke='%231f1f1f' stroke-width='4'/%3E%3Crect x='28' y='208' width='32' height='92' rx='10' fill='%231f1f1f'/%3E%3Crect x='80' y='208' width='32' height='92' rx='10' fill='%231f1f1f'/%3E%3Ccircle cx='58' cy='74' r='5' fill='%231f1f1f'/%3E%3Ccircle cx='82' cy='74' r='5' fill='%231f1f1f'/%3E%3Cpath d='M54 92 Q70 106 86 92' fill='none' stroke='%231f1f1f' stroke-width='4' stroke-linecap='round'/%3E%3Ctext x='70' y='332' font-family='Verdana' font-size='16' font-weight='700' text-anchor='middle' fill='%231f1f1f'%3Eplayer 1%3C/text%3E%3C/svg%3E") center/contain no-repeat;
}

body::after {
  right: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 360'%3E%3Crect x='12' y='12' width='116' height='336' rx='12' fill='%23cce8ff' stroke='%231f1f1f' stroke-width='4'/%3E%3Ccircle cx='70' cy='78' r='28' fill='%23fff' stroke='%231f1f1f' stroke-width='4'/%3E%3Cpath d='M42 168 L70 118 L98 168 Z' fill='%239bd86d' stroke='%231f1f1f' stroke-width='4'/%3E%3Crect x='52' y='166' width='36' height='60' rx='14' fill='%239bd86d' stroke='%231f1f1f' stroke-width='4'/%3E%3Crect x='32' y='228' width='28' height='78' rx='10' fill='%231f1f1f'/%3E%3Crect x='80' y='228' width='28' height='78' rx='10' fill='%231f1f1f'/%3E%3Ccircle cx='58' cy='74' r='5' fill='%231f1f1f'/%3E%3Ccircle cx='82' cy='74' r='5' fill='%231f1f1f'/%3E%3Cpath d='M54 92 Q70 84 86 92' fill='none' stroke='%231f1f1f' stroke-width='4' stroke-linecap='round'/%3E%3Ctext x='70' y='332' font-family='Verdana' font-size='16' font-weight='700' text-anchor='middle' fill='%231f1f1f'%3Eplayer 2%3C/text%3E%3C/svg%3E") center/contain no-repeat;
}

.page {
  width: min(1040px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 36px;
  position: relative;
  z-index: 1;
}

.page-home {
  max-width: 1080px;
}

.hero-header,
.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.home-brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fff1d2 100%);
  font-weight: 900;
  box-shadow: 0 5px 0 #fff inset, 6px 6px 0 var(--shadow), 10px 12px 20px rgba(0, 0, 0, 0.08);
  transform: rotate(-4deg);
}

.overline {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5e5b56;
}

.home-brand-text {
  display: block;
  font-size: 30px;
  font-weight: 900;
}

.hero-board,
.panel {
  border: 3px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96) 0%, rgba(255, 245, 228, 0.93) 100%);
  box-shadow: 10px 10px 0 var(--shadow), 0 18px 28px rgba(102, 71, 33, 0.1);
}

.hero-board {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 28px;
  margin-bottom: 18px;
  position: relative;
}

.hero-board::after {
  content: "yay!";
  position: absolute;
  right: 18px;
  top: -16px;
  padding: 8px 14px;
  border: 3px solid var(--line);
  background: #ffdd71;
  box-shadow: 4px 4px 0 var(--shadow);
  font-weight: 900;
  transform: rotate(8deg);
}

.tag-line {
  margin: 0 0 8px;
  font-size: 15px;
  color: #57534d;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 0.94;
}

h2 {
  margin: 0 0 12px;
}

.hero-text {
  margin: 0;
  max-width: 48ch;
  line-height: 1.7;
}

.hero-doodles {
  display: grid;
  gap: 16px;
  align-content: center;
}

.doodle {
  width: fit-content;
  padding: 16px 20px;
  border: 3px solid var(--line);
  background: #fff;
  font-size: 32px;
  font-weight: 900;
  box-shadow: 6px 6px 0 var(--shadow), 0 8px 14px rgba(0,0,0,0.08);
}

.doodle-one { background: linear-gradient(180deg, #ffe589 0%, #ffd85d 100%); transform: rotate(-6deg) translateZ(0); }
.doodle-two { background: linear-gradient(180deg, #ddf1ff 0%, #bfe0ff 100%); transform: rotate(4deg) translateZ(0); margin-left: 70px; }
.doodle-three { background: linear-gradient(180deg, #ddffd4 0%, #b9f29e 100%); transform: rotate(-2deg) translateZ(0); margin-left: 28px; }

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

.wall-card {
  display: block;
  padding: 22px;
  min-height: 148px;
  color: inherit;
  text-decoration: none;
  border: 3px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 5px 0 rgba(255,255,255,0.45) inset, 8px 8px 0 var(--shadow), 0 14px 18px rgba(0, 0, 0, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.wall-card:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 0 5px 0 rgba(255,255,255,0.45) inset, 12px 12px 0 #bca98b, 0 18px 24px rgba(0, 0, 0, 0.1);
}

.wall-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 25px;
}

.wall-card span {
  display: block;
  line-height: 1.55;
}

.yellow { background: linear-gradient(180deg, #ffe98b 0%, #ffd95c 100%); }
.blue { background: linear-gradient(180deg, #d4efff 0%, #b8deff 100%); }
.green { background: linear-gradient(180deg, #ddffd6 0%, #b7ef9b 100%); }
.pink { background: linear-gradient(180deg, #ffe2ef 0%, #ffbfdc 100%); }
.orange { background: linear-gradient(180deg, #ffe4c7 0%, #ffca93 100%); }
.gray { background: linear-gradient(180deg, #f4f4f4 0%, #dcdcdc 100%); }
.red { background: linear-gradient(180deg, #ffd8ce 0%, #ff9f83 100%); }

.tool-page {
  max-width: 760px;
}

.nav-back,
.action-button,
select,
input,
textarea {
  border: 3px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.nav-back,
.action-button {
  text-decoration: none;
  padding: 11px 15px;
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(255,255,255,0.5) inset, 5px 5px 0 var(--shadow), 0 10px 14px rgba(0,0,0,0.06);
}

.action-button:hover,
.nav-back:hover {
  transform: translateY(-2px);
}

.panel {
  padding: 22px;
  border-radius: 18px;
}

.yellow-panel { background: linear-gradient(180deg, #fff7cf 0%, #ffe89b 100%); }
.blue-panel { background: linear-gradient(180deg, #ebf6ff 0%, #cfe8ff 100%); }
.green-panel { background: linear-gradient(180deg, #ebffe2 0%, #c7f5b3 100%); }
.pink-panel { background: linear-gradient(180deg, #fff0f7 0%, #ffd4e7 100%); }
.orange-panel { background: linear-gradient(180deg, #fff0dc 0%, #ffd8af 100%); }
.gray-panel { background: linear-gradient(180deg, #fafafa 0%, #e7e7e7 100%); }
.red-panel { background: linear-gradient(180deg, #fff1ea 0%, #ffc6b2 100%); }

.tool-topline p {
  margin: 0 0 14px;
  color: #58544d;
}

label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 14px;
}

select,
input,
textarea {
  width: 100%;
  padding: 12px 13px;
  margin-bottom: 14px;
  border-radius: 12px;
  box-shadow: inset 0 4px 0 rgba(255,255,255,0.6), inset 0 -2px 0 rgba(0,0,0,0.04);
}

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

.score-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.score-board-two {
  grid-template-columns: repeat(2, 1fr);
}

.score-board div {
  padding: 14px;
  border: 3px dashed var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.76) 0%, rgba(255,248,235,0.8) 100%);
  box-shadow: 0 5px 0 rgba(255,255,255,0.55) inset, 0 10px 16px rgba(0,0,0,0.05);
}

.score-board span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #5a5854;
  text-transform: uppercase;
}

.score-board strong {
  font-size: 28px;
}

.big-pad {
  width: 100%;
  min-height: 210px;
  border: 3px solid var(--line);
  border-radius: 22px;
  font: inherit;
  font-size: 32px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 6px 0 rgba(255,255,255,0.65), inset 0 -10px 0 rgba(0, 0, 0, 0.08), 0 14px 18px rgba(0,0,0,0.08);
  margin-bottom: 14px;
}

.yellow-pad { background: linear-gradient(180deg, #ffe589 0%, #ffd651 100%); }
.green-pad { background: linear-gradient(180deg, #cff5c7 0%, #aee79f 100%); }

.typing-card {
  min-height: 120px;
  padding: 18px;
  border: 3px dashed var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(255,248,235,0.86) 100%);
  line-height: 1.75;
  margin-bottom: 14px;
  box-shadow: 0 5px 0 rgba(255,255,255,0.5) inset, 0 10px 16px rgba(0,0,0,0.05);
}

.reaction-arena {
  min-height: 250px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #f5f5f5 0%, #dfdfdf 100%);
  box-shadow: inset 0 6px 0 rgba(255,255,255,0.7), inset 0 -8px 0 rgba(0,0,0,0.05), 0 12px 18px rgba(0,0,0,0.08);
  font-size: 34px;
  font-weight: 900;
  cursor: pointer;
}

.reaction-arena.waiting {
  background: linear-gradient(180deg, #ffcaca 0%, #f3a3a3 100%);
}

.reaction-arena.ready {
  background: linear-gradient(180deg, #b5f0ac 0%, #7fda78 100%);
  animation: arena-glow 0.55s ease-in-out infinite alternate;
}

.double-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.dice-stage,
.coin-stage {
  display: grid;
  place-items: center;
  min-height: 300px;
  margin: 14px 0 16px;
  perspective: 1200px;
}

.dice-stage::after {
  content: "";
  width: 210px;
  height: 38px;
  margin-top: -24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.32), transparent 72%);
  filter: blur(8px);
}

.dice-cube {
  position: relative;
  width: 158px;
  height: 158px;
  transform-style: preserve-3d;
  transform: rotateX(-26deg) rotateY(35deg) translateY(0);
}

.dice-cube.rolling {
  animation: dice-spin 1.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.face {
  position: absolute;
  width: 158px;
  height: 158px;
  display: grid;
  place-items: center;
  border: 3px solid #2a2a2a;
  border-radius: 24px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.08) 38%),
    linear-gradient(145deg, #ffffff 0%, #f3f3f3 52%, #d7d7d7 100%);
  box-shadow:
    inset -12px -18px 22px rgba(0, 0, 0, 0.09),
    inset 10px 10px 14px rgba(255, 255, 255, 0.95),
    0 14px 22px rgba(0, 0, 0, 0.09);
}

.pip-face {
  width: 100%;
  height: 100%;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
}

.pip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #505050 0%, #111 75%);
  align-self: center;
  justify-self: center;
  box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.15), 0 1px 2px rgba(0, 0, 0, 0.25);
}

.pip-number {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  align-self: center;
  justify-self: center;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid #2c2c2c;
  background: linear-gradient(180deg, #fff 0%, #ececec 100%);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.8), inset 0 -4px 8px rgba(0,0,0,0.08);
  font-size: 36px;
  font-weight: 900;
}

.front { transform: translateZ(79px); }
.back { transform: rotateY(180deg) translateZ(79px); }
.right { transform: rotateY(90deg) translateZ(79px); }
.left { transform: rotateY(-90deg) translateZ(79px); }
.top { transform: rotateX(90deg) translateZ(79px); }
.bottom { transform: rotateX(-90deg) translateZ(79px); }

.result-line {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.coin-stage::after {
  content: "";
  width: 190px;
  height: 34px;
  margin-top: -26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.3), transparent 70%);
  filter: blur(8px);
}

.coin-3d {
  position: relative;
  width: 208px;
  height: 208px;
  transform-style: preserve-3d;
}

.coin-3d::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 99px;
  width: 10px;
  height: 192px;
  border-radius: 999px;
  background: repeating-linear-gradient(180deg, #8e6b17 0 4px, #f0d57d 4px 8px);
  box-shadow: inset 0 0 4px rgba(255,255,255,0.35);
  transform: rotateY(90deg) translateZ(5px);
}

.coin-3d.flipping {
  animation: coin-spin 1.2s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid #90712b;
  background: radial-gradient(circle at 35% 30%, #fff3c5 0%, #e0c56d 46%, #ab8322 100%);
  backface-visibility: hidden;
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.16), inset 0 0 0 4px rgba(255, 251, 236, 0.58), inset -12px -16px 18px rgba(99, 74, 10, 0.12);
}

.coin-back {
  transform: rotateY(180deg);
}

.coin-rim {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px dashed rgba(108, 81, 18, 0.8);
}

.coin-inner {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  color: #5b450c;
}

.coin-small-top {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.coin-liberty {
  position: absolute;
  top: 36px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.coin-profile {
  width: 64px;
  height: 86px;
  border-radius: 46px 46px 38px 36px;
  background: linear-gradient(180deg, rgba(120, 94, 26, 0.24) 0%, rgba(95, 72, 15, 0.52) 100%);
  clip-path: polygon(35% 0%, 62% 3%, 78% 16%, 82% 34%, 74% 47%, 78% 66%, 71% 83%, 58% 100%, 27% 100%, 18% 76%, 20% 52%, 17% 30%, 24% 14%);
  margin-top: 14px;
}

.coin-year {
  position: absolute;
  bottom: 16px;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

.coin-eagle {
  width: 94px;
  height: 54px;
  position: relative;
  margin-top: 8px;
}

.coin-eagle::before,
.coin-eagle::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 42px;
  height: 26px;
  border-top: 5px solid rgba(92, 69, 11, 0.85);
}

.coin-eagle::before {
  left: 2px;
  border-left: 5px solid rgba(92, 69, 11, 0.85);
  transform: skewY(-18deg) rotate(-8deg);
}

.coin-eagle::after {
  right: 2px;
  border-right: 5px solid rgba(92, 69, 11, 0.85);
  transform: skewY(18deg) rotate(8deg);
}

.coin-stars {
  position: absolute;
  bottom: 42px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.article-box {
  margin-top: 18px;
  padding: 18px;
  border: 3px dashed var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(255,247,232,0.88) 100%);
  box-shadow: 0 5px 0 rgba(255,255,255,0.55) inset, 0 12px 16px rgba(0,0,0,0.05);
  line-height: 1.75;
}

.article-box h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.article-box p {
  margin: 0 0 12px;
}

.article-box p:last-child {
  margin-bottom: 0;
}

@keyframes dice-spin {
  0% { transform: rotateX(-26deg) rotateY(35deg) translateY(0); }
  35% { transform: rotateX(260deg) rotateY(220deg) rotateZ(140deg) translateY(-12px) scale(1.1); }
  70% { transform: rotateX(460deg) rotateY(420deg) rotateZ(260deg) translateY(8px) scale(0.96); }
  100% { transform: rotateX(var(--dice-x, -26deg)) rotateY(var(--dice-y, 35deg)) rotateZ(0deg) translateY(0); }
}

@keyframes coin-spin {
  0% { transform: rotateY(0deg) rotateX(0deg) translateY(0); }
  50% { transform: rotateY(720deg) rotateX(26deg) translateY(-12px) scale(1.06); }
  100% { transform: rotateY(var(--coin-rotation, 1080deg)) rotateX(0deg) translateY(0); }
}

@keyframes arena-glow {
  from { transform: scale(1); }
  to { transform: scale(1.02); }
}

@media (max-width: 1180px) {
  body::before,
  body::after {
    opacity: 0.45;
    width: 96px;
    height: 260px;
  }
}

@media (max-width: 900px) {
  body::before,
  body::after {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero-board,
  .tool-wall,
  .score-board,
  .double-inputs {
    grid-template-columns: 1fr;
  }

  .hero-header,
  .tool-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-brand-text {
    font-size: 24px;
  }

  .reaction-arena {
    font-size: 28px;
  }
}

.lime { background: linear-gradient(180deg, #ecffb9 0%, #bff26d 100%); }
.purple { background: linear-gradient(180deg, #eddcff 0%, #c9a3ff 100%); }
.lime-panel { background: linear-gradient(180deg, #f4ffd8 0%, #d7f49d 100%); }
.purple-panel { background: linear-gradient(180deg, #f5eaff 0%, #d6b8ff 100%); }

.game-canvas {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto 14px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #f7fff2;
  box-shadow: inset 0 6px 0 rgba(255,255,255,0.6), 0 12px 18px rgba(0,0,0,0.08);
}

.dino-canvas {
  max-width: 700px;
  aspect-ratio: 35 / 13;
  background: linear-gradient(180deg, #eef7ff 0%, #fff8ea 100%);
}

.game-note {
  margin: 0 0 14px;
  text-align: center;
  font-weight: 700;
  color: #57534d;
}

.teal { background: linear-gradient(180deg, #d9fffb 0%, #8fe9db 100%); }
.teal-panel { background: linear-gradient(180deg, #ecfffb 0%, #b9f3ea 100%); }

.maker-page {
  max-width: 1100px;
}

.maker-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.maker-controls h2 {
  margin: 0 0 14px;
}

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

.maker-grid label {
  display: grid;
  gap: 6px;
}

.range-value {
  font-size: 13px;
  font-weight: 700;
  color: #4f4b45;
}

.maker-preview-wrap {
  display: grid;
  gap: 16px;
  align-content: start;
}

.maker-meta {
  padding: 16px;
  border: 3px dashed var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,247,232,0.88) 100%);
}

.maker-meta h3,
.maker-meta p {
  margin: 0;
}

.maker-meta p {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 900;
}

.phone-stage {
  padding: 22px;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #f4fffd 0%, #d9f5ef 100%);
  box-shadow: inset 0 5px 0 rgba(255,255,255,0.7), 0 14px 18px rgba(0,0,0,0.08);
}

.phone-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  justify-items: center;
  align-items: center;
}

.phone-back,
.phone-front {
  position: relative;
  width: 180px;
  height: 340px;
  border: 8px solid #d7d7d7;
  border-radius: 34px;
  box-shadow: 0 8px 0 rgba(255,255,255,0.55) inset, 0 20px 26px rgba(0,0,0,0.12);
}

.phone-back {
  background: linear-gradient(180deg, #6694ff 0%, #3f63c8 100%);
  overflow: hidden;
}

.phone-front {
  background: linear-gradient(180deg, #1b1b1b 0%, #2f2f2f 100%);
  overflow: hidden;
}

.camera-island {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 92px;
  min-height: 92px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-radius: 24px;
  background: rgba(245, 245, 245, 0.28);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.5), 0 10px 14px rgba(0,0,0,0.14);
}

.camera-lens {
  background: radial-gradient(circle at 35% 30%, #555 0%, #111 70%);
  border: 4px solid rgba(255,255,255,0.35);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.22), 0 3px 5px rgba(0,0,0,0.22);
}

.camera-lens.circle { border-radius: 50%; }
.camera-lens.square { border-radius: 12px; }
.camera-lens.pill { border-radius: 999px; }
.camera-lens.diamond { transform: rotate(45deg); border-radius: 10px; }

.camera-lens.ring { background: radial-gradient(circle, #111 38%, #dcdcdc 40%, #444 62%, #111 74%); }
.camera-lens.gloss { background: radial-gradient(circle at 30% 28%, #9dd1ff 0%, #26415f 30%, #111 72%); }
.camera-lens.pro { box-shadow: inset 0 2px 4px rgba(255,255,255,0.22), 0 0 0 3px rgba(241,206,103,0.55), 0 4px 8px rgba(0,0,0,0.24); }

.brand-stamp {
  position: absolute;
  right: 18px;
  bottom: 20px;
  font-size: 28px;
  font-weight: 900;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.08em;
}

.screen-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 72px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0,0,0,0.75);
}

.screen-ui {
  padding: 34px 14px 14px;
}

.ui-row {
  height: 18px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
}

.ui-row.short {
  width: 70%;
}

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

.app-grid span {
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.12) 100%);
}

.maker-note {
  text-align: center;
  font-weight: 700;
  color: #55514c;
}

@media (max-width: 900px) {
  .maker-layout,
  .maker-grid,
  .phone-card {
    grid-template-columns: 1fr;
  }
}

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

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.preset-chip {
  padding: 10px 14px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #f3efe7 100%);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(255,255,255,0.6) inset, 4px 4px 0 var(--shadow);
}

.advanced-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rating-chip {
  padding: 10px 12px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff2a6 0%, #ffd964 100%);
  font-weight: 900;
  white-space: nowrap;
}

.advanced-stage {
  position: relative;
}

.flash-dot {
  position: absolute;
  top: 26px;
  right: 24px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffed8 0%, #ffe48b 52%, #d6b143 100%);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.28), 0 2px 5px rgba(0,0,0,0.2);
}

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

.spec-pill {
  padding: 12px;
  border: 3px dashed var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(248,240,226,0.92) 100%);
  text-align: center;
  box-shadow: 0 5px 0 rgba(255,255,255,0.55) inset, 0 10px 14px rgba(0,0,0,0.05);
}

.spec-pill strong,
.spec-pill span {
  display: block;
}

.spec-pill span {
  font-size: 12px;
  color: #5d5851;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.phone-back.glossy,
.phone-front.glossy {
  box-shadow: 0 8px 0 rgba(255,255,255,0.55) inset, 0 20px 26px rgba(0,0,0,0.12), inset 0 -16px 22px rgba(255,255,255,0.08);
}

.phone-back.matte,
.phone-front.matte {
  filter: saturate(0.9);
}

.phone-back.frost,
.phone-front.frost {
  background-image: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 100%);
}

.phone-back.carbon {
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.08) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.08) 75%, transparent 75%, transparent),
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(0,0,0,0.14) 100%);
  background-size: 12px 12px, 100% 100%;
}

.screen-ui.wallpaper-sunrise {
  background: linear-gradient(180deg, #ffcf7b 0%, #ff8fa7 60%, #7b7cff 100%);
}

.screen-ui.wallpaper-space {
  background:
    radial-gradient(circle at 25% 25%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 70% 38%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 55% 70%, #fff 0 2px, transparent 3px),
    linear-gradient(180deg, #0d0f26 0%, #1f2f61 100%);
}

.screen-ui.wallpaper-gaming {
  background: linear-gradient(135deg, #0d1b2f 0%, #6626ff 48%, #1de5c7 100%);
}

.screen-ui.wallpaper-minimal {
  background: linear-gradient(180deg, #eff2f7 0%, #d7deeb 100%);
}

.screen-notch.front-punch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  top: 16px;
  background: rgba(0,0,0,0.85);
}

.screen-notch.front-notch {
  width: 88px;
  height: 20px;
  border-radius: 0 0 16px 16px;
}

.screen-notch.front-pill {
  width: 86px;
  height: 18px;
  border-radius: 999px;
}

.screen-notch.front-under {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  top: 16px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
}

.camera-island.layout-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.camera-island.layout-triangle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.camera-island.layout-stack {
  grid-template-columns: 1fr;
}

.camera-island.layout-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 128px !important;
}

.camera-island.layout-strip .camera-lens {
  justify-self: center;
}

@media (max-width: 900px) {
  .maker-grid-advanced,
  .spec-strip {
    grid-template-columns: 1fr;
  }

  .advanced-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

.coming-soon {
  margin: 22px 0 0;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: #5d564d;
}

.logo-brand {
  gap: 0;
}

.site-logo {
  display: block;
  width: min(320px, 72vw);
  height: auto;
}

.hero-header .site-logo {
  width: min(360px, 82vw);
}

.maker-meta-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.view-mode-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.view-mode-chip {
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(242,235,224,0.94) 100%);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(255,255,255,0.65) inset, 3px 3px 0 rgba(191,174,147,0.85);
}

.view-mode-chip.active {
  background: linear-gradient(180deg, #fff2a6 0%, #ffd964 100%);
}

.advanced-stage {
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.phone-stage-copy {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 2px dashed rgba(31,31,31,0.5);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(228,255,249,0.74) 100%);
}

.phone-stage-copy strong {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.phone-stage-copy span {
  color: #50504b;
  line-height: 1.5;
}

.phone-viewer {
  min-height: 520px;
  display: grid;
  place-items: center;
  perspective: 1800px;
  perspective-origin: center 40%;
  touch-action: none;
  user-select: none;
}

.phone-viewer.dragging-phone,
.phone-viewer.dragging-lens {
  cursor: grabbing;
}

.phone-card {
  --phone-rotate-x: -14deg;
  --phone-rotate-y: -26deg;
  position: relative;
  width: min(100%, 440px);
  min-height: 440px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transition: transform 280ms ease, gap 220ms ease;
}

.phone-card.split-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.phone-card.front-view,
.phone-card.back-view,
.phone-card.three-view {
  grid-template-columns: 1fr;
}

.phone-card.three-view {
  transform: rotateX(var(--phone-rotate-x)) rotateY(var(--phone-rotate-y));
}

.phone-back,
.phone-front {
  position: relative;
  overflow: hidden;
}

.phone-card.split-view .phone-back,
.phone-card.split-view .phone-front {
  transform: none;
}

.phone-card.back-view .phone-front,
.phone-card.front-view .phone-back {
  display: none;
}

.phone-card.back-view .phone-back,
.phone-card.front-view .phone-front {
  transform: translateZ(0);
}

.phone-card.three-view .phone-back,
.phone-card.three-view .phone-front {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
}

.phone-card.three-view .phone-back {
  transform: translate3d(-50%, -50%, -14px) rotateY(180deg);
}

.phone-card.three-view .phone-front {
  transform: translate3d(-50%, -50%, 14px);
}

.phone-back::before,
.phone-front::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.phone-back::before {
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.44) 0%, transparent 24%),
    linear-gradient(145deg, rgba(255,255,255,0.22) 0%, transparent 30%, rgba(0,0,0,0.12) 100%);
}

.phone-front::before {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.14) 0%, transparent 22%, rgba(0,0,0,0.28) 100%),
    radial-gradient(circle at 70% 12%, rgba(255,255,255,0.12) 0%, transparent 22%);
}

.camera-surface {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44%;
  height: 34%;
  min-width: 112px;
  min-height: 112px;
  border: 2px solid var(--camera-accent, #7ef0d0);
  background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.08) 100%);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.4), 0 16px 20px rgba(0,0,0,0.16);
}

.draggable-lens {
  position: absolute;
  transform: translate3d(0, 0, 0);
  margin: 0;
  padding: 0;
  border-color: rgba(255,255,255,0.38);
  cursor: grab;
  touch-action: none;
}

.draggable-lens::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: inherit;
  background: radial-gradient(circle at 35% 35%, rgba(132,196,255,0.9) 0%, rgba(11,18,26,0.18) 34%, rgba(0,0,0,0.84) 100%);
}

.phone-card.three-view .draggable-lens {
  pointer-events: auto;
}

.phone-front .screen-ui {
  height: 100%;
}

.phone-front::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
  pointer-events: none;
}

@media (max-width: 900px) {
  .advanced-meta {
    align-items: stretch;
  }

  .maker-meta-actions {
    justify-items: stretch;
  }

  .view-mode-row {
    justify-content: flex-start;
  }

  .phone-viewer {
    min-height: 480px;
  }

  .phone-card {
    width: 100%;
    min-height: 400px;
  }

  .phone-card.split-view {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .page.maker-page {
    width: min(100% - 12px, 100%);
    padding-top: 12px;
  }

  .panel.maker-layout {
    padding: 14px;
    border-radius: 20px;
  }

  .maker-controls,
  .maker-preview-wrap {
    min-width: 0;
  }

  .preset-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preset-chip,
  .view-mode-chip {
    min-height: 44px;
  }

  .maker-grid-advanced {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .phone-stage {
    padding: 14px;
    border-radius: 20px;
  }

  .phone-stage-copy {
    padding: 12px;
  }

  .phone-viewer {
    min-height: 420px;
  }

  .phone-card {
    min-height: 340px;
  }

  .phone-card.three-view {
    transform: rotateX(calc(var(--phone-rotate-x) * 0.9)) rotateY(var(--phone-rotate-y)) scale(0.92);
  }

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

  .camera-surface {
    top: 14px;
    left: 14px;
    width: 46%;
    height: 36%;
    min-width: 100px;
    min-height: 100px;
  }
}


.phone-viewer.dragging-phone .phone-card {
  transition: none;
}


.phone-stage {
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 24%),
    linear-gradient(180deg, #edf8f7 0%, #cfe7e4 100%);
}

.phone-stage-copy {
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(242,249,248,0.86) 100%);
}

.phone-card {
  width: min(100%, 480px);
}

.phone-card.three-view {
  cursor: grab;
  transform: rotateX(var(--phone-rotate-x)) rotateY(var(--phone-rotate-y)) translateY(-8px);
}

.phone-back,
.phone-front {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.58),
    0 28px 48px rgba(0,0,0,0.22),
    0 10px 18px rgba(0,0,0,0.14);
}

.phone-back::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.42) 0%, transparent 26%),
    linear-gradient(160deg, rgba(255,255,255,0.18) 0%, transparent 38%, rgba(0,0,0,0.16) 100%);
  pointer-events: none;
}

.phone-front::before {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.12) 0%, transparent 22%, rgba(0,0,0,0.34) 100%),
    radial-gradient(circle at 70% 12%, rgba(255,255,255,0.14) 0%, transparent 20%);
}

.camera-surface {
  top: 18px;
  left: 18px;
  width: 46%;
  height: 35%;
  border: 1px solid rgba(255,255,255,0.32);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.22) 0%, rgba(114,120,126,0.26) 48%, rgba(26,29,33,0.32) 100%),
    linear-gradient(180deg, rgba(244,244,244,0.12) 0%, rgba(38,39,44,0.28) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -8px 18px rgba(0,0,0,0.18),
    0 18px 24px rgba(0,0,0,0.18);
}

.draggable-lens {
  border: 3px solid rgba(188,192,198,0.85);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.44),
    0 8px 14px rgba(0,0,0,0.22),
    0 0 0 1px rgba(42,44,48,0.32);
  background:
    radial-gradient(circle at 35% 35%, rgba(80,88,98,0.92) 0%, rgba(18,22,28,0.96) 60%, rgba(0,0,0,1) 100%);
}

.draggable-lens::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.12);
  background: radial-gradient(circle at 32% 28%, rgba(104,184,255,0.4) 0%, rgba(8,14,20,0.1) 28%, rgba(0,0,0,0.82) 100%);
}

.draggable-lens::after {
  inset: 26%;
  background: radial-gradient(circle at 35% 35%, rgba(112,202,255,0.82) 0%, rgba(20,24,32,0.3) 30%, rgba(0,0,0,0.9) 100%);
}

.camera-lens.square,
.camera-lens.pill,
.camera-lens.diamond {
  border-width: 2px;
}

.flash-dot {
  top: 30px;
  right: 28px;
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #fffaf0 0%, #ffe69e 52%, #b58b27 100%);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.28), 0 4px 8px rgba(0,0,0,0.24);
}

.brand-stamp {
  color: rgba(255,255,255,0.52);
  text-shadow: 0 1px 2px rgba(0,0,0,0.24);
}

.screen-ui.wallpaper-minimal {
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 28%),
    linear-gradient(180deg, #f5f7fb 0%, #d7deeb 100%);
}

.spec-pill {
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(243,239,232,0.95) 100%);
}

@media (max-width: 640px) {
  .phone-card.three-view {
    transform: rotateX(calc(var(--phone-rotate-x) * 0.9)) rotateY(var(--phone-rotate-y)) translateY(-4px) scale(0.92);
  }

  .camera-surface {
    top: 14px;
    left: 14px;
    width: 47%;
    height: 36%;
  }
}

.phone-card {
  --device-width: 180px;
  --device-height: 340px;
  --device-depth: 18px;
  --device-radius: 42px;
  --device-side-tone: linear-gradient(180deg, #cfd6de 0%, #9099a4 100%);
}

.phone-card.three-view {
  width: calc(var(--device-width) + 90px);
  min-height: calc(var(--device-height) + 90px);
  cursor: grab;
  transform: rotateX(var(--phone-rotate-x)) rotateY(var(--phone-rotate-y)) translateY(-8px);
}

.phone-card.split-view,
.phone-card.front-view,
.phone-card.back-view {
  width: min(100%, 480px);
}

.phone-edge {
  display: none;
}

.phone-card.three-view .phone-edge {
  display: block;
  position: absolute;
  background: var(--device-side-tone);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -6px 12px rgba(0,0,0,0.18);
}

.phone-card.three-view .edge-left,
.phone-card.three-view .edge-right {
  top: 50%;
  width: var(--device-depth);
  height: calc(var(--device-height) - 6px);
  border-radius: 999px;
}

.phone-card.three-view .edge-left {
  left: 50%;
  transform: translate3d(calc(-1 * (var(--device-width) / 2)), -50%, 0) rotateY(90deg);
}

.phone-card.three-view .edge-right {
  left: 50%;
  transform: translate3d(calc(var(--device-width) / 2), -50%, 0) rotateY(90deg);
}

.phone-card.three-view .edge-top,
.phone-card.three-view .edge-bottom {
  left: 50%;
  width: calc(var(--device-width) - 10px);
  height: var(--device-depth);
  border-radius: 999px;
}

.phone-card.three-view .edge-top {
  top: 50%;
  transform: translate3d(-50%, calc(-1 * (var(--device-height) / 2)), 0) rotateX(90deg);
}

.phone-card.three-view .edge-bottom {
  top: 50%;
  transform: translate3d(-50%, calc(var(--device-height) / 2), 0) rotateX(90deg);
}

.phone-card.three-view .phone-back {
  transform: translate3d(-50%, -50%, calc(var(--device-depth) / -2)) rotateY(180deg);
}

.phone-card.three-view .phone-front {
  transform: translate3d(-50%, -50%, calc(var(--device-depth) / 2));
}

.phone-back,
.phone-front {
  overflow: hidden;
  border-style: solid;
}

.phone-back,
.phone-front,
.phone-edge {
  backface-visibility: hidden;
}

.phone-back::before {
  background:
    radial-gradient(circle at 16% 10%, rgba(255,255,255,0.34) 0%, transparent 18%),
    linear-gradient(158deg, rgba(255,255,255,0.16) 0%, transparent 38%, rgba(0,0,0,0.18) 100%);
}

.phone-back::after {
  background:
    radial-gradient(circle at 78% 84%, rgba(255,255,255,0.1) 0%, transparent 16%),
    linear-gradient(160deg, rgba(255,255,255,0.06) 0%, transparent 42%, rgba(0,0,0,0.18) 100%);
}

.phone-front::before {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.05) 0%, transparent 22%, rgba(0,0,0,0.48) 100%),
    radial-gradient(circle at 70% 10%, rgba(255,255,255,0.08) 0%, transparent 18%);
}

.phone-front::after {
  inset: 12px;
  border-radius: calc(var(--device-radius) - 14px);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.screen-ui {
  border-radius: calc(var(--device-radius) - 16px);
}

.camera-surface {
  border: none;
  background:
    linear-gradient(145deg, rgba(105,112,119,0.24) 0%, rgba(34,38,42,0.52) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(18,20,24,0.22) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -12px 18px rgba(0,0,0,0.26),
    0 18px 28px rgba(0,0,0,0.2);
}

.draggable-lens {
  border: 3px solid rgba(150,156,164,0.9);
  background: radial-gradient(circle at 35% 35%, rgba(92,98,110,0.94) 0%, rgba(17,20,25,0.98) 60%, rgba(0,0,0,1) 100%);
}

.flash-dot {
  right: 26px;
}

.phone-card.split-view .phone-back,
.phone-card.split-view .phone-front,
.phone-card.back-view .phone-back,
.phone-card.front-view .phone-front {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 28px 40px rgba(0,0,0,0.2),
    0 10px 18px rgba(0,0,0,0.14);
}

.phone-card.split-view .phone-front,
.phone-card.front-view .phone-front {
  border-image: none !important;
  border-color: #111319 !important;
}

.phone-card.split-view .phone-back,
.phone-card.back-view .phone-back {
  border-image-slice: 1;
}

@media (max-width: 640px) {
  .phone-card.three-view {
    width: calc(var(--device-width) + 54px);
    min-height: calc(var(--device-height) + 54px);
    transform: rotateX(calc(var(--phone-rotate-x) * 0.9)) rotateY(var(--phone-rotate-y)) translateY(-4px) scale(0.92);
  }
}


.avatar-page {
  max-width: 1260px;
}

.avatar-shell {
  display: grid;
  gap: 18px;
}

.avatar-header .nav-back {
  background: rgba(10, 14, 27, 0.92);
  color: #f6f8ff;
  border-color: #20314f;
  box-shadow: 0 0 0 1px rgba(91,140,255,0.15), 0 10px 22px rgba(0,0,0,0.22);
}

.avatar-hero,
.avatar-panel,
.avatar-history-card,
.avatar-preview-card,
.avatar-prompt-box,
.avatar-status {
  border: 1px solid rgba(94, 126, 255, 0.18);
}

.avatar-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(71, 155, 255, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 79, 216, 0.18), transparent 24%),
    linear-gradient(160deg, #090d18 0%, #10172a 55%, #0d1120 100%);
  box-shadow: 0 24px 60px rgba(3, 8, 20, 0.42);
}

.avatar-kicker {
  margin: 0 0 10px;
  color: #7fe7ff;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.avatar-hero h1 {
  margin: 0 0 10px;
  color: #f7faff;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.avatar-subtitle {
  margin: 0;
  max-width: 56ch;
  color: rgba(226, 234, 255, 0.78);
  line-height: 1.7;
}

.avatar-trending {
  align-self: center;
  padding: 18px;
  border-radius: 22px;
  background: rgba(8, 13, 24, 0.76);
  box-shadow: inset 0 0 0 1px rgba(125, 147, 255, 0.16);
}

.avatar-trending span,
.avatar-mini-note {
  color: rgba(216, 224, 246, 0.72);
  font-size: 13px;
}

.trending-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.trending-chip,
.copy-link,
.neon-button {
  font: inherit;
}

.trending-chip,
.copy-link {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(113, 138, 255, 0.22);
  background: rgba(20, 27, 46, 0.86);
  color: #eef3ff;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.trending-chip:hover,
.copy-link:hover,
.neon-button:hover {
  transform: translateY(-2px);
}

.avatar-panel {
  padding: 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(61, 90, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(10,14,27,0.97) 0%, rgba(8,11,21,0.98) 100%);
  box-shadow: 0 24px 60px rgba(5, 8, 18, 0.46);
}

.avatar-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
}

.avatar-controls,
.avatar-preview-column {
  min-width: 0;
}

.avatar-controls h2,
.avatar-controls h3,
.avatar-history-card h3 {
  margin: 0;
  color: #f8fbff;
}

.avatar-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.compact-heading {
  margin-bottom: 12px;
}

.compact-row {
  flex-wrap: wrap;
}

.avatar-controls label,
.avatar-controls input,
.avatar-controls textarea,
.avatar-controls select {
  color: #edf2ff;
}

.avatar-controls input,
.avatar-controls textarea,
.avatar-controls select {
  background: rgba(15, 21, 39, 0.96);
  border-color: rgba(96, 120, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), inset 0 10px 30px rgba(0,0,0,0.22);
}

.avatar-controls textarea,
.avatar-controls select,
.avatar-controls input[type="text"] {
  border-radius: 18px;
}

.avatar-controls input[type="color"] {
  min-height: 54px;
  padding: 6px;
  border-radius: 16px;
}

.avatar-grid {
  margin-top: 10px;
}

.avatar-description {
  min-height: 116px;
}

.neon-button {
  border-radius: 16px;
  border: 1px solid rgba(95, 117, 255, 0.3);
  background: linear-gradient(180deg, rgba(13,19,38,0.92) 0%, rgba(10,14,28,0.96) 100%);
  color: #eef3ff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 12px 24px rgba(0,0,0,0.28);
}

.solid-button {
  background: linear-gradient(135deg, #4c7dff 0%, #8b5cff 55%, #ff4fd8 100%);
  border-color: rgba(255,255,255,0.12);
}

.avatar-prompt-box,
.avatar-history-card {
  padding: 18px;
  margin-top: 18px;
  border-radius: 24px;
  background: rgba(12, 17, 30, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.avatar-prompt-box p {
  margin: 0;
  color: rgba(224, 231, 252, 0.82);
  line-height: 1.65;
}

.avatar-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 15, 28, 0.9);
  color: rgba(230, 236, 255, 0.86);
}

.avatar-status.success {
  color: #9dffd4;
  border-color: rgba(73, 214, 163, 0.3);
}

.avatar-status.error {
  color: #ffb9bf;
  border-color: rgba(255, 104, 121, 0.25);
}

.avatar-status.loading {
  color: #8fe8ff;
  border-color: rgba(72, 204, 255, 0.28);
}

.avatar-preview-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.avatar-preview-card {
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(72, 122, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(10,14,27,0.97) 0%, rgba(8,11,21,0.98) 100%);
}

.avatar-preview-stage {
  position: relative;
  min-height: 520px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(90, 111, 255, 0.24), transparent 20%),
    radial-gradient(circle at 80% 16%, rgba(255, 79, 216, 0.18), transparent 18%),
    linear-gradient(180deg, #121a31 0%, #09101c 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.avatar-placeholder,
.avatar-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 24px;
  color: #eef3ff;
}

.avatar-placeholder-orb {
  width: 118px;
  height: 118px;
  margin-bottom: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 30%),
    linear-gradient(135deg, #4c7dff 0%, #9d4dff 52%, #ff4fd8 100%);
  box-shadow: 0 0 38px rgba(104, 114, 255, 0.34);
}

.avatar-placeholder strong,
.avatar-loader p {
  font-size: 24px;
}

.avatar-placeholder span {
  max-width: 28ch;
  color: rgba(222, 230, 255, 0.76);
  line-height: 1.6;
}

.avatar-spinner {
  width: 70px;
  height: 70px;
  margin-bottom: 16px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.08);
  border-top-color: #7fe7ff;
  border-right-color: #ff4fd8;
  animation: avatar-spin 0.85s linear infinite;
}

.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.avatar-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

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

.avatar-history-item {
  padding: 0;
  border: 1px solid rgba(94, 126, 255, 0.2);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(14, 19, 33, 0.96);
  color: #ebf1ff;
  cursor: pointer;
}

.avatar-history-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.avatar-history-item span {
  display: block;
  padding: 8px 10px 10px;
  font-size: 12px;
}

.avatar-history-empty {
  padding: 16px;
  border-radius: 18px;
  background: rgba(14, 19, 33, 0.96);
  color: rgba(226, 233, 255, 0.72);
}

.hidden {
  display: none !important;
}

@keyframes avatar-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .avatar-hero,
  .avatar-layout {
    grid-template-columns: 1fr;
  }

  .avatar-history-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .avatar-panel,
  .avatar-hero,
  .avatar-preview-card,
  .avatar-history-card,
  .avatar-prompt-box {
    border-radius: 22px;
  }

  .avatar-preview-stage,
  .avatar-image {
    min-height: 360px;
  }

  .avatar-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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



.phone-stage.advanced-stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0) 18%),
    radial-gradient(circle at 80% 14%, color-mix(in srgb, var(--device-accent, #82b4ff) 40%, white) 0%, rgba(255,255,255,0) 20%),
    linear-gradient(180deg, #eef9f8 0%, #d6ebe8 100%);
}

.phone-stage.advanced-stage::before {
  content: "";
  position: absolute;
  inset: auto -8% -26% -8%;
  height: 180px;
  background: radial-gradient(circle at center, rgba(83, 104, 122, 0.12) 0%, rgba(83, 104, 122, 0) 70%);
  pointer-events: none;
}

.phone-card {
  isolation: isolate;
}

.phone-floor-glow,
.phone-floor-shadow,
.phone-button,
.camera-bump-shadow,
.top-speaker,
.status-bar,
.hero-widget,
.widget-strip,
.dock-row {
  position: absolute;
}

.phone-floor-glow,
.phone-floor-shadow {
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
  border-radius: 50%;
}

.phone-floor-glow {
  bottom: 34px;
  width: calc(var(--device-width) + 132px);
  height: 90px;
  background: radial-gradient(circle, color-mix(in srgb, var(--device-accent, #9fc2ff) 38%, transparent) 0%, rgba(255,255,255,0) 72%);
  filter: blur(10px);
  opacity: 0.85;
}

.phone-floor-shadow {
  bottom: 18px;
  width: calc(var(--device-width) + 110px);
  height: 42px;
  background: radial-gradient(circle, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0) 72%);
  filter: blur(10px);
  opacity: 0.78;
}

.phone-card.split-view .phone-floor-glow,
.phone-card.split-view .phone-floor-shadow,
.phone-card.front-view .phone-floor-glow,
.phone-card.front-view .phone-floor-shadow,
.phone-card.back-view .phone-floor-glow,
.phone-card.back-view .phone-floor-shadow {
  opacity: 0.45;
}

.phone-card.three-view .phone-floor-glow,
.phone-card.three-view .phone-floor-shadow {
  opacity: 1;
}

.phone-button {
  display: none;
  right: calc(50% - (var(--device-width) / 2) - (var(--device-depth) / 2));
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.42) 0%, rgba(80,85,92,0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 6px rgba(0,0,0,0.22);
}

.phone-card.three-view .phone-button {
  display: block;
}

.power-button {
  top: calc(50% - 10px);
  height: 54px;
}

.volume-up {
  left: calc(50% - (var(--device-width) / 2) - (var(--device-depth) / 2));
  right: auto;
  top: calc(50% - 72px);
  height: 42px;
}

.volume-down {
  left: calc(50% - (var(--device-width) / 2) - (var(--device-depth) / 2));
  right: auto;
  top: calc(50% - 20px);
  height: 42px;
}

.phone-back,
.phone-front {
  backdrop-filter: saturate(120%);
}

.phone-back::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(155deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 30%),
    radial-gradient(circle at 78% 86%, color-mix(in srgb, var(--device-accent, #9fc2ff) 18%, transparent) 0%, rgba(255,255,255,0) 30%);
  pointer-events: none;
}

.camera-bump-shadow {
  top: 18px;
  left: 18px;
  width: 46%;
  height: 35%;
  min-width: 118px;
  min-height: 118px;
  border-radius: calc(var(--device-radius) - 20px);
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,0.22) 0%, rgba(0,0,0,0) 30%), linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.34) 100%);
  transform: translate3d(6px, 8px, -1px);
  filter: blur(8px);
  opacity: 0.58;
  pointer-events: none;
}

.camera-surface {
  overflow: hidden;
}

.camera-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 26% 18%, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 22%),
    linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 42%);
  pointer-events: none;
}

.draggable-lens {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.44),
    inset 0 -8px 12px rgba(0,0,0,0.5),
    0 6px 12px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.12);
}

.draggable-lens::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: inherit;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.74) 0%, rgba(255,255,255,0) 18%), radial-gradient(circle at center, rgba(73,137,255,0.24) 0%, rgba(0,0,0,0) 38%);
}

.top-speaker {
  top: 12px;
  left: 50%;
  width: 72px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(60,65,72,0.95) 0%, rgba(8,10,14,0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 1px 2px rgba(0,0,0,0.32);
  z-index: 2;
}

.screen-ui {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 10px;
  padding: 28px 14px 14px;
  background-blend-mode: screen, normal;
}

.status-bar {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255,255,255,0.94);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-icons {
  display: inline-flex;
  gap: 4px;
}

.status-icons i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  opacity: 0.95;
}

.hero-widget {
  position: relative;
  inset: auto;
  padding: 14px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--device-accent, #8db5ff) 42%, rgba(255,255,255,0.18)) 0%, rgba(255,255,255,0.12) 100%),
    linear-gradient(180deg, rgba(16,22,36,0.24) 0%, rgba(7,10,17,0.42) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24), 0 14px 24px rgba(0,0,0,0.18);
  color: #fff;
}

.widget-label {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-widget strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.hero-widget p {
  margin: 6px 0 0;
  max-width: 18ch;
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  line-height: 1.45;
}

.ui-row {
  margin-bottom: 0;
  background: rgba(255,255,255,0.22);
}

.widget-strip {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-widget {
  display: block;
  min-height: 44px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.1) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.app-grid {
  align-self: end;
}

.app-grid span,
.dock-row span {
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0) 24%),
    linear-gradient(135deg, rgba(255,255,255,0.18) 0%, color-mix(in srgb, var(--device-accent, #8db5ff) 48%, rgba(19,27,44,0.64)) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 10px 16px rgba(0,0,0,0.16);
}

.dock-row {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
}

.dock-row span {
  display: block;
  aspect-ratio: 1;
}

.brand-stamp {
  letter-spacing: 0.32em;
}

.phone-card.three-view .phone-back,
.phone-card.three-view .phone-front,
.phone-card.three-view .phone-edge,
.phone-card.three-view .phone-button {
  filter: drop-shadow(0 14px 18px rgba(0,0,0,0.16));
}

.phone-card.three-view .phone-back {
  transform: translate3d(-50%, -50%, calc(var(--device-depth) / -2)) rotateY(180deg) translateY(-4px);
}

.phone-card.three-view .phone-front {
  transform: translate3d(-50%, -50%, calc(var(--device-depth) / 2)) translateY(-4px);
}

.phone-card.three-view .phone-edge {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.34), inset 0 -8px 12px rgba(0,0,0,0.26), 0 6px 12px rgba(0,0,0,0.16);
}

@media (max-width: 640px) {
  .hero-widget strong {
    font-size: 18px;
  }

  .hero-widget p {
    font-size: 11px;
  }

  .phone-floor-glow {
    width: calc(var(--device-width) + 72px);
  }

  .phone-floor-shadow {
    width: calc(var(--device-width) + 58px);
  }
}

.phone-card {
  --device-depth: 22px;
}

.phone-card.three-view {
  transform-style: preserve-3d;
}

.phone-card.three-view .phone-back,
.phone-card.three-view .phone-front,
.phone-card.three-view .phone-edge,
.phone-card.three-view .phone-button,
.phone-card.three-view .camera-bump-shadow {
  transform-style: preserve-3d;
}

.phone-card.three-view .phone-back,
.phone-card.three-view .phone-front {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 34px 52px rgba(0,0,0,0.24),
    0 14px 24px rgba(0,0,0,0.18);
}

.phone-card.three-view .phone-back {
  transform: translate3d(-50%, -50%, calc(var(--device-depth) / -2)) rotateY(180deg) translateY(-4px);
}

.phone-card.three-view .phone-front {
  transform: translate3d(-50%, -50%, calc(var(--device-depth) / 2)) translateY(-4px);
}

.phone-card.three-view .edge-left,
.phone-card.three-view .edge-right {
  width: calc(var(--device-depth) + 2px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.34) 0%, rgba(255,255,255,0.08) 16%, rgba(0,0,0,0.16) 100%),
    var(--device-side-tone);
}

.phone-card.three-view .edge-top,
.phone-card.three-view .edge-bottom {
  height: calc(var(--device-depth) + 2px);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.04) 18%, rgba(0,0,0,0.14) 100%),
    var(--device-side-tone);
}

.phone-card.three-view .phone-edge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 24%, rgba(0,0,0,0.18) 100%);
}

.phone-card.three-view .phone-button {
  transform: translateZ(2px);
}

.phone-card.three-view .camera-surface {
  transform: translateZ(3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -12px 18px rgba(0,0,0,0.26),
    0 18px 28px rgba(0,0,0,0.24),
    0 0 0 1px rgba(255,255,255,0.06);
}

.phone-card.three-view .camera-surface::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.phone-card.three-view .camera-bump-shadow {
  opacity: 0.72;
  filter: blur(10px);
}

.phone-card.three-view .phone-front::after {
  inset: 10px;
  border-radius: calc(var(--device-radius) - 12px);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    inset 0 -40px 60px rgba(0,0,0,0.12);
}

.phone-card.three-view .phone-floor-shadow {
  width: calc(var(--device-width) + 128px);
  height: 50px;
}

.phone-card.three-view .phone-floor-glow {
  width: calc(var(--device-width) + 150px);
  height: 104px;
}

/* Final 3D chassis overrides for the phone maker */
.phone-viewer {
  perspective: 2400px;
  perspective-origin: center 34%;
}

.phone-card {
  --device-depth: 24px;
  --device-lift: -10px;
}

.phone-card.three-view {
  width: calc(var(--device-width) + 140px);
  min-height: calc(var(--device-height) + 150px);
  transform: rotateX(var(--phone-rotate-x)) rotateY(var(--phone-rotate-y)) translateY(var(--device-lift));
}

.phone-card.three-view .phone-back,
.phone-card.three-view .phone-front,
.phone-card.three-view .phone-edge,
.phone-card.three-view .phone-button,
.phone-card.three-view .phone-port,
.phone-card.three-view .speaker-grille,
.phone-card.three-view .camera-bump-shadow,
.phone-card.three-view .camera-surface {
  transform-style: preserve-3d;
}

.phone-card.three-view .phone-back,
.phone-card.three-view .phone-front {
  border-width: calc(max(8px, var(--device-depth) * 0.34));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 42px 80px rgba(0,0,0,0.24),
    0 16px 26px rgba(0,0,0,0.18);
}

.phone-card.three-view .phone-front {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 12%),
    linear-gradient(180deg, #08090d 0%, #141821 100%) !important;
}

.phone-card.three-view .phone-back {
  transform: translate3d(-50%, -50%, calc(var(--device-depth) / -2)) rotateY(180deg) translateY(-6px);
}

.phone-card.three-view .phone-front {
  transform: translate3d(-50%, -50%, calc(var(--device-depth) / 2)) translateY(-6px);
}

.phone-card.three-view .phone-edge {
  display: block;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.06) 14%, rgba(0,0,0,0.2) 100%),
    var(--device-side-tone);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -10px 16px rgba(0,0,0,0.18),
    0 6px 16px rgba(0,0,0,0.14);
}

.phone-card.three-view .edge-left,
.phone-card.three-view .edge-right {
  width: var(--device-depth);
  height: calc(var(--device-height) - 10px);
}

.phone-card.three-view .edge-top,
.phone-card.three-view .edge-bottom {
  width: calc(var(--device-width) - 16px);
  height: var(--device-depth);
}

.phone-card.three-view .edge-left {
  transform: translate3d(calc(-1 * (var(--device-width) / 2)), -50%, 0) rotateY(90deg) translateZ(1px);
}

.phone-card.three-view .edge-right {
  transform: translate3d(calc(var(--device-width) / 2), -50%, 0) rotateY(90deg) translateZ(1px);
}

.phone-card.three-view .edge-top {
  transform: translate3d(-50%, calc(-1 * (var(--device-height) / 2)), 0) rotateX(90deg) translateZ(1px);
}

.phone-card.three-view .edge-bottom {
  transform: translate3d(-50%, calc(var(--device-height) / 2), 0) rotateX(90deg) translateZ(1px);
}

.phone-port,
.speaker-grille {
  display: none;
  position: absolute;
  z-index: 4;
}

.phone-card.three-view .phone-port,
.phone-card.three-view .speaker-grille {
  display: block;
}

.usb-port {
  left: 50%;
  top: calc(50% + (var(--device-height) / 2) - 4px);
  width: 44px;
  height: 10px;
  transform: translate3d(-50%, 0, 0) rotateX(90deg);
  border-radius: 999px;
  background: linear-gradient(180deg, #1c2129 0%, #050608 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 2px 4px rgba(0,0,0,0.24);
}

.speaker-grille {
  top: calc(50% + (var(--device-height) / 2) - 4px);
  width: 28px;
  height: 8px;
  transform: rotateX(90deg);
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #0d1015 0 3px, #4a4f58 3px 4px);
}

.speaker-left {
  left: calc(50% - 62px);
}

.speaker-right {
  left: calc(50% + 34px);
}

.phone-card.three-view .camera-surface {
  transform: translateZ(6px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -14px 22px rgba(0,0,0,0.28),
    0 22px 32px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.08);
}

.phone-card.three-view .camera-bump-shadow {
  transform: translate3d(10px, 12px, -8px);
  opacity: 0.82;
  filter: blur(12px);
}

.phone-card.three-view .phone-front::after {
  inset: 8px;
  border-radius: calc(var(--device-radius) - 10px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -50px 70px rgba(0,0,0,0.16);
}

.phone-card.three-view .screen-ui {
  border-radius: calc(var(--device-radius) - 16px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    inset 0 -40px 60px rgba(0,0,0,0.14);
}

.phone-card.three-view .phone-floor-shadow {
  width: calc(var(--device-width) + 180px);
  height: 62px;
  bottom: 6px;
  opacity: 0.9;
}

.phone-card.three-view .phone-floor-glow {
  width: calc(var(--device-width) + 210px);
  height: 118px;
  bottom: 18px;
}

@media (max-width: 640px) {
  .phone-card.three-view {
    width: calc(var(--device-width) + 86px);
    min-height: calc(var(--device-height) + 94px);
  }

  .phone-card.three-view .phone-floor-shadow {
    width: calc(var(--device-width) + 110px);
  }

  .phone-card.three-view .phone-floor-glow {
    width: calc(var(--device-width) + 138px);
  }
}

/* Phone polish overrides */
.phone-back,
.phone-front {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.52),
    inset 0 -10px 18px rgba(0,0,0,0.08),
    0 26px 40px rgba(0,0,0,0.18),
    0 10px 18px rgba(0,0,0,0.12);
}

.phone-back {
  background:
    radial-gradient(circle at 22% 14%, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0) 20%),
    linear-gradient(160deg, color-mix(in srgb, var(--phone-back-highlight, #7ea4ff) 38%, white) 0%, transparent 32%),
    linear-gradient(165deg, var(--phone-back-highlight, #7ea4ff) 0%, color-mix(in srgb, var(--phone-back-shadow, #243352) 16%, var(--phone-back-highlight, #7ea4ff)) 38%, var(--phone-back-shadow, #243352) 100%);
}

.phone-front {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 12%),
    linear-gradient(180deg, #090b10 0%, #141922 100%) !important;
}

.phone-front::before {
  background:
    linear-gradient(155deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 18%, rgba(0,0,0,0.3) 100%),
    radial-gradient(circle at 72% 10%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 18%);
}

.phone-front::after {
  inset: 9px;
  border-radius: calc(var(--device-radius) - 11px);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    inset 0 -30px 50px rgba(0,0,0,0.12);
}

.screen-ui {
  padding: 30px 14px 14px;
  background-color: rgba(6,8,12,0.08);
}

.hero-widget {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--device-accent, #8db5ff) 46%, rgba(255,255,255,0.16)) 0%, rgba(255,255,255,0.08) 100%),
    linear-gradient(180deg, rgba(18,24,38,0.18) 0%, rgba(7,10,18,0.42) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 12px 20px rgba(0,0,0,0.16);
}

.camera-surface {
  top: 18px;
  left: 18px;
  width: 46%;
  height: 35%;
  min-width: 112px;
  min-height: 112px;
  border-radius: calc(var(--device-radius) - 18px);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.24) 0%, rgba(94,100,108,0.28) 42%, rgba(22,25,30,0.42) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(18,20,24,0.26) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -12px 18px rgba(0,0,0,0.24),
    0 16px 24px rgba(0,0,0,0.2);
}

.flash-dot {
  top: 36px;
  left: calc(18px + 46% + 10px);
  right: auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fffef5 0%, #ffe8a8 45%, #cda034 100%);
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.24),
    0 4px 8px rgba(0,0,0,0.22);
}

.brand-stamp {
  display: none;
}

.top-speaker {
  width: 78px;
  height: 6px;
  top: 11px;
  background: linear-gradient(180deg, rgba(64,68,75,0.95) 0%, rgba(8,10,14,0.98) 100%);
}

.status-bar {
  color: rgba(255,255,255,0.96);
}

.app-grid span,
.dock-row span,
.mini-widget {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 8px 14px rgba(0,0,0,0.14);
}

@media (max-width: 640px) {
  .flash-dot {
    top: 32px;
    left: calc(14px + 47% + 8px);
  }
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 18, 13, 0.5);
  backdrop-filter: blur(6px);
}

.result-modal.hidden {
  display: none !important;
}

.result-modal-card {
  width: min(100%, 420px);
  padding: 26px 24px 24px;
  border: 3px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff0d8 100%);
  box-shadow: 10px 10px 0 var(--shadow), 0 22px 34px rgba(0,0,0,0.14);
  text-align: center;
}

.result-modal-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7b5d28;
}

.result-modal-title {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 1;
}

.result-modal-value {
  margin: 14px 0 10px;
  font-size: clamp(2.3rem, 9vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.result-modal-subtext {
  margin: 0;
  color: #5c564d;
  line-height: 1.6;
}

.result-modal-button {
  margin-top: 18px;
  min-width: 150px;
}

/* Dinosaur game polish */
.dino-canvas {
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0) 18%),
    linear-gradient(180deg, #c6efff 0%, #fff1d8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 18px 28px rgba(78, 56, 24, 0.14);
}

.leaderboard-card {
  margin-top: 18px;
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(255,247,232,0.96) 100%);
  box-shadow: 8px 8px 0 var(--shadow), 0 14px 24px rgba(0,0,0,0.08);
}

.leaderboard-player {
  margin: 16px 0 18px;
  padding: 14px;
  border: 2px solid rgba(41, 26, 8, 0.12);
  border-radius: 20px;
  background: rgba(255, 250, 243, 0.95);
}

.leaderboard-player-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f543f;
}

.leaderboard-player-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.leaderboard-player-input {
  flex: 1 1 220px;
}

.leaderboard-player-note {
  margin: 10px 0 0;
  min-height: 22px;
  color: #5c564d;
  line-height: 1.5;
}

.leaderboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.leaderboard-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7b5d28;
}

.leaderboard-list {
  display: grid;
  gap: 10px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  border: 2px solid rgba(99, 77, 35, 0.12);
}

.leaderboard-rank {
  font-size: 1.05rem;
}

.leaderboard-meta {
  display: grid;
  gap: 3px;
}

.leaderboard-name {
  font-weight: 800;
}

.leaderboard-detail,
.leaderboard-empty,
.result-modal-hint,
.result-modal-save-note {
  color: #5c564d;
  line-height: 1.5;
}

.leaderboard-score {
  font-weight: 900;
  font-size: 1.05rem;
}

.leaderboard-empty {
  margin: 0;
  padding: 8px 0 0;
}

.result-modal-rank {
  margin-top: 16px;
  text-align: left;
}

.result-modal-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
}

.result-modal-input {
  width: 100%;
  margin-bottom: 8px;
}

.result-save-button {
  margin-top: 6px;
  width: 100%;
}

.result-modal-save-note {
  min-height: 22px;
  margin: 10px 0 0;
  font-size: 14px;
}

@media (max-width: 640px) {
  .leaderboard-head,
  .leaderboard-row {
    grid-template-columns: 1fr;
  }

  .leaderboard-head {
    display: grid;
  }

  .leaderboard-score {
    justify-self: start;
  }
}


.wall-card.coral {
  background: linear-gradient(180deg, #ffd0bf 0%, #ffb39b 100%);
}

.username-card {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.username-controls,
.username-results-wrap {
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(247,252,255,0.98) 100%);
  box-shadow: 8px 8px 0 var(--shadow), 0 16px 28px rgba(0,0,0,0.08);
}

.username-controls {
  display: grid;
  gap: 10px;
}

.username-toggles {
  display: grid;
  gap: 8px;
  margin: 4px 0 6px;
}

.username-toggles label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.username-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.username-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(41, 26, 8, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #eefbff 100%);
  color: var(--line);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.username-chip span {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.username-chip strong {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4d6c78;
}

.username-chip.copied {
  background: linear-gradient(135deg, #ddffef 0%, #b8f7d3 100%);
}

@media (max-width: 820px) {
  .username-card {
    grid-template-columns: 1fr;
  }
}

.username-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.username-actions .action-button {
  flex: 1 1 180px;
}

.secondary-button {
  background: linear-gradient(180deg, #fff8d6 0%, #ffd76c 100%);
}

.username-status {
  margin: 4px 0 0;
  min-height: 22px;
  color: #5c564d;
  line-height: 1.5;
}

/* Mobile optimization pass */
@media (max-width: 900px) {
  .page,
  .page-home,
  .page.tool-page,
  .page.maker-page {
    width: min(100% - 16px, 100%);
    padding-top: 12px;
    padding-bottom: 18px;
  }

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

  .panel,
  .hero-board,
  .avatar-panel,
  .leaderboard-card,
  .username-controls,
  .username-results-wrap {
    padding: 18px;
    border-radius: 20px;
    box-shadow: 6px 6px 0 var(--shadow), 0 14px 24px rgba(102, 71, 33, 0.08);
  }

  .reaction-arena,
  .game-canvas,
  .dino-canvas {
    width: 100%;
  }

  .score-board strong {
    font-size: 24px;
  }

  .username-results {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 640px) {
  .page,
  .page-home,
  .page.tool-page,
  .page.maker-page {
    width: calc(100% - 12px);
    padding-top: 8px;
    padding-bottom: 14px;
  }

  .hero-header,
  .tool-header {
    gap: 10px;
    margin-bottom: 14px;
  }

  .hero-board,
  .panel,
  .avatar-panel,
  .leaderboard-card,
  .username-controls,
  .username-results-wrap,
  .article-box {
    padding: 14px;
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--shadow), 0 10px 18px rgba(102, 71, 33, 0.07);
  }

  .hero-board {
    gap: 14px;
  }

  .hero-board::after {
    right: 10px;
    top: -12px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .tool-wall {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wall-card {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .tool-topline p,
  .coming-soon {
    font-size: 14px;
    line-height: 1.5;
  }

  input,
  select,
  textarea,
  button,
  .action-button {
    font-size: 16px;
  }

  .double-inputs,
  .score-board,
  .score-board-two,
  .maker-grid,
  .maker-grid-advanced,
  .spec-strip,
  .username-card,
  .username-actions {
    grid-template-columns: 1fr;
  }

  .username-actions {
    display: grid;
  }

  .score-board {
    gap: 10px;
  }

  .score-board div {
    padding: 12px;
    border-radius: 14px;
  }

  .score-board strong {
    font-size: 22px;
  }

  .reaction-arena {
    min-height: 190px;
    font-size: 24px;
    border-radius: 18px;
  }

  .game-canvas {
    max-width: 100%;
    border-radius: 18px;
  }

  .dino-canvas {
    max-width: 100%;
    border-radius: 18px;
  }

  .leaderboard-player-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .leaderboard-player-input,
  .username-chip {
    min-width: 0;
  }

  .username-results {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .username-chip {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .phone-viewer {
    min-height: 360px;
  }

  .phone-card,
  .phone-card.split-view,
  .phone-card.front-view,
  .phone-card.back-view {
    width: 100%;
  }

  .phone-card {
    min-height: 300px;
  }

  .phone-card.three-view {
    width: calc(var(--device-width) + 56px);
    min-height: calc(var(--device-height) + 70px);
  }

  .camera-surface {
    min-width: 92px;
    min-height: 92px;
  }

  .site-logo {
    max-height: 44px;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: clamp(1.9rem, 10vw, 2.4rem);
  }

  .wall-card strong,
  .article-box h2,
  .username-results-head h2,
  .leaderboard-head h2 {
    font-size: 1.1rem;
  }

  .reaction-arena {
    min-height: 170px;
    font-size: 21px;
  }

  .phone-viewer {
    min-height: 330px;
  }

  .phone-card {
    min-height: 280px;
  }
}

.touch-pad {
  display: none;
  margin: 14px auto 6px;
  width: min(100%, 320px);
  gap: 10px;
}

.snake-touch-pad {
  display: none;
}

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

.touch-control,
.touch-jump {
  min-height: 52px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,243,214,0.96) 100%);
  color: var(--line);
  font: inherit;
  font-weight: 800;
}

.touch-control.up {
  width: 100%;
}

.maker-mobile-toggle {
  display: none;
}

@media (max-width: 640px) {
  .snake-touch-pad {
    display: grid;
  }

  .touch-jump {
    display: block;
    width: 100%;
    margin: 12px 0 4px;
  }

  .maker-layout {
    display: grid;
  }

  .maker-preview-wrap {
    order: 1;
  }

  .maker-controls {
    order: 2;
  }

  .maker-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 12px;
  }

  .maker-layout:not(.controls-open) .maker-controls {
    display: none;
  }

  .maker-layout .maker-meta-actions,
  .maker-layout .view-mode-row,
  .maker-layout .preset-row {
    width: 100%;
  }

  .maker-layout .view-mode-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .maker-layout .preset-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .maker-layout .maker-note {
    text-align: left;
    line-height: 1.5;
  }

  .maker-layout .phone-stage-copy {
    gap: 4px;
  }
}

.contact-box {
  margin-top: 20px;
  padding: 22px;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #fff3df 0%, #ffd7a6 100%);
  box-shadow: 8px 8px 0 var(--shadow), 0 14px 24px rgba(102, 71, 33, 0.1);
  text-align: center;
}

.contact-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f5324;
}

.contact-box h2 {
  margin: 0 0 10px;
}

.contact-name,
.contact-id {
  margin: 6px 0 0;
  font-size: 1rem;
  color: #4f3b19;
}

@media (max-width: 640px) {
  .contact-box {
    padding: 16px;
    border-radius: 18px;
  }

  .contact-name,
  .contact-id {
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
  }
}

.contact-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.discord-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background-color: #5865f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M32.6 15.7c-2.1-1-4.2-1.7-6.4-2.1l-.3.5c2 .5 2.9 1.1 4 1.9-3.9-1.9-7.9-1.9-11.8 0 1.1-.9 2.3-1.5 4-1.9l-.3-.5c-2.2.4-4.3 1.1-6.4 2.1-4.1 6.2-5.2 12.2-4.7 18.1 2.7 2 5.4 3.2 8.1 4l1.9-3.1c-1.1-.4-2.2-.9-3.2-1.5l.8-.6c3.9 1.8 8.1 1.8 12 0l.8.6c-1 .6-2.1 1.1-3.2 1.5l1.9 3.1c2.7-.8 5.4-2 8.1-4 .7-6.8-1.1-12.8-4.7-18.1ZM19.2 29.7c-1.2 0-2.2-1.1-2.2-2.5s1-2.5 2.2-2.5c1.2 0 2.2 1.1 2.2 2.5s-1 2.5-2.2 2.5Zm9.6 0c-1.2 0-2.2-1.1-2.2-2.5s1-2.5 2.2-2.5c1.2 0 2.2 1.1 2.2 2.5s-1 2.5-2.2 2.5Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 74%;
  box-shadow: 0 6px 12px rgba(88, 101, 242, 0.24);
}

@media (max-width: 640px) {
  .contact-title-row {
    gap: 10px;
  }

  .discord-logo {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
}

.mario-canvas {
  max-width: 800px;
  aspect-ratio: 5 / 2;
  background: linear-gradient(180deg, #dff6ff 0%, #fff6c9 100%);
}

.mario-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 14px;
}

.unlock-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.unlock-box {
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,246,238,0.96) 100%);
  box-shadow: 8px 8px 0 var(--shadow), 0 14px 22px rgba(0,0,0,0.08);
}

.unlock-head h2 {
  margin: 0 0 10px;
}

.unlock-head .leaderboard-kicker {
  margin-bottom: 4px;
}

.unlock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.unlock-option {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 2px solid rgba(41, 26, 8, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #fef2df 100%);
  color: var(--line);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.unlock-option strong {
  font-size: 0.95rem;
}

.unlock-option span,
.unlock-option small {
  color: #5f5649;
}

.unlock-option.selected {
  border-color: #d4532e;
  background: linear-gradient(180deg, #fff1e6 0%, #ffd5bf 100%);
}

.unlock-option.locked {
  opacity: 0.72;
  background: linear-gradient(180deg, #f3f0eb 0%, #e1d8cb 100%);
}

@media (max-width: 820px) {
  .unlock-board {
    grid-template-columns: 1fr;
  }
}

.unlock-option {
  position: relative;
}

.unlock-option::after {
  pointer-events: none;
  content: "tap";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6d4c;
}

.sprint-modal {
  position: fixed;
  inset: 0;
  z-index: 1201;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(28, 16, 9, 0.5);
}

.sprint-modal.open {
  display: grid;
}

.sprint-modal-card {
  width: min(520px, 100%);
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fffaf2 0%, #ffe8d4 100%);
  box-shadow: 10px 10px 0 var(--shadow), 0 20px 30px rgba(0,0,0,0.16);
}

.sprint-modal-look {
  height: 92px;
  margin: 10px 0 14px;
  border: 2px solid rgba(41,26,8,0.16);
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #eef8ff 0%, #fff5da 100%);
}

.sprint-modal-art {
  width: 56px;
  height: 72px;
  border-radius: 18px;
}

.sprint-modal-card p {
  margin: 8px 0;
  color: #5e5549;
}

.sprint-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.mario-detail-card { margin-bottom: 16px; }

