@font-face{
  font-family:system-studio;
  src:local("Segoe UI")
}
*{
  box-sizing:border-box
}
body{
  margin:0;
  background:#f6f7f2;
  color:#243d35;
  font-family:system-studio,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:15px;
  line-height:1.6
}
button,input,select,textarea{
  font:inherit
}
button,a,input,select,textarea,summary{
  -webkit-tap-highlight-color:transparent
}
button{
  cursor:pointer
}
button:disabled{
  cursor:wait;
  opacity:.55
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
  outline:3px solid #d4a444;
  outline-offset:3px
}
[hidden]{
  display:none!important
}
a{
  color:inherit
}
h1,h2,h3,p{
  margin:0
}
h1{
  font-size:clamp(29px,4.5vw,41px);
  font-weight:650;
  letter-spacing:-1.2px;
  line-height:1.4
}
h2{
  font-size:18px;
  font-weight:650
}
h3{
  font-size:18px;
  font-weight:550
}
small{
  font-size:12px
}
.topbar{
  max-width:1160px;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:25px 30px 18px;
  gap:12px
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  font-size:18px;
  font-weight:700;
  white-space:nowrap
}
.brand strong{
  font-size:15px;
  font-weight:550;
  margin-left:3px
}
.brand img{
  border-radius:11px
}
.device-badge{
  background:#e6ebe2;
  color:#607057;
  border-radius:30px;
  font-size:11px;
  padding:5px 11px;
  white-space:nowrap
}
main{
  max-width:1120px;
  margin:auto;
  padding:8px 22px 115px
}
.page-intro{
  margin:20px 0 26px
}
.eyebrow{
  font-size:10px;
  letter-spacing:2.4px;
  font-weight:600;
  color:#8b957f;
  margin-bottom:8px
}
.page-intro>p:last-child{
  color:#879084;
  margin-top:8px;
  font-size:14px
}
.workspace{
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);
  align-items:start;
  gap:24px
}
.compose-stack{
  display:grid;
  gap:16px;
  min-width:0
}
.card{
  background:#fff;
  border:1px solid #e9ece3;
  box-shadow:0 6px 25px #243d3504;
  border-radius:24px;
  padding:25px;
  min-width:0
}
.section-heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:23px
}
.segmented{
  display:flex;
  background:#f2f4ee;
  border-radius:12px;
  padding:4px
}
.segmented button{
  border:0;
  border-radius:9px;
  padding:6px 16px;
  background:none;
  color:#83917f;
  min-height:36px;
  font-size:13px
}
.segmented button[aria-pressed=true]{
  background:#fff;
  color:#294c3f;
  box-shadow:0 1px 4px #16291b12;
  font-weight:650
}
.field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:17px;
  font-weight:550;
  font-size:13px;
  color:#56674f
}
.field input,.field select,.field textarea,.account-line select{
  width:100%;
  min-height:47px;
  border:1px solid #e6e9df;
  background:#fafbf7;
  border-radius:12px;
  color:#314a3e;
  padding:11px 13px;
  outline-offset:1px;
  font-weight:400;
  font-size:15px
}
.field textarea{
  resize:vertical;
  min-height:154px;
  background:#fafbf8;
  line-height:1.8
}
input::placeholder,textarea::placeholder{
  color:#a1aa9b
}
.field-note{
  color:#8b9584;
  font-size:12px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.field-note:not(:empty){
  margin:0 0 17px
}
.prompt-footer{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:-11px;
  margin-bottom:20px;
  color:#9aa390;
  font-size:10px
}
.reference-heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
  color:#607151;
  font-size:13px
}
.reference-heading small{
  font-size:10px;
  background:#f0f3eb;
  color:#90a17c;
  border-radius:7px;
  padding:3px 6px;
  margin-left:5px
}
.text-button{
  border:0;
  background:none;
  color:#6f8064;
  padding:5px 7px;
  font-size:12px;
  min-height:40px
}
.upload-area{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:92px;
  padding:12px;
  border:1.5px dashed #d9e1ce;
  background:#fcfdf9;
  border-radius:14px;
  cursor:pointer
}
.upload-symbol{
  display:grid;
  place-items:center;
  border-radius:11px;
  width:34px;
  height:34px;
  background:#edf2e5;
  color:#819561;
  font-size:24px;
  line-height:1
}
.upload-area strong{
  font-size:12px;
  font-weight:550;
  display:block;
  color:#6a7c57
}
.upload-area small{
  display:block;
  color:#a3ad97;
  font-size:10px;
  margin-top:2px
}
.visually-hidden{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.upload-area:focus-within{
  outline:3px solid #d4a444
}
.reference-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px
}
.reference-item{
  position:relative;
  margin:0;
  width:76px
}
.reference-item img{
  width:76px;
  height:76px;
  object-fit:cover;
  border-radius:10px
}
.reference-item figcaption{
  font-size:10px;
  text-align:center;
  color:#8a957f
}
.reference-item button{
  position:absolute;
  right:-5px;
  top:-6px;
  background:#314d3e;
  color:#fff;
  border:2px solid white;
  border-radius:50%;
  width:28px;
  height:28px;
  padding:0;
  line-height:20px
}
.advanced{
  border-top:1px solid #edf0e7;
  border-bottom:1px solid #edf0e7;
  margin:18px 0
}
.advanced summary{
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  padding:15px 0;
  font-size:12px;
  color:#6f7e61;
  list-style:none
}
.advanced summary::-webkit-details-marker{
  display:none
}
.advanced[open] summary span{
  transform:rotate(45deg)
}
.field-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 14px;
  padding-bottom:6px
}
.check-field{
  display:flex;
  align-items:center;
  gap:9px;
  color:#75816b;
  font-size:12px;
  min-height:44px;
  font-weight:400
}
.check-field input{
  width:17px;
  height:17px;
  accent-color:#35594b;
  flex:0 0 auto
}
.account-line{
  display:flex;
  align-items:center;
  gap:9px;
  margin:17px 0;
  color:#8b9582;
  font-size:12px
}
.account-line label{
  white-space:nowrap
}
.account-line select{
  min-width:0;
  flex:1;
  background:#fff;
  font-size:12px;
  min-height:40px;
  padding:8px
}
.actions{
  display:flex;
  gap:10px
}
.actions.wrap{
  flex-wrap:wrap
}
.primary,.secondary{
  min-height:46px;
  border-radius:12px;
  padding:11px 17px;
  font-size:13px;
  font-weight:550;
  line-height:1.5
}
.primary{
  border:1px solid #214b3c;
  background:#244e3f;
  color:#fff;
  box-shadow:0 4px 8px #244e3f10
}
.actions .primary{
  flex:1
}
.primary span{
  margin-left:8px;
  font-size:17px;
  font-weight:400
}
.primary:hover{
  background:#1c3d31
}
.secondary{
  border:1px solid #e2e8d8;
  background:#f8faf4;
  color:#7c8b6a
}
.secondary:hover{
  background:#eff3e7
}
.secondary.danger{
  color:#a06443
}
.status{
  font-size:12px;
  color:#829071;
  margin-top:14px;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.status.error{
  color:#a45541
}
.status.success{
  color:#427752
}
progress{
  width:100%;
  height:5px;
  margin-top:12px;
  accent-color:#4b7356
}
.estimate{
  font-size:12px;
  padding:10px 12px;
  background:#f6f7e9;
  border-radius:10px;
  color:#858346
}
.page-note{
  font-size:10px;
  color:#9da791;
  text-align:center;
  padding:0 8px
}
.result-card{
  min-height:480px;
  position:sticky;
  top:20px
}
.small-tag{
  font-size:10px;
  color:#a0a88e;
  border:1px solid #edf0e7;
  padding:3px 9px;
  border-radius:20px;
  white-space:nowrap
}
.empty-art{
  text-align:center;
  padding:70px 4px 40px;
  position:relative;
  color:#99a58d
}
.art-tile{
  width:105px;
  height:123px;
  border-radius:17px;
  margin:0 auto 30px
}
.art-back{
  background:#f1eedc;
  transform:rotate(11deg);
  position:absolute;
  left:50%;
  margin-left:-43px;
  top:63px
}
.art-front{
  position:relative;
  background:linear-gradient(145deg,#e0e9d6,#f2f5ec);
  transform:rotate(-8deg);
  border:1px solid #d8e2cb;
  box-shadow:0 6px 12px #b4c5a51a;
  display:grid;
  place-items:center
}
.art-front span{
  font-size:49px;
  color:#9eaf88;
  font-weight:300
}
.empty-art h3{
  font-size:15px;
  margin:5px 0 12px;
  color:#7a8d69
}
.empty-art p{
  font-size:12px;
  line-height:1.9;
  color:#a4af99
}
.result-media{
  display:block;
  width:100%;
  max-height:65vh;
  border-radius:14px;
  background:#f1f3ed;
  object-fit:contain
}
.media-card+.media-card{
  margin-top:20px
}
.media-actions{
  display:flex;
  gap:8px;
  margin-top:10px;
  align-items:center;
  flex-wrap:wrap
}
.media-actions a,.media-actions button{
  font-size:12px;
  min-height:40px
}
.media-actions a{
  text-decoration:none;
  padding:10px;
  color:#7d8d6c
}
.result-prompt{
  font-size:12px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:#89967b;
  max-height:140px;
  overflow:auto;
  margin:18px 0
}
.settings-grid{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:24px;
  align-items:start
}
.password-row{
  display:flex;
  gap:8px;
  min-width:0
}
.password-row input{
  min-width:0
}
.password-row button{
  flex:0 0 auto
}
.inline-link{
  display:inline-block;
  font-size:12px;
  color:#6f8858;
  margin-top:16px;
  text-decoration:none
}
.install-symbol{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  background:#eff2e4;
  color:#82955b;
  font-size:24px;
  border-radius:11px;
  margin-bottom:15px
}
.install-card p,.about-card p{
  font-size:13px;
  color:#8d9982;
  margin-top:12px
}
.install-card button{
  margin-top:17px
}
.history-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:15px 0;
  font-size:13px;
  color:#8a977e
}
.history-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px
}
.history-item{
  padding:15px;
  border-radius:18px
}
.history-item img,.history-item video{
  width:100%;
  height:170px;
  object-fit:cover;
  border-radius:12px;
  background:#f1f3ed
}
.history-item h3{
  font-size:13px;
  margin:10px 0 2px
}
.history-item time{
  font-size:10px;
  color:#a2ab97
}
.history-item p{
  font-size:12px;
  color:#8a967e;
  overflow-wrap:anywhere;
  margin:8px 0;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden
}
.history-item .secondary{
  font-size:11px;
  padding:8px 10px;
  min-height:40px
}
.history-empty{
  grid-column:1/-1;
  text-align:center;
  padding:60px 25px;
  color:#a0ab94;
  border:1px dashed #dce4d2;
  border-radius:20px
}
.bottom-nav{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  z-index:20;
  display:flex;
  justify-content:center;
  gap:40px;
  padding:10px 20px calc(10px + env(safe-area-inset-bottom));
  background:#fffef8f5;
  backdrop-filter:blur(18px);
  border-top:1px solid #e7ecde
}
.bottom-nav button{
  display:flex;
  align-items:center;
  gap:9px;
  border:0;
  background:none;
  padding:9px 21px;
  border-radius:12px;
  color:#a2ad96;
  font-size:12px;
  min-height:42px
}
.bottom-nav button>span{
  font-size:20px;
  line-height:1
}
.bottom-nav button[aria-current=page]{
  color:#365941;
  background:#eef2e5;
  font-weight:650
}
#toast{
  position:fixed;
  bottom:calc(88px + env(safe-area-inset-bottom));
  left:50%;
  transform:translateX(-50%);
  z-index:50;
  padding:11px 18px;
  border-radius:13px;
  max-width:90vw;
  min-width:220px;
  background:#274d3ded;
  color:#fff;
  font-size:12px;
  box-shadow:0 5px 25px #24432f22;
  text-align:center
}
@media(max-width:760px){
  .topbar{
    padding:20px 19px 9px
  }
  .brand{
    gap:9px;
    font-size:17px
  }
  .brand strong{
    font-size:14px
  }
  .device-badge{
    font-size:10px;
    padding:4px 8px
  }
  main{
    padding:4px 16px 110px
  }
  .page-intro{
    margin:20px 4px 23px
  }
  .eyebrow{
    font-size:9px;
    letter-spacing:2px;
    margin-bottom:7px
  }
  .page-intro>p:last-child{
    font-size:12px;
    margin-top:7px
  }
  .workspace,.settings-grid{
    grid-template-columns:1fr;
    gap:20px
  }
  .card{
    padding:20px;
    border-radius:20px
  }
  .section-heading{
    margin-bottom:19px
  }
  .result-card{
    position:static;
    min-height:340px
  }
  .empty-art{
    padding-top:45px;
    padding-bottom:28px
  }
  .art-back{
    top:38px
  }
  .field input,.field select,.field textarea{
    font-size:16px
  }
  .prompt-footer{
    font-size:9px
  }
  .bottom-nav{
    justify-content:space-around;
    gap:0;
    padding-top:8px;
    padding-bottom:calc(8px + env(safe-area-inset-bottom))
  }
  .bottom-nav button{
    flex-direction:column;
    gap:5px;
    min-width:80px;
    font-size:10px;
    padding:5px 18px;
    line-height:1.3
  }
  .bottom-nav button>span{
    font-size:22px
  }
  .history-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px
  }
  .history-item{
    padding:12px
  }
  .history-item img,.history-item video{
    height:150px
  }
  .history-item .media-actions{
    gap:6px
  }
  .history-item .secondary{
    padding:7px
  }
  .result-media{
    max-height:60vh
  }
  .actions{
    gap:8px
  }
  .primary,.secondary{
    padding:11px 13px;
    font-size:12px
  }
  .field-note{
    font-size:11px
  }
  .account-line select{
    font-size:13px
  }
  .install-card p,.about-card p{
    font-size:12px
  }
}
@media(max-width:370px){
  .topbar{
    padding-left:14px;
    padding-right:14px
  }
  .brand strong{
    font-size:12px
  }
  .device-badge{
    font-size:9px
  }
  main{
    padding-left:12px;
    padding-right:12px
  }
  .card{
    padding:17px
  }
  .segmented button{
    padding-left:12px;
    padding-right:12px
  }
  .history-grid{
    grid-template-columns:1fr
  }
  .prompt-footer span:first-child{
    max-width:90%
  }
  .account-line{
    gap:6px
  }
}
