:root {
  --ink: #17201b;
  --muted: #6d766f;
  --line: #dce6dc;
  --paper: #fffdf7;
  --soft: #f1f8ed;
  --mint: #1f9b73;
  --mint-dark: #087957;
  --coral: #f2785c;
  --amber: #f5b84b;
  --blue: #5b8def;
  --shadow: 0 18px 60px rgba(31, 86, 67, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(242, 120, 92, 0.18), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(91, 141, 239, 0.18), transparent 28%),
    linear-gradient(135deg, #eef8f1 0%, #fff7ec 100%);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.prototype-stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 430px minmax(260px, 360px);
  justify-content: center;
  align-items: start;
  gap: 28px;
  padding: 28px;
}

.phone-shell {
  position: relative;
  width: min(430px, 100%);
  height: min(860px, calc(100vh - 56px));
  height: min(860px, calc(100dvh - 56px));
  min-height: 640px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.app-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 20px 18px 14px;
  background: rgba(255, 253, 247, 0.92);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 21px;
  line-height: 1.2;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.view {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px calc(112px + env(safe-area-inset-bottom));
}

.view.active {
  display: block;
}

.home-hero {
  min-height: 236px;
  position: relative;
  overflow: hidden;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 10px;
  border-radius: 26px;
  background:
    linear-gradient(140deg, rgba(31, 155, 115, 0.95), rgba(8, 121, 87, 0.92)),
    #1f9b73;
  color: #fff;
}

.home-hero h2 {
  margin: 10px 0 12px;
  font-size: 25px;
  line-height: 1.18;
}

.home-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 800;
}

.pet-card-stack {
  position: relative;
  min-height: 180px;
}

.pet-photo {
  position: absolute;
  width: 118px;
  height: 148px;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.pet-photo span {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.pet-photo.cat {
  right: 6px;
  top: 10px;
  transform: rotate(8deg);
  background:
    radial-gradient(circle at 44% 42%, #fff3d0 0 18%, transparent 19%),
    radial-gradient(circle at 34% 36%, #26362e 0 3%, transparent 4%),
    radial-gradient(circle at 56% 36%, #26362e 0 3%, transparent 4%),
    linear-gradient(160deg, #f6c777, #f08c65);
}

.pet-photo.dog {
  right: 72px;
  bottom: 0;
  transform: rotate(-9deg);
  background:
    radial-gradient(circle at 45% 45%, #fff4df 0 20%, transparent 21%),
    radial-gradient(circle at 35% 38%, #26362e 0 3%, transparent 4%),
    radial-gradient(circle at 55% 38%, #26362e 0 3%, transparent 4%),
    linear-gradient(160deg, #9dc6ff, #6d8ff0);
}

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

.section-heading h3 {
  margin: 0;
  font-size: 17px;
}

.section-heading span {
  color: var(--muted);
  font-size: 12px;
}

.trial-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(31, 155, 115, 0.22);
  border-radius: 18px;
  background: #effaf3;
}

.trial-status span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 900;
}

.trial-status strong {
  font-size: 12px;
  line-height: 1.35;
}

.channel-grid,
.idea-strip {
  display: grid;
  gap: 12px;
}

.channel-card,
.idea-card,
.workflow-card,
.form-panel,
.result-card,
.video-result-card,
.profile-card,
.creative-panel,
.privacy-card,
.feedback-panel,
.error-card,
.poster-preview {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 86, 67, 0.08);
}

.channel-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 16px;
  text-align: left;
}

.channel-card strong {
  font-size: 17px;
}

.channel-card small {
  grid-column: 2;
  color: var(--muted);
}

.primary-card {
  border-color: rgba(31, 155, 115, 0.32);
  background: linear-gradient(135deg, #ffffff, #eef9f1);
}

.channel-icon {
  grid-row: 1 / span 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--soft);
}

.channel-icon::before,
.icon-button span::before,
.bottom-nav span::before,
.icon-plus::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  color: var(--mint-dark);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.camera-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7h3l1.5-2h7L17 7h3a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm8 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7h3l1.5-2h7L17 7h3a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Zm8 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z'/%3E%3C/svg%3E");
}

.wave-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 14a2 2 0 0 0 2-2 2 2 0 1 1 4 0 2 2 0 1 0 4 0 2 2 0 1 1 4 0 2 2 0 0 0 2 2v3a5 5 0 0 1-4-2 5 5 0 0 1-8 0 5 5 0 0 1-4 2v-3ZM4 7a3 3 0 0 0 2-1 3 3 0 0 1 4 0 3 3 0 0 0 4 0 3 3 0 0 1 4 0 3 3 0 0 0 2 1v3a6 6 0 0 1-4-1.5A6 6 0 0 1 12 10a6 6 0 0 1-4-1.5A6 6 0 0 1 4 10V7Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 14a2 2 0 0 0 2-2 2 2 0 1 1 4 0 2 2 0 1 0 4 0 2 2 0 1 1 4 0 2 2 0 0 0 2 2v3a5 5 0 0 1-4-2 5 5 0 0 1-8 0 5 5 0 0 1-4 2v-3ZM4 7a3 3 0 0 0 2-1 3 3 0 0 1 4 0 3 3 0 0 0 4 0 3 3 0 0 1 4 0 3 3 0 0 0 2 1v3a6 6 0 0 1-4-1.5A6 6 0 0 1 12 10a6 6 0 0 1-4-1.5A6 6 0 0 1 4 10V7Z'/%3E%3C/svg%3E");
}

.video-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h11a2 2 0 0 1 2 2v2.4l4-2.2V17l-4-2.2V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm5 4v6l5-3-5-3Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h11a2 2 0 0 1 2 2v2.4l4-2.2V17l-4-2.2V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm5 4v6l5-3-5-3Z'/%3E%3C/svg%3E");
}

.chat-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm4 5v2h8V9H8Zm0 4v2h5v-2H8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm4 5v2h8V9H8Zm0 4v2h5v-2H8Z'/%3E%3C/svg%3E");
}

.icon-arrow-left::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.7 5.3 8 12l6.7 6.7-1.4 1.4L5.2 12l8.1-8.1 1.4 1.4Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.7 5.3 8 12l6.7 6.7-1.4 1.4L5.2 12l8.1-8.1 1.4 1.4Z'/%3E%3C/svg%3E");
}

.icon-user::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5.2 0-9 2.8-9 6v2h18v-2c0-3.2-3.8-6-9-6Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5.2 0-9 2.8-9 6v2h18v-2c0-3.2-3.8-6-9-6Z'/%3E%3C/svg%3E");
}

.icon-home::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 3 9 8h-3v10h-5v-6h-2v6H6V11H3l9-8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 3 9 8h-3v10h-5v-6h-2v6H6V11H3l9-8Z'/%3E%3C/svg%3E");
}

