:root {
  color-scheme: light;
  --bg: #4d647e;
  --ink: #edf3f8;
  --panel: rgba(37, 47, 59, 0.56);
  --panel-strong: rgba(21, 27, 34, 0.66);
  --line: rgba(255, 255, 255, 0.24);
  --shadow: rgba(11, 17, 24, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #f3f4f5;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.chrome-button {
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  background-image:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.3), transparent 32%),
    linear-gradient(90deg, #8198af 0%, #6f879f 46%, #546b84 100%);
  border: 0.5px solid rgba(38, 38, 39, 0.623);
  color: rgba(239, 245, 250, 0.92);
  text-shadow: 0 1px rgba(18, 27, 36, 0.45);
  box-shadow:
    0 4px 3px 1px rgba(252, 252, 252, 0.1),
    0 6px 8px rgba(21, 32, 44, 0.34),
    0 -4px 4px rgba(103, 126, 148, 0.22),
    0 -6px 4px rgba(150, 169, 187, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    inset 0 0 0 0 rgba(206, 207, 209, 0);
  transition: box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}


.chrome-button:active,
.chrome-button:focus-visible,
.chrome-button.is-playing,
.chrome-button.is-recording {
  background-image:
    radial-gradient(circle at 62% 66%, rgba(10, 19, 29, 0.18), transparent 38%),
    linear-gradient(90deg, #7189a1 0%, #637b94 46%, #4b6077 100%);
  box-shadow:
    0 4px 3px 1px rgba(252, 252, 252, 0.1),
    0 6px 8px rgba(21, 32, 44, 0.3),
    0 -4px 4px rgba(103, 126, 148, 0.2),
    0 -6px 4px rgba(150, 169, 187, 0.12),
    inset 0 0 5px 3px rgba(23, 34, 47, 0.36),
    inset 0 0 3px rgba(31, 45, 59, 0.48);
  transform: translateY(1px);
}

.phone-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #f3f4f5;
}

.phone-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 46% 42%, rgba(255, 255, 255, 0.055), transparent 38%),
    radial-gradient(circle at 84% 18%, rgba(0, 0, 0, 0.1), transparent 16%),
    linear-gradient(135deg, #506982, var(--bg) 56%, #485e76);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 82px rgba(12, 20, 30, 0.22);
}

.phone-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(0, 0, 0, 0.18) 0 1px, transparent 1.4px);
  background-position: 0 0, 3px 3px;
  background-size: 9px 9px, 11px 11px;
  mix-blend-mode: overlay;
}

#stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.panel-dot,
.transport,
.countdown,
.toast,
.modal-backdrop {
  z-index: 2;
}

.panel-dot {
  position: absolute;
  width: clamp(30px, 2.75vw, 42px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(145deg, #344151, #202936 64%, #161d27);
  box-shadow:
    0 6px 12px rgba(10, 16, 22, 0.35),
    inset 4px 5px 10px rgba(255, 255, 255, 0.08),
    inset -7px -9px 14px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, filter 160ms ease;
}

.panel-dot:hover,
.panel-dot.is-open {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.round-button,
.disc-button,
.record-button,
.circle-action {
  color: #68737d;
}

.round-button {
  width: clamp(30px, 2.6vw, 42px);
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: clamp(17px, 1.5vw, 23px);
  font-weight: 700;
}

.transport {
  position: absolute;
  display: grid;
  gap: clamp(16px, 2.1vh, 23px);
  transform: translateY(-50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.transport[hidden] {
  display: none;
}

.disc-button {
  width: clamp(27px, 2.45vw, 38px);
  aspect-ratio: 1;
  border-radius: 50%;
}

.disc-button img {
  width: 42%;
  height: 42%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.14));
}

.disc-button.is-playing img {
  transform: translateX(1px);
}

.record-button {
  width: clamp(30px, 2.52vw, 40px);
  height: clamp(54px, 5.12vh, 67px);
  border-radius: 999px;
}

.record-button img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.14));
}

.record-button.is-recording img {
  transform: translateY(1px);
}

.settings-panel {
  position: absolute;
  right: max(8vw, 70px);
  top: 13%;
  width: clamp(180px, 15vw, 250px);
  min-height: 190px;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 30px;
  border-radius: 34px;
  color: rgba(238, 244, 249, 0.82);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, opacity 220ms ease;
}

.settings-panel.is-hidden {
  opacity: 0;
  transform: translateX(20px) scale(0.98);
  pointer-events: none;
}

.settings-panel button,
.settings-panel label {
  color: inherit;
  background: transparent;
  text-align: center;
  font-size: clamp(15px, 1.25vw, 20px);
}

.settings-panel label {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.settings-panel input {
  width: 58px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0;
  background: transparent;
}

.countdown {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(88px, 14vw, 220px);
  font-weight: 700;
  text-shadow: 0 16px 34px rgba(6, 11, 18, 0.36);
  background: rgba(12, 18, 24, 0.12);
  backdrop-filter: blur(3px);
}

.countdown.is-visible {
  display: grid;
  animation: fadeIn 180ms ease;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 8%;
  max-width: min(520px, 80vw);
  padding: 12px 18px;
  border-radius: 999px;
  color: rgba(247, 250, 253, 0.95);
  background: rgba(17, 23, 30, 0.62);
  box-shadow: 0 12px 28px rgba(8, 14, 20, 0.25);
  backdrop-filter: blur(18px);
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: clamp(28px, 4vw, 58px);
  background: rgba(19, 28, 37, 0.38);
  backdrop-filter: blur(8px);
}

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

.add-card {
  width: min(20vw, 290px);
  aspect-ratio: 1;
  border-radius: 28px;
  color: #606060;
  flex-direction: column;
  gap: 10px;
}

.add-card span,
.add-tile span {
  display: block;
  font-size: clamp(76px, 9vw, 138px);
  line-height: 1;
  transform: translateY(-4px);
}

.add-card strong {
  color: #606060;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 700;
  line-height: 1;
}

.gallery-modal {
  width: min(74vw, 1080px);
  min-height: min(33vw, 300px);
  padding: clamp(32px, 4vw, 58px);
  border-radius: 30px;
  background: rgba(20, 26, 31, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 50px var(--shadow);
  display: flex;
  align-items: center;
  gap: clamp(34px, 4.2vw, 68px);
  overflow-x: auto;
  backdrop-filter: blur(20px);
}

.gallery-list {
  display: flex;
  gap: clamp(34px, 4.2vw, 68px);
}

.tile {
  position: relative;
  flex: 0 0 auto;
  width: clamp(128px, 12.5vw, 190px);
  aspect-ratio: 1;
  border-radius: 0;
  overflow: hidden;
  color: #111;
  background: #d9d9d9;
}

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

.tile .edit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(42px, 5vw, 76px);
  color: #050505;
}

.tile .remove {
  position: absolute;
  right: 2px;
  top: -8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #050505;
  background: transparent;
  font-size: 36px;
  line-height: 1;
}

.add-tile {
  border-radius: 28px;
  color: #606060;
}

.modal-actions {
  position: absolute;
  left: 50%;
  bottom: 15%;
  display: flex;
  gap: clamp(90px, 12vw, 170px);
  transform: translateX(-50%);
}

.circle-action {
  width: clamp(46px, 4vw, 62px);
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: clamp(26px, 2.4vw, 36px);
}

.circle-action.muted {
  filter: brightness(0.86);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

