:root {
  --paper: #f1ece3;
  --paper-deep: #e5ddcf;
  --paper-soft: #f8f4ec;
  --card: #fffdf8;
  --ink: #181713;
  --text: #181713;
  --muted: #746e65;
  --muted-light: #9a9389;
  --line: rgba(24, 23, 19, 0.13);
  --line-strong: rgba(24, 23, 19, 0.23);
  --red: #d34833;
  --red-dark: #9f3022;
  --red-soft: #f5ded7;
  --green: #28765b;
  --amber: #9b641a;
  --shadow-sm: 0 8px 24px rgba(48, 36, 22, 0.07);
  --shadow: 0 24px 70px rgba(44, 32, 17, 0.13);
  --radius: 28px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--paper);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  touch-action: pan-y;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at 8% 2%, rgba(211, 72, 51, 0.10), transparent 28rem),
    radial-gradient(circle at 94% 28%, rgba(24, 23, 19, 0.055), transparent 30rem),
    linear-gradient(145deg, #f7f3eb 0%, var(--paper) 54%, #ece5da 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(24, 23, 19, 0.018) 50%, transparent 50.1%),
    linear-gradient(0deg, transparent 49.9%, rgba(24, 23, 19, 0.014) 50%, transparent 50.1%);
  background-size: 88px 88px;
}

button, input, textarea, select { font: inherit; touch-action: manipulation; }
button { color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.55; }
img { max-width: 100%; }
.hidden { display: none !important; }

::selection { background: rgba(211, 72, 51, 0.2); color: var(--ink); }

:focus-visible {
  outline: 3px solid rgba(211, 72, 51, 0.34);
  outline-offset: 3px;
}

.paper-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  z-index: 21;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.065'/%3E%3C/svg%3E");
}

.eyebrow {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.24em;
  color: var(--red);
  text-transform: uppercase;
}

/* Login */
.auth-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(450px, 1.08fr) minmax(400px, 0.92fr);
  align-items: stretch;
  gap: 24px;
  padding: 24px;
}

.auth-art {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 75% 18%, rgba(211, 72, 51, 0.32), transparent 19rem),
    linear-gradient(145deg, #25221d 0%, #171613 64%, #0f0f0e 100%);
  box-shadow: 0 32px 90px rgba(28, 21, 13, 0.22);
  isolation: isolate;
}

.auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  background:
    repeating-linear-gradient(112deg, transparent 0 21px, rgba(255, 255, 255, 0.025) 22px 23px),
    radial-gradient(circle at 12% 88%, rgba(244, 238, 225, 0.12), transparent 18rem);
}

.auth-art-top {
  position: absolute;
  z-index: 5;
  top: 34px;
  left: 38px;
  right: 38px;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 250, 241, 0.62);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.auth-scene {
  position: absolute;
  inset: 82px 6% 185px 6%;
  overflow: hidden;
}

.auth-panel {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 5px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
}

.auth-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 44%, rgba(211, 72, 51, 0.5) 44.5% 57%, transparent 57.5%),
    repeating-linear-gradient(118deg, transparent 0 18px, rgba(26, 23, 19, 0.07) 19px 20px);
  mix-blend-mode: multiply;
}

.auth-panel-one {
  top: 0;
  left: 2%;
  width: 61%;
  height: 50%;
  transform: rotate(-4.5deg);
  background: #e8dfcf;
}

.auth-panel-two {
  top: 19%;
  right: 1%;
  width: 47%;
  height: 48%;
  transform: rotate(6deg);
  background: #d8d1c3;
}

.auth-panel-three {
  left: 16%;
  bottom: 0;
  width: 61%;
  height: 35%;
  transform: rotate(-1.5deg);
  background: #bfc4bb;
}

.panel-index {
  position: absolute;
  z-index: 3;
  top: 11px;
  left: 13px;
  color: rgba(24, 23, 19, 0.6);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.panel-moon {
  position: absolute;
  top: 18%;
  right: 13%;
  width: 24%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 252, 243, 0.82);
  box-shadow: 0 0 34px rgba(255, 252, 243, 0.34);
}

.panel-person {
  position: absolute;
  display: block;
  width: 30%;
  height: 54%;
  border-radius: 48% 48% 10% 10%;
  background: #28251f;
}

.panel-person::before {
  content: "";
  position: absolute;
  top: -22%;
  left: 25%;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: inherit;
}

