/* ============================================================
   Okishima:1336 fan guide — sumi-e editorial theme
   Paper · ink · vermillion. Brush strokes, enso, seals, torii.
   ============================================================ */

:root {
  --paper:      #f6f1e4;
  --paper-deep: #ede5d1;
  --edge:       #ddd2b6;
  --ink:        #1b1510;
  --ink-2:      #4d4435;
  --ink-3:      #8a7e66;
  --red:        #cf2b1e;
  --red-deep:   #9e2015;
  --indigo:     #314a58;

  --font-brush: 'Yuji Syuku', 'Shippori Mincho', serif;
  --font-head:  'Shippori Mincho', 'Hiragino Mincho ProN', serif;
  --font-body:  'Zen Kaku Gothic New', 'Hiragino Sans', -apple-system, 'Segoe UI', sans-serif;

  --maxw: 1120px;
  --measure: 46rem;

  /* faint paper grain */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  /* seigaiha for dark surfaces */
  --waves-dark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='30' viewBox='0 0 60 30'><g fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1.4'><circle cx='0' cy='30' r='26'/><circle cx='30' cy='30' r='26'/><circle cx='60' cy='30' r='26'/><circle cx='15' cy='15' r='13'/><circle cx='45' cy='15' r='13'/><circle cx='30' cy='0' r='26'/></g></svg>");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
}

::selection { background: var(--red); color: var(--paper); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}
.wrap--narrow { max-width: calc(var(--measure) + 2.8rem); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: .5rem 1rem;
  text-decoration: none;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ============ header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 228, .93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
/* lacquer line under the ink border */
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--red);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 62px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark-num {
  font-family: var(--font-brush);
  color: var(--red);
  font-size: 1.05em;
  margin-left: .1em;
  display: inline-block;
  transform: translateY(.1em) rotate(-2.5deg);
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.main-nav::-webkit-scrollbar { display: none; }

.main-nav a {
  padding: .55rem .6rem;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .03em;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.main-nav a:hover { color: var(--red); border-bottom-color: var(--red); }
.main-nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }

/* ============ hero ============ */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 5.2rem;
}

/* giant brush "1336" watermark, as on the game's own key art */
.hero-1336 {
  position: absolute;
  right: -1.5rem;
  top: -4.5rem;
  z-index: 0;
  font-family: var(--font-brush);
  font-size: clamp(11rem, 30vw, 23rem);
  line-height: 1;
  color: rgba(27, 21, 16, .055);
  transform: rotate(-6deg);
  user-select: none;
  pointer-events: none;
}

.hero-enso {
  position: absolute;
  left: -50px;
  top: -42px;
  width: min(240px, 42vw);
  z-index: 0;
  opacity: .92;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
}

.kicker {
  margin: 0;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 2px;
  background: var(--red);
  vertical-align: middle;
  margin-right: .7rem;
  transform: translateY(-2px);
}

.hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(3.4rem, 9vw, 6.6rem);
  line-height: 1.02;
  margin: .5rem 0 1.3rem;
  letter-spacing: .01em;
}
.h1-num {
  font-family: var(--font-brush);
  font-weight: 400;
  color: var(--red);
  font-size: .58em;
  display: inline-block;
  transform: rotate(-3deg) translateY(-.12em);
  margin-left: .14em;
}

.lead {
  font-size: 1.18rem;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 39rem;
  margin: 0;
}

.seal {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-top: 1.7rem;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-brush);
  font-size: 1.15rem;
  letter-spacing: .05em;
  transform: rotate(-4deg);
  box-shadow: 2px 3px 0 rgba(27, 21, 16, .28);
}

/* the game's own one-line description, set vertically */
.hero-vertical {
  writing-mode: vertical-rl;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .55em;
  color: var(--ink-2);
  margin: .4rem 0 0;
  padding: .6rem .55rem;
  border-left: 1px solid var(--edge);
}

/* wide ink brush stroke closing the hero */
.hero-brush {
  display: block;
  width: 100%;
  height: 66px;
  margin-top: 3.2rem;
}

/* ============ content blocks ============ */

.block { padding: 4.3rem 0; }

