:root {
  color-scheme: light;
  --ink: #14202e;
  --muted: #6d7785;
  --line: #dbe1e8;
  --panel: #f7f9fb;
  --night: #071326;
  --night-soft: #0c1f39;
  --accent: #dd4f5e;
  --accent-strong: #c73447;
  --green: #24926b;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(221, 79, 94, 0.06), transparent 36%),
    linear-gradient(180deg, #eef3f6, #ffffff 46%, #eef4f0);
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(360px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 32px 0;
}

.phone {
  width: min(100%, 390px);
  min-height: 720px;
  padding: 34px 20px 26px;
  border: 8px solid #121820;
  border-radius: 30px;
  color: #fff;
  background: var(--night);
  box-shadow: 0 28px 70px rgba(18, 24, 32, 0.28);
}

.status-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #e8504f;
}

h1 {
  margin: 16px 0 24px;
  text-align: center;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 760;
  letter-spacing: 0;
}

.sections {
  display: grid;
  gap: 22px;
}

.section-title {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 650;
}

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

.quick-card {
  min-width: 0;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  color: #1f2730;
  background: #fff;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.quick-card:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(221, 79, 94, 0.36);
  outline-offset: 3px;
}

.quick-card.is-selected {
  border-color: #ff7280;
  box-shadow: 0 0 0 2px rgba(255, 114, 128, 0.28);
}

.quick-card[data-theme="pink"] {
  background: linear-gradient(180deg, #ffe2ea, #ffffff);
}

.quick-card[data-theme="rose"] {
  background: linear-gradient(180deg, #ffd8d8, #ffffff);
}

.quick-card[data-theme="orange"] {
  background: linear-gradient(180deg, #ffdfca, #ffffff);
}

.quick-card[data-theme="mint"] {
  background: linear-gradient(180deg, #d9f7df, #ffffff);
}

.quick-card[data-theme="sky"] {
  background: linear-gradient(180deg, #d8ecff, #ffffff);
}

.quick-card[data-theme="cream"] {
  background: linear-gradient(180deg, #fff0c8, #ffffff);
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.brand-icon[data-icon="dy"] {
  background: #111318;
}

.brand-icon[data-icon="xh"] {
  background: #e74247;
}

.brand-icon[data-icon="ks"] {
  background: #ff7a20;
}

.brand-icon[data-icon="sp"] {
  background: #19b36a;
}

.brand-icon[data-icon="bi"] {
  background: #2f9fd8;
}

.brand-icon[data-icon="bj"] {
  background: #386ce3;
}

.quick-card strong {
  max-width: 100%;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
}

.preset-panel {
  min-height: 620px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 60px rgba(31, 45, 61, 0.13);
  backdrop-filter: blur(18px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: 24px;
}

.icon-button:hover {
  background: var(--accent-strong);
}

.preset-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 9px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
}

textarea:focus {
  outline: 3px solid rgba(221, 79, 94, 0.18);
  border-color: rgba(221, 79, 94, 0.72);
}

.file-drop {
  min-height: 96px;
  border: 1px dashed #aab5c2;
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  color: var(--muted);
  background: #fbfcfd;
  text-align: center;
}

.file-drop input {
  display: none;
}

.file-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  font-size: 20px;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-pill {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #3e4b59;
  background: #fff;
  font-size: 13px;
}

.file-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.text-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 760;
}

.text-button:hover {
  border-color: #b8c3cf;
  background: #f7fafc;
}

.text-button.accent {
  border-color: transparent;
  color: #fff;
  background: var(--accent);
}

.text-button.accent:hover {
  background: var(--accent-strong);
}

.job-status {
  min-height: 48px;
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 4px solid var(--line);
  color: #3f4b59;
  background: var(--panel);
  line-height: 1.5;
}

.job-status.is-running {
  border-color: #3d82e9;
}

.job-status.is-done {
  border-color: var(--green);
}

.job-status.is-error {
  border-color: var(--accent);
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 22px 0;
  }

  .phone {
    min-height: auto;
  }

  .preset-panel {
    width: min(100%, 390px);
    min-height: auto;
  }
}

@media (max-width: 390px) {
  .app-shell {
    width: calc(100vw - 18px);
  }

  .phone,
  .preset-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .card-grid {
    gap: 8px;
  }
}
