* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  --paper: #F6ECD5;
  --paper2: #EDD89B;
  --cream: #FFFBF0;
  --ink: #1A0D05;
  --ink-mid: #5C3D1E;
  --ink-light: #9A7348;
  --crimson: #8B1515;
  --gold: #B8860B;
  --sage: #4A6645;
  --shadow: rgba(26, 13, 5, 0.12);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans JP', sans-serif;
  min-height: 100vh;
  overflow-x: hidden
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999
}

#app {
  max-width: 660px;
  margin: 0 auto;
  padding: 16px 14px 48px
}

.hdr {
  text-align: center;
  padding: 28px 0 20px
}

.hdr-logo {
  position: relative;
  display: inline-block;
  font-family: 'Shippori Mincho B1', serif;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1
}

.hdr-logo span {
  color: var(--crimson)
}

.hdr-logo .mezase {
  position: absolute;
  top: -25px;
  left: -38px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  background: #ffe066;
  padding: 3px 8px;
  transform: rotate(-8deg);
  box-shadow: 1px 2px 4px rgba(90,60,20,.18);
  white-space: nowrap;
  z-index: 1;
  letter-spacing: .04em;
  line-height: 1.2
}

.hdr-sub {
  font-size: .7rem;
  color: var(--ink-mid);
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-top: 5px
}

.hdr-line {
  width: 48px;
  height: 2px;
  background: var(--crimson);
  margin: 12px auto 0
}

.card {
  background: var(--cream);
  border: 1px solid rgba(90, 60, 20, .18);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 2px 3px 10px var(--shadow);
  position: relative
}

.card::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: -5px;
  bottom: -5px;
  border: 1px solid rgba(90, 60, 20, .08);
  border-radius: 4px;
  z-index: -1;
  pointer-events: none
}

.card-title {
  font-family: 'Shippori Mincho B1', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px
}

.card-title::before {
  content: '◆';
  color: var(--crimson);
  font-size: .65rem
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 18px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 3px;
  transition: all .15s;
  border: none;
  letter-spacing: .04em
}

.btn-ink {
  background: var(--ink);
  color: var(--paper)
}

.btn-ink:hover {
  background: var(--ink-mid);
  transform: translateY(-1px)
}

.btn-out {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(90, 60, 20, .4)
}

.btn-out:hover {
  background: rgba(0, 0, 0, .04)
}

.btn-gold {
  background: var(--gold);
  color: #fff;
  font-size: .8rem;
  padding: 6px 12px
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important
}

.btn-full {
  width: 100%;
  display: flex
}

.fg {
  margin-bottom: 12px
}

.fl {
  display: block;
  font-size: .78rem;
  color: var(--ink-mid);
  margin-bottom: 4px;
  letter-spacing: .04em
}

.fi,
.fs {
  width: 100%;
  padding: 8px 11px;
  background: var(--paper);
  border: 1.5px solid rgba(90, 60, 20, .28);
  border-radius: 3px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: .92rem;
  color: var(--ink);
  outline: none;
  transition: border-color .2s
}

.fi:focus,
.fs:focus {
  border-color: var(--ink-mid)
}

.fta {
  width: 100%;
  padding: 9px 11px;
  background: var(--paper);
  border: 1.5px solid rgba(90, 60, 20, .28);
  border-radius: 3px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: .95rem;
  color: var(--ink);
  outline: none;
  resize: vertical;
  transition: border-color .2s;
  line-height: 1.85
}

.fta:focus {
  border-color: var(--ink-mid)
}

.cc {
  text-align: right;
  font-size: .72rem;
  color: var(--ink-light);
  margin-top: 3px
}

.ptag {
  background: var(--paper);
  border: 1px solid rgba(90, 60, 20, .22);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  gap: 4px
}

.ptag.host {
  border-color: var(--crimson);
  color: var(--crimson)
}

.ptag.spec {
  opacity: .6;
  font-style: italic
}

.rid {
  font-family: 'Shippori Mincho B1', serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: .3em;
  color: var(--crimson);
  text-align: center;
  padding: 6px 0
}

.steps {
  display: flex;
  border: 1px solid rgba(90, 60, 20, .18);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 18px
}