.icon-list::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h4v4H4V5Zm6 1h10v2H10V6ZM4 10h4v4H4v-4Zm6 1h10v2H10v-2ZM4 15h4v4H4v-4Zm6 1h10v2H10v-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h4v4H4V5Zm6 1h10v2H10V6ZM4 10h4v4H4v-4Zm6 1h10v2H10v-2ZM4 15h4v4H4v-4Zm6 1h10v2H10v-2Z'/%3E%3C/svg%3E");
}

.icon-plus::before {
  width: 34px;
  height: 34px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5Z'/%3E%3C/svg%3E");
}

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

.idea-card {
  min-height: 112px;
  padding: 14px;
  text-align: left;
}

.idea-card strong {
  display: block;
  margin-bottom: 8px;
}

.idea-card small {
  color: var(--muted);
  line-height: 1.4;
}

.model-entry {
  border-color: rgba(31, 155, 115, 0.42);
  background: linear-gradient(135deg, #effaf3, #ffffff);
}

.workflow-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  margin-bottom: 14px;
}

.workflow-card h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.workflow-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.step-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--mint);
  color: #fff;
  font-weight: 900;
}

.upload-box {
  display: block;
  margin-bottom: 14px;
  cursor: pointer;
}

.upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: auto;
}

.upload-preview {
  min-height: 226px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1.5px dashed rgba(31, 155, 115, 0.6);
  border-radius: 26px;
  background: linear-gradient(135deg, #f5fbf1, #fff);
  color: var(--mint-dark);
  text-align: center;
}

.upload-preview.has-image {
  background-size: cover;
  background-position: center;
}

.upload-preview.has-image > * {
  display: none;
}

.upload-preview small {
  color: var(--muted);
}

.hidden,
.hidden-media {
  display: none !important;
}

.video-preview-shell {
  min-height: clamp(220px, 34dvh, 300px);
  aspect-ratio: 16 / 10;
  display: grid;
  position: relative;
  overflow: hidden;
  border: 1.5px dashed rgba(31, 155, 115, 0.58);
  border-radius: 26px;
  background: linear-gradient(150deg, #ecf8f2, #fff6ea);
}

.video-preview-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0d1914;
}

.video-placeholder {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 22px;
  color: var(--mint-dark);
  text-align: center;
}

.video-placeholder .channel-icon {
  margin-bottom: 4px;
  background: #ffffff;
}

.video-placeholder small {
  max-width: 280px;
  color: var(--muted);
  line-height: 1.5;
}

.video-status {
  padding: 12px 13px;
  margin-bottom: 14px;
  border: 1px solid #f5d9a9;
  border-radius: 18px;
  background: #fff8eb;
  color: #7b4a12;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.video-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.video-pipeline span {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 7px;
  border-radius: 14px;
  background: #effaf3;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.form-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: #f1f5ee;
}

.mode-switch button {
  min-height: 40px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.mode-switch button.active {
  background: #fff;
  color: var(--mint-dark);
  box-shadow: 0 6px 16px rgba(31, 86, 67, 0.1);
}

.form-panel label,
.feedback-panel > label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-panel select,
.form-panel textarea,
.form-panel input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.feedback-panel select,
.feedback-panel textarea,
.feedback-panel input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.form-panel textarea,
.feedback-panel textarea {
  resize: vertical;
  line-height: 1.55;
}

.primary-action,
.secondary-action,
.quiet-button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  font-weight: 900;
}

.primary-action {
  width: 100%;
  background: var(--mint);
  color: #fff;
}

.secondary-action {
  background: #fff1e9;
  color: #9a3d2a;
}

.quiet-button {
  min-height: 36px;
  background: var(--soft);
  color: var(--mint-dark);
}

.record-pad {
  min-height: clamp(220px, 32dvh, 280px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  margin-bottom: 14px;
  border-radius: 28px;
  background: linear-gradient(160deg, #eaf3ff, #fff7ec);
  border: 1px solid var(--line);
  text-align: center;
}

.listening-card {
  min-height: clamp(360px, calc(100dvh - 220px), 560px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(160deg, #0b7d5a, #13231d);
}

.listening-orb {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.08), 0 0 60px rgba(255, 255, 255, 0.28);
}

.listening-orb span {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
}

.listening-card h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.listening-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.sound-bars {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sound-bars i {
  width: 8px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  animation: barPulse 0.9s infinite ease-in-out;
}

.sound-bars i:nth-child(2) { animation-delay: 0.1s; }
.sound-bars i:nth-child(3) { animation-delay: 0.2s; }
.sound-bars i:nth-child(4) { animation-delay: 0.3s; }
.sound-bars i:nth-child(5) { animation-delay: 0.4s; }

@keyframes barPulse {
  0%, 100% { height: 16px; opacity: 0.55; }
  50% { height: 44px; opacity: 1; }
}

.pulse-dot {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 18px rgba(242, 120, 92, 0.16), 0 0 0 38px rgba(242, 120, 92, 0.08);
}

.result-card {
  padding: 18px;
}

.video-result-card {
  padding: 18px;
}

.result-header,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-card h2 {
  margin: 18px 0 10px;
  font-size: 18px;
}

.core-meaning {
  padding: 14px;
  border-radius: 18px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  line-height: 1.65;
  font-weight: 800;
}

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

.behavior-grid span {
  padding: 10px;
  border-radius: 14px;
  background: #fff8eb;
  color: #7b4a12;
  font-size: 12px;
  line-height: 1.35;
}

.style-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 14px 0;
}

.style-tabs button {
  flex: 0 0 auto;
  min-width: 70px;
  height: 38px;
  border-radius: 999px;
  background: #f2f3ef;
  color: var(--muted);
  font-weight: 900;
}

.style-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.translation-box {
  min-height: 170px;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 248, 236, 0.9)),
    #fff3d3;
}

.translation-box span {
  color: #9a5a18;
  font-size: 12px;
  font-weight: 900;
}

.translation-box p {
  margin: 12px 0 0;
  font-size: 24px;
  line-height: 1.42;
  font-weight: 900;
}

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

.listen-action {
  width: 100%;
  min-height: 46px;
  margin-bottom: 12px;
  padding: 0 16px;
  border-radius: 16px;
  background: #111f19;
  color: #ffffff;
  font-weight: 900;
}

.listen-action.playing {
  background: var(--coral);
}

.video-frame {
  position: relative;
  min-height: 0;
  height: clamp(260px, 48dvh, 430px);
  aspect-ratio: 9 / 16;
  margin: 16px 0 14px;
  overflow: hidden;
  border-radius: 28px;
  background: #0d1914;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0d1914;
}

.subtitle-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(10, 22, 17, 0.84);
  color: #ffffff;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.video-proof {
  padding: 13px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: #f8fbf6;
  border: 1px solid var(--line);
}

.video-proof strong {
  display: block;
  margin-bottom: 6px;
}

.video-proof p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.facts-panel {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f8fbf6;
}

.facts-panel summary {
  cursor: pointer;
  font-weight: 900;
}

.facts-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.facts-panel span {
  color: var(--mint-dark);
  font-weight: 900;
}

.feedback-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-top: 14px;
}

