:root {
  color-scheme: light;
  --page-bg: linear-gradient(180deg, #fffafc 0%, #ffe8ef 48%, #fff5da 100%);
  --card-bg: rgba(255, 255, 255, 0.86);
  --card-border: rgba(177, 103, 129, 0.18);
  --text-main: #43222f;
  --text-soft: #8f5f72;
  --shadow-soft: 0 24px 70px rgba(135, 79, 94, 0.14);
  --shadow-mini: 0 10px 24px rgba(135, 79, 94, 0.12);
  --accent: #ff7aa2;
  --accent-deep: #f05386;
  --accent-peach: #ffb36c;
  --mint: #a5e1d2;
  --panel-radius: 32px;
  --ui-font: "Avenir Next", "Trebuchet MS", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --display-font: "Marker Felt", "Bradley Hand", "Comic Sans MS", cursive;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--ui-font);
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 208, 124, 0.35), transparent 24%),
    var(--page-bg);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 28px;
  align-items: start;
  padding: 30px 32px 34px;
  margin-bottom: 22px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 239, 244, 0.88)),
    linear-gradient(160deg, rgba(255, 255, 255, 0.4), rgba(255, 219, 227, 0.6));
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.eyebrow,
.panel__kicker {
  margin: 0 0 10px;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero__copy {
  max-width: 760px;
  padding-top: 8px;
}

.hero__logo {
  display: block;
  width: min(180px, 40vw);
  height: auto;
  margin: 0 0 18px;
}

.hero h1 {
  margin: 0;
  max-width: 13ch;
  font-family: var(--display-font);
  font-size: clamp(2.4rem, 4.9vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.hero__text {
  margin: 18px 0 0;
  max-width: 48ch;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.hero__badges {
  display: flex;
  justify-content: flex-end;
  align-self: start;
  min-width: 240px;
}

.language-picker {
  display: grid;
  gap: 10px;
  min-width: 220px;
  padding: 16px 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 248, 0.9));
  border: 1px solid rgba(214, 161, 181, 0.34);
  box-shadow:
    0 20px 40px rgba(173, 110, 132, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #8d5d71;
}

.language-picker span {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
}

.language-picker select {
  min-height: 50px;
  border-radius: 18px;
  border-color: rgba(214, 161, 181, 0.34);
  background: rgba(255, 255, 255, 0.96);
  font-size: 1.02rem;
  color: #5a3443;
  box-shadow: 0 10px 20px rgba(191, 145, 162, 0.1);
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 137, 160, 0.24);
  color: var(--text-soft);
  box-shadow: var(--shadow-mini);
}

.badge--secure::before,
.status-pill::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #86dbad, #2dbd74);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(420px, 1.22fr);
  gap: 22px;
}

.panel {
  padding: 24px;
  border-radius: var(--panel-radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.panel__heading,
.capture-controls,
.capture-settings,
.capture-meta,
.control-row,
.control-group__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel__heading h2,
.control-group__heading h3 {
  margin: 0;
}

.panel__heading {
  align-items: flex-start;
  margin-bottom: 18px;
}

.camera-stage {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 219, 227, 0.78), transparent 32%),
    linear-gradient(180deg, #36202c 0%, #21131a 100%);
}

.camera-stage video,
.camera-stage__empty {
  width: 100%;
  height: 100%;
}

.camera-stage video {
  display: block;
  object-fit: cover;
  opacity: 0;
  transform: scaleX(-1);
  transition: opacity 160ms ease;
}

.camera-stage video.is-live {
  opacity: 1;
}

.camera-stage__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
  color: rgba(255, 241, 247, 0.9);
  background:
    linear-gradient(155deg, rgba(255, 166, 194, 0.16), transparent 46%),
    linear-gradient(0deg, rgba(255, 206, 122, 0.12), transparent 32%);
}

.camera-stage__empty p {
  margin: 6px 0;
}

.countdown {
  position: absolute;
  inset: auto 20px 20px auto;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.18);
  font-family: var(--display-font);
  font-size: 2.8rem;
  color: var(--accent-deep);
}

.hidden {
  display: none;
}

.capture-controls,
.capture-settings,
.capture-meta {
  margin-top: 16px;
}

.shortcut-hint,
.share-status {
  margin: 14px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(203, 137, 160, 0.24);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-mini);
  color: var(--text-main);
  font-size: 0.9rem;
}

.capture-controls,
.control-row {
  flex-wrap: wrap;
}

.capture-settings label,
.control-row label {
  display: grid;
  gap: 8px;
  flex: 1 1 180px;
  color: var(--text-soft);
}

.button,
.file-button,
.link-button {
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

.button:disabled {
  transform: none;
  opacity: 0.58;
  cursor: not-allowed;
}

.button:disabled {
  box-shadow: none;
}

.button,
.file-button {
  min-height: 46px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text-main);
  border: 1px solid rgba(203, 137, 160, 0.2);
  box-shadow: var(--shadow-mini);
}

