/* LuckyDefense guide - minimal, phone-first (dark) */
:root{
  --bg: #0b0f14;
  --panel: #101723;
  --panel2: #0f1621;
  --text: #e6edf3;
  --muted: #9fb0c3;
  --line: rgba(255,255,255,.08);
  --accent: #6aa6ff;
  --accent2: #9ef0ff;
  --warn: #ffcc66;
  --danger: #ff6b6b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
          "Noto Sans JP", "Yu Gothic", Meiryo, Arial, sans-serif;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  letter-spacing: .02em;
  font-size: 15px;
}

a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }

.wrap{
  width: min(760px, calc(100% - 20px));
  margin: 0 auto;
}

main.wrap{
  padding: 18px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.site-header{
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(16,23,35,.65), transparent);
}

.eyebrow{
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

h1{
  font-size: 20px;
  margin: 6px 0 10px;
  line-height: 1.25;
}

.lead{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.toc{
  margin: 0;
  padding: 0 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.toc-title{
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 14px;
}

.toc ol{
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.toc li > ol{ margin-top: 8px; }
.toc ol ol{ margin-top: 8px; padding-left: 14px; }
.toc li{ margin: 6px 0; }
.toc a{ color: var(--text); }
.toc a:hover{ color: var(--accent2); }

.card{
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

h2{
  font-size: 17px;
  margin: 0 0 10px;
  line-height: 1.3;
}

p{ margin: 10px 0; }
strong{ color: #ffffff; }

pre{
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,.25);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
code{ font-family: var(--mono); }

.small{ font-size: 13px; }
.muted{ color: var(--muted); }

.callout{
  border: 0;
  border-left: 3px solid rgba(106,166,255,.65);
  background: transparent;
  border-radius: 0;
  padding: 0 0 0 12px;
  margin: 12px 0;
}

.callout-title{
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: .02em;
}

.callout-strong{
  border-left-color: rgba(158,240,255,.75);
}

.callout-warn{
  border-left-color: rgba(255,204,102,.8);
}

.level-list, .bullet, .diamond-list, .qa-list{
  padding-left: 18px;
  margin: 10px 0;
}

.level-list li,
.bullet > li,
.diamond-list li{
  margin: 6px 0;
}

.bullet ul{
  margin-top: 8px;
  padding-left: 18px;
}

.qa-list{
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}

.qa-list li{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  margin: 8px 0;
}

.qa-list .q{
  color: var(--text);
  font-weight: 600;
}

.qa-list .a{
  color: var(--accent2);
  font-weight: 800;
  white-space: nowrap;
}

/* slightly roomier on wider screens */
@media (min-width: 720px){
  h1{ font-size: 26px; }
  h2{ font-size: 20px; }
  .card{ padding: 0; }
  .toc{ padding: 0 0 12px; }
}

/* iOS safe area padding */
@supports(padding: max(0px)){
  body{
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* TOC accordion */
.toc-root, .toc-sub{
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.toc-item{ margin: 6px 0; }

.toc-acc{
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.toc-acc:first-child{
  border-top: 0;
  padding-top: 0;
}

.toc-sum{
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

/* Hide default marker */
.toc-sum::-webkit-details-marker{ display:none; }
.toc-acc > summary{ list-style: none; }

/* Triangle marker */
.toc-acc > summary::before{
  content: "▶";
  display: inline-block;
  width: 1.2em;
  color: var(--muted);
}
.toc-acc[open] > summary::before{
  content: "▼";
  color: var(--muted);
}

.toc-sub{
  margin: 6px 0 8px;
  padding-left: 18px;
}

.toc-sub li{ margin: 6px 0; }
.toc-sub a{ color: var(--accent); }


/* data table (dark) */
.table-wrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table{
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}
.data-table th,
.data-table td{
  padding: 8px 10px;
  border: 1px solid var(--line);
  vertical-align: top;
}
.data-table th{
  background: rgba(255,255,255,.04);
  text-align: left;
  font-weight: 800;
  white-space: nowrap;
}
.data-table td{
  background: rgba(255,255,255,.02);
}
