.meme-workspace,
.meme-workspace *{box-sizing:border-box}
.meme-workspace [hidden]{display:none!important}
.meme-workspace{
  overflow:hidden;
  border:1px solid rgba(37,99,235,.18);
  border-radius:15px;
  background:#f8fbff;
  color:#102a43
}
.meme-grid{
  display:grid;
  grid-template-columns:minmax(390px,.92fr) minmax(0,1.35fr);
  min-height:690px
}
.meme-panel{min-width:0;background:#fff}
.meme-input-panel{border-right:1px solid rgba(37,99,235,.13)}
.meme-panel-header{
  min-height:54px;
  padding:10px 15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid rgba(37,99,235,.12)
}
.meme-panel-header>span{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:14px;
  font-weight:950
}
.meme-panel-header>span i{color:#1686ec}
.meme-panel-header button,
.meme-panel-header a{
  min-height:36px;
  padding:8px 12px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:8px;
  background:#eef7ff;
  color:#1765d8;
  font-size:12px;
  font-weight:900;
  text-decoration:none;
  cursor:pointer
}
.meme-drop{
  position:relative;
  min-height:126px;
  margin:15px;
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed rgba(37,99,235,.3);
  border-radius:12px;
  background:linear-gradient(145deg,#f8fbff,#eef6ff);
  cursor:pointer;
  transition:.18s ease
}
.meme-drop:hover,
.meme-drop.is-dragging{
  border-color:#1686ec;
  background:#edf7ff;
  box-shadow:0 0 0 3px rgba(22,134,236,.08)
}
.meme-drop>input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer
}
.meme-drop>[data-meme-drop-empty]{
  display:grid;
  justify-items:center;
  gap:5px;
  text-align:center;
  pointer-events:none
}
.meme-drop>[data-meme-drop-empty] i{font-size:27px;color:#1686ec}
.meme-drop>[data-meme-drop-empty] strong{font-size:14px}
.meme-drop>[data-meme-drop-empty] span{font-size:11px;color:#64748b}
.meme-file{
  width:100%;
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  align-items:center;
  gap:12px;
  pointer-events:none
}
.meme-file img{
  width:64px;
  height:64px;
  object-fit:cover;
  border:1px solid rgba(37,99,235,.13);
  border-radius:8px;
  background:#e2e8f0
}
.meme-file strong,
.meme-file span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.meme-file strong{font-size:12px;font-weight:950}
.meme-file span{margin-top:5px;color:#64748b;font-size:11px;font-weight:750}
.meme-text-fields{
  margin:0 15px 13px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px
}
.meme-text-fields label,
.meme-setting{
  min-width:0;
  display:grid;
  gap:6px
}
.meme-text-fields label>span,
.meme-setting>span{
  color:#334e68;
  font-size:11px;
  font-weight:900
}
.meme-text-fields textarea,
.meme-setting select,
.meme-setting input[type="text"],
.meme-setting input[type="number"]{
  width:100%;
  border:1px solid rgba(37,99,235,.18);
  border-radius:8px;
  background:#fff;
  color:#102a43;
  font:inherit;
  font-size:12px;
  font-weight:750;
  outline:none
}
.meme-text-fields textarea{
  min-height:68px;
  padding:10px;
  resize:vertical;
  line-height:1.35
}
.meme-text-fields textarea:focus,
.meme-setting select:focus,
.meme-setting input:focus{
  border-color:#1686ec;
  box-shadow:0 0 0 3px rgba(22,134,236,.08)
}
.meme-text-fields small{
  justify-self:end;
  color:#718096;
  font-size:10px
}
.meme-settings{
  margin:0 15px 16px;
  padding:13px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  border:1px solid rgba(37,99,235,.13);
  border-radius:12px;
  background:#f8fbff
}
.meme-setting select,
.meme-setting input[type="text"],
.meme-setting input[type="number"]{
  min-height:40px;
  padding:8px 10px
}
.meme-color-setting>div{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  gap:7px
}
.meme-color-setting input[type="color"]{
  width:46px;
  min-height:40px;
  padding:3px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:8px;
  background:#fff;
  cursor:pointer
}
.meme-setting input.is-invalid{border-color:#dc2626!important;background:#fff1f2!important}
.meme-switch-setting{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  min-height:61px;
  padding:10px 12px;
  border:1px solid rgba(37,99,235,.12);
  border-radius:9px;
  background:#fff
}
.meme-switch-setting input{
  width:20px;
  height:20px;
  accent-color:#1686ec;
  cursor:pointer
}
.meme-range-setting{grid-column:1/-1}
.meme-range-setting>div{
  display:grid;
  grid-template-columns:minmax(0,1fr) 74px 22px;
  align-items:center;
  gap:8px
}
.meme-range-setting input[type="range"]{
  width:100%;
  accent-color:#1686ec;
  cursor:pointer
}
.meme-range-setting b{font-size:11px;color:#526b86}
.meme-preview-panel{
  display:grid;
  grid-template-rows:auto minmax(470px,1fr) auto auto;
  min-height:690px
}
.meme-preview{
  min-height:470px;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:auto;
  background:
    linear-gradient(45deg,rgba(148,163,184,.12) 25%,transparent 25%),
    linear-gradient(-45deg,rgba(148,163,184,.12) 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,rgba(148,163,184,.12) 75%),
    linear-gradient(-45deg,transparent 75%,rgba(148,163,184,.12) 75%);
  background-size:20px 20px;
  background-position:0 0,0 10px,10px -10px,-10px 0
}
.meme-empty{
  max-width:360px;
  display:grid;
  justify-items:center;
  gap:8px;
  color:#66809a;
  text-align:center
}
.meme-empty i{font-size:43px;color:#93c5fd}
.meme-empty strong{font-size:14px;color:#334e68}
.meme-empty span{font-size:11px;line-height:1.5}
.meme-canvas-wrap{
  max-width:100%;
  max-height:100%;
  display:flex;
  align-items:center;
  justify-content:center
}
.meme-canvas-wrap canvas{
  display:block;
  max-width:100%;
  max-height:620px;
  border:1px solid rgba(15,23,42,.16);
  border-radius:6px;
  background:#000;
  box-shadow:0 18px 42px rgba(15,23,42,.16)
}
.meme-preview-info{
  padding:12px 15px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  border-top:1px solid rgba(37,99,235,.12);
  background:#fff
}
.meme-preview-info>div{
  min-width:0;
  padding:9px;
  display:grid;
  gap:3px;
  border:1px solid rgba(37,99,235,.1);
  border-radius:8px;
  background:#f8fbff;
  text-align:center
}
.meme-preview-info b{
  overflow:hidden;
  color:#102a43;
  font-size:12px;
  font-weight:950;
  text-overflow:ellipsis;
  white-space:nowrap
}
.meme-preview-info span{color:#718096;font-size:10px;font-weight:750}
.meme-next{
  margin:0 15px 15px;
  padding:12px;
  display:grid;
  gap:10px;
  border:1px solid rgba(22,134,236,.2);
  border-radius:10px;
  background:#eef8ff
}
.meme-next>div:first-child strong,
.meme-next>div:first-child span{display:block}
.meme-next>div:first-child strong{font-size:12px;font-weight:950}
.meme-next>div:first-child span{margin-top:3px;color:#526b86;font-size:10px}
.meme-next>div:last-child{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px
}
.meme-next a{
  min-height:36px;
  padding:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(37,99,235,.14);
  border-radius:7px;
  background:#fff;
  color:#1765d8;
  font-size:11px;
  font-weight:900;
  text-align:center;
  text-decoration:none
}
.meme-next a.is-loading{opacity:.58;pointer-events:none}
.meme-next a.is-ready:hover{border-color:#1686ec;background:#e7f4ff}
.meme-footer{border-top:1px solid rgba(37,99,235,.12);background:#fff}
.meme-create{
  min-height:40px;
  padding:9px 17px;
  border:0;
  border-radius:8px;
  background:linear-gradient(135deg,#0ea5e9,#2563eb);
  color:#fff;
  font-size:12px;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(37,99,235,.18)
}
.meme-create:disabled{opacity:.48;cursor:not-allowed;box-shadow:none}
.meme-create.is-loading{opacity:.68;pointer-events:none}

body.theme-dark .meme-workspace{
  border-color:#274260;
  background:#0b1628;
  color:#f8fafc
}
body.theme-dark .meme-panel,
body.theme-dark .meme-panel-header,
body.theme-dark .meme-footer,
body.theme-dark .meme-preview-info{background:#101b2f;border-color:#263b57}
body.theme-dark .meme-input-panel{border-color:#263b57}
body.theme-dark .meme-drop,
body.theme-dark .meme-settings,
body.theme-dark .meme-preview-info>div{
  border-color:#28425f;
  background:#0e1a2e
}
body.theme-dark .meme-drop:hover,
body.theme-dark .meme-drop.is-dragging{background:#112540}
body.theme-dark .meme-text-fields label>span,
body.theme-dark .meme-setting>span,
body.theme-dark .meme-empty strong,
body.theme-dark .meme-preview-info b{color:#e6edf7}
body.theme-dark .meme-text-fields textarea,
body.theme-dark .meme-setting select,
body.theme-dark .meme-setting input[type="text"],
body.theme-dark .meme-setting input[type="number"],
body.theme-dark .meme-color-setting input[type="color"],
body.theme-dark .meme-switch-setting,
body.theme-dark .meme-next a{
  border-color:#2b4664;
  background:#0b1628;
  color:#f8fafc
}
body.theme-dark .meme-drop>[data-meme-drop-empty] span,
body.theme-dark .meme-file span,
body.theme-dark .meme-text-fields small,
body.theme-dark .meme-preview-info span,
body.theme-dark .meme-next>div:first-child span{color:#a9bdd3}
body.theme-dark .meme-preview{
  background-color:#091426;
  background-image:
    linear-gradient(45deg,rgba(71,85,105,.18) 25%,transparent 25%),
    linear-gradient(-45deg,rgba(71,85,105,.18) 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,rgba(71,85,105,.18) 75%),
    linear-gradient(-45deg,transparent 75%,rgba(71,85,105,.18) 75%)
}
body.theme-dark .meme-next{border-color:#28517b;background:#0d2440}

@media(max-width:1100px){
  .meme-grid{grid-template-columns:1fr}
  .meme-input-panel{border-right:0;border-bottom:1px solid rgba(37,99,235,.13)}
  .meme-preview-panel{min-height:600px}
}
@media(max-width:720px){
  .meme-workspace{border-radius:10px}
  .meme-text-fields,
  .meme-settings{grid-template-columns:1fr}
  .meme-range-setting{grid-column:auto}
  .meme-preview{min-height:390px;padding:10px}
  .meme-preview-panel{grid-template-rows:auto minmax(390px,1fr) auto auto;min-height:520px}
  .meme-preview-info{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}
  .meme-next>div:last-child{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:480px){
  .meme-panel-header{padding:9px 10px}
  .meme-panel-header>span{font-size:12px}
  .meme-drop{margin:10px;min-height:112px}
  .meme-text-fields,.meme-settings{margin-left:10px;margin-right:10px}
  .meme-settings{padding:10px}
  .meme-preview-info{grid-template-columns:1fr 1fr}
  .meme-next{margin:0 10px 10px}
  .meme-next>div:last-child{grid-template-columns:1fr}
  .meme-range-setting>div{grid-template-columns:minmax(0,1fr) 66px 20px}
}
