:root {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #17151a;
  background: #f1eff8;
  font-synthesis: none;
  --ink: #17151a;
  --lavender: #ddd8ef;
  --panel: #edf5f6;
  --pink: #ef78ad;
  --yellow: #f2c84b;
  --blue: #69b9da;
  --muted: #686273;
  --header-height: 102px;
}
/* Shared by the existing Electron screen and the phone upload page. */
.generate-screen {
  min-height: calc(100dvh - var(--header-height));
  padding: 36px 38px 62px;
  background: #f1eff8;
}
.generate-panel { max-width: 1040px; margin: 32px auto 0; display: grid; gap: 22px; }
.generate-card {
  border: 2px solid var(--ink); border-radius: 8px; background: #fff;
  padding: 24px; box-shadow: 7px 7px 0 rgba(23, 21, 26, .12);
}
.generate-card h3 {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  font-size: clamp(22px, 3vw, 30px); line-height: 1.15;
}
.generate-card h3 span {
  display: inline-grid; place-items: center; flex: 0 0 42px;
  width: 42px; height: 42px; background: var(--yellow);
  border: 2px solid var(--ink); border-radius: 50%;
  font: 900 18px Bahnschrift, Arial, sans-serif;
}
.generate-qr {
  display: flex; align-items: center; gap: 25px; padding: 18px;
  background: #e8f4dc; border: 2px solid var(--ink);
}
.generate-qr img { width: 168px; height: 168px; flex: 0 0 168px; background: #fff; border: 6px solid #fff; }
.generate-qr p, .generate-qr-placeholder p { margin: 0; font-size: clamp(20px, 3vw, 28px); font-weight: 900; }
.generate-qr-placeholder, .generate-photo-ready {
  display: flex; align-items: center; gap: 18px; min-height: 138px;
  padding: 22px; background: #e8f4dc; border: 2px dashed var(--ink);
  font-size: 23px; font-weight: 900;
}
.generate-qr-placeholder svg, .generate-photo-ready svg { width: 56px; height: 56px; flex: 0 0 56px; }
.generate-photo-ready svg { color: #168458; }
.generate-hint { margin: 14px 0 0; color: var(--muted); font-weight: 800; }
.generate-style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.generate-style {
  min-height: 148px; display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; gap: 12px; padding: 18px; background: #f7f6fa;
  border: 2px solid var(--ink); border-radius: 6px; cursor: pointer; text-align: left;
}
.generate-style.selected { background: #fff2c3; box-shadow: 5px 5px 0 var(--pink); }
.generate-style:disabled { opacity: .5; cursor: wait; }
.generate-style span { font: 900 clamp(22px, 4vw, 36px) "Arial Black", Arial, sans-serif; line-height: 1; }
.generate-style strong { font-size: 21px; }
.style-realistic-comic span { color: #fff; background: var(--ink); padding: 7px 10px; transform: skew(-7deg); }
.generate-style small { font-size: 14px; line-height: 1.4; color: var(--muted); }
.generate-finish { display: flex; flex-direction: column; align-items: stretch; }
.generate-finish .primary-button { min-height: 76px; font-size: 22px; }
.generate-result { display: block; max-width: 100%; max-height: 320px; object-fit: contain; margin: 0 auto 20px; border: 2px solid var(--ink); background-color: #fff; background-image: conic-gradient(#e6e4eb 25%, transparent 0 50%, #e6e4eb 0 75%, transparent 0); background-size: 20px 20px; }
.generate-message { color: #b72f3d; font-weight: 800; }
.generate-skip {
  align-self: center; display: inline-flex; align-items: center; gap: 5px; min-height: 54px;
  padding: 10px; border: 0; background: transparent; font-weight: 900; text-decoration: underline; cursor: pointer;
}
.generate-upload-link { color: var(--ink); font-weight: 800; overflow-wrap: anywhere; font-size: 13px; }
.generate-secondary-action { margin-top: 16px; }
.pod-mobile *, .pod-mobile *::before, .pod-mobile *::after { box-sizing: border-box; }
body.pod-mobile { margin: 0; min-width: 320px; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
.pod-mobile button, .pod-mobile input { font: inherit; color: inherit; }
.pod-mobile [hidden] { display: none !important; }
.pod-mobile .app-header {
  height: var(--header-height); padding: 18px 22px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; background: rgba(237,245,246,.96);
  border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 10;
}
.pod-mobile .brand-lockup { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.pod-mobile .brand-logo { display: block; width: 150px; max-height: 66px; object-fit: contain; }
.pod-mobile .brand-lockup span { font: 900 10px Bahnschrift, Arial, sans-serif; }
.pod-mobile .section-heading { text-align: center; margin-bottom: 34px; }
.pod-mobile .section-heading p { margin: 0; color: #78566d; font: 900 13px Bahnschrift, Arial, sans-serif; }
.pod-mobile .section-heading h2 { margin: 9px 0 0; font: 900 31px/1.2 "Arial Black", "Microsoft YaHei", sans-serif; }
.pod-mobile .primary-button, .pod-mobile .secondary-button {
  min-height: 58px; border: 2px solid var(--ink); border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; font-weight: 900; cursor: pointer;
}
.pod-mobile .primary-button { background: var(--ink); color: #fff; box-shadow: 5px 5px 0 var(--pink); }
.pod-mobile .secondary-button { background: #fff; color: var(--ink); }
.pod-mobile button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.pod-mobile button:focus-visible, .pod-mobile label:focus-within { outline: 3px solid #167b9b; outline-offset: 3px; }
.pod-mobile .photo-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pod-mobile .photo-choices label { text-align: center; font-size: 16px; padding: 12px; }
.pod-mobile .photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pod-mobile .phone-photo { width: 100%; max-height: 340px; object-fit: contain; border: 2px solid var(--ink); margin: 18px 0; background: #f7f6fa; }
.pod-mobile .phone-action { width: 100%; margin-top: 16px; }
.pod-mobile .generate-photo-ready { min-height: 70px; font-size: 16px; padding: 16px; margin-top: 18px; }
.pod-mobile .photo-note { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.pod-mobile .phone-status { margin: 18px 0 0; min-height: 24px; font-weight: 800; line-height: 1.5; }
.pod-mobile .phone-status[data-error="true"] { color: #b72f3d; }
.pod-mobile .phone-message { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.pod-mobile .generate-result { max-height: 480px; margin: 0 auto 16px; width: 100%; }
@media (max-width: 640px) {
  .generate-screen { padding: 25px 18px 44px; }
  .generate-card { padding: 18px; }
  .generate-qr { flex-direction: column; text-align: center; }
  .generate-style { min-height: 128px; padding: 12px; }
  .generate-style strong { font-size: 17px; }
  .pod-mobile { --header-height: 82px; }
  .pod-mobile .app-header { padding: 12px 14px; }
  .pod-mobile .brand-logo { width: 132px; max-height: 52px; }
  .pod-mobile .section-heading h2 { font-size: 27px; }
  .pod-mobile .generate-card h3 { font-size: 22px; }
  .pod-mobile .generate-card h3 span { flex-basis: 36px; width: 36px; height: 36px; font-size: 16px; }
  .pod-mobile .generate-style span { font-size: 25px; }
  .pod-mobile .generate-finish .primary-button { min-height: 64px; font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .pod-mobile *, .pod-mobile *::before, .pod-mobile *::after { scroll-behavior: auto !important; transition: none !important; }
}
