:root{
  --accent:#c4adff;
  --second:#7552bc;
  --bg:#171127;
  --glow:#693d91;
  --motif:none;
  --panel:#161520e8;
  --muted:#b4afc4;
  color-scheme:dark
}
body{
  background:var(--motif),radial-gradient(ellipse at 90% 5%,color-mix(in srgb,var(--glow),transparent 65%),transparent 50%),var(--bg);
  transition:background-color .3s;
  color:#f7f3ff
}
.app{
  width:min(1120px,92vw);
  padding-top:24px
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:24px
}
.brand{
  font-weight:950;
  font-size:27px;
  color:#fff;
  text-decoration:none
}
.brand span{
  color:var(--accent)
}
.brand small{
  font-size:12px;
  letter-spacing:.16em;
  margin-left:12px
}
.eyebrow{
  font-size:11px;
  letter-spacing:.16em;
  font-weight:800;
  color:var(--accent)
}
#status{
  padding:10px 15px;
  border:1px solid #ffffff18;
  border-radius:12px;
  color:#d4cbe9;
  font-size:13px;
  margin-bottom:18px;
  overflow-wrap:anywhere
}
#status.error{
  border-color:#f99696;
  color:#ffbaba
}
.tabs{
  display:flex;
  border-bottom:1px solid #ffffff18;
  gap:24px;
  margin-bottom:24px;
  overflow-x:auto
}
.tabs button{
  white-space:nowrap;
  background:none;
  color:#aaa3bb;
  border:0;
  padding:14px 2px;
  border-bottom:2px solid transparent;
  font-weight:700;
  cursor:pointer
}
.tabs [aria-current=page]{
  color:var(--accent);
  border-color:var(--accent)
}
h1{
  font-size:clamp(30px,5vw,48px);
  margin:12px 0 20px;
  letter-spacing:-.04em
}
h2{
  font-size:21px
}
.muted{
  color:var(--muted);
  line-height:1.7
}
.hero-layout{
  display:grid;
  grid-template-columns:1fr 350px;
  min-height:290px;
  align-items:center
}
.hero-layout h1{
  font-size:clamp(36px,5vw,57px)
}
.hero-art{
  position:relative;
  height:270px;
  display:grid;
  place-items:center
}
.paper{
  position:absolute;
  width:155px;
  height:210px;
  border-radius:16px;
  border:1px solid #f1cf8d;
  padding:16px;
  box-shadow:0 15px 45px #0005
}
.paper.back{
  background:linear-gradient(140deg,#9a79d9,#30284b);
  transform:rotate(-18deg) translateX(-40px);
  color:#e6daff
}
.paper.front{
  background:linear-gradient(155deg,#b99a57,#4b3046 70%);
  transform:rotate(12deg) translateX(25px);
  display:flex;
  flex-direction:column;
  justify-content:space-between
}
.paper span{
  font-size:12px;
  font-weight:900
}
.paper strong{
  font-family:Georgia,serif;
  font-size:23px
}
.paper small{
  color:#e5d5ba
}
.hero-art i{
  position:absolute;
  right:30px;
  top:20px;
  font-size:60px;
  color:var(--accent)
}
.modes{
  display:grid;
  grid-template-columns:1.7fr repeat(5,1fr);
  gap:9px;
  margin:16px 0 22px
}
.modes button{
  padding:15px 8px;
  border:1px solid #ffffff1f;
  border-radius:13px;
  background:#ffffff04;
  color:#c5bfd2;
  cursor:pointer;
  font-weight:750
}
.modes button small{
  display:block;
  font-size:10px;
  margin-top:5px;
  opacity:.7
}
.modes button[aria-pressed=true]{
  color:var(--accent);
  background:color-mix(in srgb,var(--glow),transparent 65%);
  border-color:var(--accent)
}
.panel{
  background:var(--panel);
  box-shadow:none;
  border-color:#ffffff13;
  padding:25px
}
.summon{
  display:grid;
  grid-template-columns:1fr 260px;
  gap:20px;
  align-items:center
}
.summon-actions{
  display:grid;
  gap:10px
}
.full{
  grid-column:1/-1;
  margin:0;
  border-top:1px solid #ffffff12;
  padding-top:16px
}
.primary{
  background:linear-gradient(130deg,var(--accent),color-mix(in srgb,var(--second),white 22%));
  color:#171123
}
.big{
  padding:21px;
  font-size:18px
}
.big span{
  float:right
}
.btn{
  min-height:44px;
  font-size:14px
}
.danger{
  background:#ef828212;
  color:#ffc0c0;
  border:1px solid #fca3a327
}
.note{
  color:#b1aac4
}
label{
  display:block;
  font-size:13px;
  color:#cec7dc;
  margin:13px 0;
  line-height:1.7
}
input,textarea,select{
  display:block;
  width:100%;
  background:#0e0d17;
  color:#fff;
  border:1px solid #ffffff24;
  padding:12px;
  border-radius:10px;
  font:inherit;
  font-size:16px;
  min-width:0
}
input:focus,select:focus,textarea:focus{
  outline:2px solid var(--accent);
  outline-offset:2px
}
input[type=range]{
  padding:8px 0;
  accent-color:var(--accent)
}
input[type=color]{
  height:46px;
  padding:5px
}
.check{
  display:flex;
  align-items:center;
  gap:10px
}
.check input{
  width:19px;
  height:19px;
  accent-color:var(--second)
}
.fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px
}
.list-tools{
  display:flex;
  gap:10px;
  align-items:end;
  flex-wrap:wrap
}
.list-tools label{
  flex:1;
  margin-bottom:0;
  min-width:180px
}
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px
}
.section-head h2{
  margin:0
}
.suggestions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
  max-height:240px;
  overflow:auto
}
.suggestions button{
  white-space:normal;
  text-align:left;
  line-height:1.6;
  padding:9px;
  font-size:13px
}
.word-row{
  border-top:1px solid #ffffff12;
  padding:18px 0
}
.word-row strong{
  font-size:19px
}
.word-row p{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:#b9b1ca;
  line-height:1.6;
  max-height:140px;
  overflow:auto
}
.word-row .actions{
  gap:7px
}
.word-row button{
  padding:8px 12px
}
.studio-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px
}
.preview-panel{
  align-self:start;
  position:sticky;
  top:20px;
  display:grid;
  justify-items:center;
  background:radial-gradient(circle,var(--glow),transparent 65%);
  padding:25px 0
}
.preview-panel .card{
  max-width:100%
}
.controls{
  margin:0
}
.card,.mini{
  isolation:isolate
}
.card .card-image,.mini .card-image{
  position:absolute;
  inset:0;
  z-index:0;
  background-size:cover;
  background-repeat:no-repeat;
  pointer-events:none
}
.card .card-overlay,.mini .card-overlay{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none
}
.card-copy{
  background:#0808118c;
  border-radius:12px;
  padding:10px;
  color:#fff;
  text-shadow:0 2px 4px #000
}
.card .meaning{
  font-size:16px;
  max-height:160px;
  white-space:pre-wrap
}
.mini .mini-ja{
  max-height:170px;
  overflow:auto;
  white-space:pre-wrap
}
.mini{
  gap:16px
}
.mini::before,.mini::after{
  pointer-events:none
}
.no-effect,.no-effect::before,.no-effect::after{
  animation:none!important
}
.no-effect::before,.no-effect::after{
  display:none
}
.card,.mini{
  outline:1px solid color-mix(in srgb,var(--accent),transparent 60%);
  outline-offset:3px
}
.stage{
  background:radial-gradient(ellipse at center,color-mix(in srgb,var(--glow),transparent 50%),transparent),#0b0a13;
  min-height:650px
}
.stage .beam-layer{
  filter:drop-shadow(0 0 30px var(--accent))
}
.result-grid{
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr))
}
summary{
  cursor:pointer;
  font-weight:700;
  min-height:30px
}
footer{
  border-top:1px solid #ffffff18;
  margin-top:45px;
  padding:25px 0;
  color:#bab2c9;
  font-size:12px;
  line-height:1.8
}
footer span{
  margin-left:14px
}
footer p{
  font-size:11px;
  color:#8e869e
}
a{
  color:var(--accent)
}
button:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px
}
.reduce-motion *,.reduce-motion *::before,.reduce-motion *::after{
  animation:none!important;
  transition:none!important;
  scroll-behavior:auto!important
}
.reduce-motion .announce.show{
  opacity:1
}
.reduce-motion .card-wrap.reveal{
  opacity:1
}
@media(max-width:700px){
  .topbar>.eyebrow{
    display:none
  }
  .app{
    width:92vw
  }
  .tabs{
    gap:20px
  }
  .tabs button{
    font-size:13px
  }
  .hero-layout{
    grid-template-columns:1fr 130px;
    min-height:220px
  }
  .hero-art{
    transform:scale(.6);
    transform-origin:center;
    height:220px
  }
  .hero-layout h1{
    font-size:31px
  }
  .hero-layout p:not(.eyebrow){
    font-size:12px
  }
  .modes{
    grid-template-columns:repeat(3,1fr)
  }
  .modes button{
    padding:12px 5px
  }
  .summon{
    grid-template-columns:1fr;
    gap:8px
  }
  .summon-actions{
    grid-template-columns:1fr 1fr
  }
  .big{
    font-size:15px;
    padding:15px
  }
  .panel{
    padding:18px
  }
  .fields{
    grid-template-columns:1fr;
    gap:0
  }
  .studio-grid{
    grid-template-columns:1fr
  }
  .preview-panel{
    position:static;
    grid-row:1;
    padding-top:0
  }
  .preview-panel .card{
    width:240px
  }
  .studio-grid .preview-panel .word{
    font-size:28px
  }
  .studio-grid .preview-panel .meaning{
    max-height:100px
  }
  .section-head{
    flex-wrap:wrap
  }
  .list-tools .btn{
    flex:1
  }
  .stage{
    min-height:610px;
    padding:25px 8px
  }
  .result-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px
  }
  .mini{
    padding:10px
  }
  .mini-word{
    font-size:19px
  }
  .mini-ja{
    font-size:12px
  }
  .mini .tag{
    font-size:8px
  }
  .card-copy{
    padding:8px
  }
  .card .word{
    font-size:clamp(25px,7vw,40px)
  }
}
.custom-design .rarity,.custom-design .mini-r{
  align-self:flex-start;
  padding:3px 10px;
  border-radius:9px;
  background:#070710a6;
  color:#fff;
  text-shadow:0 2px 4px #000
}
@media(max-width:700px){
  .studio-grid .preview-panel{
    position:sticky;
    top:8px;
    z-index:45;
    background:radial-gradient(ellipse at center,color-mix(in srgb,var(--glow),transparent 30%),transparent),#15121ff5;
    border:1px solid #ffffff22;
    border-radius:18px;
    padding:10px;
    box-shadow:0 10px 30px #0007
  }
  .studio-grid .preview-panel .card{
    width:155px;
    border-radius:16px;
    padding:10px
  }
  .studio-grid .preview-panel .word{
    font-size:18px
  }
  .studio-grid .preview-panel .meaning{
    font-size:11px;
    max-height:55px
  }
  .studio-grid .preview-panel .rarity{
    font-size:21px
  }
  .studio-grid .preview-panel .tag{
    font-size:7px
  }
  .studio-grid .preview-panel>.note{
    display:none
  }
  .studio-grid .preview-panel>.eyebrow{
    margin:0 0 10px
  }
}