.step {
  flex: 1;
  padding: 7px 4px;
  text-align: center;
  font-size: .72rem;
  color: var(--ink-light);
  background: var(--paper);
  border-right: 1px solid rgba(90, 60, 20, .18)
}

.step:last-child {
  border-right: none
}

.step.active {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600
}

.step.done {
  background: var(--ink-mid);
  color: var(--paper)
}

.ngrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 10px
}

.nbtn {
  padding: 8px;
  background: var(--paper);
  border: 1.5px solid rgba(90, 60, 20, .22);
  border-radius: 3px;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: .92rem;
  color: var(--ink);
  text-align: center;
  transition: all .15s
}

.nbtn:hover {
  border-color: var(--ink-mid);
  background: rgba(90, 60, 20, .05)
}

.nbtn.sel {
  border-color: var(--crimson);
  background: rgba(139, 21, 21, .07);
  color: var(--crimson);
  font-weight: 600
}

.ctx {
  background: rgba(90, 60, 20, .05);
  border-left: 3px solid var(--crimson);
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: 0 3px 3px 0
}

.ctx-lbl {
  font-size: .7rem;
  color: var(--ink-light);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 3px
}

.ctx-ttl {
  font-family: 'Shippori Mincho B1', serif;
  font-size: 1.05rem;
  font-weight: 700
}

.ctx-pg {
  font-size: .9rem;
  line-height: 1.9;
  color: var(--ink-mid);
  white-space: pre-wrap;
  margin-top: 8px
}

.tbar {
  width: 100%;
  height: 5px;
  background: rgba(90, 60, 20, .12);
  border-radius: 3px;
  margin-bottom: 14px;
  overflow: hidden
}

.tfill {
  height: 100%;
  background: var(--crimson);
  transition: width 1s linear;
  border-radius: 3px
}

.ttxt {
  text-align: right;
  font-size: .78rem;
  color: var(--ink-mid);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums
}

.pdots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-bottom: 14px
}

.pdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(90, 60, 20, .18)
}

.pdot.act {
  background: var(--crimson)
}

.pdot.done {
  background: var(--ink-mid)
}

.sc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--ink-mid)
}

.pips {
  display: flex;
  gap: 3px
}

.pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(90, 60, 20, .14)
}

.pip.on {
  background: var(--sage)
}

.badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--sage);
  color: #fff;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .75rem
}

.badge-wait {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(90, 60, 20, .1);
  color: var(--ink-mid)
}

.sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse 2s infinite
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .3
  }
}

.spec-banner {
  background: rgba(90, 60, 20, .06);
  border: 1px dashed rgba(90, 60, 20, .25);
  border-radius: 3px;
  padding: 10px 14px;
  text-align: center;
  font-size: .82rem;
  color: var(--ink-mid);
  margin-bottom: 14px
}

.bres {
  background: var(--cream);
  border: 1px solid rgba(90, 60, 20, .18);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px
}

.bres-hd {
  background: var(--ink);
  color: var(--paper);
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px
}

.bres-ttl {
  font-family: 'Shippori Mincho B1', serif;
  font-size: 1.05rem;
  font-weight: 700
}

.bres-own {
  font-size: .72rem;
  opacity: .6;
  margin-top: 2px
}

.bpages {
  padding: 14px 16px
}

.bpage {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(90, 60, 20, .18);
  font-size: .9rem;
  line-height: 1.9;
  white-space: pre-wrap
}

.bpage:last-child {
  border-bottom: none
}

.bpage-auth {
  font-size: .7rem;
  color: var(--ink-light);
  margin-top: 5px;
  text-align: right
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.tc {
  text-align: center
}

.sm {
  font-size: .82rem
}

.muted {
  color: var(--ink-light)
}

.mt8 {
  margin-top: 8px
}

.mt12 {
  margin-top: 12px
}

.mb8 {
  margin-bottom: 8px
}

.mb12 {
  margin-bottom: 12px
}

.serif {
  font-family: 'Shippori Mincho B1', serif
}

#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: var(--paper);
  padding: 9px 18px;
  border-radius: 3px;
  font-size: .82rem;
  transition: transform .28s ease;
  z-index: 1000;
  white-space: nowrap;
  pointer-events: none
}

#toast.show {
  transform: translateX(-50%) translateY(0)
}
