:root {
  --bg: #090b0f;
  --ink: #eef2f5;
  --muted: #9aa2af;
  --panel: #171a20;
  --line: #262a31;
  --green: #119c9b;
  --red: #b7443c;
  --gold: #bf8428;
  --blue: #2c628d;
  --deep: #111318;
  --teal: #24c8c2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(36, 200, 194, 0.16), transparent 34%),
    var(--bg);
}

body.app-booting .workspace {
  visibility: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.workspace {
  width: min(1220px, calc(100% - 32px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 350px;
  gap: 24px;
  align-items: start;
}

.device-area {
  display: grid;
  justify-items: center;
}

.robot-head {
  width: 180px;
  height: 86px;
  border: 2px solid #252a31;
  border-bottom: 0;
  border-radius: 60px 60px 18px 18px;
  background: linear-gradient(180deg, #20242b, #111318);
  display: grid;
  grid-template-columns: 24px;
  align-items: center;
  justify-content: center;
  position: relative;
}

.camera-cover {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #dffefa;
  background: rgba(17, 156, 155, 0.16);
  padding: 6px 8px;
  font-size: 13px;
  text-align: center;
}

.camera-cover.closed {
  color: var(--red);
}

.camera {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #8cc5e6 0 18%, #132943 20% 62%, #08101c 64%);
  box-shadow: inset 0 0 0 5px #283a4d;
}

.state-light {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #d5dcd6;
}

.state-light.on {
  background: #42a66c;
  box-shadow: 0 0 14px rgba(66, 166, 108, 0.8);
}

.state-light.calling {
  background: var(--gold);
  box-shadow: 0 0 14px rgba(191, 132, 40, 0.8);
}

.robot-body {
  width: min(760px, 100%);
  min-height: 640px;
  border: 8px solid #050607;
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.robot-body::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 238px;
  background:
    linear-gradient(180deg, rgba(9, 11, 15, 0.18), var(--panel)),
    url("./assets/images/opera_stage.svg") center/cover;
  opacity: 0.42;
  pointer-events: none;
}

.robot-body > * {
  position: relative;
  z-index: 1;
}

.screen-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.caption {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 16px;
}

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

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.25;
}

.status-pill {
  border: 0;
  color: #dffefa;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(17, 156, 155, 0.18);
  white-space: nowrap;
}

.status-pill.closed {
  color: var(--red);
}

.voice-panel {
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 22, 27, 0.78);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: start;
}

.voice-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 7px;
  box-shadow: 0 0 0 6px rgba(40, 119, 92, 0.12);
}

.voice-panel strong {
  display: block;
  color: var(--teal);
  margin-bottom: 6px;
}

#assistantText {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.45;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.pair-card {
  max-width: 560px;
  margin: 12px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(20, 22, 27, 0.82);
  padding: 24px;
}

.pair-card h2 {
  font-size: 34px;
}

.pair-card p {
  color: #c5cbd4;
  font-size: 20px;
  line-height: 1.5;
}

.pair-demo-code {
  display: inline-flex;
  margin: 4px 0 18px;
  color: var(--teal);
  font-size: 28px;
  letter-spacing: 0;
}

.pair-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
}

.pair-form input {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0 16px;
  text-transform: uppercase;
}

.pair-form button {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  color: #062021;
  background: var(--teal);
  font-weight: 700;
}

.pair-status {
  min-height: 30px;
  margin: 14px 0 0;
}

.pair-status.error {
  color: #ffb4ae;
}

.pair-status.success {
  color: var(--teal);
}

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

.tile,
.secondary-row button,
.control-row button,
.call-row button,
.hardware-buttons button,
.phone-actions button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(28, 31, 38, 0.92);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.tile {
  min-height: 116px;
  padding: 18px;
  text-align: left;
  overflow: hidden;
  position: relative;
}

.tile::after {
  content: "";
  position: absolute;
  inset: auto -22px -34px auto;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: rgba(36, 200, 194, 0.1);
}

.tile span {
  display: block;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
}

.tile small {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.4;
}

.tile.opera {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72)),
    url("./assets/images/opera_stage.svg") center/cover;
  border-left: 8px solid var(--gold);
}

