/* Home, section pages, item types, notices. */

/* ---------- prose (rendered markdown) ---------- */

.prose {
  max-width: 68ch;
  font-size: 1.04rem;
  line-height: 1.95;
  color: var(--ink);
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.05em;
}

.prose h3,
.prose h4,
.prose h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .04em;
  color: var(--sumi);
}

.prose h3 {
  margin-top: 1.7em;
  padding-bottom: .35em;
  font-size: 1.42rem;
  border-bottom: 1px solid var(--hairline);
}

.prose h4 {
  margin-top: 1.5em;
  font-size: 1.2rem;
}

.prose h5 {
  margin-top: 1.4em;
  font-size: 1.04rem;
  color: var(--ink-soft);
  letter-spacing: .1em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose a {
  color: var(--beni);
  text-decoration: underline;
  text-decoration-color: rgba(194, 56, 42, .45);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color var(--dur-fast) ease, text-decoration-color var(--dur-fast) ease;
}

.prose a:hover {
  color: var(--shu);
  text-decoration-color: currentColor;
}

.prose strong {
  font-weight: 700;
  color: var(--sumi);
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose li + li {
  margin-top: .3em;
}

.prose li > ul,
.prose li > ol {
  margin-top: .3em;
}

.prose ul > li::marker {
  color: var(--shu);
}

.prose ol > li::marker {
  color: var(--kin-deep);
  font-family: var(--font-latin);
  font-weight: 600;
}

.prose blockquote {
  padding: .3em 0 .3em 1.2em;
  border-left: 2px solid var(--kin);
  color: var(--ink-soft);
  font-style: italic;
}

.prose code {
  padding: .12em .4em;
  border-radius: 3px;
  background: rgba(212, 196, 160, .45);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86em;
}

.prose pre {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--sumi);
  color: var(--on-dark);
  line-height: 1.6;
  overflow-x: auto;
  border: 1px solid var(--sumi-soft);
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: .86rem;
}

.prose hr {
  height: 1px;
  margin: 2em auto;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--kin) 50%, transparent);
}

.prose__empty {
  color: var(--ink-faint);
  font-style: italic;
}