.panel-person-one { right: 13%; bottom: -8%; transform: rotate(3deg); }
.panel-person-two { left: 29%; bottom: -12%; background: #37332c; transform: rotate(-4deg); }

.panel-lines {
  position: absolute;
  inset: 24% 10% 20% 12%;
  opacity: 0.46;
  background: repeating-linear-gradient(0deg, transparent 0 12px, #6c665b 13px 14px);
  transform: rotate(-4deg);
}

.panel-horizon {
  position: absolute;
  inset: 55% -10% auto;
  height: 42%;
  background: #5c665f;
  transform: rotate(-2deg);
}

.bubble {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 1.5px solid #292620;
  border-radius: 48% 52% 48% 52%;
  background: #fffdf6;
  color: #292620;
  font-family: var(--serif);
  font-size: clamp(10px, 1.2vw, 15px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 19%;
  width: 12px;
  height: 12px;
  border-right: 1.5px solid #292620;
  border-bottom: 1.5px solid #292620;
  background: #fffdf6;
  transform: rotate(35deg);
}

.bubble-one { top: 10%; left: 7%; width: 39%; height: 23%; transform: rotate(-5deg); }
.bubble-two { top: 8%; right: 5%; width: 47%; height: 25%; transform: rotate(5deg); }

.auth-caption {
  position: absolute;
  z-index: 4;
  left: 7%;
  bottom: 11%;
  color: #fffaf1;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.06em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.42);
}

.auth-caption span { color: #f27660; }

.auth-meta {
  position: absolute;
  z-index: 4;
  left: 7.5%;
  bottom: 6%;
  display: flex;
  gap: 8px;
  color: rgba(255, 250, 241, 0.52);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.auth-meta span + span::before { content: "·"; margin-right: 8px; color: var(--red); }

.auth-seal {
  position: absolute;
  z-index: 6;
  right: 7%;
  bottom: 7%;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 3px solid #f06a52;
  border-radius: 17px;
  color: #f06a52;
  font-family: var(--serif);
  font-size: 45px;
  font-weight: 900;
  transform: rotate(7deg);
  box-shadow: inset 0 0 0 4px rgba(240, 106, 82, 0.08);
}

.auth-card {
  align-self: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 72px);
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 54px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.auth-brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(159, 48, 34, 0.36);
  border-radius: 9px;
  color: var(--red);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
  transform: rotate(-4deg);
}

.auth-card h1 {
  margin: 10px 0 14px;
  font-family: var(--serif);
  font-size: clamp(48px, 5.4vw, 76px);
  letter-spacing: -0.075em;
  line-height: 1;
}

.auth-intro {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.auth-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.auth-flow span { display: inline-flex; align-items: center; gap: 5px; }
.auth-flow b { color: var(--red); font-size: 9px; font-variant-numeric: tabular-nums; }
.auth-flow i { flex: 1; max-width: 38px; height: 1px; background: var(--line); }

.auth-form { margin-top: 26px; }
.auth-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 750; line-height: 1.4; }
.auth-form input + label { margin-top: 16px; }
.input-row { display: flex; gap: 10px; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input, select { min-height: 52px; padding: 0 16px; }
textarea { padding: 17px 18px; resize: vertical; line-height: 1.82; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='m5 7 4 4 4-4' fill='none' stroke='%23746e65' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }
input:focus, textarea:focus, select:focus {
  border-color: rgba(211, 72, 51, 0.62);
  background: var(--card);
  box-shadow: 0 0 0 4px rgba(211, 72, 51, 0.08);
}

input::placeholder, textarea::placeholder { color: #a59d92; }

.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.field-hint { min-height: 18px; margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--red-dark); font-size: 12px; line-height: 1.55; }
.auth-terms { margin: 24px 0 0; color: var(--muted-light); font-size: 10px; line-height: 1.7; }
.auth-buttons { display: flex; gap: 10px; margin-top: 22px; }
.auth-buttons .button { flex: 1; }

/* Buttons */
.button {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:active { transform: translateY(1px) scale(0.992); }
.button-ink { background: var(--ink); color: #fff; box-shadow: 0 12px 28px rgba(24, 23, 19, 0.18); }
.button-red {
  background: linear-gradient(135deg, #d94d36, #b73827);
  color: #fff;
  box-shadow: 0 13px 30px rgba(179, 54, 35, 0.25);
}
.button-red:hover { background: linear-gradient(135deg, #c9412d, var(--red-dark)); box-shadow: 0 16px 36px rgba(159, 48, 34, 0.29); }
.button-ghost { border: 1px solid var(--line); background: rgba(255, 253, 248, 0.62); color: var(--ink); }
.button-ghost:hover { border-color: var(--line-strong); background: var(--card); }
.button-outline { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.button-small { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 11px; }
.button-large { min-height: 56px; padding: 0 24px; justify-content: space-between; }
.button-arrow { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.16); font-size: 16px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--red-dark); font-size: 11px; font-weight: 800; }
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
  font-size: 20px;
}

/* App chrome */
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 90px;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 24;
  width: min(1220px, calc(100% - 48px));
  min-height: 68px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid rgba(24, 23, 19, 0.09);
  background: rgba(241, 236, 227, 0.83);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-seal {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--red);
  color: #fff8ef;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(159, 48, 34, 0.19);
  transform: rotate(-3deg);
}
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-family: var(--serif); font-size: 17px; letter-spacing: -0.03em; }
.brand-copy small { color: var(--muted-light); font-size: 7px; font-weight: 800; letter-spacing: 0.18em; }

.desktop-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(24, 23, 19, 0.08);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.64);
}
.tab-button {
  min-height: 34px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  transition: color 160ms ease, background 160ms ease;
}
.tab-button.active { background: var(--ink); color: #fff; box-shadow: 0 5px 14px rgba(24, 23, 19, 0.14); }
.topbar-note { justify-self: end; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.07em; }
.topbar-note span { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(211, 72, 51, 0.1); }

.main-content { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.view-section { padding: 48px 0 34px; }

/* Create */
.hero-copy { max-width: 830px; margin-bottom: 30px; }
.hero-topline { display: flex; align-items: center; gap: 15px; }
.hero-topline::after { content: ""; width: 64px; height: 1px; background: rgba(211, 72, 51, 0.32); }
.hero-index { color: var(--muted-light); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; }
.hero-copy h1, .library-heading h1, .profile-heading h1 {
  margin: 9px 0 13px;
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 66px);
  font-weight: 900;
  line-height: 1.07;
  letter-spacing: -0.065em;
}
.hero-copy > p { max-width: 690px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }

.story-flow {
  width: min(570px, 100%);
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 24px;
  color: var(--muted);
}
.story-flow span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.story-flow b { color: var(--red); font-size: 9px; font-weight: 850; letter-spacing: 0.04em; }
.story-flow em { font-size: 10px; font-style: normal; font-weight: 700; }
.story-flow i { flex: 1; height: 1px; min-width: 18px; background: linear-gradient(90deg, rgba(24, 23, 19, 0.18), rgba(24, 23, 19, 0.04)); }

.create-card {
  position: relative;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(24, 23, 19, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent 48%),
    rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(13px);
}
.create-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--red) 18%, var(--red) 82%, transparent);
}
.create-card::after {
  content: "STORY";
  position: absolute;
  top: 20px;
  right: 30px;
  color: rgba(24, 23, 19, 0.025);
  font-family: var(--serif);
  font-size: 96px;
  font-weight: 900;
  letter-spacing: -0.08em;
  pointer-events: none;
}
.form-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(24, 23, 19, 0.08);
}
.form-overline { display: block; margin-bottom: 5px; color: var(--red); font-size: 8px; font-weight: 850; letter-spacing: 0.22em; }
.form-heading h2 { margin: 0; font-family: var(--serif); font-size: 25px; letter-spacing: -0.04em; }
.form-note { color: var(--muted-light); font-size: 10px; }

.field-group { position: relative; z-index: 1; margin-bottom: 23px; }
.field-group label, .field-group legend { display: block; margin-bottom: 9px; color: #3e3b36; font-size: 12px; font-weight: 750; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-title input { min-height: 56px; font-size: 16px; }
.label-line { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.label-line label { margin-bottom: 9px; }
.char-count {
  margin-bottom: 9px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(24, 23, 19, 0.045);
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
#novelText { min-height: 310px; border-radius: 17px; background: rgba(255, 253, 248, 0.9); }
.novel-field {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(24, 23, 19, 0.08);
  border-radius: 20px;
  background: rgba(239, 233, 222, 0.5);
}
.novel-field textarea { margin-bottom: 0; }
.novel-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.novel-badge { flex: 0 0 auto; margin-top: 9px; padding: 4px 8px; border: 1px solid rgba(211, 72, 51, 0.16); border-radius: 999px; color: var(--red-dark); font-size: 9px; font-weight: 750; }
.create-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 5px; }
.create-footer .form-error { flex: 1; margin: 0; }
.create-footer .button-large { min-width: 225px; }

.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 26px; letter-spacing: -0.04em; }
.recent-strip { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(24, 23, 19, 0.08); }
.trial-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 4px;
  padding: 13px 16px;
  border: 1px solid rgba(211, 72, 51, 0.17);
  border-radius: 15px;
  background: linear-gradient(120deg, rgba(211, 72, 51, 0.07), rgba(255, 253, 248, 0.72));
  color: var(--muted);
}
.trial-notice-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 800;
}
.trial-notice p { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 10px; line-height: 1.55; }
.trial-notice strong { flex: 0 0 auto; color: var(--ink); font-size: 11px; }
.recent-jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }

/* Library and jobs */
.library-heading { align-items: center; }
.profile-heading { align-items: center; }
.profile-heading-mark { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 0.16em; }
.library-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.library-hint span { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.jobs-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.job-card {
  --job-cover-half-height: 58px;
  position: relative;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  padding: 19px 20px 18px 122px;
  overflow: hidden;
  border: 1px solid rgba(24, 23, 19, 0.1);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 6px 22px rgba(48, 36, 22, 0.035);
  text-align: left;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}
.job-card:hover { transform: translateY(-3px); border-color: rgba(24, 23, 19, 0.17); box-shadow: 0 18px 38px rgba(48, 36, 22, 0.1); }
.job-card::before {
  content: "";
  position: absolute;
  top: calc(50% - var(--job-cover-half-height));
  left: 17px;
  width: 86px;
  height: 116px;
  border-radius: 6px;
  background:
    linear-gradient(151deg, transparent 0 49%, rgba(246, 237, 224, 0.9) 50% 53%, transparent 54%),
    radial-gradient(circle at 72% 25%, rgba(255, 248, 235, 0.76) 0 11px, transparent 12px),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 255, 255, 0.12) 19px 20px),
    linear-gradient(145deg, #34302a, #151411);
  box-shadow: 0 10px 22px rgba(24, 23, 19, 0.2);
}
.job-card:nth-child(3n+2)::before {
  background:
    linear-gradient(153deg, transparent 0 55%, rgba(211, 72, 51, 0.72) 56% 61%, transparent 62%),
    radial-gradient(circle at 32% 28%, rgba(246, 235, 218, 0.7) 0 12px, transparent 13px),
    linear-gradient(145deg, #75766c, #30332e);
}
.job-card:nth-child(3n+3)::before {
  background:
    radial-gradient(circle at 73% 30%, rgba(24, 23, 19, 0.55) 0 20px, transparent 21px),
    linear-gradient(160deg, transparent 0 53%, rgba(211, 72, 51, 0.68) 54% 59%, transparent 60%),
    linear-gradient(145deg, #d8cfbe, #8d8577);
}
.job-card::after {
  content: attr(data-index);
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 19px;
  padding: 0 6px;
  border-radius: 19px 0 19px 0;
  background: rgba(20, 18, 15, 0.9);
  color: rgba(255, 252, 245, 0.96);
  font-family: var(--serif);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
}
.job-card-content { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.job-card-top { position: absolute; z-index: 2; top: calc(50% - var(--job-cover-half-height)); left: 122px; right: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 9px; }
.job-card h3 { position: relative; z-index: 1; margin: 22px 0 7px; overflow: hidden; font-family: var(--serif); font-size: 23px; line-height: 1.16; letter-spacing: -0.04em; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { position: relative; z-index: 1; color: var(--muted); font-size: 10px; line-height: 1.55; }
.job-card-top .job-meta { flex: 1; padding-top: 4px; }
.job-card-footer { position: absolute; z-index: 2; right: 20px; bottom: calc(50% - var(--job-cover-half-height)); display: flex; justify-content: flex-end; margin: 0; padding: 0; }
.job-delete {
  padding: 5px 11px;
  border: 1px solid rgba(24, 23, 19, 0.11);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
}
.job-delete:hover { color: var(--red-dark); border-color: rgba(159, 48, 34, 0.32); }
.job-delete:disabled { opacity: .5; cursor: default; }
.job-error { position: relative; z-index: 1; margin: 10px 0 0; color: var(--red-dark); font-size: 10px; line-height: 1.5; }
.status-pill { padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 850; letter-spacing: 0.03em; white-space: nowrap; }
.status-queued { background: #eee5d5; color: #74562b; }
.status-draft { background: #e1e8f2; color: #355274; }
.status-running { background: #dfece6; color: var(--green); }
.status-succeeded { background: #dfebe3; color: var(--green); }
.status-partial { background: #f4e6d4; color: #824b19; }
.status-paused { background: #f0e5d0; color: #79571f; }
.status-failed { background: #f4ded9; color: var(--red-dark); }
.status-expired { background: #e9e6e0; color: #6d685f; }
.job-retention { position: relative; z-index: 1; margin: 9px 0 0; color: var(--muted-light); font-size: 9px; }
.progress-track { position: relative; z-index: 1; height: 4px; margin-top: 16px; overflow: hidden; border-radius: 99px; background: rgba(24, 23, 19, 0.075); }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--red), #e67b5f); transition: width 600ms ease; }
.job-progress-line { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 9px; }

.empty-state { max-width: 560px; margin: 58px auto 84px; text-align: center; }
.empty-art { position: relative; width: 230px; height: 145px; margin: 0 auto 27px; }
.empty-frame {
  position: absolute;
  width: 89px;
  height: 119px;
  overflow: hidden;
  border: 1px solid rgba(24, 23, 19, 0.16);
  border-radius: 7px;
  background: #fffdf8;
  box-shadow: 0 12px 28px rgba(48, 36, 22, 0.11);
}
.empty-frame::before {
  content: "";
  position: absolute;
  inset: 11px 9px 34px;
  background:
    linear-gradient(145deg, transparent 0 58%, rgba(211, 72, 51, 0.58) 59% 66%, transparent 67%),
    repeating-linear-gradient(0deg, transparent 0 14px, rgba(24, 23, 19, 0.1) 15px 16px),
    #e5ddd0;
}
.empty-frame i { position: absolute; left: 12px; bottom: 11px; width: 54px; height: 3px; border-radius: 9px; background: rgba(24, 23, 19, 0.11); }
.empty-frame b { position: absolute; right: 12px; top: 12px; color: rgba(24, 23, 19, 0.26); font-size: 10px; letter-spacing: 0.08em; }
.empty-frame-one { left: 11px; top: 16px; transform: rotate(-8deg); }
.empty-frame-two { left: 72px; top: 3px; z-index: 2; transform: rotate(1deg); }
.empty-frame-three { right: 7px; top: 20px; transform: rotate(8deg); }
.empty-mark {
  position: absolute;
  z-index: 4;
  right: 17px;
  bottom: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid #f0765e;
  border-radius: 11px;
  background: rgba(241, 236, 227, 0.9);
  color: #d34833;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 900;
  transform: rotate(7deg);
  box-shadow: 0 8px 18px rgba(159, 48, 34, 0.13);
}
.empty-state h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 28px; letter-spacing: -0.04em; }
.empty-state p { margin: 0 0 23px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-state .button { min-width: 134px; }

/* Job detail sheet */
.job-sheet { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(19, 17, 14, 0.55); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.sheet-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(900px, calc(100% - 36px));
  max-height: min(900px, calc(100dvh - 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  background: #f4efe6;
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.34);
}
.sheet-handle { display: none; }
.sheet-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 253, 248, 0.52); }
.sheet-header h2 { margin: 5px 0 0; font-family: var(--serif); font-size: 30px; line-height: 1.13; letter-spacing: -0.045em; }
.sheet-close { flex: 0 0 auto; }
.sheet-body { overflow-y: auto; padding: 24px 28px 40px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(24, 23, 19, 0.2) transparent; }
.sheet-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.summary-cell { padding: 14px; border: 1px solid rgba(24, 23, 19, 0.09); border-radius: 15px; background: rgba(255, 253, 248, 0.72); box-shadow: var(--shadow-sm); }
.summary-cell span { display: block; color: var(--muted); font-size: 9px; letter-spacing: 0.04em; }
.summary-cell strong { display: block; margin-top: 5px; font-size: 14px; }
.sheet-stage { margin: 0 0 18px; padding: 13px 15px; border-left: 3px solid var(--red); border-radius: 0 13px 13px 0; background: rgba(255, 253, 248, 0.7); color: var(--muted); font-size: 11px; line-height: 1.6; }
.sheet-error { margin: 0 0 18px; padding: 13px 15px; border-radius: 14px; background: #f4dfda; color: var(--red-dark); font-size: 11px; line-height: 1.6; }
.sheet-warning { display: grid; gap: 4px; margin: 0 0 18px; padding: 14px 15px; border: 1px solid rgba(155, 100, 26, 0.14); border-radius: 14px; background: #f5eadc; color: #784c1d; font-size: 11px; line-height: 1.6; }
.sheet-warning strong { color: #60370e; font-size: 12px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.sheet-actions .button { flex: 0 1 auto; }
.panel-viewer { display: flex; flex-direction: column; gap: 13px; }
.panel-viewer img { display: block; width: 100%; height: auto; border-radius: 13px; background: var(--paper-deep); box-shadow: 0 12px 34px rgba(48, 36, 22, 0.14); }
.panel-image-link { display: block; overflow: hidden; border-radius: 13px; cursor: zoom-in; }
.panel-loading { padding: 48px 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); font-size: 12px; text-align: center; }

.draft-notice { display: grid; gap: 4px; margin-bottom: 18px; padding: 15px 17px; border: 1px solid rgba(211, 72, 51, 0.13); border-radius: 15px; background: #fff8ea; font-size: 11px; line-height: 1.55; }
.draft-notice strong { font-size: 12px; }
.draft-notice span { color: var(--muted); }
.plan-section { margin: 0 0 22px; }
.plan-section h3 { margin: 0 0 11px; font-family: var(--serif); font-size: 18px; letter-spacing: -0.03em; }
.plan-loading { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 12px; }
.plan-heading-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.plan-heading-row h3 { margin: 0; }
.plan-card { display: grid; gap: 9px; margin-bottom: 11px; padding: 14px; border: 1px solid rgba(24, 23, 19, 0.085); border-radius: 15px; background: rgba(255, 253, 248, 0.8); box-shadow: 0 5px 15px rgba(48, 36, 22, 0.03); }
.plan-card-title { font-size: 12px; font-weight: 750; }
.plan-field { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.plan-field input, .plan-field textarea { width: 100%; min-height: 38px; padding: 8px 10px; border-color: rgba(24, 23, 19, 0.12); border-radius: 10px; background: #fff; color: var(--ink); font-size: 12px; }
.plan-field textarea { line-height: 1.62; resize: none; }
.plan-save { justify-self: end; }
.plan-buttons { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ref-preview { width: 100%; max-height: 230px; object-fit: contain; border-radius: 11px; background: #ece6db; }
.source-text { max-height: 112px; margin: 0; overflow: auto; padding: 10px; border-radius: 10px; background: #f3ede3; color: #5e5446; white-space: pre-wrap; font-size: 10px; line-height: 1.55; }
.dialogue-list { display: grid; gap: 4px; color: #5e5446; font-size: 10px; }
.panel-result { display: grid; gap: 7px; }
.panel-result-missing { padding-top: 1px; }
.panel-missing { min-height: 168px; display: grid; place-content: center; gap: 7px; padding: 22px; border: 1px dashed rgba(139, 82, 32, 0.35); border-radius: 13px; background: rgba(246, 234, 220, 0.62); color: #794b20; text-align: center; }
.panel-missing strong { font-size: 13px; }
.panel-missing span { max-width: 620px; color: #956d49; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.panel-regen-button { min-height: 30px; padding: 5px 12px; border: 1px solid rgba(159, 48, 34, 0.25); border-radius: 999px; background: rgba(255, 255, 255, 0.76); color: var(--red-dark); font-size: 10px; font-weight: 750; cursor: pointer; }
.panel-regen-button:disabled { opacity: .58; cursor: default; }
.panel-edit-card { max-width: 500px; }
.panel-edit-label { margin-top: 2px; color: var(--muted); font-size: 10px; }
.panel-edit-source { max-height: 150px; }
.panel-edit-card .plan-input { width: 100%; min-height: 112px; padding: 10px; border-color: rgba(24, 23, 19, 0.12); border-radius: 11px; background: #fff; color: var(--ink); font-family: inherit; font-size: 12px; line-height: 1.65; resize: vertical; }
.confirm-bar { position: sticky; bottom: 0; z-index: 3; display: grid; gap: 8px; padding: 14px 0 4px; background: linear-gradient(180deg, rgba(244, 239, 230, 0), #f4efe6 36%); }
.confirm-bar .button { width: 100%; }

/* Full screen image viewer */
.image-viewer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); background: rgba(10, 9, 8, 0.97); }
.image-viewer-backdrop { position: absolute; inset: 0; }
.image-viewer img { position: relative; display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 7px; box-shadow: 0 24px 76px rgba(0, 0, 0, 0.58); }
.image-viewer-close { position: absolute; z-index: 1; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: inline-flex; align-items: center; gap: 8px; min-height: 43px; padding: 0 13px 0 15px; border: 1px solid rgba(255, 255, 255, 0.23); border-radius: 999px; background: rgba(25, 23, 20, 0.84); color: #fff; box-shadow: 0 9px 30px rgba(0, 0, 0, 0.36); font-size: 11px; font-weight: 750; backdrop-filter: blur(13px); }
.image-viewer-close b { font-size: 23px; font-weight: 300; line-height: 1; }
body.image-viewer-open { overflow: hidden; }

/* Confirm dialogs */
.confirm-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(37, 29, 19, 0.48); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.confirm-card { position: relative; width: 100%; max-width: 360px; display: grid; gap: 11px; padding: 25px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 22px; background: #f7f2e9; box-shadow: 0 26px 75px rgba(30, 20, 8, 0.3); }
.confirm-card::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
.confirm-card h3 { margin: 0; font-family: var(--serif); font-size: 21px; letter-spacing: -0.035em; }
.confirm-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(24, 23, 19, 0.075); font-size: 12px; }
.confirm-row span { flex-shrink: 0; color: var(--muted); }
.confirm-row strong { color: var(--ink); font-weight: 700; text-align: right; word-break: break-all; }
.confirm-tip, .confirm-message { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.confirm-buttons { display: flex; gap: 9px; margin-top: 5px; }
.confirm-buttons .button { flex: 1; }

/* Profile */
.profile-card { overflow: hidden; border: 1px solid rgba(24, 23, 19, 0.1); border-radius: 24px; background: rgba(255, 253, 248, 0.8); box-shadow: var(--shadow); }
.profile-head { display: flex; align-items: center; gap: 13px; padding: 23px 24px; border-bottom: 1px solid rgba(24, 23, 19, 0.075); }
.profile-mark { width: 50px; height: 50px; display: grid; place-items: center; flex-shrink: 0; border-radius: 15px; background: linear-gradient(145deg, #d44a34, #9f3022); color: #f8f1e7; font-family: var(--serif); font-size: 22px; font-weight: 900; box-shadow: 0 8px 18px rgba(159, 48, 34, 0.2); transform: rotate(-3deg); }
.profile-head-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.profile-head-text strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.profile-head-text small { color: var(--muted); font-size: 10px; }
.profile-status { flex-shrink: 0; padding: 5px 8px; border: 1px solid rgba(211, 72, 51, 0.17); border-radius: 999px; color: var(--red-dark); font-size: 8px; font-weight: 800; }
.profile-balance { position: relative; margin: 20px 24px; padding: 22px; overflow: hidden; border-radius: 18px; background: linear-gradient(145deg, #24221e, #12110f); color: #fffaf2; box-shadow: 0 14px 30px rgba(24, 23, 19, 0.17); }
.profile-balance::after { content: "算力"; position: absolute; right: 16px; bottom: -21px; color: rgba(255, 255, 255, 0.035); font-family: var(--serif); font-size: 82px; font-weight: 900; }
.profile-balance div { position: relative; z-index: 1; display: grid; gap: 6px; }
.profile-balance span { color: rgba(255, 250, 242, 0.58); font-size: 9px; letter-spacing: 0.12em; }
.profile-balance strong { font-family: var(--serif); font-size: 38px; letter-spacing: -0.04em; }
.profile-balance small { position: relative; z-index: 1; display: block; margin-top: 18px; color: rgba(255, 250, 242, 0.43); font-size: 9px; }
.profile-rows { display: grid; margin: 0 24px; border-top: 1px solid rgba(24, 23, 19, 0.075); }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid rgba(24, 23, 19, 0.075); font-size: 12px; }
.profile-row span { flex-shrink: 0; color: var(--muted); }
.profile-row strong { color: var(--ink); font-weight: 700; text-align: right; }
.profile-card > .button { margin: 20px 24px 24px; width: calc(100% - 48px); justify-content: space-between; }
.profile-footnote { margin: 15px 4px 0; color: var(--muted-light); font-size: 9px; line-height: 1.6; }

/* Mobile navigation */
.bottom-nav { display: none; }
.toast { position: fixed; z-index: 90; top: 50%; left: 50%; max-width: min(430px, calc(100% - 30px)); padding: 12px 18px; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; background: rgba(24, 23, 19, 0.94); color: #fff; box-shadow: 0 15px 44px rgba(0, 0, 0, 0.26); font-size: 11px; line-height: 1.5; text-align: center; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

@media (min-width: 1101px) {
  .profile-card { max-width: 760px; }
}

@media (max-width: 960px) {
  .auth-view { grid-template-columns: minmax(380px, 0.95fr) minmax(370px, 1.05fr); gap: 16px; padding: 16px; }
  .auth-art { min-height: 650px; }
  .auth-card { padding: 34px; }
  .auth-brand-row { margin-bottom: 38px; }
  .topbar-note { display: none; }
  .app-topbar { grid-template-columns: 1fr auto; }
}

@media (max-width: 860px) {
  body { background: linear-gradient(160deg, #f7f3eb 0%, #f0ebe2 58%, #e9e1d5 100%); }
  .auth-view { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
  .auth-art { display: block; flex: 0 0 218px; min-height: 218px; height: 218px; border-radius: 26px; }
  .auth-art-top { top: 18px; left: 21px; right: 21px; font-size: 7px; }
  .auth-scene { inset: 44px 7% 78px 7%; }
  .auth-panel-one { width: 56%; height: 57%; }
  .auth-panel-two { top: 13%; width: 43%; height: 61%; }
  .auth-panel-three { width: 51%; height: 38%; left: 26%; }
  .bubble { font-size: 8px; }
  .auth-caption { left: 22px; bottom: 25px; font-size: 30px; line-height: 1.02; }
  .auth-meta { display: none; }
  .auth-seal { right: 21px; bottom: 23px; width: 48px; height: 48px; border-width: 2px; border-radius: 11px; font-size: 25px; }
  .auth-card { flex: 0 0 auto; min-height: 0; display: block; width: 100%; max-width: none; margin: 0; padding: 27px 22px 34px; border: 1px solid rgba(24, 23, 19, 0.08); border-radius: 26px; background: rgba(255, 253, 248, 0.72); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); }
  .auth-brand-row { display: none; }
  .auth-card h1 { margin-top: 8px; font-size: 47px; }
  .auth-intro { font-size: 13px; line-height: 1.72; }
  .auth-flow { margin-top: 18px; }
  .auth-form { margin-top: 21px; }
  .auth-form input { min-height: 50px; }
  .auth-buttons { margin-top: 18px; }
  .auth-terms { margin-top: 18px; }

  .app-topbar { width: calc(100% - 28px); min-height: 58px; grid-template-columns: 1fr auto; }
  .desktop-tabs { display: none; }
  .brand-seal { width: 31px; height: 31px; font-size: 16px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { font-size: 6px; }
  .topbar-note { display: flex; font-size: 8px; }
  .main-content { width: calc(100% - 28px); }
  .app-shell { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .view-section { padding: 30px 0 24px; }
  .hero-copy { margin-bottom: 24px; }
  .hero-copy h1, .library-heading h1, .profile-heading h1 { font-size: 39px; }
  .hero-copy > p { font-size: 12px; line-height: 1.75; }
  .story-flow { gap: 8px; margin-top: 18px; }
  .story-flow b { font-size: 8px; }
  .story-flow em { font-size: 9px; }
  .story-flow i { min-width: 8px; }

  .create-card { padding: 20px 17px 15px; border-radius: 22px; box-shadow: 0 18px 48px rgba(44, 32, 17, 0.1); }
  .create-card::before { left: 24px; right: 24px; }
  .create-card::after { top: 14px; right: 16px; font-size: 62px; }
  .form-heading { margin-bottom: 22px; padding-bottom: 16px; }
  .form-heading h2 { font-size: 22px; }
  .form-note { display: none; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .field-group { margin-bottom: 19px; }
  .field-title input { min-height: 52px; }
  .novel-field { padding: 14px; margin-bottom: 8px; border-radius: 17px; }
  #novelText { min-height: 245px; padding: 14px; }
  .novel-badge { display: none; }
  .create-footer { position: relative; flex-direction: column; align-items: stretch; gap: 8px; margin: 8px -5px -4px; padding: 13px 5px 8px; background: transparent; }
  .create-footer .form-error { min-height: 0; margin: 0; }
  .create-footer .button-large { width: 100%; min-width: 0; }
  .button-large { width: 100%; justify-content: center; }
  .button-large .button-arrow { position: absolute; right: 20px; }

  .recent-strip { margin-top: 36px; padding-top: 20px; }
  .trial-notice { align-items: flex-start; margin-top: 22px; padding: 12px 13px; }
  .trial-notice p { flex-direction: column; gap: 2px; }
  .recent-jobs, .jobs-list { grid-template-columns: 1fr; }
  .job-card { --job-cover-half-height: 54px; min-height: 152px; padding: 14px 16px 14px 108px; }
  .job-card::before { top: calc(50% - var(--job-cover-half-height)); left: 15px; width: 76px; height: 108px; }
  .job-card h3 { margin-top: 0; font-size: 21px; }
  .job-card-top .job-meta { display: none; }
  .job-card-top { top: calc(50% - var(--job-cover-half-height)); left: 108px; right: 16px; justify-content: flex-end; }
  .job-card-footer { right: 16px; bottom: calc(50% - var(--job-cover-half-height)); }
  .empty-state { margin: 38px auto 64px; }
  .empty-art { transform: scale(0.92); margin-bottom: 19px; }

  .profile-heading-mark { display: none; }
  .profile-head { padding: 19px; }
  .profile-status { display: none; }
  .profile-balance { margin: 16px 19px; padding: 19px; }
  .profile-balance strong { font-size: 34px; }
  .profile-rows { margin: 0 19px; }
  .profile-card > .button { width: calc(100% - 38px); margin: 17px 19px 19px; }
  .profile-footnote { margin-left: 2px; }

  .bottom-nav {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    padding: 6px max(17px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(17px, env(safe-area-inset-left));
    border-top: 1px solid rgba(24, 23, 19, 0.09);
    background: rgba(255, 253, 248, 0.93);
    box-shadow: 0 -10px 32px rgba(44, 32, 17, 0.08);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
  }
  .nav-item { position: relative; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 2px 6px; border: 0; border-radius: 15px; background: transparent; color: #8a8379; font-size: 9px; font-weight: 650; transition: color 160ms ease, transform 160ms ease; }
  .nav-item:active { transform: scale(0.95); }
  .nav-item.active { color: var(--red-dark); }
  .nav-icon-wrap { width: 38px; height: 25px; display: grid; place-items: center; border-radius: 999px; transition: background 160ms ease; }
  .nav-item.active .nav-icon-wrap { background: rgba(211, 72, 51, 0.11); }
  .nav-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .nav-item.active::after { content: ""; position: absolute; bottom: 0; width: 16px; height: 2px; border-radius: 99px; background: var(--red); }

  .job-sheet { display: flex; align-items: flex-end; }
  .sheet-backdrop { background: rgba(19, 17, 14, 0.5); }
  .sheet-panel { top: auto; left: 0; bottom: 0; width: 100%; max-height: 93dvh; transform: none; border-radius: 27px 27px 0 0; animation: sheet-up 220ms ease-out; }
  .sheet-handle { display: block; width: 38px; height: 4px; margin: 8px auto 0; border-radius: 99px; background: rgba(24, 23, 19, 0.2); }
  .sheet-header { padding: 14px 19px 13px; }
  .sheet-header h2 { font-size: 25px; }
  .sheet-body { padding: 17px 17px calc(28px + env(safe-area-inset-bottom)); }
  .sheet-summary { gap: 7px; }
  .summary-cell { padding: 11px 10px; }
  .summary-cell strong { font-size: 12px; }
  .sheet-actions { display: grid; grid-template-columns: 1fr; }
  .sheet-actions .button { width: 100%; }
  .plan-card { padding: 12px; }

  .confirm-overlay { align-items: flex-end; padding: 12px; }
  .confirm-card { max-width: none; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px; }
  .confirm-buttons { flex-direction: column-reverse; }
}

@media (max-width: 420px) {
  .auth-art { flex-basis: 196px; min-height: 196px; height: 196px; }
  .auth-caption { font-size: 27px; }
  .auth-card { padding: 24px 18px 30px; }
  .auth-card h1 { font-size: 43px; }
  .auth-flow { gap: 7px; }
  .auth-flow i { max-width: 18px; }
  .auth-form input + label { margin-top: 14px; }
  .hero-copy h1, .library-heading h1, .profile-heading h1 { font-size: 36px; }
  .story-flow em { font-size: 8px; }
  .form-heading h2 { font-size: 21px; }
  .job-card { --job-cover-half-height: 50.5px; padding-left: 101px; }
  .job-card::before { width: 70px; height: 101px; }
  .job-card h3 { font-size: 19px; }
  .profile-balance strong { font-size: 31px; }
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@supports (padding: max(0px)) {
  .image-viewer-close { top: max(16px, env(safe-area-inset-top)); }
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  body { user-select: none; -webkit-user-select: none; }
}