.feedback-panel > strong {
  font-size: 16px;
}

.feedback-panel input[type="range"] {
  padding: 0;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.reason-grid legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.reason-grid label,
.toggle-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}

.reason-grid input,
.toggle-row input {
  width: auto;
  min-height: auto;
  accent-color: var(--mint);
}

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

.metrics-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.metrics-grid article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.metrics-grid span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.privacy-card,
.error-card {
  padding: 14px;
  margin-top: 14px;
  border-radius: 18px;
  background: #fff8eb;
  border: 1px solid #f5d9a9;
}

.privacy-card strong,
.error-card strong {
  display: block;
  margin-bottom: 6px;
}

.privacy-card p,
.error-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.timeline-captions {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.timeline-captions span {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff8eb;
  color: #7b4a12;
  font-size: 12px;
  font-weight: 800;
}

.profile-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  margin-bottom: 14px;
}

.avatar {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--mint);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.profile-card h2 {
  margin-bottom: 4px;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stats-grid div {
  padding: 14px 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}

.stats-grid strong {
  display: block;
  font-size: 20px;
}

.stats-grid span {
  color: var(--muted);
  font-size: 12px;
}

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

.disclaimer-card {
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #fff8eb;
  border: 1px solid #f5d9a9;
}

.disclaimer-card strong {
  display: block;
  margin-bottom: 6px;
}

.disclaimer-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.menu-list button {
  height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 800;
}

.record-list,
.lab-list {
  display: grid;
  gap: 12px;
}

.record-item,
.lab-item {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.record-item strong,
.lab-item strong {
  display: block;
  margin-bottom: 6px;
}

.record-item p,
.lab-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.creative-panel {
  padding: 18px;
}

.model-channel-card,
.confidence-card,
.channel-flow article {
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(31, 86, 67, 0.08);
}

.model-channel-card {
  margin-bottom: 14px;
}

.model-channel-card h2 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.model-channel-card p,
.channel-flow p,
.confidence-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.channel-flow {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.channel-flow strong,
.confidence-card h3 {
  display: block;
  margin-bottom: 8px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(16, 31, 25, 0.42);
  backdrop-filter: blur(8px);
}

.modal-backdrop.hidden {
  display: none;
}

.modal-panel {
  width: 100%;
  max-height: 84%;
  overflow: auto;
  position: relative;
  padding: 20px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.25);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #f2f3ef;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.modal-panel h2 {
  margin: 14px 42px 14px 0;
  font-size: 22px;
}

.modal-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-list article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.modal-list strong {
  display: block;
  margin-bottom: 5px;
}

.modal-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.confidence-mini {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.confidence-mini span {
  padding: 9px 10px;
  border-radius: 14px;
  background: #effaf3;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 900;
}

.creative-panel p {
  color: var(--muted);
  line-height: 1.7;
}

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

.radar-list span {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(90deg, #e8f8ee, #fff);
  border: 1px solid var(--line);
  font-weight: 900;
}

.poster-preview {
  min-height: clamp(360px, 56dvh, 560px);
  padding: 18px;
  display: grid;
  align-content: end;
  gap: 14px;
  margin-bottom: 14px;
  color: #fff;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.58) 62%),
    radial-gradient(circle at 50% 34%, #fff5d7 0 11%, transparent 12%),
    radial-gradient(circle at 46% 31%, #1a2520 0 1.6%, transparent 1.8%),
    radial-gradient(circle at 54% 31%, #1a2520 0 1.6%, transparent 1.8%),
    linear-gradient(160deg, #76c893, #5b8def);
}

.poster-preview p {
  margin: 0;
  font-size: 28px;
  line-height: 1.32;
  font-weight: 900;
}

.poster-preview small {
  opacity: 0.9;
}

.bottom-nav {
  position: absolute;
  z-index: 20;
  left: 18px;
  right: 18px;
  bottom: max(16px, env(safe-area-inset-bottom));
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(220, 230, 220, 0.9);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(23, 32, 27, 0.12);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.bottom-nav button.active {
  background: var(--soft);
  color: var(--mint-dark);
}

.bottom-nav span::before {
  width: 21px;
  height: 21px;
  color: currentColor;
}

.bottom-nav small {
  font-size: 11px;
}

.notes-panel {
  align-self: start;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.76);
  border: 1px solid rgba(23, 32, 27, 0.12);
  box-shadow: var(--shadow);
}

.notes-panel h2 {
  margin-bottom: 12px;
}

.notes-panel li {
  margin-bottom: 10px;
  line-height: 1.55;
}

.notes-panel p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .prototype-stage {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .phone-shell {
    margin: 0 auto;
  }

  .notes-panel {
    width: min(430px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 460px) {
  .prototype-stage {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 0;
  }

  .phone-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .notes-panel {
    display: none;
  }
}

@media (max-width: 360px) {
  .video-pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

button:focus-visible,
.upload-box:focus-within .upload-preview,
.upload-box:focus-within .video-preview-shell,
.upload-box:focus-within .record-pad,
.form-panel select:focus-visible,
.form-panel textarea:focus-visible,
.form-panel input:focus-visible,
.feedback-panel select:focus-visible,
.feedback-panel textarea:focus-visible,
.feedback-panel input:focus-visible {
  outline: 3px solid rgba(31, 155, 115, 0.36);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .sound-bars i {
    animation: none;
  }
}
