* {
  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%); }

.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%); }

.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);
}
