:root {
  --bg: #f3f6f8;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e1ea;
  --line-strong: #b7c3d0;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --blue: #2563eb;
  --red: #c2410c;
  --shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

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

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

.mobile-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 14px 14px 28px;
}

.mobile-header {
  padding: 10px 2px 14px;
}

.mobile-header p,
.make-topbar p,
.effect-row-meta {
  margin: 0;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
}

.mobile-header h1,
.make-topbar h1 {
  margin: 2px 0 0;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.list-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -14px 10px;
  padding: 10px 14px 12px;
  background: rgba(243, 246, 248, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 225, 234, 0.75);
}

.search-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.search-control input,
.mobile-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  padding: 10px 12px;
}

.search-control input:focus,
.mobile-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 10px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  padding: 0 12px;
}

.category-pill.is-active {
  border-color: var(--teal);
  background: #ecfdf5;
  color: var(--teal-dark);
  font-weight: 700;
}

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

.effect-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 98px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  padding: 10px;
}

.effect-row:active {
  transform: scale(0.99);
}

.effect-row img {
  width: 76px;
  aspect-ratio: 1 / 1;
  border-radius: 7px;
  object-fit: cover;
  background: #e8eef5;
}

.effect-row-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.effect-row-copy strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.effect-row-copy span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.row-arrow {
  color: var(--line-strong);
  font-size: 1.8rem;
  line-height: 1;
}

.empty-state,
.form-status {
  min-height: 20px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-status.is-error {
  color: var(--red);
}

.form-status.is-success {
  color: var(--teal-dark);
}

.make-shell {
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.make-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: center;
  margin: 0 -14px 12px;
  padding: 10px 14px;
  background: rgba(243, 246, 248, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 225, 234, 0.75);
}

.make-topbar h1 {
  font-size: 1.25rem;
}

.back-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.effect-hero {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.effect-hero img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  background: #e8eef5;
}

.effect-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  padding: 12px;
}

.mobile-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.form-fields {
  display: grid;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.field-label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.mobile-upload {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 168px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.mobile-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.upload-placeholder {
  display: grid;
  gap: 4px;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.upload-placeholder strong {
  color: var(--teal-dark);
}

.upload-placeholder span {
  font-size: 0.82rem;
}

.upload-preview {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #e8eef5;
}

.result-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.result-card h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.result-links {
  display: flex;
  gap: 8px;
}

.result-links a {
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 700;
}

.result-card img {
  display: block;
  width: 100%;
  background: #e8eef5;
}

.sticky-actions {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 10px;
  width: min(100%, 560px);
  transform: translateX(-50%);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.65;
}

@media (min-width: 760px) {
  .mobile-shell {
    padding-top: 24px;
  }

  .mobile-header h1 {
    font-size: 2rem;
  }

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

  .effect-row {
    grid-template-columns: 96px minmax(0, 1fr) 18px;
    min-height: 118px;
  }

  .effect-row img {
    width: 96px;
  }

  .effect-hero img {
    max-height: 430px;
  }
}
