:root {
  color-scheme: light;
  --ink: #173c35;
  --ink-2: #49635e;
  --paper: #f5f1e8;
  --surface: #fffdf7;
  --line: #d9d4c9;
  --accent: #ed9e44;
  --accent-soft: #fde9cf;
  --success: #2d7a61;
  --danger: #a74735;
  --shadow: 0 20px 50px rgba(23, 60, 53, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; padding-bottom: 88px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(18px, 4vw, 52px); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(23,60,53,.08); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 38px; height: 38px; }
.brand span small { display: block; color: var(--ink-2); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.user-chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: var(--surface); color: var(--ink); }
.page { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 64px; }
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: stretch; margin: 18px 0 28px; }
.hero-card { padding: clamp(28px, 5vw, 62px); border-radius: 32px; background: var(--ink); color: #fffdf7; overflow: hidden; position: relative; }
.hero-card::after { content: ""; position: absolute; width: 280px; height: 280px; right: -110px; bottom: -140px; border-radius: 50%; background: var(--accent); opacity: .88; }
.eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; max-width: 760px; font-size: clamp(38px, 7vw, 72px); line-height: .96; letter-spacing: -.055em; }
.hero p { max-width: 600px; font-size: 17px; line-height: 1.6; color: rgba(255,255,255,.76); }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { border: 0; border-radius: 14px; padding: 13px 17px; background: var(--accent); color: #27180a; font-weight: 800; box-shadow: none; }
.button:hover { transform: translateY(-1px); }
.button.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.button.ghost { background: transparent; color: currentColor; border: 1px solid currentColor; opacity: .85; }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.brief-card, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 10px 28px rgba(23,60,53,.06); }
.brief-card { padding: 26px; display: flex; flex-direction: column; justify-content: space-between; }
.brief-card strong { font-size: 46px; letter-spacing: -.05em; }
.brief-card p { color: var(--ink-2); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 34px 0 14px; }
.section-head h2, .card h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.muted { color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.stat strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.stat span { color: var(--ink-2); font-size: 13px; }
.draft-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.draft-card { overflow: hidden; }
.draft-image { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #dfe4df; display: block; }
.draft-body { padding: 18px; }
.draft-body h3 { margin: 0 0 6px; font-size: 18px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; background: #e6eee9; color: var(--ink); font-weight: 700; }
.empty { padding: 36px; text-align: center; }
.composer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; }
.card { padding: 22px; }
.dropzone { display: grid; place-items: center; min-height: 310px; padding: 28px; border: 2px dashed #9aa9a4; border-radius: 20px; background: #f7f8f4; text-align: center; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.camera-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: var(--accent-soft); font-size: 34px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #dfe4df; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; color: white; background: rgba(0,0,0,.65); }
label.field { display: grid; gap: 7px; margin: 16px 0; font-weight: 750; }
.field small { color: var(--ink-2); font-weight: 500; }
textarea, input[type="text"], input[type="number"], select { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; color: var(--ink); background: white; }
textarea { min-height: 118px; resize: vertical; }
.notice { padding: 13px 15px; border-radius: 14px; background: var(--accent-soft); color: #60401e; font-size: 13px; line-height: 1.5; }
.notice.success { background: #dcefe6; color: #1e5b47; }
.notice.danger { background: #f7dcd7; color: #7a3025; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 16px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.price { border-radius: 16px; padding: 14px; background: #eef2ef; }
.price.recommended { background: var(--accent-soft); outline: 2px solid var(--accent); }
.price small, .price strong { display: block; }
.price strong { font-size: 24px; margin-top: 5px; }
.list { margin: 10px 0 0; padding-left: 20px; line-height: 1.6; }
.loader { width: 22px; height: 22px; border: 3px solid rgba(23,60,53,.2); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 80% 15%, #f4b66e 0 14%, transparent 15%), var(--ink); }
.login-card { width: min(460px, 100%); padding: 34px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.login-card img { width: 64px; }
.login-card h1 { margin: 26px 0 12px; font-size: 46px; }
.login-card p { color: var(--ink-2); line-height: 1.6; }
.bottom-nav { display: none; }
@media (max-width: 800px) {
  .topbar { padding: 11px 16px; }
  .user-chip { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { width: min(100% - 24px, 680px); padding-top: 14px; }
  .hero, .composer, .result-layout { grid-template-columns: 1fr; }
  .hero-card { padding: 32px 24px; border-radius: 24px; }
  .hero-card h1 { font-size: 46px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .draft-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,253,247,.96); border-top: 1px solid var(--line); backdrop-filter: blur(18px); }
  .bottom-nav button { border: 0; background: transparent; padding: 9px; color: var(--ink-2); font-size: 12px; font-weight: 800; }
  .bottom-nav button.active { color: var(--ink); }
}
