.orientation-entry { margin: 16px 0; }
.orientation-entry .button { width: 100%; }
.orientation-advance { width: 100%; margin-bottom: 8px; }
.orientation-advance[hidden] { display: none; }
.orientation-entry p { margin: 8px 2px 0; color: var(--muted); font-size: 14px; }
.orientation-dialog { box-sizing: border-box; position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; border: 0; padding: 0; color: var(--text); background: var(--cream-50); overflow: auto; overscroll-behavior: contain; }
.orientation-dialog[open] { display: flex; flex-direction: column; }
.orientation-dialog::backdrop { background: var(--forest-950); }
.orientation-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); }
.orientation-header strong { font-size: 18px; overflow-wrap: anywhere; }
.orientation-header span { display: block; font-size: 14px; margin-top: 4px; }
.orientation-header .button { flex-shrink: 0; }
.orientation-toolbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); }
.orientation-dialog button { min-height: 46px; font-size: 15px; }
.orientation-toolbar [aria-pressed="true"] { background: var(--forest-800); color: white; border-color: var(--forest-800); }
.orientation-toolbar [aria-pressed="false"] { background: var(--cream-100); color: var(--forest-800); border-color: var(--cream-300); }
.orientation-viewport { position: relative; flex: 1 0 230px; min-height: 230px; overflow: hidden; touch-action: none; isolation: isolate; background: var(--cream-200); outline-offset: -3px; }
.orientation-rotor { position: absolute; left: 50%; top: 50%; transform-origin: center; pointer-events: none; }
.orientation-canvas { width: 100%; height: 100%; }
.orientation-north { position: absolute; z-index: 500; left: max(12px, env(safe-area-inset-left)); top: 12px; display: grid; justify-items: center; width: 42px; padding: 4px; background: white; border-radius: 10px; box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 700; pointer-events: none; }
.orientation-north span { display: block; font-size: 25px; line-height: 30px; }
.orientation-zoom { position: absolute; z-index: 500; right: max(12px, env(safe-area-inset-right)); bottom: 12px; display: grid; gap: 6px; }
.orientation-zoom button { width: 48px; height: 48px; border: 1px solid var(--cream-300); background: white; color: var(--forest-900); border-radius: 10px; font-size: 26px; }
.orientation-footer { flex-shrink: 0; padding: 8px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.orientation-footer p { margin: 3px 0; font-size: 14px; }
.orientation-footer [data-orientation-error]:empty { display: none; }
.orientation-info { margin: 0 0 6px; }
.orientation-info summary { box-sizing: border-box; min-height: 44px; padding: 11px 8px; border-radius: 8px; color: var(--forest-800); background: var(--forest-100); font-size: 14px; font-weight: 700; line-height: 22px; cursor: pointer; }
.orientation-info summary:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; }
.orientation-info-content { padding: 6px 2px 2px; }
.orientation-footer small, .orientation-attribution { display: block; font-size: 14px; }
.orientation-footer small { color: var(--muted); margin: 5px 0; }
.orientation-legend { display: flex; flex-wrap: wrap; gap: 12px; font-weight: 600; }
.orientation-legend-plan { color: #985b10; }
.orientation-legend-return { color: #735aa0; }
.orientation-legend-recorded { color: #3f6047; }
.orientation-pin { background: none; border: 0; }
.orientation-pin span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: white; background: var(--forest-800); border: 2px solid white; font-size: 14px; font-weight: 700; transform: rotate(var(--orientation-counter, 0deg)); }
.orientation-live { background: none; border: 0; }
.orientation-dot { position: absolute; left: 7px; top: 7px; width: 16px; height: 16px; box-sizing: border-box; background: #24699d; border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #24699d; }
.orientation-fan { display: none; position: absolute; left: -20px; top: -55px; width: 70px; height: 70px; background: linear-gradient(to top, #24699d80, #24699d12); clip-path: polygon(50% 100%, 0 0, 100% 0); transform-origin: 50% 100%; transform: rotate(var(--orientation-heading, 0deg)); }
.orientation-has-heading .orientation-fan { display: block; }
@media (max-width: 600px) {
  .orientation-toolbar { grid-template-columns: 1fr 1fr; }
  .orientation-header strong { font-size: 16px; }
}
@media (max-height: 550px) and (min-width: 601px) {
  .orientation-header { padding-top: 4px; padding-bottom: 4px; }
  .orientation-header span { display: none; }
  .orientation-viewport { min-height: 170px; flex-basis: 170px; }
}
