:root {
  color-scheme: dark;
  --canvas: #131719;
  --top: #181d20;
  --panel: #1c2225;
  --panel-2: #232b2d;
  --line: #343d40;
  --text: #f4f0e7;
  --muted: #bac3bd;
  --dim: #9daaa3;
  --gold: #f1c36f;
  --mint: #a4d7b1;
  --blue: #a6d9e6;
  --radius: 14px;
  font-family: "Hiragino Sans", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 98px; }
body { margin: 0; background: var(--canvas); color: var(--text); }
a { color: var(--gold); text-underline-offset: 4px; }
a:hover { color: #ffe0a4; }
button, select, input { font: inherit; color: inherit; }
input, select, button { min-height: 43px; }
button, summary, select { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(1.45rem, 3.6vw, 1.84rem); line-height: 1.3; letter-spacing: .025em; }
h3 { font-size: 1.11rem; line-height: 1.4; }
code {
  border-radius: 4px;
  background: #2b3537;
  color: #d9eddc;
  padding: .13em .32em;
  font-family: "SFMono-Regular", Consolas, "Yu Gothic UI", monospace;
  font-size: .94em;
  overflow-wrap: anywhere;
}
img { object-fit: contain; }
img[src*="/items/"], .item-icon { image-rendering: pixelated; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip:focus { position: fixed; z-index: 10; left: 12px; top: 12px; background: var(--canvas); padding: .55em; }
.top { position: sticky; top: 0; z-index: 5; background: var(--top); border-bottom: 1px solid var(--line); }
.top-inner {
  max-width: 1360px;
  margin-inline: auto;
  padding: 0 clamp(16px, 4vw, 48px);
  min-height: 65px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.13rem; text-decoration: none; white-space: nowrap; }
.brand img { background: #713f2a; border-radius: 9px; }
.brand b { color: var(--gold); font-weight: 700; margin-left: 2px; }
.outside { display: flex; align-items: center; gap: clamp(11px, 2.3vw, 28px); flex-wrap: wrap; }
.outside a { color: var(--muted); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.outside a:hover { color: var(--gold); }
.shell {
  max-width: 1360px; padding: 32px clamp(16px, 4vw, 48px) 0; margin-inline: auto;
  display: grid; grid-template-columns: minmax(164px, 185px) minmax(0, 1fr); gap: clamp(18px, 3.5vw, 48px); align-items: start;
}
.sidebar { position: sticky; top: 94px; }
.nav-title { font-size: .88rem; font-weight: 700; color: var(--dim); margin: 0 0 8px 12px; }
.sidebar a {
  border-radius: 8px; text-decoration: none; display: flex; align-items: center; gap: 9px;
  padding: 10px 10px; color: var(--muted); font-size: .94rem; white-space: nowrap; min-height: 42px;
}
.sidebar a[aria-current], .sidebar a:hover { background: #2b332f; color: var(--text); }
.nav-date { margin: 18px 0 0 12px; color: var(--dim); font-size: .88rem; }
.hero {
  min-height: 292px; border-radius: 18px; border: 1px solid #4b5545;
  background: radial-gradient(ellipse at 85% 73%, #345449 0%, transparent 45%), linear-gradient(116deg, #263129 0%, #25332b 53%, #3a4330 100%);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(215px, 34%); align-items: center;
  gap: 4px; position: relative; overflow: hidden;
}
.hero-content { padding: clamp(23px, 4vw, 48px) 0 clamp(23px, 4vw, 48px) clamp(22px, 4vw, 50px); z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.48rem); line-height: 1.15; letter-spacing: .012em; font-weight: 800; }
.hero h1 span { color: var(--gold); }
.hero p { margin-top: 15px; color: #d5e1d7; max-width: 35em; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 23px; }
.button {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 15px; min-height: 43px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2);
  color: var(--text); font-size: .95rem; font-weight: 700; line-height: 1.4; text-align: center;
}
.button.primary { color: #241c0f; background: var(--gold); border-color: var(--gold); }
.button.primary:hover { background: #f9d78f; }
.button.secondary:hover { background: #313b3d; color: var(--text); }
.hero-art { min-height: 250px; position: relative; isolation: isolate; }
.hero-art img { position: absolute; filter: drop-shadow(0 8px 8px #101a1291); }
.orbit { position: absolute; z-index: -1; left: 44%; top: 49%; width: 196px; height: 196px; transform: translate(-50%,-50%); border: 1px solid #cee0bb30; border-radius: 50%; }
.orbit-inner { width: 150px; height: 150px; border-color: #cee0bb40; }
.art-pick { left: 43%; top: 46%; transform: translate(-50%, -50%) rotate(-7deg); }
.art-diamond { top: 62%; left: 49%; transform: rotate(12deg); }
.art-bread { top: 57%; left: 6%; transform: rotate(-13deg); }
.art-gold { top: 18%; left: 69%; transform: rotate(13deg); }
.pixel { width: 7px; height: 7px; background: #e9d193; transform: rotate(45deg); position: absolute; opacity: .65; }
.p1 { top: 25%; left: 21%; } .p2 { top: 61%; left: 81%; } .p3 { top: 78%; left: 34%; width: 5px; height: 5px; }
.article { margin: 50px 0 0; }
.heading { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.heading img { flex: 0 0 31px; }
.address {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  background: #203132; padding: 14px 16px; border: 1px solid #425a54; border-radius: var(--radius); margin-bottom: 12px;
}
.address div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.address span:not(.sr-only) { color: #c3d8cc; font-size: .91rem; }
.address code { font-size: 1.22rem; color: #f4faec; background: transparent; padding: 0; }
.copy { font-size: .9rem; }
.grid { display: grid; gap: 12px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 16px 18px; }
.panel h3 { margin-bottom: 8px; }
.panel p, .panel ol { color: var(--muted); }
.panel ol { margin: 0; padding-left: 1.3em; }
.panel li + li { margin-top: .35em; }
.panel p + p { margin-top: 8px; }
.mode { display: flex; align-items: flex-start; gap: 12px; }
.mode img { flex: 0 0 32px; margin-top: 2px; }
.mode h3 { margin-bottom: 4px; }
.source, .aside-note { margin-top: 12px; color: var(--muted); font-size: .94rem; }
.callout {
  background: #242d29; border: 1px solid #3c4b43; border-left: 3px solid #88ba96; border-radius: 9px;
  padding: 12px 15px; margin-top: 13px; color: #d4e1d7;
}
.callout strong { color: var(--mint); }
.callout p { margin-top: 3px; }
.shop-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shop-tabs { display: flex; gap: clamp(4px, 1.42vw, 14px); flex-wrap: wrap; padding: 0 12px; border-bottom: 1px solid var(--line); background: #202729; }
.shop-tabs a {
  border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-weight: 700;
  padding: 13px 9px 10px; line-height: 1.35; font-size: .94rem;
}
.shop-tabs a[aria-current] { border-bottom-color: var(--gold); color: var(--gold); }
.shop-tabs a:hover { color: var(--text); }
.shop-inside { padding: clamp(12px, 2vw, 20px); }
.shop-description { display: flex; gap: 8px 16px; align-items: flex-start; justify-content: space-between; }
.shop-description p { color: var(--muted); }
.muted { color: var(--dim) !important; font-size: .88rem; }
.catalog-total { flex: 0 0 auto; color: var(--gold); font-weight: 700; font-size: .93rem; font-variant-numeric: tabular-nums; }
.shop-controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 15px 0 9px; }
.shop-controls input, .shop-controls select {
  max-width: 100%; width: 100%; background: #181e20; color: var(--text);
  border: 1px solid #485256; border-radius: 8px; padding: 8px 10px; font-size: .94rem;
}
.search-label { flex: 1 1 230px; min-width: 160px; }
.shop-controls input::placeholder { color: #a6b3ac; opacity: 1; }
.result-count { margin: 0 0 7px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; text-align: left; }
thead { background: #293234; color: #d9e3db; }
th, td { padding: 9px 10px; }
thead th { font-size: .88rem; white-space: nowrap; font-weight: 700; }
tbody tr + tr { border-top: 1px solid #343e3d; }
tbody tr:nth-child(even) { background: #20282a; }
tbody tr:hover { background: #263130; }
tbody th { font-weight: 600; }
.item-name { display: flex; align-items: center; gap: 9px; }
.item-name > span { min-width: 0; }
.item-icon { display: block; flex: 0 0 30px; width: 30px; height: 30px; background: #2d3937; padding: 3px; border-radius: 5px; }
.item-name small { display: block; color: var(--muted); line-height: 1.4; font-size: .83rem; font-weight: 400; }
.item-category { display: block; color: var(--dim); font-size: .83rem; white-space: nowrap; }
.price, .stock { white-space: nowrap; font-variant-numeric: tabular-nums; }
.price { color: var(--gold); font-weight: 600; }
.sell { color: var(--mint); }
.unavailable { color: var(--dim); font-size: .93rem; }
.stock { color: var(--muted); text-align: right; }
.offers summary { color: var(--blue); font-size: .88rem; }
.offers ul { list-style: none; padding: 5px 0 0; margin: 0; line-height: 1.4; max-height: 9.8rem; overflow: auto; }
.offers li { white-space: nowrap; font-size: .84rem; color: var(--muted); }
.offers li + li { margin-top: 3px; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 11px; }
.pagination:empty { display: none; }
.page-indicator { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.empty { padding: 18px; color: var(--muted); text-align: center; }
.subhead { margin: 20px 0 7px; }
.lede { margin: 0 0 11px; color: var(--muted); }
.rank-table { background: var(--panel); }
.rank-table td { color: var(--muted); font-size: .95rem; }
.rank-table td:first-of-type, .rank-table td:nth-of-type(2) { white-space: nowrap; }
.rank-table th[scope="row"] { color: var(--gold); white-space: nowrap; }
.faq { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { padding: 12px 15px; font-weight: 700; min-height: 45px; }
.faq summary:hover { color: var(--gold); }
.faq p { padding: 0 15px 12px; color: var(--muted); }
.help-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.foot { margin: 42px 0 0; border-top: 1px solid var(--line); color: var(--dim); font-size: .88rem; padding: 18px 0 22px; }
.foot p:first-child { color: var(--muted); font-weight: 700; font-size: .97rem; }
.foot span { color: var(--dim); font-weight: 400; padding-left: 8px; font-size: .88rem; }
.foot p + p { margin-top: 6px; }
@media (max-width: 870px) {
  html { scroll-padding-top: 122px; }
  .shell { display: block; padding-top: 0; }
  .sidebar { z-index: 4; top: 65px; background: var(--canvas); margin-inline: -16px; padding: 4px 16px 8px; }
  .sidebar nav { display: flex; gap: 3px; overflow: auto; scrollbar-width: thin; }
  .sidebar a { flex: 0 0 auto; padding: 8px 10px; }
  .nav-title, .nav-date { display: none; }
  .hero { margin-top: 8px; }
}
@media (max-width: 570px) {
  .top-inner { min-height: 59px; }
  .brand { font-size: 1rem; gap: 7px; }
  .brand img { width: 28px; height: 28px; }
  .outside { justify-content: flex-end; gap: 2px 10px; }
  .outside a { font-size: .84rem; }
  .sidebar { top: 59px; }
  .hero { display: block; min-height: 0; }
  .hero-content { padding: 24px 18px 22px; }
  .hero p { max-width: 26ch; }
  .hero-art { position: absolute; min-height: 0; width: 110px; height: 100px; top: 7px; right: 1px; opacity: .86; pointer-events: none; }
  .hero-art img { width: auto; height: 23px; }
  .hero-art .art-pick { height: 52px; left: 53%; }
  .hero-art .art-bread { left: 22%; }
  .hero-art .art-gold { display: none; }
  .orbit { width: 72px; height: 72px; left: 53%; }
  .orbit-inner { display: none; }
  .article { margin-top: 34px; }
  .grid { grid-template-columns: 1fr; gap: 8px; }
  .panel { padding: 13px 14px; }
  .shop-description { flex-direction: column; gap: 3px; }
  .shop-tabs { padding-inline: 7px; }
  .shop-tabs a { font-size: .87rem; padding-inline: 5px; }
  .table-wrap th, .table-wrap td { padding: 7px 6px; }
  .item-name { gap: 6px; font-size: .93rem; }
  .item-icon { width: 24px; height: 24px; flex-basis: 24px; padding: 2px; }
  .item-name small, .item-category { font-size: .8rem; }
  .rank-table table { min-width: 380px; }
}
@media (max-width: 380px) {
  .hero-art { display: none; }
}
.hero-index { margin-top: 11px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-index a { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 8px; padding: 9px 11px; min-height: 43px; background: #212b29; border: 1px solid #3d4b44; border-radius: 7px; font-size: .92rem; }
.hero-index a:hover, .search-open:hover { background: #2d3c34; color: var(--gold); }
.mode a, .panel a { text-decoration-thickness: 1px; }
.mode h3 a { color: inherit; text-decoration: none; }
.mode h3 a:hover { color: var(--gold); text-decoration: underline; }
.join-image { margin-top: 10px; }
.join-image summary { color: var(--gold); font-size: .93rem; }
.join-image img { display: block; width: 100%; border-radius: 7px; margin-top: 8px; background: #121713; }
.first-steps { margin-bottom: 12px; border-color: #526052; background: linear-gradient(100deg,#27342d,var(--panel)); }
.first-steps li { margin: 5px 0; }
.world-detail + .world-detail { margin-top: 9px; }
.reset-timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 11px 0; }
.reset-timeline div { padding: 8px 12px; background: #283733; border: 1px solid #42564a; border-radius: 6px; display: grid; gap: 2px; }
.reset-timeline time { color: var(--mint); font-weight: 700; }
.reset-timeline span { color: var(--muted); font-size: .92rem; }
.guide-definitions { display: grid; margin: 9px 0 0; }
.guide-definitions > div { display: grid; grid-template-columns: minmax(118px, .26fr) minmax(0,1fr); padding: 7px 0; gap: 10px; }
.guide-definitions > div + div { border-top: 1px solid var(--line); }
.guide-definitions dt { font-weight: 700; }
.guide-definitions dd { margin: 0; color: var(--muted); }
#command-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
#command-filter > label:first-child { flex: 1 1 210px; }
#command-filter input, #command-filter select, #wiki-query { width: 100%; min-height: 43px; border-radius: 7px; border: 1px solid #4c5b5c; background: #181f21; padding: 7px 10px; }
.command-panel table { font-size: .94rem; }
.command-panel code { display: inline-block; margin: 2px 0; }
.command-panel th:first-child { min-width: 10ch; }
#command-empty { margin-top: 7px; }
.search-open { border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; min-height: 34px; background: #293231; color: var(--text); font-size: .91rem; white-space: nowrap; }
#wiki-search { width: min(540px, calc(100vw - 24px)); padding: 15px; background: var(--panel); border: 1px solid #546160; color: var(--text); border-radius: 12px; }
#wiki-search::backdrop { background: #0a0b0db5; }
.search-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; gap: 10px; }
.search-heading h2 { font-size: 1.24rem; }
#wiki-results { max-height: min(55vh,400px); overflow: auto; margin-top: 8px; }
#wiki-results a { display: flex; align-items: center; gap: 9px; padding: 7px 8px; min-height: 43px; color: var(--text); text-decoration: none; border-radius: 5px; overflow-wrap: anywhere; }
#wiki-results a:hover { background: #2c3a34; color: var(--gold); }
#wiki-results a img { width: 24px; height: 24px; flex: 0 0 24px; }
#wiki-results a small { margin-left: auto; color: var(--muted); font-size: .81rem; flex: 0 0 auto; }
@media (max-width: 570px) {
  .outside { max-width: 222px; }
  .search-open { min-height: 30px; padding: 2px 6px; font-size: .82rem; }
  .guide-definitions > div { grid-template-columns: 1fr; gap: 2px; }
  .command-panel table { min-width: 345px; }
}
