:root {
  --sumi: #1f2a36;
  --shu: #b5382a;
  --kin: #c9b27a;
  --paper: #faf8f3;
  --line: #ddd6c6;
  --c-weather: #2f6f9f;
  --c-time: #5a5f8f;
  --c-social: #8a5a2b;
  --c-arts: #7a3f7a;
  --c-letters: #2e6b4f;
  --c-life: #6b6b3a;
  --c-health: #a0522d;
  --c-nature: #3d7a3d;
  --c-town: #55606e;
  --c-other: #777;
  --c-person: #b5382a;
  --c-place: #1f5f8b;
}

body { background: var(--paper); color: #222; }

.site-header { background: var(--sumi); border-bottom: 3px double var(--kin); }
.site-title { text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; }
.site-title-main { color: #fff; font-size: 1.25rem; font-weight: 600; letter-spacing: .04em;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }
.site-title-sub { color: var(--kin); font-size: .78rem; }

.nav-tabs .nav-link { color: var(--sumi); }
.nav-tabs .nav-link.active { font-weight: 600; border-top: 2px solid var(--shu); }
.panel { background: #fff; border: 1px solid #dee2e6; border-top: 0; padding: 1rem; }
.hint { font-size: .82rem; color: #666; }
.examples a { margin-right: .6rem; }

.index-list { max-height: 30rem; overflow-y: auto; border: 1px solid var(--line); border-radius: .25rem; }
.index-list-short { max-height: 14rem; }
.index-item { display: flex; align-items: baseline; gap: .5rem; width: 100%; text-align: left; background: #fff;
  border: 0; border-bottom: 1px solid #eee; padding: .3rem .6rem; }
.index-item:hover, .index-item:focus { background: #f3efe4; }
.index-item.active { background: #f6e9e6; box-shadow: inset 3px 0 0 var(--shu); }
.index-item .nm { font-weight: 600; }
.index-item .sub { color: #666; font-size: .82rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.index-item .cnt { font-variant-numeric: tabular-nums; color: var(--shu); font-size: .85rem; white-space: nowrap; }
.index-item .nogeo { color: #999; font-size: .75rem; }

.map { height: 26rem; border: 1px solid var(--line); border-radius: .25rem; }
.legend .dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: -1px; }
.dot-sure { background: rgba(181, 56, 42, .55); border: 1.5px solid var(--shu); }
.dot-est { background: rgba(31, 95, 139, .25); border: 1.5px dashed var(--c-place); }
.leaflet-tooltip.place-tip { font-size: .85rem; }

.cloud { position: relative; height: 30rem; border: 1px solid var(--line); border-radius: .25rem; background: #fff; overflow: hidden; }
.cloud span { cursor: pointer; transition: opacity .15s; }
.cloud span:hover { opacity: .65; text-decoration: underline; }
.cloud-legend label { margin-right: .7rem; white-space: nowrap; cursor: pointer; }
.cloud-legend .sw { display: inline-block; width: .75rem; height: .75rem; border-radius: 2px; margin-right: .2rem; vertical-align: -1px; }

.placeholder-note { background: #fff; border: 1px dashed var(--line); padding: 1.2rem; color: #555; border-radius: .25rem; }
.results-summary { font-size: 1.05rem; }
.results-summary strong { color: var(--shu); }
.xpath-shown { font-size: .78rem; color: #555; word-break: break-all; background: #f1eee6; border-radius: .25rem; padding: .35rem .5rem; }
.variants-note { font-size: .82rem; color: #555; }
.variants-note .grp { display: inline-block; border: 1px solid var(--line); border-radius: .25rem; padding: 0 .35rem; margin: 0 .2rem .2rem 0; background: #fff; }

.years { display: flex; align-items: flex-end; gap: .5rem; height: 3.6rem; margin: .5rem 0; }
.years .yr { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-size: .72rem; color: #555; height: 100%; }
.years .bar { width: 2.2rem; background: var(--kin); border-radius: 2px 2px 0 0; min-height: 2px; }
.years .num { font-variant-numeric: tabular-nums; }

.result { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--kin); border-radius: .25rem; padding: .6rem .8rem; margin-bottom: .6rem; }
.result-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.result-date { font-weight: 600; font-size: 1.02rem; text-decoration: none; color: var(--sumi); }
.result-date:hover { color: var(--shu); text-decoration: underline; }
.result-vol { color: #666; font-size: .82rem; }
.result-n { margin-left: auto; font-size: .8rem; color: #666; white-space: nowrap; }
.snips { list-style: none; margin: .35rem 0 0; padding: 0; }
.snips li { padding: .2rem 0; border-top: 1px dotted #e6e1d4; display: flex; gap: .5rem; align-items: baseline; }
.snips li:first-child { border-top: 0; }
.snip-text { flex: 1; font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; line-height: 1.7; }
.snip-text mark { background: #fbe3df; color: var(--shu); font-weight: 700; padding: 0 .1em; border-bottom: 1px solid var(--shu); }
.snip-where { font-size: .72rem; color: #fff; background: #8a8f98; border-radius: .2rem; padding: 0 .3rem; white-space: nowrap; }
.snip-link { font-size: .78rem; white-space: nowrap; text-decoration: none; }
.snip-link:hover { text-decoration: underline; }
.more-hits { font-size: .8rem; color: #666; }

.entity-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--shu); border-radius: .25rem; padding: .7rem .9rem; margin-bottom: .8rem; }
.entity-card.place { border-top-color: var(--c-place); }
.entity-name { font-size: 1.25rem; font-weight: 600; font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }
.entity-latin { color: #555; margin-left: .5rem; }
.entity-meta { font-size: .88rem; color: #444; }
.entity-ids a { margin-right: .7rem; font-size: .82rem; }

.error-note { background: #fdecea; border: 1px solid #f1b5ae; color: #8a1f14; padding: .7rem .9rem; border-radius: .25rem; }
#aboutBody h3 { font-size: 1rem; margin-top: 1rem; font-weight: 600; }
#aboutBody ul { padding-left: 1.2rem; }
@media (max-width: 575px) { .map { height: 20rem; } .cloud { height: 24rem; } }
