/* Based on the supplied calendar site's .tw-right-navigation and .tw-vertical-menu. */
body.twst-standalone .tw-right-navigation{position:fixed;inset:0;z-index:3000;pointer-events:none}
body.twst-standalone .tw-right-navigation .tw-vertical-menu{position:absolute;right:5px;top:50%;transform:translateY(-50%);z-index:3000;display:flex;flex-direction:column;background:rgba(235,235,233,.95);backdrop-filter:blur(8px);border:1px solid rgba(0,0,0,.12);border-right:0;border-radius:12px 0 0 12px;box-shadow:-5px 10px 25px rgba(0,0,0,.08);overflow:hidden;pointer-events:auto}
body.twst-standalone .tw-vertical-menu a{color:#0f172a;padding:12px 14px;text-decoration:none;font:700 12px/1.4 Inter,system-ui,sans-serif;writing-mode:vertical-rl;text-orientation:mixed;position:relative;background:rgba(235,235,233,.95)}
body.twst-standalone .tw-vertical-menu a:not(:last-child)::after{content:'';position:absolute;bottom:0;left:8px;right:8px;height:1px;background:#A1A69F}
body.twst-standalone .tw-vertical-menu a:hover,body.twst-standalone .tw-vertical-menu a:focus-visible{background:#434C49;color:#EBEBE9}
body.twst-standalone .tw-vertical-menu .tw-menu-toggle{writing-mode:horizontal-tb;width:46px;height:46px;min-height:46px;padding:0;display:flex;align-items:center;justify-content:center;font-size:22px;color:#434C49}
body.twst-standalone .tw-vertical-menu .tw-menu-toggle::after{display:none}
body.twst-standalone .tw-menu-icon{font-size:23px;line-height:1}
body.twst-standalone .tw-cal-popover{display:none;position:fixed;right:66px;top:50%;transform:translateY(-50%);z-index:3100;width:260px;box-sizing:border-box;background:#202725;color:#fff;border:1px solid #A1A69F;border-radius:9px;padding:14px;box-shadow:0 8px 24px #0007;font:12px Inter,system-ui,sans-serif}
body.twst-standalone .tw-cal-popover.open{display:block}
body.twst-standalone .twst-cal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
body.twst-standalone .twst-cal-head button{background:none;border:0;color:white;cursor:pointer;padding:7px}
body.twst-standalone .twst-cal-weekdays,body.twst-standalone #calDaysGrid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center}
body.twst-standalone #calDaysGrid{margin-top:5px}
body.twst-standalone #calDaysGrid a{display:grid;place-items:center;min-height:30px;color:inherit;text-decoration:none;border-radius:4px}
body.twst-standalone #calDaysGrid a:hover,body.twst-standalone #calDaysGrid a:focus-visible{outline:2px solid #6C7B76;outline-offset:-2px}
body.twst-standalone #calDaysGrid a[aria-current=date]{background:#6C7B76;color:#fff;font-weight:700}
body.twst-standalone #w18TopicsDialog{width:min(600px,calc(100vw - 32px));max-height:85dvh;overflow:auto;box-sizing:border-box;padding:24px;border:1px solid #A1A69F;border-radius:10px;background:#EBEBE9;color:#1C201F;margin:auto;font-family:Inter,system-ui,sans-serif}
body.twst-standalone #w18TopicsDialog::backdrop{background:rgba(0,0,0,.6)}
body.twst-standalone #w18TopicsDialog .w18-topics-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}
body.twst-standalone #w18TopicsDialog h2{font-size:20px;margin:0}body.twst-standalone #w18TopicsDialog h3{font-size:15px;margin:20px 0 8px}
body.twst-standalone #w18TopicsClose{background:transparent;color:inherit;border:1px solid #A1A69F;border-radius:6px;min-width:40px;min-height:40px;font-size:25px;cursor:pointer}
body.twst-standalone #w18TopicsDialog a{display:block;padding:10px 0;color:#1C201F;text-decoration:none;overflow-wrap:anywhere}
body.twst-standalone #w18TopicsDialog a:hover{text-decoration:underline}
body.twst-standalone #w18TopicsDialog .w18-topics-list{list-style:none;margin:0;padding:0}body.twst-standalone #w18TopicsDialog .w18-topics-list ul{list-style:none;padding-left:20px}
body.twst-standalone #w18TopicsDialog .w18-topics-years{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:10px 0 20px}
body.twst-standalone #w18TopicsDialog .w18-topics-years a{padding:8px 12px;border:1px solid #A1A69F;border-radius:5px}
@media(max-width:767px){body.twst-standalone .tw-right-navigation .tw-vertical-menu{top:12px;right:10px;transform:none;border-radius:10px 0 0 10px}body.twst-standalone .tw-vertical-menu>a:not(#calToggleBtn):not(.tw-menu-toggle){display:none}body.twst-standalone .tw-vertical-menu>a:is(#calToggleBtn,.tw-menu-toggle){display:flex;width:46px;min-width:46px;height:46px;min-height:46px;padding:0;align-items:center;justify-content:center}body.twst-standalone .tw-cal-popover{right:62px;top:12px;transform:none;width:min(260px,calc(100vw - 78px))}}

/* 7.0.6 – Restore standalone story day navigation without modifying day pages. */
body.twst-standalone .tw-right-navigation{z-index:3000}
body.twst-standalone .tw-vertical-menu a:focus-visible{outline:2px solid #6C7B76;outline-offset:-2px}
body.twst-standalone .tw-cal-popover:not(.open){display:none}
@media(max-width:767px){body.twst-standalone .tw-right-navigation .tw-vertical-menu{top:72px}body.twst-standalone .tw-cal-popover{top:72px}}

/* 7.0.7: Real 90-degree rotation, matching the original side rail.
   Rotate the complete label rather than stacking individual characters. */
body.twst-standalone .tw-right-navigation .tw-vertical-menu > a:not(.tw-menu-toggle){
  writing-mode:horizontal-tb;
  text-orientation:mixed;
  display:flex;
  align-items:center;
  justify-content:center;
  width:46px;
  min-width:46px;
  height:68px;
  min-height:68px;
  box-sizing:border-box;
  padding:0;
  white-space:nowrap;
}
body.twst-standalone .tw-right-navigation .tw-vertical-menu > a#calToggleBtn{height:96px;min-height:96px;}
body.twst-standalone .tw-vertical-menu .twst-rotated-label{
  display:block;
  transform:rotate(-90deg);
  transform-origin:center;
  white-space:nowrap;
  line-height:1;
}
body.twst-standalone .tw-right-navigation .tw-vertical-menu > a.tw-menu-toggle{
  width:46px;min-width:46px;height:46px;min-height:46px;
  writing-mode:horizontal-tb;
}
@media(max-width:767px){
  body.twst-standalone .tw-right-navigation .tw-vertical-menu > a#calToggleBtn{
    height:46px;min-height:46px;width:46px;min-width:46px;
  }
  body.twst-standalone .tw-right-navigation .tw-vertical-menu > a#calToggleBtn .twst-rotated-label{
    font-size:9px;
  }
}
