:root{
  --bg:#0b1220;
  --card:#0f1a2e;
  --text:#e8eefc;
  --muted:rgba(232,238,252,.72);
  --line:rgba(232,238,252,.14);
  --warn:#ffd37a;
  --good:#a7f3d0;
  --shadow:0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(88,101,242,.16), transparent 60%),
              radial-gradient(900px 500px at 80% 10%, rgba(167,243,208,.12), transparent 60%),
              var(--bg);
  color:var(--text);
}

.wrap{max-width:1100px; margin:0 auto; padding:0 14px;}

.topbar{
  position:sticky; top:0; z-index:10;
  background:rgba(11,18,32,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0;
}
.brand-title{font-weight:800; letter-spacing:.02em}
.brand-sub{color:var(--muted); font-size:12px; margin-top:2px}

.topbar-right{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.stat{
  border:1px solid var(--line);
  border-radius:14px;
  padding:8px 10px;
  background:rgba(255,255,255,.03);
  min-width:90px;
}
.stat-label{font-size:11px; color:var(--muted)}
.stat-value{font-size:18px; font-weight:800}

.panel{
  margin-top:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.03);
  padding:12px;
  box-shadow:var(--shadow);
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width: 840px){
  .grid2{grid-template-columns:1fr}
}

.row{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-top:10px;
}
.row-tight{margin-top:8px}
.spacer{flex:1}

.label{display:block; font-weight:700; font-size:13px; margin:0 0 6px 0; color:rgba(232,238,252,.86)}
.micro{font-size:12px; color:var(--muted); line-height:1.5}

.select, .textarea, .input{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.12);
  color:var(--text);
  padding:10px 12px;
  font-size:15px;
  outline:none;
}
.textarea{resize:vertical; min-height:120px}
.select{padding-right:34px}
.select:focus,.textarea:focus,.input:focus{
  border-color:rgba(167,243,208,.6);
  box-shadow:0 0 0 4px rgba(167,243,208,.12);
}

.btn{
  border:1px solid rgba(167,243,208,.35);
  background:rgba(167,243,208,.12);
  color:var(--text);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:700;
}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(1px)}
.btn.ghost{
  border-color:var(--line);
  background:rgba(255,255,255,.03);
}
.btn.small{padding:8px 10px; font-size:13px; border-radius:12px}

.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  font-size:13px;
  color:rgba(232,238,252,.88);
  user-select:none;
}
.chip input{accent-color:#a7f3d0}

.fixopts{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.10);
}
.fixopts-head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.fixopts-title{font-weight:800}
.fixopts-grid{margin-top:10px; display:flex; flex-wrap:wrap; gap:8px}

.report-head{display:flex; align-items:flex-end; justify-content:space-between; gap:10px; flex-wrap:wrap}
.report-title{font-weight:900; font-size:18px}
.report{margin-top:10px; display:flex; flex-direction:column; gap:10px}

.item{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(0,0,0,.12);
}
.item-top{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.item-title{font-weight:900}
.badges{display:flex; gap:8px; flex-wrap:wrap}
.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:rgba(232,238,252,.9);
}
.badge.warn{
  border-color:rgba(255,211,122,.35);
  background:rgba(255,211,122,.12);
  color:#ffe4ad;
}
.item-desc{margin-top:8px; color:rgba(232,238,252,.84); line-height:1.6}
.samples{
  margin-top:10px;
  white-space:pre-wrap;
  font-size:13px;
  color:rgba(232,238,252,.72);
  border-top:1px dashed rgba(232,238,252,.15);
  padding-top:10px;
}

.summary-title{font-weight:900}
.summary-list{margin-top:10px; display:flex; flex-wrap:wrap; gap:8px}
.summary-pill{
  border:1px solid rgba(167,243,208,.35);
  background:rgba(167,243,208,.10);
  border-radius:999px;
  padding:8px 10px;
  font-size:13px;
}
.summary-pill strong{margin-right:6px}

.diff-head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.diff-title{font-weight:900}
.diff-actions{display:flex; gap:10px; flex-wrap:wrap}
.diff-grid{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
@media (max-width: 900px){
  .diff-grid{grid-template-columns:1fr}
}
.diffbox{
  margin:0;
  min-height:160px;
  max-height:380px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.12);
  white-space:pre-wrap;
  word-break:break-word;
}

/* Adsense placeholder */
.adbox{
  margin-top:14px;
  border:1px dashed rgba(232,238,252,.18);
  border-radius:18px;
  padding:14px;
  background:rgba(255,255,255,.02);
  text-align:center;
}

/* preset boxes */
.presetBox{
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.08);
}
.presetIO{
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:rgba(0,0,0,.08);
}
.btnrow{display:flex; gap:8px; flex-wrap:wrap; margin-top:6px}

/* user dict */
.userdict{
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  background:rgba(255,255,255,.03);
}
.userdict-head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.userdict-title{font-weight:900}
.userdict-actions{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.userdict-add{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:10px;
}
@media (max-width: 760px){
  .userdict-add{grid-template-columns:1fr}
  .userdict-add .addbtn .btn{width:100%}
}
.field{display:flex; flex-direction:column; gap:6px}

.dict-io{
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.10);
}
.dict-io-head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px}
.dict-io-actions{display:flex; gap:10px; flex-wrap:wrap}

.dict-list{margin-top:10px; display:flex; flex-direction:column; gap:8px}
.dict-item{
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(0,0,0,.12);
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.dict-text{color:var(--muted); font-size:13px; line-height:1.6; word-break:break-word}
.dict-text strong{color:var(--text)}
.dict-actions{display:flex; gap:10px; flex-wrap:wrap}

/* guard */
.guard{
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  background:rgba(255,255,255,.03);
}
.guard-head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.guard-title{font-weight:900}
.guard-actions{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.guard-grid{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width: 940px){
  .guard-grid{grid-template-columns:1fr}
}
.guard-box{
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.10);
}
.guard-box-head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.guard-add{margin-top:8px; display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.guard-add .input{flex:1; min-width:220px}
.guard-list{margin-top:10px; display:flex; flex-direction:column; gap:8px}
.guard-item{
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(0,0,0,.12);
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.guard-text{color:var(--muted); font-size:13px; line-height:1.6; word-break:break-word}
.guard-text strong{color:var(--text)}

/* md output */
.mdout{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  background:rgba(0,0,0,.08);
}
.mdout-head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.mdout-title{font-weight:900}
.mdout-actions{display:flex; gap:10px; flex-wrap:wrap}

/* profile */
.profileBox{
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  background:rgba(0,0,0,.08);
}
.profileHead{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.profileTitle{font-weight:900}
.profileActions{display:flex; gap:10px; flex-wrap:wrap}
.profileGrid{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
@media (max-width: 760px){
  .profileGrid{grid-template-columns:1fr}
}
.profileIO{
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.10);
}

/* footer */
.footer{
  margin-top:20px;
  border-top:1px solid var(--line);
  background:rgba(11,18,32,.72);
  backdrop-filter: blur(10px);
}
.footer-inner{
  padding:14px 0;
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap;
}
.footer-links{display:flex; gap:12px; flex-wrap:wrap}
.link{color:rgba(232,238,252,.86); text-decoration:none}
.link:hover{text-decoration:underline}