/* ---------- home ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--on-dark);
  background:
    radial-gradient(60% 70% at 78% 26%, rgba(233, 213, 163, .2) 0%, rgba(233, 213, 163, 0) 60%),
    radial-gradient(120% 90% at 70% 20%, var(--ai) 0%, var(--kon) 55%, var(--kon-deep) 100%);
  border-bottom: 1px solid var(--kin-deep);
}

.hero .hero__scene {
  position: relative;
  height: 78vh;
  min-height: 520px;
}

.hero__text {
  position: absolute;
  left: clamp(20px, 6vw, 88px);
  bottom: clamp(36px, 11vh, 120px);
  display: flex;
  align-items: stretch;
  gap: clamp(14px, 2vw, 24px);
  max-width: min(34rem, calc(100% - 40px));
  padding: clamp(22px, 3vw, 34px) clamp(22px, 3.2vw, 40px);
  border: 1px solid rgba(200, 163, 90, .75);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(251, 246, 234, .95), rgba(244, 236, 219, .88));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 6px rgba(251, 246, 234, .16), 0 0 80px 10px rgba(251, 246, 234, .22), var(--shadow-lift);
  color: var(--ink);
}

.hero__text .hero__accent {
  flex: none;
  padding-right: clamp(12px, 1.6vw, 20px);
  border-right: 1px solid var(--hairline);
  font-family: var(--font-brush);
  font-size: 1.02rem;
  letter-spacing: .5em;
  line-height: 1.2;
  color: var(--shu);
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.hero__words {
  min-width: 0;
  align-self: center;
}

.hero__title {
  font-family: var(--font-brush);
  font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .04em;
  color: var(--sumi);
  overflow-wrap: anywhere;
}

.hero__line {
  display: block;
  width: 72px;
  height: 2px;
  margin: 18px 0 14px;
  background: var(--kin-foil);
}

.hero__tagline {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.intro {
  margin-top: clamp(40px, 7vw, 84px);
}

.intro .intro__panel {
  position: relative;
  padding: clamp(28px, 5vw, 60px) clamp(22px, 6vw, 76px);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  background-color: var(--kinari);
  box-shadow: var(--shadow-paper);
}

.intro__panel .prose {
  margin-inline: auto;
}

.intro__mark {
  position: absolute;
  top: -15px;
  left: clamp(18px, 4vw, 44px);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  background: var(--shu);
  color: var(--kinari);
  font-family: var(--font-brush);
  font-size: 1.05rem;
  line-height: 1;
  box-shadow: 0 4px 10px -4px rgba(143, 36, 36, .7);
}

.rooms {
  margin-top: clamp(48px, 8vw, 96px);
}

.rooms__head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.rooms__head::before,
.rooms__head::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--kin-deep));
  opacity: .65;
}

.rooms__head::after {
  background: linear-gradient(270deg, transparent, var(--kin-deep));
}

.rooms__title {
  font-family: var(--font-latin);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .42em;
  margin-right: -.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.plaques {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(18px, 2.6vw, 32px);
}

.plaque {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 228px;
  padding: 26px 26px 22px;
  border: 1px solid var(--paper-edge);
  border-top: 3px double var(--kin-deep);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--kinari) 0%, #f7efdd 100%);
  box-shadow: var(--shadow-paper);
  color: var(--ink);
  text-decoration: none;
}

.plaque:hover,
.plaque:focus-visible {
  border-color: var(--kin-deep);
  box-shadow: var(--shadow-lift);
}

.plaque__seal {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border-radius: 5px;
  background: var(--shu);
  color: var(--kinari);
  font-family: var(--font-brush);
  font-size: 1.7rem;
  line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(251, 246, 234, .2), 0 6px 14px -8px rgba(143, 36, 36, .9);
}

.plaque__title {
  font-family: var(--font-heading);
  font-size: 1.36rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .05em;
  overflow-wrap: anywhere;
}

.plaque__desc {
  margin-top: -8px;
  color: var(--ink-soft);
  font-size: .96rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.plaque__count {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--hairline-soft);
  font-family: var(--font-latin);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--kin-deep);
}


/* ---------- empty states & notices ---------- */

.empty {
  padding: clamp(40px, 8vw, 88px) 20px;
  text-align: center;
}

.empty__glyph {
  display: block;
  font-family: var(--font-brush);
  font-size: 4.2rem;
  line-height: 1;
  color: rgba(150, 118, 58, .34);
}

.empty__line {
  margin-top: 18px;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink-soft);
}

.empty__hint {
  max-width: 34rem;
  margin: 10px auto 0;
  color: var(--ink-faint);
  font-size: .98rem;
}

.notice {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 80px var(--gutter);
}

.notice .notice__accent {
  position: absolute;
  top: 12vh;
  right: clamp(20px, 8vw, 120px);
  font-family: var(--font-brush);
  font-size: 1.5rem;
  letter-spacing: .5em;
  color: rgba(150, 118, 58, .5);
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.notice__card {
  max-width: 34rem;
  text-align: center;
}

.notice__glyph {
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: var(--shu);
  color: var(--kinari);
  font-family: var(--font-brush);
  font-size: 3.4rem;
  line-height: 1;
  box-shadow: inset 0 0 0 3px rgba(251, 246, 234, .2), 0 16px 30px -16px rgba(143, 36, 36, .9);
}

.notice__title {
  margin-top: 30px;
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.4;
}

.notice__text {
  margin-top: 12px;
  color: var(--ink-soft);
}

.notice__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

/* ---------- section header ---------- */

.sec-head {
  position: relative;
}

.sec-head .sec-head__banner {
  position: relative;
  height: 260px;
  overflow: hidden;
  background:
    radial-gradient(70% 120% at 82% 0%, rgba(233, 213, 163, .16) 0%, rgba(233, 213, 163, 0) 60%),
    linear-gradient(180deg, var(--kon-deep) 0%, var(--kon) 55%, var(--ai) 100%);
  border-bottom: 1px solid var(--kin-deep);
}

.sec-head__body {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 3.4vw, 44px);
  margin-top: -76px;
}

