:root{
  --bg: #f7f6ff;
  --panel: rgba(255,255,255,0.78);
  --panel-2: rgba(255,255,255,0.92);
  --text: #1b1d2b;
  --muted: rgba(27,29,43,0.70);
  --accent: #ffd58a;
  --accent-2: #9fd6ff;
  --border: rgba(27,29,43,0.12);
  --shadow: 0 12px 32px rgba(20,23,38,0.12);
  --radius: 16px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 15% 10%, rgba(159,214,255,0.35), transparent 60%),
    radial-gradient(1100px 760px at 85% 30%, rgba(255,213,138,0.30), transparent 58%),
    radial-gradient(900px 700px at 50% 100%, rgba(197,156,255,0.22), transparent 62%),
    radial-gradient(900px 700px at 50% 50%, rgba(255,255,255,0.95), rgba(255,255,255,0.30) 55%, transparent 70%),
    var(--bg);
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

.header{
  text-align: center;
  margin-bottom: 18px;
}
.header h1{
  margin: 0;
  font-size: 28px;
  letter-spacing: .04em;
}
.subtitle{
  margin: 8px 0 0;
  color: var(--muted);
}

.panel{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.label{ display:block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.input{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  outline: none;
}
.input + .label{
  margin-top: 12px;
}
.input:focus{
  border-color: rgba(159,214,255,0.55);
  box-shadow: 0 0 0 3px rgba(159,214,255,0.18);
}

.actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255,255,255,0.80);
  cursor: pointer;
  transition: transform .05s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.btn:hover{ background: rgba(255,255,255,0.92); }
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity: .5; cursor: not-allowed; }
.btn.primary{
  background: linear-gradient(135deg, rgba(255,213,138,0.30), rgba(159,214,255,0.22));
  border-color: rgba(255,213,138,0.35);
}

.hint{
  margin: 10px 0 0;
  font-size: 12px;
  color: rgba(27,29,43,0.55);
}

.spread{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.slot{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.slot h2{
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: .02em;
  color: rgba(27,29,43,0.92);
}

.card{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid rgba(27,29,43,0.10);
}

.card-img{
  width: 110px;
  height: 146px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(27,29,43,0.12);
  background: rgba(255,255,255,0.7);
  box-shadow: 0 10px 26px rgba(20,23,38,0.14);
}
.card-img.reversed{
  transform: rotate(180deg);
}

.card-title{
  font-size: 16px;
  font-weight: 700;
}
.card-sub{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.reading{
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(27,29,43,0.88);
  white-space: pre-wrap;
}

.footer{
  margin-top: 18px;
  text-align: center;
  color: rgba(27,29,43,0.55);
}

@media (max-width: 920px){
  .spread{ grid-template-columns: 1fr; }
  .card{ grid-template-columns: 110px 1fr; }
}
