/* Open Letters: use the shared Hogwarts Memorial Archive palette and header/footer. */
body{background:#15191d;color:#ede4d6}
.open-letters-page{padding:28px 16px 42px;min-height:calc(100vh - 260px);text-align:center}
.open-letters-page .ol-frame{position:relative;box-sizing:border-box;width:min(100%,900px);margin:0 auto;padding:40px 34px 45px;background:#1b1e20;border:2px solid #8e7656;border-radius:12px;box-shadow:inset 0 0 0 7px #1b1e20,inset 0 0 0 8px #5d4c3b}
.open-letters-page .archive-header{margin-bottom:25px!important}
.open-letters-page .archive-header .archive-subtitle{font-style:normal!important}
.ol-toolbar{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:14px auto 10px}
.ol-toolbar button,.ol-modal form button{font:500 16px/1.3 'Cormorant Garamond','Noto Serif Thai',Georgia,serif;background:#665347;color:#ede4d6;border:1px solid #b79a6c;border-radius:6px;padding:11px 17px;cursor:pointer}
.ol-toolbar button:hover,.ol-modal form button:hover{background:#806a51}
.ol-toolbar button:disabled,.ol-modal form button:disabled{opacity:.6;cursor:wait}
#olStatus{min-height:22px;margin:16px auto 12px;color:#beb1a2;font-size:13px}
.ol-grid{display:grid;grid-template-columns:repeat(5,38px);grid-auto-rows:25px;justify-content:center;justify-items:center;gap:14px 16px;width:max-content;max-width:100%;margin:20px auto 32px}
.ol-envelope{display:block;width:38px;height:25px;min-width:38px;min-height:25px;padding:0;background:#d8c9af;border:0;border-radius:2px;box-shadow:0 2px 5px #0003;cursor:pointer;transition:transform .15s,box-shadow .15s}
.ol-envelope:hover{transform:translateY(-2px);background:#d8c9af;box-shadow:0 4px 9px #0005}
.ol-envelope:focus-visible{outline:2px solid #b79a6c;outline-offset:4px}
.ol-envelope svg{display:block;width:38px;height:25px}
.ol-back{display:inline-block;margin:16px auto 0;color:#b79a6c;text-decoration:none;font:500 17px 'Cormorant Garamond','Noto Serif Thai',Georgia,serif}
.ol-back:hover{text-decoration:underline}
.ol-overlay[hidden]{display:none!important}.ol-overlay{position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(0,0,0,.82);backdrop-filter:blur(4px)}
.ol-modal{position:relative;box-sizing:border-box;width:min(100%,550px);max-height:90vh;overflow:auto;background:#1b1e20;border:2px solid #8e7656;border-radius:12px;padding:34px 28px;color:#ede4d6;box-shadow:inset 0 0 0 7px #1b1e20,inset 0 0 0 8px #5d4c3b}
.ol-modal h2{margin:8px 0 20px;text-align:center;font:500 34px/1.1 'Cormorant Garamond','Noto Serif Thai',Georgia,serif}
.ol-modal-symbol{text-align:center;color:#b79a6c;font-size:28px}
.ol-close{position:absolute;top:12px;right:16px;background:transparent!important;border:0!important;color:#ede4d6;font-size:30px;line-height:1;padding:4px 8px;cursor:pointer}
.ol-meta{padding-bottom:14px;border-bottom:1px solid #665347;color:#c6a879;font-size:13px;font-variant-numeric:tabular-nums}
.ol-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.9;text-align:left}
.ol-compose-note{color:#beb1a2;font-size:13px;line-height:1.7}
.ol-modal form{display:flex;flex-direction:column;gap:10px;text-align:left}
.ol-modal form label{color:#ede4d6;font-size:14px}
.ol-modal input,.ol-modal textarea{box-sizing:border-box;width:100%;padding:12px;border:1px solid #6c6053;border-radius:6px;background:#222529;color:#ede4d6;font:14px Georgia,'Noto Serif Thai',serif}
#olFormStatus{color:#d9c6ab;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
body.ol-dialog-open{overflow:hidden}
@media(max-width:600px){.open-letters-page{padding:20px 10px 28px}.open-letters-page .ol-frame{padding:28px 12px 32px;box-shadow:inset 0 0 0 5px #1b1e20,inset 0 0 0 6px #5d4c3b}.ol-grid{gap:12px 12px}.ol-modal{padding:30px 20px}.ol-toolbar button{font-size:14px}}
@media(max-width:350px){.ol-grid{gap:10px 9px}}
@media(prefers-reduced-motion:reduce){.ol-envelope{transition:none}}

/* Larger wax-sealed envelopes, still a centered 5 × 4 grid. */
.ol-grid{grid-template-columns:repeat(5,58px);grid-auto-rows:38px;gap:16px 18px}
.ol-envelope{width:58px;height:38px;min-width:58px;min-height:38px}
.ol-envelope svg{width:58px;height:38px}
.ol-send-warning{margin:8px 0 2px;padding:10px 12px;border:1px solid #8e7656;border-radius:6px;background:#282523;color:#e2c69f;font-size:13px;line-height:1.7;text-align:center}
@media(max-width:600px){.ol-grid{grid-template-columns:repeat(5,48px);grid-auto-rows:32px;gap:12px 12px}.ol-envelope{width:48px;height:32px;min-width:48px;min-height:32px}.ol-envelope svg{width:48px;height:32px}}
@media(max-width:350px){.ol-grid{grid-template-columns:repeat(5,44px);grid-auto-rows:29px;gap:10px 9px}.ol-envelope{width:44px;height:29px;min-width:44px;min-height:29px}.ol-envelope svg{width:44px;height:29px}}

/* Readable letter modal: typography and aligned numerals only */
.ol-modal .ol-meta {
  font-family: Georgia, 'Noto Serif Thai', serif;
  font-size: 17px;
  line-height: 1.75;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
}
.ol-modal .ol-body {
  font-family: Georgia, 'Noto Serif Thai', serif;
  font-size: 19px;
  line-height: 1.95;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
}
.ol-modal .ol-compose-note, .ol-modal .ol-send-warning {font-size: 15px;line-height: 1.8;}
.ol-modal form label {font-size: 17px;}
.ol-modal input, .ol-modal textarea {font-size: 17px;line-height: 1.7;}
.ol-modal #olFormStatus {font-size: 15px;}
@media(max-width:600px){.ol-modal .ol-meta{font-size:15px}.ol-modal .ol-body{font-size:17px}.ol-modal form label,.ol-modal input,.ol-modal textarea{font-size:16px}}

/* Match My Characters back link (.my-characters-back in style.css). */
.ol-back {
  display: block;
  margin: 40px 0 0;
  text-align: center;
  color: var(--hogwarts-gold);
  font: inherit;
  text-decoration: underline;
}
.ol-back:hover { text-decoration: underline; }


/* Report control: upper-right of the opened letter, next to close */
.ol-report-button{
position:absolute;right:54px;top:16px;display:inline-flex;align-items:center;gap:5px;
padding:5px 9px;background:transparent;border:1px solid #8e7656;border-radius:5px;
color:#d9c6ab;font:500 14px Georgia,'Noto Serif Thai',serif;cursor:pointer;
}
.ol-report-button:hover{background:#40362f;color:#fff0d9}
.ol-report-button:focus-visible{outline:2px solid #d9c6ab;outline-offset:3px}
.ol-report-modal select{box-sizing:border-box;width:100%;padding:12px;background:#222529;color:#ede4d6;border:1px solid #6c6053;border-radius:6px;font:16px Georgia,'Noto Serif Thai',serif}
#olReportStatus{font-size:15px;line-height:1.7;color:#d9c6ab;overflow-wrap:anywhere}
@media(max-width:600px){.ol-report-button{font-size:12px;right:48px;top:14px}}