.block h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
/* red diamond mark + fading rule */
.block h2::before {
  content: "";
  flex: none;
  width: .5em;
  height: .5em;
  background: var(--red);
  transform: rotate(45deg);
}
.block h2::after {
  content: "";
  flex: 1;
  height: 2px;
  margin-left: .6rem;
  background: linear-gradient(90deg, var(--edge), transparent);
}

.block p {
  max-width: var(--measure);
  color: var(--ink-2);
  margin: 0 0 1.1rem;
}
.block p:last-child { margin-bottom: 0; }

/* inline text links — vermillion with an ink underline */
.block p a {
  color: var(--red-deep);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(207, 43, 30, .4);
  transition: background .15s, border-color .15s;
}
.block p a:hover {
  background: rgba(207, 43, 30, .1);
  border-bottom-color: var(--red);
}

/* dark ink band (codes section) */
.block--ink {
  background-color: var(--ink);
  background-image: var(--waves-dark);
  color: var(--paper);
}
.block--ink h2 { color: var(--paper); }
.block--ink h2::after { background: linear-gradient(90deg, #453c2f, transparent); }
.block--ink p { color: #cfc7b8; }
.block--ink p a {
  color: #ff7063;
  border-bottom-color: rgba(255, 112, 99, .45);
}
.block--ink p a:hover {
  background: rgba(255, 112, 99, .14);
  border-bottom-color: #ff7063;
}

/* What is — split with record aside */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.2rem;
  align-items: start;
}

.record {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--edge);
  border-top: 6px solid var(--ink);
  border-bottom: 6px solid var(--ink);
  padding: 1.3rem 1.4rem 1.5rem;
}
/* small red hanko corner */
.record::after {
  content: "";
  position: absolute;
  right: .9rem;
  top: .9rem;
  width: .85rem;
  height: .85rem;
  background: var(--red);
  transform: rotate(8deg);
}
.record-title {
  margin: 0 0 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--red);
}
.record dl { margin: 0; display: grid; gap: .85rem; }
.record dl > div {
  border-left: 3px solid var(--edge);
  padding-left: .75rem;
}
.record dt {
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.record dd { margin: .1rem 0 0; font-weight: 700; font-size: .95rem; }

/* three pillars */
.pillars {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.pillar {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.4rem 1.3rem 1.6rem;
  background: var(--paper-deep);
  border: 1px solid var(--edge);
  border-top: 4px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s, border-color .15s, box-shadow .15s, background .15s;
}
.pillar:hover {
  border-top-color: var(--red);
  background: #f3eddb;
  transform: translateY(-4px);
  box-shadow: 0 10px 22px -14px rgba(27, 21, 16, .5);
}
.pillar svg { width: 46px; height: 46px; color: var(--ink); transition: color .15s; }
.pillar:hover svg { color: var(--red-deep); }
.pillar-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.18rem;
}
.pillar-desc { font-size: .9rem; color: var(--ink-2); }

/* islands figure + note */
.islands-fig {
  margin: 0 0 1.9rem;
  border: 1px solid var(--edge);
  background: var(--paper-deep);
}
.islands-fig svg { display: block; width: 100%; height: auto; }

.note {
  border-left: 5px solid var(--red);
  background: var(--paper-deep);
  padding: .95rem 1.15rem;
  font-size: .95rem;
}

/* ============ the seven paths ============ */

.paths {
  background-color: var(--paper-deep);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.paths-sub { margin: -0.6rem 0 0; color: var(--ink-3); font-size: .95rem; }

.path-list {
  list-style: none;
  margin: 1.9rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem 1.8rem;
}
.path {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1.05rem;
  background: var(--paper);
  border: 1px solid var(--edge);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s, border-color .15s, background .15s;
}
.path:hover {
  border-color: var(--ink);
  background: #fcf8ee;
  transform: translateX(5px);
}
.path-num {
  flex: none;
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-brush);
  font-size: 1.35rem;
  color: var(--ink);
  transition: background .15s, border-color .15s, color .15s;
}
.path:hover .path-num {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}
.path-body { display: flex; flex-direction: column; min-width: 0; }
.path-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.06rem;
}
.path-desc { font-size: .85rem; color: var(--ink-2); }
.path-torii {
  flex: none;
  margin-left: auto;
  width: 27px;
  height: 27px;
  fill: var(--red);
  opacity: .85;
  transition: transform .15s, opacity .15s;
}
.path:hover .path-torii { transform: translateX(3px); opacity: 1; }