.button:hover,
.file-button:hover,
.theme-card:hover,
.sticker-button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), #ff9bbb);
  color: white;
  border-color: transparent;
}

.button--accent {
  background: linear-gradient(135deg, var(--accent-peach), #ff8f8f);
  color: white;
  border-color: transparent;
}

.button--ghost {
  background: rgba(255, 245, 248, 0.8);
}

.link-button {
  padding: 0;
  background: transparent;
  color: var(--accent-deep);
  font-weight: 700;
}

.shots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.shot-card {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(203, 137, 160, 0.2);
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.shot-card.is-selected {
  border-color: rgba(240, 83, 134, 0.52);
  box-shadow: 0 16px 32px rgba(240, 83, 134, 0.16);
}

.shot-card__image-wrap {
  aspect-ratio: 1 / 1.25;
  background: linear-gradient(180deg, rgba(255, 243, 247, 0.8), rgba(255, 230, 191, 0.45));
}

.shot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shot-card__meta {
  padding: 10px 12px 12px;
}

.shot-card__label {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.board-wrap {
  padding: 14px;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 244, 247, 0.88), rgba(255, 252, 240, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 225, 190, 0.45));
}

.board-stage {
  position: relative;
  margin: 0 auto;
  width: min(100%, 430px);
  aspect-ratio: 9 / 16;
}

#boardCanvas,
.sticker-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 26px;
}

#boardCanvas {
  display: block;
  box-shadow: 0 18px 42px rgba(109, 56, 68, 0.18);
}

.sticker-layer {
  pointer-events: none;
}

.sticker-node {
  position: absolute;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  transform-origin: center center;
}

.sticker-node svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 18px rgba(83, 34, 47, 0.18));
}

.sticker-node.is-selected::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  border: 2px dashed rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 122, 162, 0.78);
}

.editor-controls {
  margin-top: 22px;
}

.control-group {
  margin-top: 20px;
}

.capture-meta__actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.slot-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 245, 248, 0.92);
  border: 1px solid rgba(203, 137, 160, 0.22);
  color: var(--text-soft);
  box-shadow: var(--shadow-mini);
}

.control-group__heading {
  align-items: end;
}

.control-group__heading p,
.capture-meta p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.theme-card {
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(203, 137, 160, 0.18);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-mini);
  text-align: left;
  cursor: pointer;
}

.theme-card.is-selected {
  border-color: rgba(240, 83, 134, 0.46);
  box-shadow: 0 14px 32px rgba(226, 88, 124, 0.18);
}

.theme-card__swatch {
  height: 72px;
  margin-bottom: 12px;
  border-radius: 16px;
}

.theme-card strong,
.theme-card span {
  display: block;
}

.theme-card strong {
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.theme-card span {
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.sticker-button {
  padding: 10px 8px;
  border: 1px solid rgba(203, 137, 160, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-mini);
  cursor: pointer;
}

.sticker-button svg {
  width: 48px;
  height: 48px;
  display: block;
  margin: 0 auto 8px;
}

.sticker-button span {
  display: block;
  font-size: 0.82rem;
  text-align: center;
  color: var(--text-soft);
}

select,
input[type="text"],
input[type="color"],
input[type="email"],
textarea {
  min-height: 48px;
  width: 100%;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(203, 137, 160, 0.22);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

input[type="color"] {
  padding: 6px;
}

textarea {
  min-height: 148px;
  padding: 14px;
  resize: vertical;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 48px;
}

.toggle input {
  width: 20px;
  height: 20px;
}

.control-row--compact {
  justify-content: flex-start;
  margin-top: 18px;
}

.site-footer {
  padding: 22px 8px 4px;
  text-align: center;
}

.site-footer__links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer__links a {
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.legal-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.legal-card {
  padding: 32px;
  border-radius: 32px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.legal-card h1 {
  margin: 0 0 18px;
  font-family: var(--display-font);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.05;
}

.legal-card p {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.8;
}

.legal-card a {
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.legal-card a:hover {
  text-decoration: underline;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 700;
}

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.contact-status {
  margin: 8px 0 20px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(165, 225, 210, 0.28);
  border: 1px solid rgba(84, 164, 137, 0.22);
  color: #356352;
  font-size: 0.98rem;
  line-height: 1.6;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
}

.contact-note {
  margin-top: 14px;
  font-size: 0.94rem;
}

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

  .hero__badges {
    justify-content: flex-start;
    min-width: 0;
  }

  .language-picker {
    min-width: min(260px, 100%);
  }

}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .hero,
  .panel,
  .legal-card {
    padding: 20px;
    border-radius: 28px;
  }

  .hero h1 {
    max-width: 14ch;
    font-size: clamp(2.15rem, 10vw, 3.1rem);
  }

  .hero__text {
    font-size: 1rem;
  }

  .camera-stage {
    min-height: 320px;
  }

  .board-stage {
    width: min(100%, 360px);
  }

  .panel__heading,
  .control-group__heading,
  .capture-settings,
  .capture-meta {
    flex-direction: column;
    align-items: stretch;
  }
}
