.hut-card { container-type: inline-size; }

.hut-expand, .hut-close {
  background: transparent;
  color: #793848;
  font: 15px Georgia, serif;
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 34px;
  padding: 0;
}

.hut-expand { margin: -2px 0 0; }
.hut-instruction { color: #635745; font: italic 13px/1.4 Georgia, serif; margin: 3px 0 13px; }

.hut-stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.26;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 28% 83%, #8e6348 0, #493735 46%, transparent 75%),
    repeating-linear-gradient(90deg, #0f1722 0 2px, #273039 2px 3px, transparent 3px 6.45%),
    linear-gradient(165deg, #2c3742, #191e28 70%);
  border: 1px solid #635044;
  box-shadow: inset 0 0 45px #10162499, 3px 4px 0 #8e786436;
}

.hut-window {
  position: absolute;
  inset: 16% auto auto 6%;
  width: 16%;
  height: 29%;
  background: linear-gradient(#101626 4%, #243a4f 95%);
  border: max(4px, 1cqi) solid #382a2a;
  box-shadow: 0 1px 0 #996b49, 3px 4px 0 #171d2a, inset 2px 4px 8px #101622b0;
}

.hut-window::before, .hut-window::after {
  content: '';
  position: absolute;
  z-index: 1;
  background: #3b2d31;
}

.hut-window::before { inset: 0 47% 0 45%; }
.hut-window::after { inset: 51% 0 43% 0; }

.hut-window i {
  position: absolute;
  left: 12%;
  top: 13%;
  width: 21%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 2px 2px 0 0 #e5d7a1;
}

.hut-wall-label {
  position: absolute;
  top: 3%;
  left: 29%;
  color: #efceb1;
  font: italic clamp(10px, 2.2cqi, 19px) Georgia, serif;
  transform: rotate(-1.3deg);
  text-shadow: 0 1px 2px #161827;
}

.hut-board {
  position: absolute;
  top: 12%;
  left: 27%;
  right: 8%;
  height: 57%;
  background:
    radial-gradient(circle at 24% 52%, #e5a46b62, transparent 65%),
    radial-gradient(ellipse, #37140d3b 0 14%, transparent 34%) 0 0 / 9px 7px,
    radial-gradient(ellipse, #f0b9888c 0 10%, transparent 30%) 1px 2px / 7px 6px,
    radial-gradient(ellipse at 49% 54%, #ab7652, #835638);
  border: max(4px, .95cqi) solid #5c3b2a;
  box-shadow: 0 0 0 1px #2e2323, inset 0 0 16px #482b2c94, 3px 5px 0 #23212bb5;
  z-index: 2;
}

.hut-threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.hut-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8%;
  width: 27%;
  height: 31%;
  padding: 4% 1% 2%;
  text-align: center;
  color: #302b2a;
  background: repeating-linear-gradient(0deg, #5e533015 0 1px, transparent 1px 8px), #eee0bc;
  border: 1px solid #594b3d49;
  box-shadow: 1px 3px 4px #25191a88;
  font: italic clamp(9px, 2.65cqi, 22px)/1.05 Georgia, serif;
  white-space: nowrap;
}

.hut-pin-head {
  position: absolute;
  z-index: 2;
  width: clamp(5px, 1.15cqi, 10px);
  aspect-ratio: 1;
  border-radius: 50%;
  top: 9%;
  left: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle at 34% 29%, #f88269 1%, #c34941 34%, #7f2627 70%);
  box-shadow: 1px 2px 1px #4424289a;
}

.hut-pin:hover, .hut-pin[aria-pressed="true"] {
  color: #1d1b1c;
  box-shadow: 0 0 0 1px #fad9a2, 2px 4px 7px #2b1d1b99;
}
.hut-pin.is-connected .hut-pin-head { box-shadow: 0 0 0 1px #f6ce9c, 1px 2px 1px #4424289a; }
.hut-pin[aria-pressed="true"] { z-index: 3; outline: 2px solid #ffd78d; outline-offset: 1px; }

.hut-pin:focus-visible { outline-offset: 2px; }
.hut-pin strong { font-weight: normal; }
.hut-pin-sound { left: 5%; top: 9%; transform: rotate(-7deg); }
.hut-pin-art { left: 69%; top: 11%; background-color: #c8cab1; transform: rotate(6deg); }
.hut-pin-rails { left: 4%; top: 61.5%; background-color: #d1d5c5; transform: rotate(4deg); }
.hut-pin-letters { left: 70%; top: 64.2%; background-color: #dcb8ad; transform: rotate(-5deg); }
.hut-pin-signal { left: 37%; top: 20%; width: 26%; height: 48%; background: #e7d9c5; transform: rotate(-2deg); z-index: 1; }
.hut-pin-clubhouse { left: 37%; top: 73%; width: 26%; height: 22%; background-color: #c5ceaf; transform: rotate(3deg); }

.hut-polaroid {
  display: grid;
  align-items: end;
  justify-items: center;
  height: 65%;
  width: 83%;
  background: linear-gradient(153deg, #64726b, #303c42);
  border: 1px solid #2b363c;
  overflow: hidden;
  position: relative;
}

.hut-sketch-bird {
  width: 69%;
  height: 55%;
  border-radius: 56% 47% 35% 42%;
  margin: 0 20% 12% 0;
  background: radial-gradient(circle at 58% 16%, #a98f70, #7d674d 48%, #594b40 95%);
  box-shadow: inset -.16em -.13em 0 #453b3855;
  position: relative;
}

.hut-sketch-bird::before {
  content: '';
  position: absolute;
  width: 13%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #211c22;
  border: 1px solid #d2ba8e;
  left: 65%;
  top: 22%;
}

.hut-sketch-bird::after {
  content: '';
  position: absolute;
  left: 84%;
  top: 38%;
  width: 63%;
  height: 15%;
  background: #d3ba96;
  clip-path: polygon(0 0, 100% 64%, 0 100%);
}

.hut-doodle { height: 35%; width: 56%; position: relative; }
.hut-music { color: #753a42; font: bold 1.28em/1 Georgia, serif; }
.hut-picture { border: 1px solid #4f6047; transform: rotate(-5deg); background: linear-gradient(40deg, #6f7756 34%, transparent 35%), linear-gradient(-24deg, #575d47 30%, transparent 31%), #b5b194; }
.hut-track { rotate: -11deg; border-block: 1px solid #374e5a; background: repeating-linear-gradient(90deg, transparent 0 19%, #526777 19% 25%); }
.hut-envelope { border: 1px solid #754d51; background: linear-gradient(28deg, transparent 48%, #754d51 49% 52%, transparent 53%) left / 51% 100% no-repeat, linear-gradient(-28deg, transparent 48%, #754d51 49% 52%, transparent 53%) right / 51% 100% no-repeat; }
.hut-clubhouse { width: 39%; background: #54634c; clip-path: polygon(50% 0, 100% 42%, 85% 42%, 85% 100%, 59% 100%, 59% 60%, 41% 60%, 41% 100%, 15% 100%, 15% 42%, 0 42%); }

.hut-floor {
  position: absolute;
  background: repeating-linear-gradient(105deg, #83604d30 0 1px, transparent 1px 14%), linear-gradient(163deg, #59504b 3%, #36323a 68%);
  border-top: 3px solid #211e28;
  inset: 73% 0 0;
}

.hut-desk {
  position: absolute;
  width: 75%;
  left: 10%;
  top: 70%;
  height: 7%;
  z-index: 4;
  border-top: 2px solid #a47755;
  border-bottom: max(3px, .75cqi) solid #523a30;
  background: linear-gradient(90deg, #855c43, #a1714e 48%, #674533);
  box-shadow: 2px 3px 3px #231d29a3;
}

.hut-desk::before, .hut-desk::after {
  content: '';
  position: absolute;
  width: 5%;
  height: 215%;
  top: 100%;
  background: linear-gradient(90deg, #583f36, #a07553 70%, #584038);
  box-shadow: 2px 3px 2px #28212a8c;
}

.hut-desk::before { left: 4%; }
.hut-desk::after { right: 4%; }

.hut-lamp {
  position: absolute;
  width: 19%;
  height: 300%;
  left: 6%;
  bottom: 28%;
  border-bottom: max(3px, .65cqi) solid #3f4139;
  border-radius: 48% 30% 20% 18%;
  z-index: 2;
}

.hut-lamp::before {
  content: '';
  position: absolute;
  inset: 20% 28% 0 30%;
  border-left: max(3px, .55cqi) solid #56564a;
  transform: skewX(-23deg);
  box-shadow: inset 1px 0 #a0845c;
}

.hut-lamp i {
  position: absolute;
  inset: 0 0 64% 15%;
  border-radius: 75% 75% 4% 4%;
  transform: rotate(12deg);
  border-bottom: 2px solid #e0d28e;
  background: linear-gradient(155deg, #a1a47e, #4d6555 75%);
  box-shadow: 1px 12px 19px #ffca788c, 10px 17px 31px 7px #e4ad6e82;
}

.hut-journal, .hut-mail {
  position: absolute;
  bottom: 32%;
  min-height: 1.35em;
  width: 23%;
  z-index: 2;
  padding: 4% 2%;
  color: #f9e4bb;
  box-shadow: 2px 3px 2px #302328aa;
  font: italic clamp(10px, 2.5cqi, 18px)/1 Georgia, serif;
}

.hut-journal { left: 37%; background: #783f4a; border-bottom: 3px solid #c9ad85; transform: rotate(-6deg) skewX(-9deg); }
.hut-mail { left: 65%; background: #e2c6a0; color: #654049; border: 1px solid #aa8e71; transform: translateY(-10%) rotate(8deg); }
.hut-journal:hover, .hut-mail:hover { filter: brightness(1.18); }

.hut-mug {
  position: absolute;
  width: 8%;
  height: 85%;
  right: 5%;
  bottom: 50%;
  background: #70847b;
  border-radius: 20% 20% 30% 30%;
  box-shadow: inset 0 3px #739f93, inset -2px 0 #354d49;
}

.hut-mug::after {
  content: '';
  position: absolute;
  inset: 12% -40% 23% 72%;
  border: 2px solid #70847b;
  border-radius: 50%;
}

.hut-stool {
  position: absolute;
  z-index: 5;
  left: 38%;
  top: 84%;
  width: 21%;
  height: 6%;
  border-radius: 46%;
  background: #6b4d45;
  box-shadow: inset 0 -3px #3a3236, 1px 3px 2px #1b1a24;
}

.hut-stool::after, .hut-seat::after {
  content: '';
  position: absolute;
  top: 84%;
  left: 16%;
  right: 16%;
  height: 165%;
  border-inline: max(2px, .6cqi) solid #65483d;
  transform: perspective(13px) rotateX(12deg);
}

.hut-seat {
  position: absolute;
  z-index: 5;
  right: 6%;
  top: 83%;
  width: 16%;
  height: 7%;
  transform: rotate(-5deg);
  background: #5c463c;
  box-shadow: inset 0 -3px #372e32;
}

.hut-seat i {
  display: block;
  position: absolute;
  bottom: 30%;
  right: 0;
  transform: rotate(9deg);
  padding: 1% 6%;
  color: #694e45;
  background: #cbb28f;
  font: italic clamp(7px, 1.8cqi, 14px)/1.2 Georgia, serif;
}

.hut-board-open {
  min-height: 44px;
  margin: 10px 0 0;
  padding: 0 13px;
  border: 1px solid #876b56;
  color: #653643;
  background: #f2e7d1;
  font: 15px Georgia, serif;
}
.hut-board-open:hover { background: #e9dbc0; }
.hut-board-open span { margin-left: 5px; }
.hut-reading { margin-top: 15px; }
.hut-detail { padding: 1px 0 13px; overflow-wrap: anywhere; }
.hut-detail h3 { color: #392d2b; margin: 0 0 13px; }
.hut-evidence { border-top: 1px solid #9b8d7680; padding: 11px 0; }
.hut-label { display: block; color: #7a554b; font: 700 10px/1.45 ui-monospace, SFMono-Regular, monospace; letter-spacing: .055em; text-transform: uppercase; margin: 0 0 5px; }
.hut-detail p { font-size: 14px; line-height: 1.45; color: #493f37; margin: 0; }
.hut-source { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; color: #685c4e; font: 10px/1.3 ui-monospace, SFMono-Regular, monospace; margin-top: 9px; }
.hut-source a { color: #783848; text-decoration: underline; text-underline-offset: 2px; }
.hut-detail .hut-note { color: #624235; font: italic 16px/1.45 Georgia, serif; border-left: 2px solid #a47562; padding-left: 10px; margin-top: 6px; }
.hut-log-link { text-align: left; color: #793848; text-decoration: underline; text-underline-offset: 3px; background: none; padding: 9px 0 0; font-size: 12px; }
.hut-detail .hut-connection { margin: 0 0 14px; font: italic 15px/1.45 Georgia, serif; color: #694b3f; }
.hut-linked { margin-bottom: 13px; }
.hut-link-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hut-link-chips button {
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #a0806d;
  background: #f5ecda;
  color: #653643;
  font-size: 13px;
}
.hut-link-chips button:hover { background: #ead9c3; border-color: #793848; }
.hut-film { margin: 12px 0 4px; width: 100%; }
.hut-film a { display: block; width: 100%; border: 5px solid #292329; background: #292329; box-shadow: 2px 3px 0 #7461544c; }
.hut-film img { display: block; width: 100%; height: auto; }
.hut-film figcaption { margin-top: 7px; color: #685347; font: italic 13px Georgia, serif; }

.hut-dialog {
  width: min(950px, calc(100vw - 30px));
  max-width: none;
  max-height: 93dvh;
  padding: clamp(13px, 2.5vw, 27px);
}

.hut-dialog-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 11px; }
.hut-dialog-head h2 { margin: 0; font-size: clamp(29px, 3.4vw, 40px); }
.hut-dialog .hut-stage { aspect-ratio: 2.08; }
.hut-dialog .hut-reading { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: start; margin-top: 15px; }
.hut-dialog .hut-film { margin-top: 0; }

.hut-corkboard-dialog {
  width: min(1060px, calc(100vw - 24px));
  max-width: none;
  max-height: 93dvh;
  padding: clamp(14px, 2.6vw, 28px);
  background: #f1e8d7;
}
.hut-corkboard-dialog > .hut-dialog-head { margin-bottom: 4px; }
.hut-corkboard-dialog .hut-close { min-height: 44px; }
.hut-board-instruction { color: #66594a; margin: 3px 0 17px; font-size: 14px; }
.hut-corkboard-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px); align-items: start; }
.hut-corkboard-zoom { container-type: inline-size; }
.hut-corkboard-zoom .hut-board { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 1.38; }
.hut-corkboard-zoom .hut-pin { min-height: 44px; font-size: clamp(13px, 4cqi, 21px); }
.hut-corkboard-zoom .hut-pin-head { width: clamp(8px, 2.35cqi, 13px); }
.hut-corkboard-layout .hut-detail { max-height: min(490px, 65dvh); overflow: auto; padding: 4px 7px 12px; scrollbar-width: thin; }
.hut-corkboard-layout .hut-log-link { min-height: 44px; }

@media (max-width: 700px) {
  .hut-corkboard-layout { display: block; }
  .hut-corkboard-layout .hut-detail { max-height: none; overflow: visible; padding: 19px 0 0; }
}

@media (max-width: 570px) {
  .hut-dialog .hut-stage { aspect-ratio: 1.26; }
  .hut-dialog .hut-reading { display: block; }
  .hut-dialog .hut-film { margin-top: 12px; }
}
.hut-board-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
