:root {
  color-scheme: light;
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #101828;
  --text: #172033;
  --muted: #667085;
  --line: #d9e0e8;
  --line-strong: #b8c3cf;
  --accent: #d6196a;
  --accent-strong: #ad1255;
  --blue: #2563eb;
  --green: #0f766e;
  --warning: #b45309;
  --danger: #c92a2a;
  --shadow: 0 16px 42px rgba(16, 24, 40, 0.08);
  --sidebar-width: 248px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

button.primary,
button[type="submit"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button.primary:hover,
button[type="submit"]:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

button.danger {
  border-color: rgba(201, 42, 42, 0.28);
  color: var(--danger);
}

button.ghost-danger {
  background: #fff;
}

button.ghost-danger:hover {
  border-color: rgba(201, 42, 42, 0.42);
  background: rgba(201, 42, 42, 0.06);
}

button.wide {
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.62);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

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

h1 {
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  font-size: 16px;
  line-height: 1.35;
}

.is-hidden {
  display: none !important;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 36%),
    linear-gradient(315deg, rgba(15, 118, 110, 0.1), transparent 34%),
    var(--bg);
}

.login-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-strong);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.login-card .brand-mark {
  margin-bottom: 20px;
}

.login-subtitle {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.icp-link {
  color: inherit;
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
}

.icp-link:hover,
.icp-link:focus-visible {
  text-decoration: underline;
}

.login-icp-link {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  text-align: center;
}

.admin-icp-footer {
  padding: 24px 18px 0;
  color: var(--muted);
  text-align: center;
}

.module-workspace {
  height: calc(100vh - 148px);
  min-height: 680px;
  margin: 20px 28px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f6;
}

.module-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f6f8f6;
}

