@font-face{
  font-family:"SourceHanSansSCExtraLight";
  src:url("../SourceHanSansSC-ExtraLight-2.otf") format("opentype");
  font-weight:300;
  font-style:normal;
}

:root{
  --ys-bg:#ffffff;
  --ys-ratio:3/4;
  --ys-title-size:48px;
  --ys-title-offset:0px;
  --ys-img-scale:0.8;
  --ys-img-offset:0px;
  --ys-bg-img:url('');
  --ys-benefit-size:22px;
  --ys-benefit-offset:0px;
  --ys-benefit-weight:300;
  --ys-benefit-font:"SourceHanSansSCExtraLight", "Microsoft YaHei", sans-serif;
}

.app-container{
  display:flex;
  height:calc(100vh - 120px);
}

aside{
  width:360px;
  border-right:1px solid #e2e8f0;
  background:#fff;
  display:flex;
  flex-direction:column;
}

.aside-header{
  padding:14px 16px;
  font-weight:800;
  border-bottom:1px solid #e2e8f0;
}

.scroll-area{
  padding:16px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.group{
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:12px;
  background:#fff;
}

.group-label{
  display:inline-block;
  font-size:12px;
  font-weight:800;
  color:#64748b;
  margin-bottom:10px;
}

.ctrl-row{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:10px;
}

.ctrl-row label{
  font-size:12px;
  color:#334155;
  font-weight:700;
}

.ctrl-row textarea{
  width:100%;
  resize:vertical;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:10px;
  font-size:12px;
  outline:none;
}

.ctrl-row input[type="color"]{
  height:38px;
  width:100%;
  border:none;
  padding:0;
  border-radius:10px;
}

.ctrl-row select,
.ctrl-row input[type="range"]{
  width:100%;
}

.btn-gen,
.btn-sub{
  width:100%;
  margin-top:10px;
  border:none;
  border-radius:10px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
}

.btn-gen{
  background:#0f172a;
  color:#fff;
}

.btn-gen:disabled{
  opacity:0.6;
  cursor:not-allowed;
}

.btn-sub{
  background:#f1f5f9;
  color:#0f172a;
}

main{
  flex:1;
  background:#f8fafc;
  overflow:auto;
}

.preview-container{
  padding:18px;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
  gap:18px;
}

.empty-state{
  grid-column:1 / -1;
  background:#fff;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  padding:26px;
  text-align:center;
  color:#64748b;
}

.empty-state i{
  font-size:28px;
  margin-bottom:10px;
}

.ys-card{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  overflow:hidden;
}

.ys-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid #e2e8f0;
  background:#fff;
}

.ys-card-title{
  font-size:12px;
  font-weight:800;
  color:#0f172a;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:220px;
}

.ys-card-actions{
  display:flex;
  gap:8px;
}

.ys-mini-btn{
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius:10px;
  padding:6px 8px;
  font-size:12px;
  cursor:pointer;
}

.ys-mini-btn:disabled{
  opacity:0.6;
  cursor:not-allowed;
}

.ys-canvas{
  width:100%;
  aspect-ratio:var(--ys-ratio);
  background:var(--ys-bg);
  position:relative;
  padding:26px 22px;
  overflow:hidden;
}

.ys-text-layer{
  position:absolute;
  left:0;
  right:0;
  top:0;
  bottom:0;
  pointer-events:none;
  padding:26px 22px;
}

.ys-bg-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
  display:flex;
  align-items:center;
  justify-content:center;
}

.ys-bg-image{
  position:absolute;
  inset:0;
  background-image:var(--ys-bg-img);
  background-repeat:no-repeat;
  background-position:center calc(50% + var(--ys-img-offset));
  background-size:calc(70% * var(--ys-img-scale)) auto;
}

.ys-image-src{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.ys-title{
  font-weight:900;
  font-size:var(--ys-title-size);
  line-height:1.05;
  color:#0f172a;
  transform:translateY(var(--ys-title-offset));
  text-align:center;
}


.ys-title-wrap, .ys-benefit-wrap {
  position:absolute;
  left: 22px;
  right: 22px;
  text-align:center;
}

.ys-title-wrap {
  top: 26px;
}

.ys-benefit-wrap {
  bottom: 26px;
}

.ys-title{
  font-weight:900;
  font-size:var(--ys-title-size);
  line-height:1.05;
  color:#0f172a;
  transform:translateY(var(--ys-title-offset));
  display:inline-block;
}

.ys-benefit{
  font-size:var(--ys-benefit-size);
  font-weight:var(--ys-benefit-weight);
  font-family:var(--ys-benefit-font);
  line-height:1.35;
  color:#0f172a;
  white-space:pre-wrap;
  transform:translateY(var(--ys-benefit-offset));
  display:inline-block;
}

.ys-status-pill{
  display:inline-flex;
  gap:6px;
  align-items:center;
  font-size:11px;
  font-weight:800;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid #e2e8f0;
  color:#334155;
  background:#fff;
}

.ys-status-pill.ok{ border-color:#bbf7d0; background:#f0fdf4; color:#166534; }
.ys-status-pill.err{ border-color:#fecaca; background:#fef2f2; color:#991b1b; }
.ys-status-pill.run{ border-color:#bae6fd; background:#f0f9ff; color:#075985; }
