:root {
  --ink: #17201b;
  --muted: #68726c;
  --paper: #f4f1ea;
  --card: rgba(255, 255, 255, 0.74);
  --green: #167a55;
  --green-dark: #0e5d40;
  --line: rgba(23, 32, 27, 0.12);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 20%, rgba(130, 198, 159, .24), transparent 29rem),
    radial-gradient(circle at 10% 80%, rgba(224, 176, 104, .18), transparent 30rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.grain { position: fixed; inset: 0; opacity: .28; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E"); }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.nav { height: 84px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 750; letter-spacing: -.03em; display: flex; align-items: center; gap: 11px; }
.brand i { color: var(--green); font-style: normal; }
.brand-mark { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; color: white; background: var(--ink); font-family: Georgia, serif; }
.status { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.status b { width: 8px; height: 8px; border-radius: 50%; background: #28a66d; box-shadow: 0 0 0 5px rgba(40, 166, 109, .12); }

.hero { min-height: calc(100vh - 140px); display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: 70px; padding-block: 42px 70px; }
.eyebrow { font-size: 11px; letter-spacing: .22em; color: var(--green); font-weight: 800; }
.intro h1 { font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(48px, 5.1vw, 77px); line-height: 1.08; letter-spacing: -.055em; margin: 20px 0 24px; font-weight: 500; }
.intro h1 em { color: var(--green); font-style: italic; }
.intro p { color: var(--muted); font-size: 17px; line-height: 1.85; max-width: 480px; }
.feature-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.feature-row span { border: 1px solid var(--line); background: rgba(255,255,255,.38); border-radius: 999px; padding: 8px 13px; font-size: 12px; color: #4d5852; }

.studio { position: relative; min-height: 560px; padding: 34px; border: 1px solid rgba(255,255,255,.9); border-radius: 28px; background: var(--card); box-shadow: 0 30px 90px rgba(54, 68, 59, .12); backdrop-filter: blur(18px); }
.field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.field-head label { font-weight: 720; font-size: 14px; }
.field-head span { font-size: 11px; color: #8b938e; }
.prompt-box { position: relative; }
textarea { width: 100%; min-height: 190px; resize: vertical; border: 1px solid var(--line); border-radius: 17px; padding: 18px 50px 18px 18px; background: rgba(255,255,255,.68); color: var(--ink); font: inherit; line-height: 1.7; outline: none; transition: .2s ease; }
textarea:focus, select:focus { border-color: rgba(22,122,85,.55); box-shadow: 0 0 0 4px rgba(22,122,85,.08); }
textarea::placeholder { color: #a0a8a3; }
.icon-button { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: #e8f2ec; color: var(--green); cursor: pointer; font-size: 18px; }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.options label { font-size: 11px; color: var(--muted); font-weight: 650; }
select { width: 100%; margin-top: 7px; appearance: none; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.75); color: var(--ink); padding: 11px 30px 11px 11px; outline: none; font-size: 12px; }
.generate { width: 100%; height: 55px; border: 0; border-radius: 15px; color: white; background: var(--ink); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 19px; cursor: pointer; font-size: 14px; font-weight: 720; transition: .22s ease; }
.generate:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 12px 25px rgba(14, 93, 64, .22); }
.generate:disabled { opacity: .55; cursor: wait; transform: none; }
.button-icon { text-align: left; color: #9ed7bb; }.button-arrow { text-align: right; font-size: 19px; }
.note { text-align: center; font-size: 11px; color: #949c97; margin: 12px 0 0; }

.hidden { display: none !important; }
.loading { position: absolute; inset: 0; border-radius: inherit; background: rgba(250,249,245,.94); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.loading strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; margin-top: 25px; }
.loading p { color: var(--muted); font-size: 13px; }
.orb { width: 70px; height: 70px; border-radius: 50%; border: 1px solid rgba(22,122,85,.2); display: grid; place-items: center; animation: breathe 2s ease-in-out infinite; }
.orb span { width: 37px; height: 37px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #d8f2e4, #258c63); box-shadow: 0 9px 25px rgba(22,122,85,.28); }
.progress { margin-top: 22px; width: min(290px, 85%); height: 3px; background: #dde3df; border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 35%; background: var(--green); border-radius: inherit; animation: travel 1.8s ease-in-out infinite; }
.error { margin-top: 14px; color: #8d2c28; background: #fff0ed; border: 1px solid #f2c8c2; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.result-head button { border: 0; background: none; color: var(--green); cursor: pointer; font-weight: 700; }
.result-grid { display: grid; gap: 12px; }
.artwork { position: relative; overflow: hidden; border-radius: 18px; background: #e6e8e3; }
.artwork img { display: block; width: 100%; max-height: 560px; object-fit: contain; }
.download { position: absolute; right: 13px; bottom: 13px; color: var(--ink); background: rgba(255,255,255,.88); backdrop-filter: blur(10px); padding: 9px 12px; border-radius: 10px; text-decoration: none; font-size: 12px; font-weight: 700; box-shadow: 0 4px 20px rgba(0,0,0,.1); }
footer { padding-block: 20px 32px; color: #8d9690; font-size: 11px; }

@keyframes breathe { 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(22,122,85,.05); } }
@keyframes travel { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 30px; }.intro h1 { max-width: 650px; }.intro p { margin-bottom: 0; }.studio { min-height: 530px; } }
@media (max-width: 540px) { .shell { width: min(100% - 24px, 1180px); }.nav { height: 68px; }.status { font-size: 0; }.intro h1 { font-size: 46px; }.intro p { font-size: 15px; }.studio { padding: 20px; border-radius: 22px; }.options { grid-template-columns: 1fr; } textarea { min-height: 165px; }.hero { padding-bottom: 36px; } }