label span,
.resource-body > span,
.field-title {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field-help {
  display: block;
  margin: -3px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.user-table-card { padding: 0; overflow: hidden; }
.user-table { display: grid; }
.user-row { display: grid; grid-template-columns: minmax(190px, 1fr) 90px 160px minmax(260px, 1.5fr) 86px; gap: 16px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-head { background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 700; }
.user-row strong, .user-row small { display: block; }
.user-row small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.status-badge { width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-badge.is-ready { background: rgba(15, 118, 110, 0.1); color: var(--green); }
.status-badge.is-disabled { background: rgba(201, 42, 42, 0.08); color: var(--danger); }
.user-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-toolbar input { width: min(280px, 48vw); }
.user-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-identity > div { min-width: 0; }
.user-identity strong, .user-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { flex: 0 0 auto; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); object-fit: cover; }
.user-avatar-fallback { display: grid; place-items: center; color: #fff; background: #eb3b84; font-size: 18px; font-weight: 800; }
.legal-notice-card { margin-bottom: 18px; border-left: 4px solid var(--warning); background: #fffaf0; }
.legal-notice-card strong { color: #8a4b08; }
.legal-notice-card p { margin: 7px 0 0; color: #704314; line-height: 1.6; }
.legal-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.legal-meta-grid label { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.legal-editor-card { margin-bottom: 18px; }
.legal-textarea { min-height: 520px; padding: 16px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; }
@media (max-width: 900px) { .legal-meta-grid { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .user-row { grid-template-columns: 1fr 90px 140px; } .user-row > :nth-child(4) { grid-column: 1 / 3; } }

.console {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 16px;
  background: var(--surface-strong);
  color: #fff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
}

.sidebar-brand .brand-mark {
  background: #fff;
  color: var(--surface-strong);
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.tabs {
  display: grid;
  gap: 8px;
}

.tab {
  justify-content: flex-start;
  min-height: 42px;
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  text-align: left;
}

.tab:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: none;
}

.tab.is-active {
  border-color: rgba(255, 255, 255, 0.16);
  background: #fff;
  color: var(--surface-strong);
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-foot span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.sidebar-foot strong {
  font-size: 14px;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 98px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions,
.card-actions,
.row-actions,
.url-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.metric-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.metric-card small {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 12px;
}

.upload-panel {
  display: grid;
  grid-template-columns: 170px minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: end;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel-title h2 {
  margin-top: 4px;
}

.upload-form {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 88px;
  gap: 10px;
}

.url-row {
  flex-wrap: nowrap;
}

.url-row input {
  min-width: 0;
}

#copyUploadedUrl {
  min-width: 64px;
}

.editor {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.visual-editor {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

.visual-editor.is-preview-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.visual-editor.is-preview-hidden .phone-preview {
  display: none;
}

.visual-editor .editor {
  min-width: 0;
  margin-top: 0;
}

.phone-preview {
  align-self: stretch;
  min-height: 100%;
}

.phone-preview-sticky {
  position: sticky;
  top: 128px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  max-height: calc(100vh - 144px);
  overflow: hidden;
  z-index: 8;
}

.phone-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px;
}

.phone-preview-head strong {
  font-size: 13px;
}

.phone-preview-head span {
  color: var(--muted);
  font-size: 12px;
}

.phone-device {
  position: relative;
  width: 320px;
  height: min(642px, calc(100vh - 228px));
  min-height: 420px;
  padding: 16px 12px;
  border: 1px solid rgba(16, 24, 40, 0.82);
  border-radius: 34px;
  background:
    linear-gradient(145deg, #252b38, #080b12 72%),
    #101828;
  box-shadow: 0 24px 48px rgba(16, 24, 40, 0.24);
}

.phone-speaker {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 74px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(-50%);
}

.phone-screen {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 25px;
  background: #fbf8f5;
}

.phone-screen::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px 4px;
  color: #5b6170;
  font-size: 11px;
  font-weight: 700;
}

.phone-page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px 10px;
}

.phone-page-title strong {
  font-size: 17px;
}

.phone-page-title small {
  color: var(--muted);
  font-size: 10px;
}

.phone-preview-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.phone-hotspot {
  display: grid;
  min-height: auto;
  padding: 0;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: rgba(255, 255, 255, 0.68);
  color: inherit;
  text-align: center;
  white-space: normal;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.phone-hotspot:hover {
  border-color: rgba(214, 25, 106, 0.58);
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.phone-hotspot:focus-visible {
  outline: 3px solid rgba(214, 25, 106, 0.18);
  outline-offset: 2px;
}

.phone-image-empty {
  display: grid;
  min-height: 34px;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.phone-hotspot img,
.phone-stage img,
.phone-character-card img,
.phone-instrument-pill img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.phone-home-screen {
  min-height: 614px;
  background: #fff2df;
}

.phone-screen-home {
  background: #fff2df;
}

.phone-screen-home .phone-status-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 242, 223, 0.86);
  backdrop-filter: blur(8px);
}

.phone-home-canvas {
  position: relative;
  width: 100%;
  height: 584px;
  overflow: hidden;
  background: #fff2df;
}

.phone-home-canvas .phone-hotspot,
.phone-tuner-screen .phone-hotspot,
.phone-metronome-screen .phone-hotspot {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.phone-home-canvas .phone-hotspot:hover,
.phone-tuner-screen .phone-hotspot:hover,
.phone-metronome-screen .phone-hotspot:hover {
  border-color: rgba(214, 25, 106, 0.5);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(214, 25, 106, 0.1);
}

.phone-home-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.phone-home-bg img {
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: cover;
}

.phone-profile-entry {
  position: absolute;
  top: 10px;
  right: 9px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 124px;
  min-height: 39px;
  padding: 5px 8px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 13px rgba(122, 84, 64, 0.12);
  text-align: left;
}

.phone-profile-entry img {
  width: 27px;
  height: 27px;
  border-radius: 50%;
}

.phone-profile-entry span {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.phone-profile-entry b {
  color: #3d3438;
  font-size: 10px;
  font-weight: 850;
}

.phone-profile-entry em {
  color: #9a6c77;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.phone-home-logo {
  position: absolute;
  left: 30px;
  top: 37px;
  z-index: 2;
  width: 178px;
  height: 71px;
  overflow: hidden;
}

.phone-home-logo img {
  width: 178px;
  filter: drop-shadow(0 3px 0 rgba(255, 255, 255, 0.86));
}

.phone-home-logo i {
  position: absolute;
  left: -67px;
  top: -13px;
  width: 34px;
  height: 102px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.78), rgba(255,255,255,0));
  opacity: 0.8;
  transform: rotate(18deg);
}

.phone-title-note {
  position: absolute;
  left: 247px;
  top: 54px;
  z-index: 3;
  width: 20px;
}

.phone-home-slogan {
  position: absolute;
  left: 43px;
  top: 106px;
  z-index: 2;
  width: 154px;
}

.phone-note-left-large {
  position: absolute;
  left: 13px;
  top: 193px;
  z-index: 2;
  width: 28px;
}

.phone-note-left-small {
  position: absolute;
  left: 54px;
  top: 158px;
  z-index: 2;
  width: 23px;
  opacity: 0.72;
}

.phone-note-right-small {
  position: absolute;
  right: 13px;
  top: 159px;
  z-index: 2;
  width: 17px;
}

.phone-star-left {
  position: absolute;
  left: 83px;
  top: 219px;
  z-index: 2;
  width: 14px;
}

.phone-bubble {
  position: absolute;
  left: 181px;
  top: 139px;
  z-index: 4;
  width: 107px;
}

.phone-bubble-text {
  position: absolute;
  left: 198px;
  top: 156px;
  z-index: 5;
  width: 75px;
  color: #ef2d8f;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.3px;
  line-height: 1;
  transform: rotate(-7deg);
  pointer-events: none;
  white-space: nowrap;
}

.phone-bubble-heart {
  position: absolute;
  left: 239px;
  top: 126px;
  z-index: 5;
  width: 19px;
}

.phone-goose {
  position: absolute;
  left: 86px;
  top: 143px;
  z-index: 3;
  width: 142px;
  height: 175px;
  overflow: visible;
}

.phone-goose img {
  width: 142px;
  filter: drop-shadow(0 6px 9px rgba(121, 77, 46, 0.16));
}

.live-feature-card {
  position: absolute;
  z-index: 6;
  display: block;
  width: 138px;
  height: 87px;
  overflow: hidden;
  border: 1.2px solid rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 5px 11px rgba(166, 118, 111, 0.16);
}

.feature-slot-0 { left: 6px; top: 322px; }
.feature-slot-1 { left: 152px; top: 322px; }
.feature-slot-2 { left: 6px; top: 417px; }
.feature-slot-3 { left: 152px; top: 417px; }

.card-metronome { background: linear-gradient(135deg, rgba(255, 238, 246, 0.95), rgba(255, 219, 236, 0.95)); }
.card-chords { background: linear-gradient(135deg, rgba(248, 240, 255, 0.95), rgba(235, 225, 255, 0.95)); }
.card-tuner { background: linear-gradient(135deg, rgba(238, 247, 255, 0.95), rgba(222, 238, 255, 0.95)); }
.card-more { background: linear-gradient(135deg, rgba(255, 249, 235, 0.96), rgba(255, 237, 205, 0.96)); }

.card-disabled {
  opacity: 0.5;
  filter: grayscale(0.35);
}

.card-ribbon {
  position: absolute;
  right: -17px;
  top: 9px;
  z-index: 8;
  width: 70px;
  height: 15px;
  transform: rotate(45deg);
  box-shadow: 0 2px 5px rgba(90, 60, 70, 0.12);
}

.card-ribbon em {
  display: block;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  line-height: 15px;
  text-align: center;
}

.ribbon-online { background: linear-gradient(90deg, #ff6aa3, #ef2d8f); }

.card-title {
  position: absolute;
  left: 13px;
  top: 19px;
  z-index: 3;
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.title-metronome { color: #ef2d8f; }
.title-chords { color: #5b45d9; font-size: 15px; }
.title-tuner { color: #1677ff; }
.title-more { color: #9a5b19; font-size: 15px; }

.card-desc {
  position: absolute;
  left: 13px;
  top: 40px;
  z-index: 3;
  color: #555;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.25;
}

.desc-line-2 {
  top: 53px;
}

.card-note,
.card-star,
.icon-metronome,
.icon-chord,
.icon-tuner,
.icon-more {
  position: absolute;
  z-index: 2;
  display: block;
}

.card-note { left: 73px; top: 11px; width: 14px; }
.card-star { right: 11px; top: 9px; width: 14px; }
.icon-metronome { right: 21px; top: 13px; width: 46px; }
.icon-chord { right: 6px; top: 13px; width: 58px; }
.icon-tuner { right: 30px; top: 15px; width: 20px; }
.icon-more { right: 10px; top: 17px; width: 52px; }

.arrow-button {
  position: absolute;
  right: 7px;
  bottom: 6px;
  z-index: 5;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 7px rgba(123, 91, 95, 0.2);
}

.arrow-pink { background: linear-gradient(135deg, #ff78ad, #ef2d8f); }
.arrow-purple { background: linear-gradient(135deg, #a384ff, #7655f0); }
.arrow-blue { background: linear-gradient(135deg, #78baff, #3d86f2); }
.arrow-orange { background: linear-gradient(135deg, #ffbd63, #ff7a2f); }

.phone-tip-bar {
  position: absolute;
  left: 12px;
  top: 517px;
  z-index: 6;
  display: flex;
  align-items: center;
  width: 272px;
  height: 28px;
  overflow: hidden;
  gap: 7px;
  padding: 0 42px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 9px rgba(166, 118, 111, 0.12);
  color: #333;
  font-size: 10px;
  white-space: nowrap;
}

.phone-tip-bar .tip-icon {
  width: 16px;
}

.phone-tip-bar b {
  flex: 0 0 auto;
  font-size: 10px;
}

.phone-tip-bar i {
  flex: 0 0 auto;
  width: 1px;
  height: 15px;
  background: rgba(166, 118, 111, 0.22);
}

.phone-tip-bar .tip-goose {
  position: absolute;
  right: 9px;
  bottom: -8px;
  width: 30px;
}

.phone-tip-bar .tip-heart {
  position: absolute;
  right: 37px;
  top: 5px;
  width: 12px;
}

.phone-mini-actions {
  position: absolute;
  left: 12px;
  top: 552px;
  z-index: 8;
  display: flex;
  gap: 6px;
}

.phone-mini-actions,
.phone-reference-row > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.phone-audio-chip,
.phone-audio-dot,
.phone-sound-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.phone-sound-card.is-muted {
  opacity: 0.48;
  filter: grayscale(0.45);
}

.phone-metronome-screen,
.phone-character-screen,
.phone-tuner-screen {
  display: grid;
  min-height: 548px;
  align-content: start;
  gap: 13px;
  padding: 10px 12px 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(214, 25, 106, 0.13), transparent 33%),
    #fff7fb;
}

.phone-metronome-screen {
  background:
    radial-gradient(circle at 18% 0%, rgba(214, 25, 106, 0.13), transparent 142px),
    #fbf8f5;
}

.phone-metronome-nav,
.phone-tuner-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 47px;
}

.phone-metronome-nav span,
.phone-tuner-brand > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: #222;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(16, 16, 16, 0.08);
}

.phone-metronome-nav strong {
  color: #121212;
  font-size: 17px;
  font-weight: 950;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.88));
}

.phone-beat-readout {
  justify-self: center;
  min-width: 74px;
  padding: 7px 14px;
  border: 1px solid #e7e3df;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 7px 14px rgba(16, 16, 16, 0.08);
  text-align: center;
}

.phone-beat-readout strong {
  display: block;
  color: #121212;
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.phone-beat-readout span {
  color: #676767;
  font-size: 11px;
  font-weight: 800;
}

.phone-controls {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid #e7e3df;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(16, 16, 16, 0.08);
}

.phone-controls button {
  min-height: 36px;
  border-radius: 999px;
  background: #f7f3ef;
  color: #121212;
  font-size: 24px;
  line-height: 1;
}

.phone-controls span {
  display: grid;
  justify-items: center;
}

.phone-controls b {
  color: #121212;
  font-size: 45px;
  font-weight: 950;
  line-height: 1;
}

.phone-controls em {
  color: #676767;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 3px;
}

.phone-sound-list,
.phone-character-list {
  display: grid;
  gap: 8px;
}

.phone-sound-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.phone-sound-card strong {
  font-size: 12px;
  text-align: left;
}

.phone-sound-card > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.phone-audio-dot {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.phone-stage {
  display: grid;
  min-height: 240px;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f5f8ff);
}

.phone-stage img {
  width: 190px;
  height: 210px;
}

.phone-character-card {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 8px;
  border-radius: 16px;
  text-align: left;
}

.phone-character-card img {
  width: 48px;
  height: 48px;
}

.phone-character-card span,
.phone-instrument-pill span {
  font-size: 11px;
  font-weight: 850;
}

.phone-tuner-screen {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0.64) 130px, rgba(255, 245, 239, 0) 245px),
    linear-gradient(180deg, #fff7f2 0%, #fff2ec 48%, #fff0e8 100%);
}

.phone-tuner-logo {
  width: 138px;
  min-height: 32px;
  border-radius: 8px;
}

.phone-tuner-logo img {
  width: 138px;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.88));
}

.phone-instrument-row {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  padding: 4px;
  overflow-x: auto;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 14px rgba(125, 82, 66, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.phone-instrument-row::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.phone-instrument-pill {
  flex: 1 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 48px;
  min-height: 29px;
  padding: 0 3px;
  border-radius: 17px;
  color: #858585;
}

.phone-instrument-pill:first-child {
  color: #fff;
  background: linear-gradient(135deg, #ff63a8 0%, #ee1d7f 100%);
  box-shadow: 0 4px 9px rgba(238, 29, 127, 0.26);
}

.phone-instrument-pill img {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  justify-self: center;
}

.phone-instrument-pill:first-child img {
  filter: brightness(0) invert(1);
}

.phone-tuner-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.phone-tuner-controls > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 96px;
  height: 32px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 13px rgba(125, 82, 66, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  color: #777;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.phone-tuner-controls b {
  color: #ef2b8d;
  font-size: 11px;
  font-weight: 950;
}

.phone-tuner-visual {
  position: relative;
  height: 234px;
  margin-top: 4px;
}

.phone-monitor-decoration {
  position: absolute;
  left: 50%;
  top: -6px;
  z-index: 5;
  width: 150px;
  height: 86px;
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 16px, transparent 17px),
    radial-gradient(circle at 70% 30%, #fff 0 16px, transparent 17px),
    linear-gradient(180deg, #fff4e7, #ffd7c3);
  box-shadow: 0 8px 14px rgba(106, 66, 52, 0.14);
  transform: translateX(-50%);
}

.phone-tuner-grid {
  position: absolute;
  left: 50%;
  top: 72px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 156px;
  overflow: hidden;
  border: 2px solid rgba(255, 163, 158, 0.92);
  border-radius: 17px;
  background:
    linear-gradient(rgba(181, 142, 122, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 142, 122, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 248, 239, 0.98), rgba(255, 244, 235, 0.96));
  background-size: 100% 41px, 38px 100%, 100% 100%;
  box-shadow:
    0 7px 14px rgba(224, 105, 98, 0.16),
    inset 0 0 0 4px rgba(255, 218, 210, 0.76);
  transform: translateX(-50%);
}

.phone-tuner-grid i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(181, 142, 122, 0.14);
}

.phone-tuner-grid i:nth-child(1) { left: 25%; }
.phone-tuner-grid i:nth-child(2) { left: 50%; width: 2px; background: rgba(242, 82, 128, 0.82); }
.phone-tuner-grid i:nth-child(3) { left: 75%; }

.phone-tuner-grid strong {
  z-index: 2;
  color: #f22b8d;
  font-size: 56px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.86);
}

.phone-tuner-grid span {
  position: absolute;
  bottom: 14px;
  z-index: 2;
  color: #9a6b5c;
  font-size: 11px;
  font-weight: 850;
}

.phone-reference-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.phone-reference-row small {
  color: var(--muted);
  font-size: 11px;
}

.phone-sound-button {
  flex: 1;
  justify-self: stretch;
  min-height: 32px;
}

.phone-empty-text {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.is-preview-focused {
  outline: 3px solid rgba(214, 25, 106, 0.24);
  outline-offset: 3px;
  border-radius: 10px;
}

.section-header,
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-header {
  min-height: 56px;
}

.section-header p,
.card-subtitle,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.05);
  padding: 18px;
}

.category-card {
  box-shadow: none;
}

.card-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.card-header h3 {
  word-break: break-word;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

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

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

.full {
  grid-column: 1 / -1;
}

.is-soft-hidden {
  opacity: 0.72;
}

.feature-toggle-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.feature-toggle-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.feature-toggle-card input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.feature-toggle-card strong,
.feature-toggle-card small,
.feature-toggle-card em {
  display: block;
}

.feature-toggle-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.feature-toggle-card em {
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.feature-toggle-card.is-soft-hidden em {
  background: rgba(102, 112, 133, 0.12);
  color: var(--muted);
}

.growth-safety-notice {
  border-color: rgba(15, 118, 110, 0.25);
  background: rgba(236, 253, 245, 0.72);
}

.growth-safety-notice strong {
  color: var(--green);
}

.growth-safety-notice p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.growth-feature-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.growth-feature-card {
  min-height: 170px;
}

.growth-feature-fields {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.growth-feature-card .growth-feature-fields label {
  gap: 4px;
}

.growth-feature-card .growth-feature-fields span {
  color: var(--muted);
  font-size: 11px;
}

.growth-feature-card .growth-feature-fields input {
  width: 100%;
  min-height: 34px;
  margin: 0;
}

.growth-section-header {
  margin-top: 28px;
}

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

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

.audit-intro div,
.audit-actor {
  display: grid;
  gap: 5px;
}

.audit-intro span,
.audit-actor span,
.audit-actor small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.audit-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.audit-card {
  display: grid;
  gap: 14px;
}

.audit-card-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.audit-actor {
  min-width: 170px;
  justify-items: end;
  text-align: right;
}

.audit-metadata summary {
  width: fit-content;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.audit-metadata pre {
  max-height: 260px;
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 8px;
  background: #101828;
  color: #d0d5dd;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.audit-more-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7e6;
  color: #9a6700;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .growth-feature-list,
  .growth-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .growth-feature-list,
  .growth-config-grid,
  .growth-feature-fields {
    grid-template-columns: 1fr;
  }

  .audit-intro {
    grid-template-columns: 1fr;
  }

  .audit-card-main {
    display: grid;
  }

  .audit-actor {
    min-width: 0;
    justify-items: start;
    text-align: left;
  }
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.compact-empty {
  padding: 12px;
}

.asset-field {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.resource-field {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.resource-field.compact {
  grid-template-columns: 136px minmax(0, 1fr);
}

.resource-body {
  min-width: 0;
}

.resource-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
  align-items: center;
}

.resource-stack {
  display: grid;
  gap: 8px;
}

.resource-stack button {
  justify-self: start;
}

.resource-preview {
  position: relative;
  display: grid;
  width: 180px;
  min-height: 72px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.resource-field.compact .resource-preview {
  width: 136px;
  min-height: 72px;
}

.resource-preview.is-empty {
  color: var(--muted);
  font-size: 12px;
}

.resource-preview-media {
  width: 100%;
  height: 100%;
  min-height: 72px;
  object-fit: contain;
}

.resource-preview-audio {
  width: 168px;
}

.resource-field.compact .resource-preview-audio {
  width: 124px;
}

.resource-preview-empty {
  padding: 8px;
  text-align: center;
}

.image-dimensions {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(16, 24, 40, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-dimensions[data-state="error"] {
  background: rgba(201, 42, 42, 0.86);
}

.asset-preview,
.preview-row img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sound-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.sound-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  box-shadow: none;
}

.guide-item {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.guide-item strong {
  color: var(--text);
  font-size: 14px;
}

.guide-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.subpanel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.subpanel h4,
.subpanel-header h4 {
  margin: 0;
  font-size: 15px;
}

.subpanel p,
.subpanel-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.subpanel-header,
.layer-card-header,
.count-row-title,
.sample-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.count-list,
.layer-editor {
  display: grid;
  gap: 12px;
}

.count-row,
.layer-card,
.sample-field {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.small-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 40px;
  padding: 0 2px;
}

.inline-checkbox input {
  width: 18px;
  min-height: 18px;
}

.inline-checkbox span {
  margin: 0;
  color: var(--text);
}

.layer-editor {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.layer-card-header strong,
.count-row-title strong,
.sample-field-header strong {
  min-width: 0;
  word-break: break-word;
}

.flat-grid {
  margin-top: 0;
}

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

.sample-set-section {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.compact-section-header {
  margin-bottom: 0;
}

.tuning-preset-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.tuning-preset-card,
.all-pitch-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tuning-preset-card > summary,
.all-pitch-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.tuning-preset-card > summary::-webkit-details-marker,
.all-pitch-panel > summary::-webkit-details-marker {
  display: none;
}

.tuning-preset-card > summary strong,
.all-pitch-panel > summary {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.tuning-preset-card > summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.tuning-preset-card > summary em {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.tuning-preset-card > summary em.is-ready {
  background: rgba(15, 118, 110, 0.1);
  color: var(--green);
}

.tuning-preset-card > summary em.is-warning {
  background: rgba(180, 83, 9, 0.12);
  color: var(--warning);
}

.tuning-string-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.tuning-string-sample {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tuning-string-sample.is-missing {
  border-color: rgba(180, 83, 9, 0.38);
  background: rgba(180, 83, 9, 0.04);
}

.tuning-string-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tuning-string-head strong {
  color: var(--text);
  font-size: 14px;
}

.tuning-string-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.tuning-string-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.orphan-samples,
.all-pitch-panel {
  margin-top: 14px;
}

.all-pitch-panel .sample-grid,
.orphan-samples .sample-grid {
  padding: 0 14px 14px;
  margin-top: 0;
}

.tuner-detector-groups {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.tuner-asset-groups {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

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

.preset-row {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.preset-help-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.preset-help-list span {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.preset-help-list span.is-active {
  border-color: rgba(214, 25, 106, 0.42);
  background: rgba(214, 25, 106, 0.06);
  color: var(--text);
}

.preset-help-list strong {
  color: var(--text);
  font-size: 13px;
}

.tuner-instrument-settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}

.tuner-global-panel {
  padding: 0;
  overflow: hidden;
}

.tuner-global-summary,
.tuner-instrument-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
}

.tuner-global-summary::-webkit-details-marker,
.tuner-instrument-summary::-webkit-details-marker {
  display: none;
}

.tuner-global-summary {
  padding: 18px;
}

.tuner-global-summary > span:first-child,
.tuner-instrument-summary-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.tuner-global-summary strong,
.tuner-instrument-summary strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
}

.tuner-global-summary small,
.tuner-instrument-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tuner-fold-hint {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  font-size: 0;
  font-weight: 750;
  white-space: nowrap;
}

.tuner-fold-hint::after {
  content: "展开设置";
  font-size: 12px;
}

details[open] > summary .tuner-fold-hint::after {
  content: "收起设置";
}

.tuner-global-content {
  display: grid;
  gap: 18px;
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.tuner-global-section {
  padding-top: 18px;
}

.tuner-global-section + .tuner-global-section {
  border-top: 1px solid var(--line);
}

.tuner-instrument-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.tuner-instrument-panel[open] {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 22px rgba(25, 39, 71, 0.07);
}

.tuner-instrument-panel.is-soft-hidden {
  background: rgba(102, 112, 133, 0.06);
}

.tuner-instrument-summary {
  padding: 14px 16px;
}

.tuner-instrument-summary-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue);
  font-size: 18px;
  font-weight: 850;
}

.tuner-instrument-summary-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.tuner-instrument-summary-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.tuner-instrument-summary-status em,
.instrument-advanced > summary em {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.tuner-instrument-summary-status em.is-warning,
.instrument-advanced > summary em.is-warning {
  background: rgba(180, 83, 9, 0.12);
  color: var(--warning);
}

.tuner-instrument-summary-status em.is-muted {
  background: rgba(102, 112, 133, 0.12);
  color: var(--muted);
}

.tuner-instrument-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.tuner-instrument-toolbar,
.tuner-reference-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tuner-instrument-toolbar > span {
  color: var(--muted);
  font-size: 12px;
}

.instrument-setting-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.instrument-setting-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.instrument-setting-head h4 {
  margin: 0;
  font-size: 15px;
}

.instrument-setting-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.instrument-setting-head em {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.instrument-setting-card.is-soft-hidden .instrument-setting-head em {
  background: rgba(102, 112, 133, 0.12);
  color: var(--muted);
}

.instrument-advanced {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.instrument-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.instrument-advanced > summary::-webkit-details-marker {
  display: none;
}

.instrument-advanced[open] > summary {
  border-bottom: 1px solid var(--line);
}

.instrument-section-content {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.instrument-section-content h5 {
  margin: 4px 0 -2px;
  color: var(--text);
  font-size: 13px;
}

.instrument-section-content > button {
  margin-top: 12px;
}

.tuner-string-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.string-setting-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.string-setting-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.string-setting-head strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.string-setting-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.string-setting-head em {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.backup-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  box-shadow: none;
}

.backup-intro div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.backup-intro strong {
  font-size: 14px;
}

.backup-intro span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.backup-list {
  display: grid;
  gap: 12px;
}

.backup-card {
  display: grid;
  gap: 14px;
}

.backup-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.backup-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.backup-meta span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.backup-meta strong {
  color: var(--text);
  font-size: 14px;
}

.backup-id {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.audio-preview audio {
  width: 100%;
}

.frame-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.frame-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.frame-item .resource-preview {
  width: 136px;
  min-height: 96px;
}

.frame-item .resource-preview-media {
  min-height: 96px;
}

.frame-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.frame-meta span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.json-editor {
  min-height: 540px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

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

  .sound-guide,
  .sample-grid,
  .tuner-asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .tabs {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .sidebar-foot {
    display: none;
  }

  .workspace {
    padding: 14px;
  }

  .topbar,
  .section-header,
  .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions button {
    flex: 1;
  }

  .upload-form,
  .grid-2,
  .grid-3,
  .feature-toggle-list,
  .preset-row,
  .preset-help-list,
  .tuner-instrument-settings,
  .tuner-string-settings,
  .tuner-asset-grid,
  .tuning-string-grid,
  .sound-guide,
  .backup-intro,
  .backup-meta,
  .count-grid,
  .sample-grid {
    grid-template-columns: 1fr;
  }

  .asset-field {
    grid-template-columns: 1fr;
  }

  .resource-field,
  .resource-field.compact,
  .resource-input-row {
    grid-template-columns: 1fr;
  }

  .resource-preview,
  .resource-field.compact .resource-preview,
  .frame-item .resource-preview {
    width: 100%;
    min-height: 120px;
  }

  .resource-preview-audio,
  .resource-field.compact .resource-preview-audio {
    width: 100%;
  }

  .subpanel-header,
  .layer-card-header,
  .count-row-title,
  .sample-field-header,
  .backup-main,
  .frame-tools,
  .tuner-global-summary,
  .tuner-instrument-summary,
  .tuner-instrument-toolbar,
  .tuner-reference-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tuner-instrument-summary-status {
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026 operations console refresh */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-strong: #15171c;
  --text: #20242c;
  --muted: #697180;
  --line: #dfe3e8;
  --line-strong: #bdc5d0;
  --accent: #d91d68;
  --accent-strong: #b91557;
  --blue: #245fc5;
  --green: #147a5c;
  --warning: #a45a0a;
  --danger: #c83434;
  --shadow: 0 10px 28px rgba(26, 31, 40, 0.06);
  --sidebar-width: 226px;
}

body {
  background: var(--bg);
  font-size: 14px;
}

button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 6px;
  box-shadow: none;
  font-weight: 600;
}

button:hover {
  transform: none;
}

input,
select {
  min-height: 38px;
}

input,
select,
textarea {
  border-radius: 6px;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

.console {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  gap: 0;
  padding: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.sidebar-brand {
  min-height: 78px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--surface-strong);
  color: #fff;
}

.sidebar-brand strong {
  font-size: 15px;
}

.sidebar-brand span {
  color: var(--muted);
}

.tabs {
  display: block;
  padding: 12px 10px 18px;
  overflow-y: auto;
}

.nav-group + .nav-group {
  margin-top: 18px;
}

.nav-label {
  margin: 0 10px 7px;
  color: #9299a5;
  font-size: 11px;
  font-weight: 700;
}

.tab {
  display: grid;
  width: 100%;
  min-height: 40px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4f5663;
  font-weight: 600;
}

.tab + .tab {
  margin-top: 3px;
}

.tab:hover {
  border-color: transparent;
  background: #f2f4f6;
  color: var(--text);
}

.tab.is-active {
  border-color: transparent;
  background: #fceaf2;
  color: #a91450;
}

.tab-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  background: #f0f2f5;
  color: #596170;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.tab.is-active .tab-icon {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(122, 22, 67, 0.1);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: auto 12px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.sidebar-foot span {
  color: var(--muted);
}

.sidebar-foot strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 12px;
}

.environment-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27a46f;
  box-shadow: 0 0 0 3px rgba(39, 164, 111, 0.13);
}

.workspace {
  min-width: 0;
  padding: 0 0 32px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 112px;
  padding: 16px 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.workspace-heading {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: #89909b;
  font-size: 11px;
}

.breadcrumb i {
  font-style: normal;
}

.breadcrumb strong {
  color: #646c78;
}

.workspace-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf2fb;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.workspace-description {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.topbar-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  max-width: 420px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.status-text {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #27a46f;
}

.status-pill[data-state="working"] .status-dot {
  background: #d99618;
  animation: status-pulse 1s ease-in-out infinite;
}

.status-pill[data-state="dirty"] {
  color: #8a520d;
}

.status-pill[data-state="dirty"] .status-dot {
  background: #dc8c14;
}

.status-pill[data-state="error"] {
  color: var(--danger);
}

.status-pill[data-state="error"] .status-dot {
  background: var(--danger);
}

@keyframes status-pulse {
  50% { opacity: 0.35; }
}

.topbar-actions {
  flex-wrap: nowrap;
}

.summary-grid,
.upload-panel,
.visual-editor {
  margin-right: 28px;
  margin-left: 28px;
}

.visual-editor .editor {
  margin-right: 0;
  margin-left: 0;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.metric-card {
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 7px;
  box-shadow: none;
}

.metric-card strong {
  margin-top: 6px;
  font-size: 21px;
}

.metric-card small {
  display: inline;
  margin-left: 5px;
}

.upload-panel {
  display: block;
  margin-top: 10px;
  padding: 0;
  border-radius: 7px;
  background: var(--surface);
}

.upload-panel > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}

.upload-panel > summary::-webkit-details-marker {
  display: none;
}

.upload-panel > summary strong,
.upload-panel > summary small {
  display: block;
}

.upload-panel > summary strong {
  font-size: 13px;
}

.upload-panel > summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.upload-panel > summary em {
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.upload-panel[open] > summary em::after {
  content: "收起";
}

.upload-panel[open] > summary em {
  font-size: 0;
}

.upload-panel[open] > summary em::after {
  font-size: 12px;
}

.upload-panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.upload-form {
  grid-template-columns: 150px minmax(0, 1fr) 92px;
}

.editor {
  gap: 12px;
  margin-top: 20px;
}

.section-header,
.page-toolbar {
  min-height: 44px;
}

.editor > .section-header {
  padding-bottom: 2px;
}

.section-header h2 {
  font-size: 17px;
}

.section-header p,
.page-toolbar > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.card {
  padding: 16px;
  border-radius: 7px;
  box-shadow: none;
}

.card-header {
  padding-bottom: 12px;
}

.grid-2,
.grid-3 {
  gap: 12px;
  margin-top: 14px;
}

.feature-toggle-list {
  gap: 8px;
  margin-top: 14px;
}

.feature-toggle-card {
  min-height: 88px;
  padding: 12px;
  border-radius: 6px;
  background: #fafbfc;
}

.feature-toggle-card em,
.status-badge,
.sound-badge {
  border-radius: 999px;
}

.resource-field {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid #e6e9ed;
  border-radius: 6px;
  background: #fbfcfd;
}

.resource-field.compact {
  grid-template-columns: 118px minmax(0, 1fr);
}

.resource-preview {
  width: 150px;
  min-height: 86px;
  border-radius: 5px;
  background: #f1f3f5;
}

.resource-field.compact .resource-preview {
  width: 118px;
}

.resource-preview-media {
  min-height: 86px;
}

.resource-preview-audio {
  width: 138px;
}

.resource-field.compact .resource-preview-audio {
  width: 106px;
}

.resource-input-row {
  grid-template-columns: minmax(0, 1fr) 92px;
}

.subpanel,
.layer-editor {
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.guide-item,
.count-row,
.layer-card,
.sample-field,
.tuning-preset-card,
.all-pitch-panel,
.instrument-setting-card,
.frame-item {
  border-radius: 6px;
  box-shadow: none;
}

.user-toolbar {
  justify-content: flex-end;
}

.user-table-card {
  padding: 0;
}

.user-row {
  grid-template-columns: minmax(220px, 1fr) 86px 170px minmax(260px, 1.4fr) 72px;
  gap: 14px;
  padding: 13px 16px;
}

.user-head {
  min-height: 44px;
  background: #f7f8fa;
}

.legal-notice-card {
  margin-bottom: 0;
  border-left-width: 3px;
}

.legal-meta-grid {
  gap: 10px;
  margin-bottom: 0;
}

.legal-meta-grid label {
  padding: 14px;
  border-radius: 7px;
}

.legal-editor-card {
  margin-bottom: 0;
}

.legal-textarea {
  min-height: 420px;
}

.backup-intro {
  background: #fbfcfd;
}

.json-editor {
  min-height: 620px;
}

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

  .feature-toggle-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-row {
    grid-template-columns: minmax(220px, 1fr) 86px 160px;
  }

  .user-row > :nth-child(4) {
    grid-column: 1 / 3;
  }
}

@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .console {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .workspace,
  .topbar,
  .topbar-side,
  .topbar-actions {
    width: 100%;
    min-width: 0;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand {
    min-height: 66px;
  }

  .tabs {
    display: flex;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    gap: 6px;
    padding: 8px 12px 12px;
    overflow-x: auto;
  }

  .nav-group {
    display: contents;
  }

  .nav-label {
    display: none;
  }

  .tab {
    display: flex;
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
  }

  .tab + .tab {
    margin-top: 0;
  }

  .sidebar-foot {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .topbar-side {
    justify-items: stretch;
  }

  .status-pill {
    max-width: none;
  }

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

  .topbar-actions button {
    width: 100%;
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .feature-toggle-list {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .upload-panel,
  .visual-editor {
    margin-right: 18px;
    margin-left: 18px;
  }

  .visual-editor {
    grid-template-columns: 1fr;
  }

  .phone-preview-sticky {
    position: static;
  }

  .phone-device {
    width: min(320px, 100%);
    margin: 0 auto;
  }

  .upload-panel-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .summary-grid,
  .feature-toggle-list,
  .grid-2,
  .grid-3,
  .legal-meta-grid {
    grid-template-columns: 1fr;
  }

  .upload-form,
  .resource-field,
  .resource-field.compact,
  .resource-input-row {
    grid-template-columns: 1fr;
  }

  .resource-preview,
  .resource-field.compact .resource-preview,
  .frame-item .resource-preview {
    width: 100%;
    min-height: 132px;
  }

  .resource-preview-audio,
  .resource-field.compact .resource-preview-audio {
    width: 100%;
  }

  .page-toolbar {
    align-items: stretch;
  }

  .user-toolbar input {
    width: 100%;
  }
}

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

.growth-record-manager {
  min-width: 0;
}

.growth-record-manager-header {
  align-items: flex-start;
}

.growth-record-manager-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.growth-record-list,
.growth-snapshot-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.growth-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.growth-record-row > div:first-child,
.growth-snapshot-list > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.growth-record-row strong,
.growth-record-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.growth-record-row small,
.growth-snapshot-list small,
.growth-snapshot-list span {
  color: var(--muted);
  font-size: 11px;
}

.growth-record-actions,
.growth-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.growth-record-editor {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  margin-top: 16px;
  border-color: rgba(217, 29, 104, 0.35);
  box-shadow: 0 18px 60px rgba(16, 24, 40, 0.18);
}

.growth-json-editor-label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.growth-json-editor {
  min-height: 340px;
  padding: 14px;
  border: 1px solid #303846;
  border-radius: 7px;
  background: #101828;
  color: #d8e2f0;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  tab-size: 2;
}

.growth-editor-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.growth-editor-hint {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 6px;
  background: #fff7e6;
  color: #805b10;
  font-size: 12px;
}

.leaderboard-operations {
  grid-column: 1 / -1;
}

.compact-summary-grid {
  margin-top: 12px;
}

.growth-snapshot-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.growth-snapshot-list > div {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.growth-snapshot-list small {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .growth-management-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-operations {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .growth-record-row,
  .growth-snapshot-list {
    grid-template-columns: 1fr;
  }

  .growth-record-row .status-badge {
    justify-self: start;
  }
}

/* Phone editor connection fixes */
.visual-editor .feature-toggle-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-editor .feature-toggle-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.visual-editor .feature-toggle-card em {
  grid-column: 2;
  justify-self: start;
}

.visual-editor .preset-row {
  grid-template-columns: 1fr;
}

.visual-editor .preset-help-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-editor .tuner-instrument-settings,
.visual-editor .tuning-string-grid,
.visual-editor .sample-grid,
.visual-editor .count-grid {
  grid-template-columns: 1fr;
}

.visual-editor .tuner-detector-groups .grid-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.phone-preview {
  position: relative;
}

.phone-preview-sticky {
  height: calc(100vh - 148px);
  min-height: 520px;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
}

.phone-device {
  width: 320px;
  height: min(642px, calc(100vh - 228px));
  min-height: 480px;
}

.phone-preview .phone-hotspot {
  min-height: 0;
}

.phone-feature-state {
  position: absolute;
  z-index: 12;
  width: 43px;
  height: 18px;
  border-radius: 999px;
  background: rgba(23, 125, 91, 0.9) !important;
  color: #fff;
  font-size: 8px;
  font-weight: 850;
  line-height: 18px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.16) !important;
}

.phone-feature-state.is-off,
.phone-connection-chip.is-off,
.phone-sample-set-pill.is-off {
  background: rgba(99, 108, 122, 0.88) !important;
  color: #fff;
}

.feature-state-slot-0 { left: 12px; top: 328px; }
.feature-state-slot-1 { left: 158px; top: 328px; }
.feature-state-slot-2 { left: 12px; top: 423px; }
.feature-state-slot-3 { left: 158px; top: 423px; }

.phone-preview-connections,
.phone-sound-meta,
.phone-character-links,
.phone-tuner-settings-links,
.phone-reference-head,
.phone-tuning-row,
.phone-pitch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.phone-connection-chip,
.phone-sample-set-pill,
.phone-tuning-pill {
  min-height: 24px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  background: #eef4ff !important;
  color: #245fc5;
  font-size: 9px;
  font-weight: 800;
  line-height: 24px;
  box-shadow: none !important;
}

.phone-sound-card {
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(25, 32, 44, 0.06);
  border-radius: 11px;
}

.phone-sound-card-head,
.phone-character-card-head,
.phone-reference-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.phone-sound-name,
.phone-character-name {
  min-width: 0;
  color: #20242c;
  text-align: left;
}

.phone-sound-name strong,
.phone-character-name strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-sound-audios {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.phone-preview .phone-audio-dot,
.phone-preview .phone-audio-chip,
.phone-preview .phone-sound-button {
  min-height: 26px;
  padding: 0 8px;
}

.phone-character-list {
  gap: 9px;
}

.phone-character-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(25, 32, 44, 0.06);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
}

.phone-character-frames {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.phone-character-frame {
  position: relative;
  min-height: 54px !important;
  overflow: hidden;
  border-radius: 7px !important;
  background: #f3f5f8 !important;
}

.phone-character-frame img {
  width: 100%;
  height: 54px;
  object-fit: contain;
}

.phone-character-frame > span:last-child {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 24, 40, 0.76);
  color: #fff;
  font-size: 8px;
}

.phone-stage-hotspot {
  width: 100%;
  height: 100%;
  place-items: center;
}

.phone-stage-hotspot img {
  width: 190px;
  height: 210px;
}

.phone-instrument-pill:first-child {
  color: #858585;
  background: transparent;
  box-shadow: none;
}

.phone-instrument-pill:first-child img {
  filter: none;
}

.phone-instrument-pill.is-active {
  color: #fff;
  background: linear-gradient(135deg, #ff63a8 0%, #ee1d7f 100%);
  box-shadow: 0 4px 9px rgba(238, 29, 127, 0.26);
}

.phone-instrument-pill.is-active img {
  filter: brightness(0) invert(1);
}

.phone-sound-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.phone-sound-button img {
  width: 18px;
  height: 18px;
}

.phone-tuner-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 104px;
  min-height: 32px !important;
  padding: 0 8px !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  color: #777;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.phone-tuner-mode b {
  color: #ef2b8d;
}

.phone-reference-head {
  width: 100%;
}

.phone-reference-head > div {
  display: flex;
  gap: 4px;
}

.phone-sample-set-pill,
.phone-tuning-pill {
  min-height: 22px !important;
  padding: 0 7px !important;
  line-height: 22px;
}

.phone-sample-set-pill.is-active,
.phone-tuning-pill.is-active {
  background: #ef2b8d !important;
  color: #fff;
}

.phone-tuning-row {
  max-height: 55px;
  overflow-y: auto;
}

.phone-pitch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-height: 126px;
  overflow-y: auto;
}

.phone-pitch-key {
  display: grid;
  min-height: 42px !important;
  place-items: center;
  padding: 4px 2px !important;
  border-radius: 7px !important;
  background: #f6f8fb !important;
  color: #303642;
}

.phone-pitch-key.is-ready {
  border-color: rgba(20, 122, 92, 0.2);
  background: #effaf6 !important;
}

.phone-pitch-key.is-missing {
  border-color: rgba(164, 90, 10, 0.2);
  background: #fff7ea !important;
}

.phone-pitch-key b {
  font-size: 10px;
}

.phone-pitch-key small {
  color: #697180;
  font-size: 7px;
}

.growth-menu-matrix,
.growth-filter-card,
.point-adjustment-card,
.asset-reference-card {
  margin-top: 16px;
}

.growth-menu-matrix p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.growth-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.growth-filter-row input {
  min-width: min(420px, 100%);
  flex: 1;
}

.growth-ops-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.growth-ops-card {
  padding: 0;
  overflow: hidden;
}

.growth-ops-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.growth-ops-card > summary::-webkit-details-marker {
  display: none;
}

.growth-ops-card > summary span {
  display: grid;
  gap: 4px;
}

.growth-ops-card > summary small,
.growth-ops-card > summary em {
  color: var(--muted);
  font-style: normal;
}

.growth-ops-table-wrap {
  max-height: 430px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.growth-ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.growth-ops-table th,
.growth-ops-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.growth-ops-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8f9fb;
  color: #596070;
}

.asset-reference-result {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
}

.asset-reference-result.is-blocked {
  border: 1px solid #f3b4b4;
  background: #fff3f3;
  color: #9c2929;
}

.asset-reference-result.is-clear {
  border: 1px solid #a9ddca;
  background: #f1fbf7;
  color: #14664d;
}

.asset-reference-result ul {
  max-height: 180px;
  margin: 4px 0 0;
  overflow: auto;
  color: #555e6c;
}

.iwatch-editor-toolbar {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff8fb;
}

.iwatch-section-tabs,
.iwatch-copy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.iwatch-section-tabs button {
  border-color: #f2b3ce;
  background: #fff;
  color: #d93479;
}

.iwatch-section-tabs button.is-active {
  border-color: #ef3f88;
  background: #ef3f88;
  color: #fff;
  box-shadow: 0 8px 18px rgba(239, 63, 136, 0.2);
}

.iwatch-copy-actions {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.iwatch-reused-editor {
  display: grid;
  gap: 16px;
}

@media (max-width: 680px) {
  .visual-editor .feature-toggle-list {
    grid-template-columns: 1fr;
  }

  .iwatch-copy-actions {
    align-items: stretch;
  }

  .iwatch-copy-actions button {
    width: 100%;
  }
}
