/* DEQO LAND – 絵巻物トップ（仮ビジュアル / データ駆動） */

:root {
  --deqo-ink: #1f2a2e;
  --deqo-muted: #5b6a70;
  --deqo-paper: #f4efe6;
  --deqo-panel: #fffdf8;
  --deqo-line: rgba(31, 42, 46, 0.14);
  --deqo-accent: #2f5d73;
  --deqo-accent-soft: #d9e7ef;
  --deqo-shadow: 0 18px 40px rgba(20, 30, 34, 0.18);
  --deqo-header-offset: 48px;
  --deqo-chrome-h: 64px;
}

body.emakimono-page {
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--deqo-ink);
  background: #cfd9df;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", Georgia, serif;
}

body.emakimono-page .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--deqo-line);
  backdrop-filter: blur(8px);
}

body.emakimono-page .category-tabs,
body.emakimono-page .search-bar,
body.emakimono-page .layout,
body.emakimono-page .sidebar,
body.emakimono-page .btn-search {
  display: none !important;
}

.deqo-chrome {
  position: fixed;
  top: var(--deqo-header-offset);
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--deqo-chrome-h);
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(244, 239, 230, 0.95), rgba(244, 239, 230, 0.72));
  border-bottom: 1px solid var(--deqo-line);
  pointer-events: none;
}

.deqo-chrome > * {
  pointer-events: auto;
}

.deqo-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.deqo-brand-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.deqo-brand-reading {
  font-size: 0.78rem;
  color: var(--deqo-muted);
  letter-spacing: 0.18em;
}

.deqo-brand-tagline {
  margin: 0;
  font-size: 0.82rem;
  color: var(--deqo-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(52vw, 420px);
}

.deqo-chrome-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.deqo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--deqo-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--deqo-ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-family: inherit;
}

.deqo-link:hover,
.deqo-link:focus-visible {
  background: #fff;
  outline: 2px solid var(--deqo-accent);
  outline-offset: 2px;
}