.tile.stage {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.7)),
    url("./assets/images/opera_stage.svg") center/cover;
  border-left: 8px solid var(--red);
}

.tile.drama {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.7)),
    url("./assets/images/drama_scene.svg") center/cover;
  border-left: 8px solid var(--blue);
}

.tile.call {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.7)),
    url("./assets/images/family_photo.svg") center/cover;
  border-left: 8px solid var(--green);
}

.tile.short-video {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72)),
    url("./assets/images/drama_scene.svg") center/cover;
  border-left: 8px solid var(--green);
}

.secondary-row,
.control-row,
.call-row,
.hardware-buttons {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

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

.secondary-row button,
.control-row button,
.hardware-buttons button {
  min-height: 62px;
  padding: 12px 16px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  flex: 1;
}

.media-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 22px;
  align-items: center;
  min-height: 310px;
}

.source-header {
  margin-bottom: 16px;
}

.source-header p:not(.label) {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 0;
}

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

.source-card {
  min-height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(28, 31, 38, 0.95);
  color: var(--ink);
  padding: 16px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(26, 40, 35, 0.08);
}

.source-card.preferred {
  border-color: rgba(36, 200, 194, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(36, 200, 194, 0.34),
    0 10px 24px rgba(17, 156, 155, 0.18);
}

.source-card span {
  display: inline-block;
  border-radius: 999px;
  background: rgba(17, 156, 155, 0.18);
  color: #dffefa;
  padding: 6px 9px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

.source-card strong,
.source-card small {
  display: block;
}

.source-card strong {
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.source-card small {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.media-art,
.photo-scene,
.family-scene {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.media-art {
  height: 270px;
  background: linear-gradient(160deg, #8e2f2c, #d49a3a 54%, #1d5447);
}

.media-art img,
.media-art video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
}

.media-art video {
  background: #111916;
  display: none;
}

.media-art.has-video video {
  display: block;
}

.media-art.has-video img {
  display: none;
}

.media-art.has-image .curtain,
.media-art.has-image .performer,
.media-art.has-video .curtain,
.media-art.has-video .performer {
  display: none;
}

.media-art.drama-mode {
  background: linear-gradient(150deg, #2c628d 0%, #d8b165 52%, #28775c 100%);
}

.curtain {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(80, 7, 22, 0.45) 0 18px, rgba(255, 230, 162, 0.22) 19px 22px);
}

.performer {
  width: 92px;
  height: 128px;
  border-radius: 48px 48px 24px 24px;
  background: linear-gradient(#f7dfb7 0 28%, #194f78 29% 58%, #d13f36 59%);
  position: absolute;
  left: 78px;
  bottom: 34px;
  box-shadow: 0 -28px 0 10px #1b1a2e;
}

.label {
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 8px;
}

#playingDesc,
.memory-card p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.playback-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
  background: rgba(17, 156, 155, 0.16);
  border: 1px solid rgba(36, 200, 194, 0.22);
  padding: 12px 14px;
  margin-top: 14px;
}

.playback-status strong {
  color: #dffefa;
  font-size: 24px;
  white-space: nowrap;
}

.playback-status span {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
}

.progress {
  height: 12px;
  background: #2a3038;
  border-radius: 999px;
  margin-top: 20px;
  overflow: hidden;
}

.progress span {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--green);
}

#demoAudio {
  width: 100%;
  margin-top: 14px;
}

.incoming-call {
  min-height: 340px;
  display: grid;
  place-items: center;
  text-align: center;
}

.avatar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 56px;
  font-weight: 800;
}

.incoming-call p {
  font-size: 25px;
  margin-bottom: 0;
}

.incoming-call small {
  color: var(--muted);
  font-size: 18px;
}

.call-row button {
  flex: 1;
  min-height: 78px;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
}

.call-row button[hidden] {
  display: none;
}

.accept,
.accept-key {
  background: var(--green) !important;
  color: #fff !important;
}

.decline,
.decline-key {
  background: var(--red) !important;
  color: #fff !important;
}

.video-call {
  min-height: 360px;
  border-radius: 8px;
  background: #16221f;
  padding: 14px;
  position: relative;
  color: #fff;
}

.video-main {
  height: 330px;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: #0d1513;
}

.video-main video,
.video-self video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.video-main.connected > .family-scene,
.video-main.connected > strong {
  display: none;
}

.family-scene {
  width: min(420px, 100%);
  height: 220px;
  background:
    radial-gradient(circle at 45% 28%, #f8d4ae 0 8%, transparent 9%),
    radial-gradient(circle at 58% 28%, #f8d4ae 0 8%, transparent 9%),
    linear-gradient(180deg, #86bdd8 0 42%, #f3e1b4 43%);
}

.video-self {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 100px;
  height: 74px;
  border: 3px solid #fff;
  border-radius: 8px;
  background: #5d6d67;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
}

.chat-list {
  display: grid;
  gap: 14px;
  min-height: 330px;
}

.bubble {
  width: fit-content;
  max-width: 82%;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 22px;
  line-height: 1.45;
}

.bubble.elder {
  justify-self: end;
  background: #23313a;
}

.bubble.bot {
  justify-self: start;
  background: #1f3433;
}

.memory-card {
  text-align: center;
}

.photo-scene {
  height: 260px;
  width: min(430px, 100%);
  margin: 14px auto;
  background:
    radial-gradient(circle at 50% 32%, #fff5d9 0 8%, transparent 9%),
    linear-gradient(180deg, #7ab5d0 0 48%, #8bb46b 49%);
}

.photo-scene::after {
  content: "";
  position: absolute;
  left: 92px;
  right: 92px;
  bottom: 46px;
  height: 70px;
  background: #e65f4d;
  border-radius: 70px 70px 24px 24px;
}

.reminder-list,
.settings-panel {
  display: grid;
  gap: 14px;
  min-height: 330px;
}

.reminder-list div,
.settings-panel div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(28, 31, 38, 0.92);
  padding: 16px;
}

.reminder-list strong,
.settings-panel strong,
.settings-panel span,
.reminder-list span {
  display: block;
}

.reminder-list strong,
.settings-panel strong {
  font-size: 22px;
}

.reminder-list span,
.settings-panel span {
  color: var(--muted);
  font-size: 19px;
  margin-top: 5px;
}

.hardware-buttons {
  width: min(360px, 94%);
}

.hub-link {
  display: block;
  width: fit-content;
  margin: 12px auto 0;
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}

.phone-panel {
  background: #14161b;
  color: #fff;
  border-radius: 28px;
  padding: 22px;
  min-height: 660px;
  box-shadow: 0 24px 50px rgba(25, 38, 33, 0.18);
}

.phone-panel header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.phone-panel h2 {
  margin-bottom: 8px;
}

.online {
  color: #7dd6a7;
}

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

.phone-actions button {
  min-height: 82px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  background: #20242b;
}

.phone-card {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

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

.phone-card p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
  margin-bottom: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag-row span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.82);
  padding: 7px 10px;
}

.phone-card label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.phone-card input {
  width: 22px;
  height: 22px;
}

.demo-panel {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(17, 19, 24, 0.78);
  margin-top: 18px;
  padding: 14px;
}

.demo-panel strong,
.demo-panel a {
  display: block;
}

.demo-panel p {
  color: var(--muted);
  line-height: 1.45;
  margin: 6px 0 10px;
}

.companion-memory-status {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: rgba(36, 200, 194, 0.08);
  color: var(--muted);
  line-height: 1.45;
}

.native-capability-status {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.voice-capture-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.voice-capture-row span {
  color: var(--muted);
  line-height: 1.4;
}

.mic-button {
  min-height: 54px;
  border: 1px solid rgba(36, 200, 194, 0.42);
  border-radius: 999px;
  background: rgba(17, 156, 155, 0.24);
  color: #dffefa;
  font-weight: 900;
}

.mic-button.listening {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(36, 200, 194, 0.16);
}

.demo-input-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
}

.demo-input-row input {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  min-width: 0;
  background: #0f1116;
  color: var(--ink);
}

.demo-input-row button,
.demo-chip-row button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #20242b;
  color: var(--ink);
  font-weight: 800;
}

.demo-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.demo-chip-row button {
  padding: 9px 10px;
}

.demo-panel a {
  color: var(--green);
  font-weight: 800;
  margin-top: 12px;
  text-decoration: none;
}

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

  .phone-panel {
    width: min(520px, 100%);
    justify-self: center;
  }
}

@media (max-width: 680px) {
  .workspace {
    width: min(100% - 18px, 1220px);
    margin: 10px auto;
  }

  .robot-body {
    padding: 16px;
    border-width: 5px;
  }

  h1 {
    font-size: 24px;
  }

  .primary-grid,
  .media-layout,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .tile span {
    font-size: 30px;
  }

  .secondary-row,
  .control-row,
  .call-row,
  .hardware-buttons,
  .demo-input-row,
  .pair-form,
  .voice-capture-row {
    grid-template-columns: 1fr;
  }

  .secondary-row,
  .control-row,
  .call-row,
  .hardware-buttons {
    flex-direction: column;
  }

  .playback-status {
    grid-template-columns: 1fr;
  }
}

/* Modern Eastern tablet layout selected from concept 3. */
:root {
  --paper: #f4f0e7;
  --paper-deep: #e9e2d5;
  --ink-east: #171919;
  --cinnabar: #b8241e;
  --jade: #087b7b;
  --brass: #a87520;
  --clay: #a94e2d;
}

body {
  min-height: 100vh;
  color: var(--ink-east);
  background: var(--paper);
}

.workspace {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  display: block;
}

.device-area {
  width: 100%;
  min-height: 100vh;
  display: block;
}

.robot-head,
.hardware-buttons,
.hub-link,
.phone-panel {
  display: none;
}

.robot-body {
  width: 100%;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
  color: var(--ink-east);
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(300px, 32%) minmax(0, 68%);
  grid-template-rows: minmax(230px, auto) 1fr;
}

.robot-body::before {
  display: none;
}

.screen-header {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  padding: clamp(34px, 5vw, 76px) clamp(28px, 4vw, 62px) 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 34px;
  border-right: 1px solid rgba(23, 25, 25, 0.1);
  background:
    linear-gradient(rgba(184, 36, 30, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 36, 30, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}

.companion-copy {
  min-width: 0;
}

.screen-header .caption {
  margin-bottom: 16px;
  color: var(--cinnabar);
  font-size: clamp(15px, 1.4vw, 21px);
  font-weight: 800;
}

.screen-header h1 {
  max-width: 8em;
  color: var(--ink-east);
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  font-size: clamp(34px, 3.25vw, 54px);
  line-height: 1.25;
  font-weight: 700;
}

.home-clock {
  display: grid;
  gap: 5px;
  color: var(--ink-east);
}

.home-clock strong {
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.home-clock span,
.home-clock small {
  font-size: clamp(16px, 1.55vw, 23px);
  line-height: 1.35;
}

.home-clock small {
  color: #68645d;
}

.voice-panel {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  margin: 0;
  padding: 14px clamp(28px, 4vw, 62px) clamp(34px, 5vw, 72px);
  border: 0;
  border-right: 1px solid rgba(23, 25, 25, 0.1);
  border-radius: 0;
  box-shadow: none;
  color: var(--ink-east);
  background: var(--paper);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.voice-dot {
  width: 76px;
  height: 76px;
  margin: 0;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 12px rgba(184, 36, 30, 0.08);
  position: relative;
}

.voice-dot::before,
.voice-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.voice-dot::before {
  top: 20px;
  width: 12px;
  height: 25px;
  border: 4px solid #fff;
  border-radius: 8px;
}

.voice-dot::after {
  top: 43px;
  width: 30px;
  height: 13px;
  border: 4px solid #fff;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

.voice-panel strong {
  color: var(--cinnabar);
  font-size: clamp(24px, 2.3vw, 36px);
  font-weight: 800;
}

#assistantText {
  max-width: 20em;
  margin: 0;
  color: #55534e;
  font-size: clamp(17px, 1.55vw, 23px);
  line-height: 1.45;
}

.voice-wave {
  height: 30px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.voice-wave i {
  display: block;
  width: 4px;
  height: 9px;
  border-radius: 2px;
  background: var(--cinnabar);
  animation: voicePulse 1.25s ease-in-out infinite;
}

.voice-wave i:nth-child(2),
.voice-wave i:nth-child(8) { height: 15px; animation-delay: 0.1s; }
.voice-wave i:nth-child(3),
.voice-wave i:nth-child(7) { height: 23px; animation-delay: 0.2s; }
.voice-wave i:nth-child(4),
.voice-wave i:nth-child(6) { height: 29px; animation-delay: 0.3s; }
.voice-wave i:nth-child(5) { height: 19px; animation-delay: 0.4s; }

@keyframes voicePulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.view {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
}

.view.active {
  display: block;
}

#homeView {
  padding: 10px;
  background: #d8d0c2;
}

.primary-grid {
  height: calc(100vh - 20px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tile {
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 6px;
  padding: 0 20px 0 clamp(96px, 9vw, 150px);
  box-shadow: none;
  display: flex;
  align-items: flex-end;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
}

.tile::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: clamp(82px, 8vw, 126px);
  background: var(--tile-accent, var(--cinnabar));
}

.tile::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.42));
}

.tile span {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: clamp(82px, 8vw, 126px);
  margin: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  font-size: clamp(37px, 4.2vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  writing-mode: vertical-rl;
}

.tile small {
  display: block;
  margin: 0 0 26px;
  padding: 8px 12px;
  border-radius: 4px;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.3;
  backdrop-filter: blur(4px);
}

.tile.drama {
  --tile-accent: var(--cinnabar);
  background-image: url("./assets/images/eastern-concept-content.png");
  background-size: 310% auto;
  background-position: 58% 12%;
}

.tile.stage {
  --tile-accent: var(--brass);
  background-image: url("./assets/images/eastern-concept-content.png");
  background-size: 440% auto;
  background-position: 100% 10%;
}

.tile.opera {
  --tile-accent: var(--jade);
  background-image: url("./assets/images/eastern-concept-content.png");
  background-size: 310% auto;
  background-position: 58% 86%;
}

.tile.call {
  --tile-accent: var(--clay);
  background-image: url("./assets/images/eastern-concept-content.png");
  background-size: 440% auto;
  background-position: 100% 86%;
}

.tile.short-video {
  --tile-accent: var(--clay);
  background-image: url("./assets/images/eastern-concept-content.png");
  background-size: 440% auto;
  background-position: 100% 86%;
}

body:not([data-view="home"]) .screen-header,
body:not([data-view="home"]) .voice-panel {
  background: #eee9de;
}

body:not([data-view="home"]) .view.active {
  min-height: 100vh;
  padding: clamp(24px, 4vw, 58px);
  color: var(--ink);
  background: #16191c;
}

body:not([data-view="home"]) .view.active .control-row {
  position: sticky;
  bottom: 20px;
}

@media (max-width: 900px) {
  .robot-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }

  .screen-header {
    grid-column: 1;
    grid-row: 1;
    min-height: 180px;
    padding: 26px;
    flex-direction: row;
    align-items: flex-end;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 25, 25, 0.1);
  }

  .screen-header h1 {
    max-width: 10em;
    font-size: clamp(30px, 6vw, 48px);
  }

  .home-clock {
    text-align: right;
  }

  .home-clock strong {
    font-size: clamp(42px, 9vw, 68px);
  }

  .voice-panel {
    grid-column: 1;
    grid-row: 2;
    padding: 18px 26px 24px;
    border-right: 0;
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .voice-dot {
    width: 60px;
    height: 60px;
  }

  .voice-dot::before { top: 14px; }
  .voice-dot::after { top: 37px; }

  .voice-wave {
    margin-top: 10px;
  }

  .view {
    grid-column: 1;
    grid-row: 3;
  }

  #homeView {
    padding: 6px;
  }

  .primary-grid {
    height: auto;
    min-height: 720px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(300px, 1fr));
  }

  body:not([data-view="home"]) .view.active {
    min-height: 70vh;
  }
}

@media (max-width: 560px) {
  .screen-header {
    min-height: 160px;
    align-items: flex-start;
  }

  .screen-header .caption,
  .home-clock span,
  .home-clock small {
    display: none;
  }

  .primary-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(220px, 1fr));
  }

  .tile {
    padding-left: 100px;
  }

  .tile span,
  .tile::before {
    width: 84px;
  }
}

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