:root {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  color: #20302d;
  background: #f3f6f3;
  font-synthesis: none;
  --ink: #20302d;
  --muted: #7e8c87;
  --line: #e3e9e5;
  --green: #246d5a;
  --green-deep: #174d42;
  --green-soft: #e8f5ed;
  --mint: #c9edda;
  --card: #ffffff;
  --shadow: 0 18px 48px rgba(28, 57, 47, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #f3f6f3; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; transform: none !important; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [role=button]:focus-visible, summary:focus-visible {
  outline: 3px solid #78c7a7;
  outline-offset: 3px;
}
.hidden { display: none !important; }

.showcase { --showcase-height: 212px; margin: 0 0 24px; min-width: 0; }
.showcase-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.showcase-heading h2 { margin: 0; color: #38564a; font-size: 14px; letter-spacing: -.2px; }
.showcase-heading h2 span { margin-left: 5px; color: #6aa98d; font-size: 12px; }
.showcase-heading p { margin: 4px 0 0; color: #83958b; font-size: 10px; }
.showcase-pause { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #dce6df; border-radius: 20px; color: #658172; background: #fafcfb; font-size: 10px; }
.showcase-pause:hover { color: var(--green); background: #eaf5ee; }
.showcase-scroller { height: calc(var(--showcase-height) + 10px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 13px; mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
.showcase-scroller::-webkit-scrollbar { display: none; }
.showcase-scroller:focus-visible { outline: 2px solid #78c7a7; outline-offset: 4px; }
.showcase-track { display: flex; width: max-content; padding: 4px 0 6px; }
.showcase-group { display: flex; flex: none; gap: 12px; padding-right: 12px; }
.showcase-card { position: relative; flex: none; display: block; width: calc(var(--showcase-height) * .75); height: var(--showcase-height); overflow: hidden; padding: 0; border: 0; border-radius: 12px; background: #dfe8e1; text-align: left; isolation: isolate; }
.showcase-card--landscape { width: calc(var(--showcase-height) * 1.5); }
.showcase-card--square { width: var(--showcase-height); }
.showcase-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.showcase-card:hover img { transform: scale(1.035); }
.showcase-card::after { content: ''; position: absolute; inset: 40% 0 0; z-index: 1; background: linear-gradient(transparent, rgba(12, 31, 24, .65)); pointer-events: none; }
.showcase-card-caption { position: absolute; left: 13px; right: 12px; bottom: 13px; z-index: 2; color: #fff; }
.showcase-card-caption strong { display: block; font-size: 11px; line-height: 1.35; font-weight: 650; text-shadow: 0 1px 6px #0004; }
.showcase-card-caption small { display: block; margin-top: 5px; color: #ffffffb3; font-size: 8px; letter-spacing: .3px; }
#photoWorkspace { scroll-margin-top: 86px; }
.showcase-dialog { width: min(900px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #e0e8e2; border-radius: 19px; color: var(--ink); background: #fff; box-shadow: 0 28px 90px #122d2459; overflow: auto; }
.showcase-dialog::backdrop { background: #10291fe0; backdrop-filter: blur(6px); }
.showcase-dialog-top { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; }
.showcase-dialog-top > span { color: #6f8b7c; font-size: 9px; font-weight: 700; letter-spacing: 1.7px; }
.showcase-image-frame { position: relative; display: grid; place-items: center; background: #eaf0eb; min-height: 160px; }
.showcase-image-frame > img { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100dvh - 210px); object-fit: contain; }
.showcase-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #ffffff59; border-radius: 50%; color: #fff; background: #193b30a6; font-size: 27px; }
.showcase-arrow.previous { left: 13px; }
.showcase-arrow.next { right: 13px; }
.showcase-arrow:hover { background: #193b30; }
.showcase-dialog-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 22px; }
.showcase-dialog-bottom h2 { margin: 0; font-size: 17px; }
.showcase-dialog-bottom p { margin: 5px 0 0; color: #85948a; font-size: 10px; }
.showcase-dialog-bottom .button { flex: none; }
@media (max-width: 660px) {
  .showcase { --showcase-height: 180px; margin-bottom: 18px; }
  .showcase-group { gap: 9px; padding-right: 9px; }
  .showcase-heading p { font-size: 9px; }
  .showcase-card-caption { left: 10px; bottom: 10px; }
  .showcase-dialog-bottom { padding: 15px; gap: 10px; }
  .showcase-dialog-bottom h2 { font-size: 14px; }
  .showcase-dialog-bottom .button { padding: 11px; font-size: 10px; }
  #photoWorkspace { scroll-margin-top: 136px; }
}
@media (prefers-reduced-motion: reduce) { .showcase-card img { transition: none; } }

.app-shell { min-height: 100vh; }
.topbar {
  height: 68px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-symbol {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #dcffeb;
  background: linear-gradient(145deg, #284f45, #173b34);
  box-shadow: 0 7px 18px rgba(23, 72, 57, .2);
  transform: rotate(-7deg);
  font-size: 21px;
}
.brand-symbol span { transform: rotate(7deg); }
.brand strong { display: block; font-size: 17px; letter-spacing: .7px; line-height: 20px; }
.brand small { display: block; color: #98a49f; font-size: 9px; letter-spacing: 1.55px; text-transform: uppercase; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.icon-button { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #dfe7e2; background: #fff; color: #6d7e78; font-weight: 750; }
.auth-area { flex: none; }
.google-sign-in { display: block; border: 0; background: transparent; border-radius: 24px; padding: 0; height: 40px; }
.google-sign-in img { display: block; }
.google-sign-in .google-sign-in-icon { display: none; }
.account-menu { position: relative; }
.account-menu summary { display: flex; align-items: center; gap: 8px; padding: 4px 9px 4px 4px; border: 1px solid #dce8e0; border-radius: 24px; color: #285e4b; font-size: 11px; list-style: none; cursor: pointer; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-avatar { position: relative; overflow: hidden; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e1f2e8; font-weight: 750; flex: none; }
.account-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-popover { position: absolute; top: calc(100% + 10px); right: 0; width: min(280px, calc(100vw - 32px)); padding: 17px; background: #fff; border: 1px solid #dce8e0; border-radius: 13px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.account-popover strong, .account-popover > span, .account-popover small { display: block; }
.account-popover strong { font-size: 13px; }
.account-popover > span { margin-top: 4px; font-size: 11px; color: var(--muted); }
.account-popover button, .account-popover > a { margin: 8px 0; width: 100%; padding: 11px; border-radius: 8px; border: 1px solid #dce8e0; background: #f5faf7; color: #285e4b; font-size: 12px; text-decoration: none; text-align: left; }
.account-popover > a { display: flex; justify-content: space-between; margin-top: 17px; }
.account-popover button:hover, .account-popover > a:hover { background: #e8f5ed; }
.account-popover small { font-size: 10px; line-height: 1.5; color: var(--muted); }

.account-page { max-width: 1280px; margin: 0 auto; padding: 32px 40px 64px; }
.gallery-back { color: #5b7468; text-decoration: none; font-size: 12px; }
.gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 38px 0; border-bottom: 1px solid var(--line); }
.profile-identity { display: flex; align-items: center; gap: 20px; min-width: 0; }
.profile-identity > div:last-child { min-width: 0; }
.profile-avatar { width: 76px; height: 76px; font-size: 28px; border: 4px solid #fff; box-shadow: var(--shadow); }
.profile-identity h1 { margin: 8px 0 6px; font-size: clamp(23px, 3vw, 34px); letter-spacing: -1px; overflow-wrap: anywhere; }
.profile-identity p { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.gallery-create { padding: 14px 20px; color: #fff; background: var(--green); text-decoration: none; white-space: nowrap; }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 30px 0 24px; }
.gallery-heading h2 { margin: 0 0 8px; font-size: 22px; }
.gallery-heading p { max-width: 600px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.gallery-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.gallery-preview { display: block; aspect-ratio: 4 / 3; background: #e7ece9; }
.gallery-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-card-info { padding: 17px; }
.gallery-card h3 { margin: 0 0 7px; font-size: 14px; overflow-wrap: anywhere; }
.gallery-card time { color: var(--muted); font-size: 11px; }
.gallery-card-footer { margin-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gallery-card-footer a { color: var(--green); font-size: 12px; font-weight: 650; text-decoration: none; }
.gallery-card-footer span { color: var(--muted); font-size: 10px; }
.gallery-message { padding: 70px 24px; text-align: center; color: #71877b; background: #fff; border: 1px dashed #d3dfd7; border-radius: 16px; font-size: 14px; line-height: 1.8; }
.gallery-more { display: block; margin: 28px auto 0; font-size: 12px; padding: 12px 24px; }
@media (max-width: 850px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .account-page { padding: 24px; } }
@media (max-width: 540px) { .account-page { padding: 24px 16px; } .gallery-header { align-items: flex-start; flex-direction: column; padding: 28px 0; } .profile-avatar { width: 60px; height: 60px; } .gallery-grid { grid-template-columns: 1fr; } .gallery-heading { align-items: flex-start; gap: 14px; } .gallery-heading p { font-size: 11px; } }

.app-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.sidebar {
  padding: 28px 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #fff;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
}
.sidebar-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 10px; }
.sidebar-heading span { font-size: 15px; font-weight: 760; }
.sidebar-heading small { font-size: 8px; letter-spacing: 1.4px; color: #a0aba6; }
.category-nav { display: grid; gap: 6px; }
.category-button {
  width: 100%;
  min-width: 0;
  padding: 13px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #677771;
  text-align: left;
  transition: .18s ease;
}
.category-button:hover { background: #f5f8f6; }
.category-button.active { color: #205d4d; background: #eaf6ef; border-color: #d2eadb; box-shadow: 0 5px 13px rgba(46, 113, 82, .08); }
.category-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 9px; background: #f1f4f2; font-size: 16px; }
.category-button.active .category-icon { background: #d5ebdd; }
.category-button > span:last-child { min-width: 0; }
.category-button strong { display: block; font-size: 12px; line-height: 1.3; }
.category-button small { display: block; margin-top: 2px; font-size: 9px; color: #9da8a3; }
.sidebar-guide { margin-top: auto; padding: 16px 14px; display: flex; align-items: flex-start; gap: 10px; border-radius: 14px; background: linear-gradient(145deg, #f0f7f0, #eef3ef); }
.guide-icon { color: #5ba37f; font-size: 17px; }
.sidebar-guide strong { display: block; font-size: 11px; }
.sidebar-guide p { margin: 5px 0 0; color: #819189; font-size: 9px; line-height: 1.6; }
.sidebar-footer { display: flex; justify-content: space-between; padding: 16px 7px 0; border-top: 1px solid var(--line); color: #a2aca7; font-size: 8px; letter-spacing: 1.2px; }

.workspace { width: 100%; max-width: 1600px; margin: 0 auto; padding: 26px clamp(22px, 3vw, 46px) 18px; min-width: 0; }
.workspace-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.eyebrow { margin-bottom: 7px; color: #60967f; font-size: 9px; font-weight: 780; letter-spacing: 2.15px; }
.eyebrow span { margin-left: 6px; font-size: 12px; }
.intro-copy h1 { margin: 0 0 6px; font-size: clamp(27px, 2.4vw, 38px); line-height: 1.15; letter-spacing: -1.4px; }
.intro-copy h1 span { color: #48a983; }
.intro-copy p { margin: 0; color: #83918c; font-size: 12px; }
.workflow-progress { margin: 0; padding: 0; display: flex; align-items: stretch; list-style: none; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 8px 25px rgba(35, 67, 57, .04); }
.progress-step { min-width: 145px; padding: 11px 15px; display: flex; align-items: center; gap: 9px; color: #95a19c; position: relative; }
.progress-step + .progress-step { border-left: 1px solid var(--line); }
.progress-step > span { width: 25px; height: 25px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #f0f3f1; font-size: 10px; font-weight: 800; }
.progress-step strong { display: block; font-size: 10px; }
.progress-step small { display: block; margin-top: 2px; font-size: 8px; }
.progress-step.active { color: #246d58; background: #f0f8f3; }
.progress-step.active > span { color: #fff; background: #2d8065; box-shadow: 0 0 0 4px #dff1e8; }
.progress-step.complete { color: #477c68; }
.progress-step.complete > span { color: transparent; background: #dcefe4; position: relative; }
.progress-step.complete > span::after { content: "✓"; color: #2d8065; position: absolute; }

.effect-panel, .image-card, .control-panel, .preview-action-panel { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.effect-panel { margin-bottom: 18px; padding: 17px 18px 18px; border-radius: 17px; }
.section-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.compact-section-top { margin-bottom: 13px; }
.step-number { margin-bottom: 4px; color: #57947a; font-size: 8px; letter-spacing: 1.5px; font-weight: 820; }
.section-top h2, .panel-top h2 { margin: 0; font-size: 17px; letter-spacing: -.35px; }
.effect-context { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; font-size: 10px; color: #98a39e; text-align: right; }
.effect-context strong { padding: 6px 9px; border-radius: 7px; background: #edf7f1; color: #34745e; font-size: 9px; }
.preset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.preset-card { min-width: 0; padding: 8px; display: flex; align-items: center; gap: 10px; position: relative; border: 1.5px solid #e7ece9; border-radius: 12px; background: #fff; color: var(--ink); text-align: left; transition: .16s ease; }
.preset-card:hover { transform: translateY(-1px); border-color: #bedccb; box-shadow: 0 8px 18px rgba(41, 84, 66, .08); }
.preset-card.active { border-color: #59ae88; background: #f7fcf9; box-shadow: 0 0 0 2px rgba(91, 183, 141, .12); }
.preset-art { width: 48px; height: 48px; display: grid; place-items: center; flex: none; border-radius: 9px; font-size: 21px; overflow: hidden; }
.preset-info { min-width: 0; }
.preset-info strong { display: block; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; padding-right: 10px; }
.preset-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; color: #8d9b95; font-size: 8.5px; }
.preset-check { width: 17px; height: 17px; display: grid; place-items: center; position: absolute; top: 5px; right: 5px; border-radius: 50%; background: #28775e; color: #fff; font-size: 9px; }

.work-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, 390px); gap: 18px; align-items: start; }
.primary-column { min-width: 0; }
.image-card { padding: 18px; border-radius: 18px; }
.image-card-head { margin-bottom: 13px; }
.section-subtitle { color: #97a39e; font-size: 9px; }
.image-stage { height: clamp(430px, 52vh, 610px); min-height: 410px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #edf1ef; }
.empty-stage { border: 1.5px dashed #bddbc9; background: radial-gradient(circle at 50% 35%, #fbfffc, #f2f8f3 55%, #f6f8f5); }
.image-stage.dragover { outline: 4px solid #b4e8c9; outline-offset: 2px; }
.image-stage.is-busy .image-surface { filter: saturate(.82) brightness(.85); }
.upload-placeholder { height: 100%; padding: 28px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.upload-illustration { width: 98px; height: 85px; display: grid; place-items: center; position: relative; margin-bottom: 7px; }
.photo-stack { width: 72px; height: 63px; display: grid; place-items: center; border: 5px solid #fff; border-radius: 14px; color: #8fc5ab; background: linear-gradient(135deg, #e9f7ed, #d7eadc); box-shadow: 0 10px 22px rgba(37, 96, 65, .12); transform: rotate(-7deg); font-size: 38px; }
.upload-illustration > span { position: absolute; top: 7px; right: 7px; color: #60ae87; font-size: 19px; }
.upload-placeholder h3 { margin: 5px 0 6px; font-size: 18px; }
.upload-placeholder p { margin: 0 0 18px; color: #8f9e96; font-size: 11px; }
.upload-placeholder small { margin-top: 13px; color: #a2ada7; font-size: 8.5px; }
.button { border: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; transition: transform .15s, filter .15s, box-shadow .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(.98); }
.button-primary { padding: 12px 18px; color: #fff; background: #276d57; font-size: 11px; box-shadow: 0 8px 18px rgba(32, 96, 74, .18); }
.loaded-stage, .image-surface { height: 100%; }
.loaded-stage { position: relative; }
.image-surface { display: flex; align-items: center; justify-content: center; overflow: hidden; background: repeating-conic-gradient(#eef2ef 0 25%, #e7ece9 0 50%) 50% / 24px 24px; }
.image-surface > img { width: 100%; height: 100%; object-fit: contain; }
.stage-toolbar { position: absolute; left: 13px; right: 13px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.stage-badge { padding: 8px 10px; border-radius: 8px; color: #fff; background: rgba(22, 45, 39, .82); backdrop-filter: blur(10px); font-size: 9px; }
.stage-actions { display: flex; gap: 7px; }
.small-ghost-button { pointer-events: auto; padding: 8px 10px; border: 1px solid rgba(255,255,255,.65); border-radius: 8px; color: #36534a; background: rgba(255,255,255,.91); font-size: 9px; }
.generation-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; min-width: 290px; padding: 16px 18px; display: flex; align-items: center; gap: 13px; color: #fff; background: rgba(21, 52, 43, .92); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; box-shadow: 0 18px 45px rgba(10, 31, 25, .3); backdrop-filter: blur(13px); }
.generation-status strong { display: block; font-size: 12px; }
.generation-status small { display: block; margin-top: 4px; color: #c6dcd3; font-size: 9px; }
.generation-spinner { width: 25px; height: 25px; flex: none; border: 3px solid rgba(255,255,255,.28); border-top-color: #b8f4d8; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.compare-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.compare-before { clip-path: inset(0 50% 0 0); }
.compare-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; box-shadow: 0 0 4px rgba(20,40,35,.5); }
.compare-handle { width: 40px; height: 40px; display: grid; place-items: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; color: #28725e; background: #fff; box-shadow: 0 4px 15px rgba(20,40,35,.28); pointer-events: none; font-size: 18px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.compare-side-label { position: absolute; top: 13px; padding: 6px 8px; border-radius: 7px; color: #fff; background: rgba(20,42,36,.73); font-size: 8px; pointer-events: none; }
.compare-side-label.left { left: 13px; }
.compare-side-label.right { right: 13px; }
.image-footer { min-height: 43px; margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.image-meta { min-width: 0; display: flex; align-items: center; gap: 9px; color: #83918a; font-size: 9px; }
.image-meta span:first-child { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; color: #5b6f65; }
.result-actions { display: flex; gap: 8px; margin-left: auto; }
.button-soft, .button-outline { padding: 10px 13px; font-size: 9px; }
.button-soft { color: #286e56; background: #ddf2e5; }
.button-outline { color: #5b7468; background: #fff; border: 1px solid #dce6e0; }
.preview-action-panel { margin-top: 11px; padding: 14px 18px 16px; border-radius: 14px; }
.generation-notice { margin-bottom: 14px; padding: 15px; border: 1px solid #e9c7ad; border-radius: 11px; color: #704e32; background: #fff8f0; overflow-wrap: anywhere; }
.generation-notice-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.generation-notice-heading strong { font-size: 13px; line-height: 1.5; }
.generation-notice-heading button { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; color: #8a6c51; background: #f5e9da; font-size: 18px; }
.generation-notice p { margin: 8px 0; font-size: 11px; line-height: 1.7; }
.generation-notice > small { display: block; margin-top: 5px; color: #9d7f64; font-size: 9px; line-height: 1.5; }
.generation-notice-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #ebddcd; }
.generation-notice-actions > span { font-size: 10px; color: #98785b; }
.generation-notice-actions button { flex: none; padding: 8px 12px; border: 1px solid #dfc7ae; border-radius: 7px; color: #785538; background: #fff; font-size: 10px; font-weight: 700; }

.control-panel { max-height: calc(100vh - 90px); overflow: auto; position: sticky; top: 80px; border-radius: 18px; scrollbar-width: thin; scrollbar-color: #d5dfda transparent; }
.panel-scroll-content { padding: 20px 21px; }
.panel-top { display: flex; justify-content: space-between; align-items: center; }
.settings-symbol { color: #9eb0a7; font-size: 22px; }
.panel-subtitle { margin: 9px 0 17px; color: #94a19b; font-size: 9.5px; line-height: 1.55; }
.controls-host { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > label, .range-head label { color: #41554b; font-size: 10px; font-weight: 720; }
.field select, .field textarea, .field input[type=text] { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #dfe7e2; border-radius: 8px; outline: none; color: #334a3e; background: #fbfcfb; font-size: 10px; }
.field select:focus, .field textarea:focus, .field input:focus { border-color: #73ba98; box-shadow: 0 0 0 3px rgba(85, 170, 132, .1); }
.field textarea { min-height: 66px; resize: vertical; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.range-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.range-head output { flex: none; color: #62917c; font-size: 9px; font-weight: 760; }
.range-control { width: 100%; margin: 2px 0; accent-color: #327e64; cursor: pointer; }
.field-caption { color: #8e9c95; font-size: 8.5px; line-height: 1.45; }
.toggle-field { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.toggle-field strong { display: block; font-size: 12px; line-height: 1.4; }
.toggle-field .field-caption { display: block; margin-top: 5px; }
.toggle-field input { width: 16px; height: 16px; flex: none; accent-color: #337f64; }
.control-divider { height: 1px; margin: 0; background: #ebefec; }
.identity-note { margin-top: 17px; padding: 11px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #dcecdf; border-radius: 10px; background: #f2f8f3; }
.lock-symbol { width: 27px; height: 27px; display: grid; place-items: center; flex: none; border-radius: 8px; color: #3c7759; background: #dceee0; }
.identity-note strong { display: block; color: #3b6850; font-size: 9px; }
.identity-note p { margin: 3px 0 0; color: #89a08f; font-size: 8px; }
.enabled-dot { width: 7px; height: 7px; margin-left: auto; flex: none; border-radius: 50%; background: #55b37c; }
.prompt-details { padding: 14px 0; }
.prompt-details summary { display: flex; justify-content: space-between; color: #557769; font-size: 9px; font-weight: 700; cursor: pointer; list-style: none; }
.prompt-details summary::-webkit-details-marker { display: none; }
.prompt-details pre { max-height: 155px; overflow: auto; margin: 10px 0; padding: 11px; white-space: pre-wrap; word-break: break-word; border-radius: 8px; color: #617169; background: #f4f7f5; font: 8.5px/1.55 ui-monospace, SFMono-Regular, monospace; }
.copy-prompt { padding: 7px 10px; border: 0; border-radius: 7px; color: #36765f; background: #e4f2e9; font-size: 8px; }
.consent-box { margin-bottom: 10px; color: #65776e; font-size: 8.5px; line-height: 1.5; }
.consent-box label { display: flex; align-items: flex-start; gap: 8px; }
.consent-box input { margin-top: 1px; accent-color: #2f7c61; }
.generate-button { width: 100%; padding: 14px 16px; justify-content: space-between; color: #fff; background: linear-gradient(105deg, #2d7b62, #1c5146); box-shadow: 0 9px 21px rgba(35, 91, 70, .2); font-size: 11px; }
.button-sparkle, .button-arrow { font-size: 16px; }
.generate-caption { margin-top: 8px; color: #929f99; text-align: center; font-size: 8px; line-height: 1.45; }

.footer { margin: 27px 0 4px; color: #a4afaa; text-align: center; font-size: 9px; }
.footer span { padding: 0 6px; color: #cbd4cf; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 99; max-width: min(520px, calc(100vw - 30px)); padding: 12px 17px; border-radius: 11px; color: #fff; background: #1f3d35; box-shadow: 0 14px 38px rgba(24, 49, 42, .26); opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: .22s ease; font-size: 10px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.help-dialog { max-width: 455px; padding: 23px; border: 1px solid #dfe8e2; border-radius: 17px; color: #334a3e; box-shadow: 0 28px 85px rgba(25, 54, 46, .3); }
.help-dialog::backdrop { background: rgba(15, 38, 31, .48); backdrop-filter: blur(3px); }
.dialog-title { display: flex; align-items: center; justify-content: space-between; }
.dialog-title h3 { margin: 0; }
.help-dialog li { margin-bottom: 9px; color: #5d7166; font-size: 11px; line-height: 1.55; }
.help-dialog p { color: #81948a; font-size: 10px; line-height: 1.6; }

.credit-pill { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid #d8e7df; border-radius: 9px; color: #356c56; background: #f0f7f2; text-decoration: none; font-size: 9px; }
.credit-pill strong { font-size: 11px; }
.billing-overview { margin-bottom: 24px; display: grid; gap: 14px; }
.billing-balance-card, .billing-history { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.billing-balance-card { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.billing-balance-card h2 { margin: 5px 0 8px; font-size: 21px; }
.billing-balance-card h2 strong { color: var(--green); font-size: 31px; }
.billing-balance-card p { max-width: 620px; margin: 0; color: #718278; font-size: 10px; line-height: 1.7; }
.billing-status { padding: 13px 15px; border: 1px solid #cfe4d7; border-radius: 10px; color: #356c56; background: #eef7f1; font-size: 10px; }
.billing-history .gallery-heading a { color: var(--green); font-size: 10px; }
.billing-orders { display: grid; gap: 8px; }
.billing-order { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border-radius: 10px; background: #f7f9f7; }
.billing-order strong, .billing-order time { display: block; }
.billing-order strong { font-size: 11px; }
.billing-order time, .billing-empty { margin: 4px 0 0; color: #85938c; font-size: 9px; }
.order-status { padding: 6px 8px; border-radius: 999px; color: #47735f; background: #e5f1e8; font-size: 8px; text-transform: capitalize; }
.order-status.refunded, .order-status.partially_refunded { color: #885e3b; background: #f6eadb; }

@media (max-width: 1240px) {
  .app-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .workspace { padding-inline: 22px; }
  .workflow-progress .progress-step { min-width: 125px; padding-inline: 11px; }
  .preset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-columns { grid-template-columns: minmax(0, 1fr) minmax(325px, 360px); }
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .app-layout { display: block; }
  .sidebar { height: auto; padding: 10px 16px; position: sticky; top: 68px; z-index: 30; display: block; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-heading, .sidebar-guide, .sidebar-footer { display: none; }
  .category-nav { display: flex; gap: 7px; }
  .category-button { flex: 1; justify-content: center; padding: 9px; }
  .category-button small { display: none; }
  .workspace-head { align-items: center; }
  .workflow-progress .progress-step { min-width: 0; }
  .workflow-progress small { display: none; }
  .work-columns { grid-template-columns: 1fr; }
  .control-panel { max-height: none; position: static; overflow: visible; }
  .image-stage { height: min(66vw, 600px); }
}

@media (max-width: 660px) {
  .topbar { height: 61px; padding: 0 14px; }
  .brand small { display: none; }
  .brand-symbol { width: 34px; height: 34px; }
  .sidebar { top: 61px; padding: 8px; }
  .category-nav { gap: 4px; }
  .category-button { gap: 6px; padding: 8px 4px; }
  .category-button strong { font-size: 10px; }
  .category-icon { width: 26px; height: 26px; font-size: 13px; }
  .workspace { padding: 19px 11px 14px; }
  .workspace-head { display: block; margin-bottom: 14px; }
  .intro-copy h1 { font-size: 28px; }
  .workflow-progress { margin-top: 14px; width: 100%; }
  .progress-step { flex: 1; justify-content: center; padding: 9px 5px; }
  .progress-step div { display: none; }
  .effect-panel, .image-card { padding: 14px; border-radius: 15px; }
  .effect-context > span { display: none; }
  .preset-grid { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 1px 7px; }
  .preset-card { min-width: 170px; scroll-snap-align: start; }
  .image-stage { height: 410px; min-height: 360px; }
  .image-footer { align-items: flex-start; flex-direction: column; }
  .result-actions { width: 100%; margin-left: 0; }
  .result-actions .button { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .panel-scroll-content, .preview-action-panel { padding-inline: 16px; }
  .generation-status { min-width: calc(100% - 36px); }
  .footer { font-size: 8px; }
  .credit-pill span:last-child { display: none; }
  .billing-balance-card { align-items: stretch; flex-direction: column; }
  .billing-balance-card .button { width: 100%; }
}

@media (max-width: 420px) {
  .google-sign-in .google-sign-in-full { display: none; }
  .google-sign-in .google-sign-in-icon { display: block; }
  .topbar-right { gap: 8px; }
  .account-label { display: none; }
}

.explore-tools{margin-top:34px;padding-top:26px;border-top:1px solid var(--line)}.explore-tools>h2{font-size:19px;letter-spacing:-.5px;margin:0 0 10px}.explore-tools>p{font-size:12px;line-height:1.8;max-width:690px;color:#718278;margin:0 0 20px}.explore-tools-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.explore-tools-grid>a{display:flex;flex-direction:column;padding:21px;background:#fff;border:1px solid var(--line);border-radius:13px;color:inherit;text-decoration:none}.explore-tools-grid>a:hover{border-color:#94bca6}.explore-tools-grid>a:focus-visible{outline:3px solid #78c7a7;outline-offset:4px}.explore-tools-grid h3{font-size:13px;margin:0 0 10px}.explore-tools-grid p{font-size:11px;line-height:1.8;color:#718278;flex:1;margin:0 0 16px}.explore-tools-grid span{font-size:11px;color:var(--green);font-weight:650}@media(max-width:700px){.explore-tools-grid{grid-template-columns:1fr}}