.emakimono-viewport {
  position: fixed;
  inset: calc(var(--deqo-header-offset) + var(--deqo-chrome-h)) 0 0 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
  background:
    linear-gradient(180deg, #d7e4ef 0%, #f2ebe0 62%, #6f8f6a 62%, #6f8f6a 100%);
}

.emakimono-viewport.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.emakimono-world {
  position: relative;
  height: 100%;
  min-height: 420px;
}

.emakimono-sky,
.emakimono-ground,
.emakimono-path {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.emakimono-sky {
  top: 0;
  bottom: 0;
}

.emakimono-ground {
  bottom: 0;
}

.emakimono-path {
  left: 0;
  border-radius: 999px;
}

.emakimono-decor,
.emakimono-object {
  position: absolute;
  transform: translate(-50%, -100%);
}

.decor-hill {
  border-radius: 50% 50% 8% 8%;
  opacity: 0.9;
}

.decor-cloud {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow:
    28px 10px 0 -6px rgba(255, 255, 255, 0.65),
    -24px 12px 0 -8px rgba(255, 255, 255, 0.55);
}

.decor-tree {
  width: var(--tree-size, 56px);
  height: var(--tree-size, 56px);
}

.decor-tree::before,
.decor-tree::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.decor-tree::before {
  bottom: 18%;
  width: 18%;
  height: 34%;
  background: #6b4b32;
  border-radius: 4px;
}

.decor-tree::after {
  top: 0;
  width: 78%;
  height: 70%;
  background: #3f6b49;
  border-radius: 50%;
  box-shadow: 16px 10px 0 -6px #4d7d57, -14px 12px 0 -8px #355f40;
}

.emakimono-object {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.emakimono-object:focus-visible {
  outline: 3px solid var(--deqo-accent);
  outline-offset: 6px;
}

.object-visual {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.object-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 14px rgba(20, 30, 34, 0.2));
}

.object-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.ph-wall {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  top: 28%;
  border-radius: 6px 6px 2px 2px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.ph-roof {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 8%;
  height: 28%;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.ph-door {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 22%;
  height: 28%;
  transform: translateX(-50%);
  border-radius: 8px 8px 0 0;
}

.ph-window {
  position: absolute;
  top: 42%;
  width: 16%;
  height: 14%;
  background: rgba(240, 248, 255, 0.75);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(31, 42, 46, 0.15);
}

.ph-window-left { left: 22%; }
.ph-window-right { right: 22%; }

.object-marker {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.object-marker-head {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 42%;
  height: 28%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--marker-top, #1d3550);
  box-shadow: 0 8px 16px rgba(20, 30, 34, 0.18);
}

.object-marker-body {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 58%;
  height: 54%;
  transform: translateX(-50%);
  border-radius: 40% 40% 18% 18%;
  background: var(--marker, #2f5d73);
  box-shadow: 0 10px 18px rgba(20, 30, 34, 0.16);
}

.object-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--deqo-line);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 16px rgba(20, 30, 34, 0.12);
}

.emakimono-object.is-active .object-label,
.emakimono-object:hover .object-label {
  background: var(--deqo-accent);
  color: #fff;
  border-color: transparent;
}

.emakimono-hero-mark {
  position: absolute;
  left: 72px;
  top: 48px;
  z-index: 2;
  max-width: 280px;
  pointer-events: none;
}

.emakimono-hero-mark .hero-brand {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
}

.emakimono-hero-mark .hero-reading {
  margin: 6px 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  color: var(--deqo-muted);
}

.emakimono-hint {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 25;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(31, 42, 46, 0.78);
  color: #f7f3ea;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.emakimono-hint.is-faded {
  opacity: 0;
}

.info-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(18, 24, 28, 0.42);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.info-panel {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(72vh, 560px);
  overflow: auto;
  background: var(--deqo-panel);
  border: 1px solid var(--deqo-line);
  border-radius: 18px;
  box-shadow: var(--deqo-shadow);
  padding: 18px 18px 16px;
}

.info-panel .info-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -4px -4px 8px 8px;
}

.info-panel[hidden],
.info-backdrop[hidden] {
  display: none !important;
}

.info-type {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--deqo-accent-soft);
  color: var(--deqo-accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.info-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
}

.info-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--deqo-line);
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.info-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 12px;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #d9e7ef, #efe6d8 55%, #c9d7b8);
  display: grid;
  place-items: center;
}

.info-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info-media-placeholder {
  color: var(--deqo-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.info-description {
  margin: 0 0 14px;
  color: var(--deqo-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.info-related {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.info-related a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(47, 93, 115, 0.08);
  color: var(--deqo-ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.info-related a:hover,
.info-related a:focus-visible {
  background: rgba(47, 93, 115, 0.16);
  outline: 2px solid var(--deqo-accent);
  outline-offset: 1px;
}

.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.info-actions a,
.info-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.info-actions .btn-primary {
  background: var(--deqo-accent);
  color: #fff;
}

.info-actions .btn-secondary {
  background: #fff;
  border-color: var(--deqo-line);
  color: var(--deqo-ink);
}

.info-embed {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--deqo-line);
  background: #111;
}

.info-embed iframe {
  display: block;
  width: 100%;
  min-height: 220px;
  border: 0;
}

@media (max-width: 720px) {
  :root {
    --deqo-chrome-h: 78px;
  }

  .deqo-chrome {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .deqo-brand-tagline {
    max-width: 100%;
    white-space: normal;
  }

  .emakimono-hero-mark {
    left: 28px;
    top: 28px;
    max-width: 70vw;
  }

  .info-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: min(78vh, 640px);
    border-radius: 18px 18px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .emakimono-viewport,
  .emakimono-hint {
    scroll-behavior: auto;
    transition: none;
  }
}