/* ============ FAQ ============ */

.faq details { border-top: 1px solid var(--edge); }
.faq details:last-child { border-bottom: 1px solid var(--edge); }

.faq summary {
  display: flex;
  align-items: center;
  gap: .95rem;
  cursor: pointer;
  padding: 1.05rem .2rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.4;
  list-style: none;
  transition: color .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--red-deep); }
.faq details[open] summary { color: var(--red-deep); }

.q-mark {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-brush);
  font-size: 1rem;
  transform: rotate(-3deg);
}
.q-text { flex: 1; }

.q-plus { position: relative; flex: none; width: 1rem; height: 1rem; margin-left: .5rem; }
.q-plus::before,
.q-plus::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  background: var(--ink);
}
.q-plus::after { transform: rotate(90deg); transition: transform .18s; }
.faq details[open] .q-plus::after { transform: rotate(0deg); }

.faq details p {
  margin: .1rem 0 1.4rem 2.85rem;
  color: var(--ink-2);
  font-size: .97rem;
}

/* ============ footer ============ */

.site-footer {
  background-color: var(--ink);
  background-image: var(--waves-dark);
  color: #cfc7b8;
}
.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--red);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.4rem 1.4rem 2.4rem;
  border-bottom: 1px solid #38312a;
}

.wordmark--footer { color: var(--paper); }
.wordmark--footer .wordmark-num { color: #ff7063; }
.footer-jp {
  margin: .8rem 0 0;
  font-family: var(--font-head);
  font-size: .9rem;
  letter-spacing: .4em;
  color: var(--ink-3);
}

.footer-head {
  margin: 0 0 .9rem;
  font-family: var(--font-head);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer-nav a {
  display: block;
  padding: .26rem 0;
  color: #cfc7b8;
  text-decoration: none;
  font-size: .94rem;
  transition: color .15s;
}
.footer-nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 4px;
}

.footer-base {
  padding-top: 1.3rem;
  padding-bottom: 2rem;
  font-size: .85rem;
  color: var(--ink-3);
}
.footer-base p { margin: 0; }

/* ============ responsive ============ */

@media (max-width: 880px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    padding-top: .65rem;
    padding-bottom: .55rem;
  }
  .main-nav { margin-left: 0; width: 100%; }
  .main-nav a { padding: .45rem .55rem .45rem 0; margin-right: .35rem; }

  .hero { padding-top: 3.6rem; }
  .hero-enso { opacity: .55; }
  .hero-vertical { display: none; }

  .split { grid-template-columns: 1fr; gap: 2.2rem; }
  .pillars { grid-template-columns: 1fr; }
  .path-list { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .block { padding: 3.4rem 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .faq details p { margin-left: 0; }
}

/* ============ inner pages ============ */

/* smaller hero for content pages — same brush language, less height */
.hero--page { padding-top: 3.9rem; }
.hero--page h1 { font-size: clamp(2.5rem, 6.4vw, 4.5rem); }
.hero--page .hero-brush { height: 44px; margin-top: 2.4rem; }
.hero--page .seal { width: 3rem; height: 3rem; font-size: 1rem; margin-top: 1.3rem; }

/* h3 subheads + lists inside blocks */
.block h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 2.2rem 0 .8rem;
}
.block ul, .block ol {
  max-width: var(--measure);
  color: var(--ink-2);
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
}
.block li { margin-bottom: .45rem; }
.block li::marker { color: var(--red); font-weight: 700; }
.block li > ul { margin-top: .45rem; }
.col-list { columns: 2; column-gap: 2.4rem; }

/* links and inline code inside lists/spec lists inherit the block link style */
.block li a, .block dd a, .block summary + p a {
  color: var(--red-deep);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(207, 43, 30, .4);
  transition: background .15s, border-color .15s;
}
.block li a:hover, .block dd a:hover {
  background: rgba(207, 43, 30, .1);
  border-bottom-color: var(--red);
}
.block--ink li, .block--ink ul, .block--ink ol { color: #cfc7b8; }
.block--ink li strong, .block--ink .spec-list dt { color: var(--paper); }
.block--ink .spec-list dd { color: #cfc7b8; }
.block--ink .spec-list > div { border-left-color: #453c2f; }
.block--ink li a, .block--ink dd a {
  color: #ff7063;
  border-bottom-color: rgba(255, 112, 99, .45);
}
.block--ink li a:hover, .block--ink dd a:hover {
  background: rgba(255, 112, 99, .14);
  border-bottom-color: #ff7063;
}
.block code {
  font-weight: 700;
  font-size: .9em;
  color: var(--red-deep);
  background: var(--paper-deep);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: .05em .4em;
}
.record dd { overflow-wrap: break-word; }

/* keyboard keys */
kbd {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .8em;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--edge);
  border-bottom: 3px solid var(--ink);
  border-radius: 5px;
  padding: 0 .55em;
}

/* data tables (codes, gear, moves) */
.tbl-wrap {
  overflow-x: auto;
  margin: 0 0 1.7rem;
  border: 1px solid var(--edge);
  border-top: 4px solid var(--ink);
  background: var(--paper-deep);
  -webkit-overflow-scrolling: touch;
}
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl caption {
  text-align: left;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: .6rem .95rem 0;
}
.tbl th {
  font-family: var(--font-head);
  font-weight: 700;
  text-align: left;
  padding: .6rem .95rem;
  background: var(--ink);
  color: var(--paper);
  white-space: nowrap;
}
.tbl td {
  padding: .55rem .95rem;
  border-top: 1px solid var(--edge);
  vertical-align: top;
  color: var(--ink-2);
}
.tbl tbody tr:nth-child(even) td { background: rgba(27, 21, 16, .035); }
.tbl td:first-child { font-weight: 700; color: var(--ink); }
.tbl .code-name {
  font-weight: 900;
  color: var(--red-deep);
  white-space: nowrap;
}
.tbl .dead { color: var(--ink-3); text-decoration: line-through; font-weight: 500; }

/* rarity / source tags */
.tag {
  display: inline-block;
  padding: .02em .6em .08em;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  white-space: nowrap;
}
.tag--legendary { color: var(--red-deep); }
.tag--rare { color: var(--indigo); }
.tag--common { color: var(--ink-3); }
.tag--passive { color: var(--ink-3); border-style: dashed; }

/* one-line definition lists (moves, locations, NPCs) */
.spec-list { margin: 0 0 1.5rem; max-width: var(--measure); }
.spec-list > div {
  border-left: 3px solid var(--edge);
  padding: .1rem 0 .15rem 1rem;
  margin-bottom: .85rem;
}
.spec-list > div:hover { border-left-color: var(--red); }
.spec-list dt { font-weight: 900; color: var(--ink); }
.spec-list dd { margin: .12rem 0 0; color: var(--ink-2); font-size: .95rem; }

/* numbered plan (first-hour steps) */
.steps { list-style: none; counter-reset: step; padding-left: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3.1rem;
  margin-bottom: .95rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .14rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  background: var(--paper);
}

/* "related pages" strip at the end of an article */
.rel-links {
  margin-top: 2.6rem;
  padding: 1.15rem 1.3rem 1.3rem;
  background: var(--paper-deep);
  border: 1px solid var(--edge);
  border-left: 5px solid var(--red);
}
.rel-links .rel-title {
  margin: 0 0 .7rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--red);
}
.rel-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
  margin: 0;
  padding: 0;
}
.rel-links li { margin: 0; }
.rel-links a {
  color: var(--red-deep);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border-bottom: 2px solid rgba(207, 43, 30, .4);
  transition: background .15s, border-color .15s;
}
.rel-links a:hover {
  background: rgba(207, 43, 30, .1);
  border-bottom-color: var(--red);
}

@media (max-width: 560px) {
  .col-list { columns: 1; }
  .tbl { font-size: .88rem; }
  .tbl th, .tbl td { padding: .5rem .7rem; }
}

.crumbs{font-size:.8rem;letter-spacing:.06em;color:#8a7d63;padding:.7rem 0 .2rem}
.crumbs a{color:#cf2b1e;text-decoration:none}
.crumbs a:hover{text-decoration:underline}
.crumbs .sep{margin:0 .45em;color:#b3a78d}
.page-body{max-width:46rem;padding:2.2rem 0 3.2rem}