.sec-head__glyph {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(104px, 14vw, 152px);
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--shu);
  color: var(--kinari);
  font-family: var(--font-brush);
  font-size: clamp(3.6rem, 9vw, 6rem);
  line-height: 1;
  box-shadow: inset 0 0 0 3px rgba(251, 246, 234, .22), inset 0 0 0 4px var(--shu), inset 0 0 0 5px rgba(251, 246, 234, .16), 0 22px 40px -20px rgba(20, 16, 8, .8);
}

.sec-head__text {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 96px;
}

.sec-head__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .05em;
  color: var(--sumi);
  overflow-wrap: anywhere;
}

.sec-head__desc {
  max-width: 62ch;
  margin-top: 12px;
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--ink-soft);
  white-space: pre-line;
  overflow-wrap: break-word;
}

.sec-head__meta {
  margin-top: 14px;
  font-family: var(--font-latin);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--kin-deep);
}

.sec-head__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 18px;
}

/* ---------- composer ---------- */

.composer {
  margin-bottom: clamp(26px, 4vw, 44px);
}

.composer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--paper-edge);
  border-left: 3px solid var(--shu);
  border-radius: var(--radius);
  background: rgba(251, 246, 234, .78);
  box-shadow: var(--shadow-paper);
}

.composer__hint {
  margin-left: 6px;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-faint);
}

/* ---------- items ---------- */

.items {
  display: flex;
  flex-direction: column;
  gap: clamp(30px, 4.6vw, 56px);
}

.item {
  position: relative;
}

.item.is-new {
  animation: item-arrive 1.4s var(--ease-brush);
}

@keyframes item-arrive {
  0% { box-shadow: 0 0 0 3px rgba(200, 163, 90, .9); }
  100% { box-shadow: 0 0 0 3px rgba(200, 163, 90, 0); }
}

.item-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--kin-deep);
  border-radius: 4px;
  background: rgba(20, 27, 46, .92);
  color: var(--kin-light);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .8);
  opacity: 0;
  transition: opacity var(--dur-fast) ease;
}

.item:hover > .item-tools,
.item:focus-within > .item-tools {
  opacity: 1;
}

@media (hover: none) {
  .item-tools {
    opacity: 1;
  }
}

.item-tools__btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.item-tools__btn:hover:not(:disabled) {
  background: rgba(200, 163, 90, .2);
}

.item-tools__btn[data-act="delete"]:hover {
  background: var(--shu);
  color: var(--kinari);
}

.item-tools__btn:disabled {
  opacity: .32;
}

.item-tools__btn:focus-visible {
  outline-color: var(--kin-light);
  outline-offset: 1px;
}

/* note */
.note {
  width: 100%;
  max-width: 54rem;
  margin-inline: auto;
  padding: clamp(26px, 4.6vw, 56px) clamp(22px, 5.4vw, 68px);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(212, 196, 160, .22) 0, rgba(212, 196, 160, 0) 26px),
    var(--kinari);
  box-shadow: var(--shadow-paper);
}

.note__title {
  max-width: 68ch;
  margin: 0 auto 1em;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .05em;
  color: var(--sumi);
  overflow-wrap: anywhere;
}

.note .prose {
  margin-inline: auto;
}

.note__date {
  max-width: 68ch;
  margin: 2em auto 0;
  padding-top: 1em;
  border-top: 1px solid var(--hairline-soft);
  font-family: var(--font-latin);
  font-style: italic;
  font-size: .96rem;
  color: var(--ink-faint);
  text-align: right;
}

/* gallery: rows of equal height, built from the stored aspect ratios */
.gallery {
  --row-h: 250px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.gallery::after {
  content: "";
  flex: 1000000 1 0;
}

.gallery--duo {
  --row-h: 340px;
}

.shot {
  flex-grow: calc(var(--ar, 1.5) * 100);
  flex-shrink: 1;
  flex-basis: calc(var(--ar, 1.5) * var(--row-h));
  min-width: 0;
  max-width: 100%;
}

.shot__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--ar, 1.5);
  padding: 0;
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  background: var(--washi-deep);
  box-shadow: var(--shadow-paper);
  overflow: hidden;
  cursor: zoom-in;
}

.shot__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot__caption {
  margin-top: 8px;
  padding: 0 2px;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.gallery--solo {
  justify-content: center;
}

.gallery--solo::after {
  display: none;
}

.gallery--solo .shot {
  flex: 0 1 auto;
  width: min(100%, calc(var(--ar, 1.5) * 72vh), 980px);
}

.gallery--solo .shot__frame {
  padding: clamp(8px, 1.4vw, 16px);
  background: var(--kinari);
}

.gallery--solo .shot__img {
  object-fit: contain;
}

.gallery--solo .shot__caption {
  text-align: center;
}

@media (max-width: 640px) {
  .gallery {
    --row-h: 150px;
    gap: 8px;
  }

  .gallery--duo {
    --row-h: 180px;
  }
}

/* framed viewers: pdf, video, audio, plain files */
.frame {
  width: 100%;
  border: 1px solid var(--kin-deep);
  border-radius: var(--radius);
  background: var(--kinari);
  box-shadow: var(--shadow-paper);
}

.frame--bare,
.frame--audio,
.frame--file {
  max-width: 54rem;
  margin-inline: auto;
}

.frame__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 16px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--kon) 0%, var(--kon-deep) 100%);
  color: var(--on-dark);
  box-shadow: inset 0 -1px 0 var(--kin-deep);
}

.frame--bare .frame__bar:last-child,
.frame--bare .frame__bar:has(+ .item-tools:last-child) {
  border-radius: 2px;
  box-shadow: none;
}

.frame__badge {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 8px;
  border: 1px solid var(--kin);
  border-radius: 4px;
  color: var(--kin-light);
  font-family: var(--font-latin);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1;
}

.frame__name {
  flex: 1 1 180px;
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.45;
}

.frame__name strong {
  font-family: var(--font-heading);
  font-size: 1.04rem;
  font-weight: 500;
  letter-spacing: .03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame__name span {
  font-family: var(--font-latin);
  font-size: .94rem;
  color: var(--on-dark-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.frame__body--pdf {
  height: 80vh;
  min-height: 420px;
  background: var(--sumi-soft);
}

.frame__body--pdf iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.frame__body--video {
  background: #000;
}

.frame__body--video video {
  width: 100%;
  max-height: 82vh;
  background: #000;
}

.frame__body--audio {
  padding: 20px 18px;
  background:
    linear-gradient(90deg, rgba(212, 196, 160, .25), rgba(212, 196, 160, 0) 40%),
    var(--kinari);
}

.frame__body--audio audio {
  display: block;
  width: 100%;
}

.frame__caption {
  padding: 12px 18px 14px;
  border-top: 1px solid var(--hairline-soft);
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

/* owner tools straddle the top edge on framed items so they never cover the bar's buttons */
.frame > .item-tools {
  top: -16px;
  right: 12px;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero .hero__scene {
    height: 74vh;
  }

  .hero__text {
    left: 16px;
    right: 16px;
    bottom: 28px;
    max-width: none;
  }

  .sec-head .sec-head__banner {
    height: 200px;
  }
}

@media (max-width: 560px) {
  .sec-head__body {
    flex-direction: column;
    gap: 16px;
    margin-top: -56px;
  }

  .sec-head__text {
    padding-top: 0;
  }

  .hero__text .hero__accent {
    display: none;
  }

  .composer__hint {
    display: none;
  }

  .frame__actions .btn span:not(.icon) {
    display: none;
  }

  .frame__badge {
    min-width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .item.is-new {
    animation: none;
  }

  .item-tools,
  .plaque {
    transition: none;
  }
}
