/* Layout only. Color and chrome come from themes/*.css */
:root { --tm: 52px; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: Tahoma, "Segoe UI", sans-serif; }
button, a { cursor: pointer; }

.tm {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--tm);
  display: flex; align-items: center; gap: 16px;
  padding: 0 44px;
  color: #e8e4d8;
  background: #141210;
  border-bottom: 1px solid #000;
  user-select: none;
  cursor: default;
}
.tm-title { flex: 0 0 112px; display: flex; flex-direction: column; gap: 5px; }
.tm-title strong { font: 600 12px/1 ui-sans-serif, system-ui, sans-serif; color: #fff4d5; }
.tm-word {
  flex: 0 0 auto;
  font: 600 11px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #c4b89a;
}
.tm-track {
  position: relative;
  flex: 1;
  height: 28px;
  cursor: grab;
}
.tm-track:active { cursor: grabbing; }
.tm-track:focus-visible { outline: 1px solid #e9d38f; outline-offset: 4px; }
.tm-line {
  position: absolute; left: 24px; right: 24px; top: 13px; height: 2px;
  background: linear-gradient(90deg, #5c4a2a, #d4c39a 40%, #8ab4c8 70%, #6ee7a0);
  border-radius: 1px;
}
.tm-ticks { position: absolute; inset: 0; }
.tm-tick {
  position: absolute; top: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  background: none; border: 0; color: #9a9080; padding: 0;
  font: 10px/1 ui-sans-serif, system-ui, sans-serif;
}
.tm-tick i {
  display: block; width: 6px; height: 6px; margin: 11px 0 7px;
  border-radius: 50%; background: #3a342c; box-shadow: 0 0 0 1px #000;
  transition: opacity .15s ease;
}
.tm-tick.on { color: #fff4d5; }
.tm-tick.on i { opacity: 0; } /* handle is the active marker */
.tm-tick .label-gap { display: none; }
.tm-handle {
  position: absolute; top: 6px; width: 14px; height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d8, #c9a227 55%, #6a4a10);
  box-shadow: 0 0 0 1px #000, 0 2px 6px rgba(0,0,0,.55), 0 0 10px rgba(201,162,39,.35);
  pointer-events: none;
  z-index: 2;
}

.os { position: absolute; inset: var(--tm) 0 0 0; display: flex; flex-direction: column; }
.desktop { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.board {
  position: absolute;
  top: 12px; left: 10px; bottom: 12px;
  width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.icon {
  position: static; width: 92px; border: 0; background: none;
  color: inherit; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 0 0 auto;
}
.icon .glyph-wrap {
  position: relative;
  width: 32px; height: 32px;
  display: grid; place-items: center;
}
.icon .glyph { width: 32px; height: 32px; image-rendering: pixelated; display: block; }
.icon .glyph-logo { image-rendering: auto; width: 24px; height: 24px; }
/* GitHub + Omarchy: white / Tokyo-Night green on black, every era. */
.i-github .glyph-wrap,
.i-omarchy .glyph-wrap { background: #000; overflow: hidden; }
.i-github .glyph-logo { width: 72%; height: 72%; }
.i-omarchy .glyph-logo { width: 90%; height: 90%; }
/* OutboundSync / LinkedIn / X are full app-icon marks (own fill). */
.i-outboundsync .glyph-logo,
.i-linkedin .glyph-logo,
.i-x .glyph-logo { width: 100%; height: 100%; }
.icon .dos-file { display: none; }
.icon .label { padding: 1px 4px; text-align: center; max-width: 92px; font-size: 11px; }
.icon.active .label { outline: 1px dotted; }

.window {
  display: none; position: absolute; z-index: 5; min-width: 280px; max-width: 460px;
  flex-direction: column;
}
.window.open { display: flex; }
.window.front { z-index: 9; }
.window.win-folder { max-width: 420px; }
/* Titlebar DOM: close · title · min · zoom. Default packs widgets right
   (title flexes). Win 3.1 / OS 8 keep close left via order. OS X / MacOS
   absolutely center the title so traffic lights pack left. */
.titlebar {
  display: flex; align-items: center; gap: var(--widget-gap, 6px);
  cursor: grab; user-select: none;
}
.titlebar .title {
  flex: 1 1 auto; min-width: 0; order: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.widget {
  box-sizing: border-box; flex: 0 0 auto; order: 2;
  width: 16px; height: 14px; margin: 0; padding: 0;
  position: relative; display: grid; place-items: center;
  cursor: pointer; font: 0/0 sans-serif; color: inherit;
  appearance: none; -webkit-appearance: none;
}
.widget-shade { order: 2; }
.widget-zoom { order: 3; }
.widget-close { order: 4; }
.widget-exit { display: none; order: 5; }
.widget-shade::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 7px; height: 0; border-top: 1.5px solid currentColor;
}
.widget-zoom::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); box-sizing: border-box;
  width: 7px; height: 6px; border: 1.3px solid currentColor;
}
.widget-close::before,
.widget-close::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 8px; height: 1.5px; background: currentColor;
}
.widget-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.widget-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

[data-era="win31"] .widget-close,
[data-era="mac8"] .widget-close { order: 0; }

[data-era="osx"] .titlebar,
[data-era="macos"] .titlebar { position: relative; --widget-gap: 8px; }
[data-era="osx"] .titlebar .title,
[data-era="macos"] .titlebar .title {
  position: absolute; left: 0; right: 0;
  text-align: center; pointer-events: none;
  flex: none; order: 0;
}
[data-era="osx"] .widget,
[data-era="macos"] .widget { order: 0; }
[data-era="osx"] .widget::before,
[data-era="osx"] .widget::after,
[data-era="macos"] .widget::before,
[data-era="macos"] .widget::after { content: none; }

.mb-apple {
  display: inline-block; width: 11px; height: 13px; margin-right: 6px;
  position: relative; opacity: .88; flex: 0 0 11px;
}
.mb-apple::before {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 11px; height: 10px; border-radius: 40% 40% 45% 45%;
  background: currentColor;
}
.mb-apple::after {
  content: ""; position: absolute; left: 5px; top: 0;
  width: 5px; height: 5px; border-radius: 50% 0 50% 0;
  border-left: 1.4px solid currentColor; transform: rotate(-28deg);
}
.mb-app { font-weight: 700; margin-right: 4px; }
.panel-status { display: inline-flex; align-items: center; }
.panel-status i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; margin-left: 4px; }
.panel-ws { display: inline-flex; gap: 2px; }
.panel-ws b { display: inline-block; padding: 0 6px; border-radius: 2px; font-weight: 400; opacity: .5; }
.panel-ws b.on { opacity: 1; font-weight: 700; }
.pane { padding: 12px 14px; min-height: 90px; }
.pane h1 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.pane p { margin: 0 0 12px; }
.about-pane { text-align: center; }
.about-pane .headshot {
  display: block; width: 120px; height: 120px; object-fit: cover;
  margin: 0 auto 12px; border-radius: 4px;
}
.about-pane .about-body { text-align: left; }
.about-pane .about-body p { margin: 0 0 10px; }
.folder .btn { margin-top: 12px; }

.glyph-photo { object-fit: cover; image-rendering: auto; }
.glyph-photo, .glyph-logo { filter: none; }
.btn {
  display: inline-block; padding: 4px 12px; text-decoration: none; color: inherit;
  font: inherit;
}
.folder-lead { margin-bottom: 12px; }
.folder { list-style: none; margin: 0; padding: 0; }
.folder li + li { margin-top: 4px; }
.folder a {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; color: inherit; text-decoration: none;
}
.folder .glyph { width: 24px; height: 24px; flex: 0 0 24px; image-rendering: pixelated; }
.folder b { display: block; font-size: 13px; }
.folder em { display: block; font-style: normal; font-size: 11px; opacity: .72; }
.menubar, .panel-top, .taskbar, .dock, .start-menu, .go-menu, .activities { display: none; }
.widget-back { display: none; order: 0; }

.window.zoomed { inset: 8px !important; max-width: none; }
.tasks { display: flex; gap: 3px; flex: 1; min-width: 0; }
.task-button { min-width: 120px; max-width: 190px; height: 22px; overflow: hidden; text-align: left; white-space: nowrap; font: inherit; background: #c0c0c0; border: 2px solid; border-color: #fff #000 #000 #fff; }
.task-button.front { border-color: #808080 #fff #fff #808080; background: #d0d0d0; }

/* Icon model: wrap = era plate (border/radius/shadow/optional fill).
   Content sits ON the plate. Photos and real logos never take era filters
   or wrap background-images, so plates can't cover them. */
[data-era="dos"] .icon .glyph { display: none; }
[data-era="dos"] .icon .glyph-wrap { width: auto; height: auto; background: none; border: 0; box-shadow: none; }
[data-era="dos"] .icon .dos-file {
  display: block;
  font: 12px/1.2 "Courier New", "Lucida Console", ui-monospace, monospace;
  color: #55ffff;
  letter-spacing: .02em;
  white-space: nowrap;
}
[data-era="dos"] .icon .label { display: none; }
[data-era="dos"] .board { width: 220px; align-items: flex-start; }
[data-era="dos"] .icon { width: auto; align-items: flex-start; }

[data-era="win31"] .glyph-wrap {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  box-shadow: 1px 1px 0 #000;
}
[data-era="win31"] .i-github .glyph-wrap,
[data-era="win31"] .i-omarchy .glyph-wrap {
  background: #000;
  border-color: #fff #000 #000 #fff;
}
[data-era="win31"] .glyph-photo { width: 28px; height: 28px; }

[data-era="win95"] .glyph-wrap { filter: drop-shadow(1px 1px 0 #000); }

[data-era="mac8"] .glyph-wrap {
  background: linear-gradient(#f4f4f4, #b8b8b8);
  border: 1px solid #111;
  box-shadow: inset 1px 1px 0 #fff, 1px 1px 0 #666;
}
[data-era="mac8"] .glyph-photo { width: 30px; height: 30px; }

[data-era="osx"] .glyph-wrap {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
[data-era="osx"] .glyph-wrap::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.45), transparent 46%);
  pointer-events: none;
}

[data-era="xfce"] .glyph-wrap {
  border-radius: 3px;
  box-shadow: 1px 1px 2px rgba(0,0,0,.45);
}

[data-era="popos"] .glyph-wrap {
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}

[data-era="macos"] .glyph-wrap {
  border-radius: 22%;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
}

[data-era="omarchy"] .glyph-wrap {
  border-radius: 6px;
  outline: 1px solid #2a303a;
  background: #1a1d24;
}

/* —— Phone device shell (layout). Colors live in themes/*.css —— */
[data-device="phone"] .board,
[data-device="phone"] .dock,
[data-device="phone"] .taskbar,
[data-device="phone"] .go-menu,
[data-device="phone"] .activities,
[data-device="phone"] .menubar,
[data-device="phone"] .panel-top,
[data-device="phone"] #windows,
[data-device="phone"] .start-menu { display: none !important; }

[data-device="phone"] .phone { display: flex; }
.phone {
  display: none;
  position: absolute; inset: 0;
  align-items: stretch; justify-content: stretch;
  z-index: 2;
  padding: 0;
}
/* Full-bleed mobile UI — no simulated device frame. Breakpoint: SITE.phoneBreakpoint. */
.phone-bezel {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  display: flex; flex-direction: column;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.phone-earpiece { display: none !important; }
.phone-island {
  display: none;
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 28px; border-radius: 20px; background: #000; z-index: 5;
}
.phone-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 4px; font: 600 11px/1 ui-sans-serif, system-ui, sans-serif;
  color: #fff; flex: 0 0 auto; gap: 8px; z-index: 4;
}
.phone-carrier { flex: 1; min-width: 0; opacity: .9; }
.phone-time { flex: 0 0 auto; }
.phone-batt {
  flex: 0 0 auto; width: 22px; height: 10px;
  border: 1.5px solid currentColor; border-radius: 2px; position: relative; opacity: .9;
}
.phone-batt::after {
  content: ""; position: absolute; inset: 1.5px 3px 1.5px 1.5px; background: currentColor;
}
.phone-batt::before {
  content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px;
  background: currentColor; border-radius: 0 1px 1px 0;
}
.phone-screen {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.phone-home {
  flex: 1; min-height: 0; overflow: auto;
  padding: 8px 10px 12px;
}
.phone-home-list .phone-list { list-style: none; margin: 0; padding: 0; }
.phone-list-item button {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: inherit; font: inherit;
  padding: 8px 6px;
}
.phone-list-item.focus,
.phone-list-item.focus button { outline: none; }
.phone-num { opacity: .7; margin-right: 4px; }
.phone-home-grid .phone-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 6px;
}
.phone-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; color: inherit; font: 11px/1.2 ui-sans-serif, system-ui, sans-serif;
  padding: 8px 4px;
}
.phone-grid-item .glyph-wrap { width: 40px; height: 40px; }
.phone-grid-item .glyph { width: 40px; height: 40px; }
.phone-grid-item .label { text-align: center; max-width: 72px; font-size: 10px; }
.phone-home-icons .phone-icons {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px;
  padding: 12px 8px 20px;
}
.phone-icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; color: inherit; font: 11px/1.15 ui-sans-serif, system-ui, sans-serif;
  padding: 0;
}
.phone-icon .glyph-wrap {
  width: 56px; height: 56px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center;
}
.phone-icon .glyph { width: 56px; height: 56px; }
.phone-icon .glyph-logo { width: 70%; height: 70%; }
.phone-icon .i-outboundsync .glyph-logo,
.phone-icon.i-outboundsync .glyph-logo,
.phone-icon.i-linkedin .glyph-logo,
.phone-icon.i-x .glyph-logo { width: 100%; height: 100%; }
.phone-icon .label { text-align: center; max-width: 72px; font-size: 11px; }
.phone-icon .dos-file { display: none; }


.phone-home.phone-home-icons {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding-bottom: 4px;
  overflow: hidden;
}
.phone-pages {
  display: none;
  justify-content: center;
  gap: 7px;
  padding: 10px 0 12px;
}
.phone-pages span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.28);
}
.phone-pages span.on { background: rgba(255,255,255,.85); }
.phone-dock {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-evenly;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 28px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 4px;
}
.phone-dock .phone-icon .label { display: none; }
.phone-dock .glyph-wrap { width: 56px; height: 56px; }

.phone-widgets { display: none; }
.phone-search { display: none; }
.phone-home-ios .phone-widgets { display: grid; }
.phone-home-ios .phone-search { display: flex; }

/* Feature phones: softkeys own Back — avoid duplicate with sheet-bar */
html.phone-feature .phone-back { display: none !important; }
/* Feature phones: no modern app/plugin artwork in sheets or menus */
html.phone-feature .phone-sheet-body .folder .glyph,
html.phone-feature .phone-sheet-body .folder .glyph-wrap,
html.phone-feature .phone-sheet-body .glyph-photo,
html.phone-feature .phone-sheet-body .glyph-logo,
html.phone-feature .phone-home .glyph-wrap { display: none !important; }
html.phone-feature .phone-sheet-body .folder a { gap: 0; }
html.phone-feature .phone-sheet-body {
  font-size: 15px;
  line-height: 1.45;
}
html.phone-feature .phone-sheet-title { font-size: 16px; }
html.phone-feature .phone-list-item button { font-size: 15px; line-height: 1.4; padding: 8px 6px; }


.phone-sheet {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #fff; color: #111; z-index: 6;
}
.phone-sheet[hidden] { display: none !important; }
/* Default (non-iOS): sheet covers the screen area only via bezel stacking — home stays under */
.phone-bezel { position: relative; }
.phone-sheet-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; flex: 0 0 auto;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.phone-back {
  background: none; border: 0; color: inherit; font: 600 14px/1 ui-sans-serif, system-ui, sans-serif;
  padding: 6px 4px;
}
.phone-sheet-title {
  flex: 1; text-align: center; font: 600 15px/1.2 ui-sans-serif, system-ui, sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.phone-sheet-body {
  flex: 1; min-height: 0; overflow: auto; padding: 12px 14px;
}
.phone-sheet-body .pane { padding: 0; }
.phone-sheet-body h1 { font-size: 18px; }
.phone-sheet-body .headshot { width: 96px; height: 96px; }

.phone-softkeys {
  display: none;
  flex: 0 0 auto;
  align-items: center; justify-content: space-between;
  padding: 6px 10px 10px; gap: 8px;
}
.phone-sk {
  flex: 1; min-width: 0;
  background: none; border: 0; color: inherit;
  font: 600 12px/1 ui-sans-serif, system-ui, sans-serif;
  padding: 8px 4px;
}
.phone-sk-l { text-align: left; }
.phone-sk-c { text-align: center; }
.phone-sk-r { text-align: right; }

.phone-home-btn {
  display: none;
  flex: 0 0 auto;
  width: 52px; height: 52px; margin: 8px auto 12px;
  border-radius: 50%; border: 2px solid #444; background: #1a1a1a;
  box-shadow: inset 0 0 0 1px #333;
}
.phone-gesture {
  display: none;
  flex: 0 0 auto;
  width: 120px; height: 4px; margin: 8px auto 10px;
  border-radius: 2px; background: rgba(255,255,255,.45);
}

@media (max-width: 720px) {
  :root:not([data-device="phone"]) { --tm: 56px; }
  :root:not([data-device="phone"]) .tm { padding: 0 10px; gap: 8px; height: var(--tm); }
  :root:not([data-device="phone"]) .tm-title { flex: 0 0 72px; }
  :root:not([data-device="phone"]) .tm-word { font-size: 9px; letter-spacing: .1em; }
  :root:not([data-device="phone"]) .tm-title strong { font-size: 11px; }
  :root:not([data-device="phone"]) .tm-tick { font-size: 8px; }
  :root:not([data-device="phone"]) .tm-line { left: 10px; right: 10px; }
}

/* Phone mode Time Machine — title above, full-width thumb-first slider (desktop .tm unchanged) */
[data-device="phone"] { --tm: 118px; }
[data-device="phone"] .tm {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  height: var(--tm);
  gap: 4px;
  padding: 10px 6px 12px;
}
[data-device="phone"] .tm-title {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 0 6px;
}
[data-device="phone"] .tm-word {
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: .12em;
  color: #c4b89a;
}
[data-device="phone"] .tm-title strong {
  font-size: 17px;
  line-height: 1.1;
  color: #fff4d5;
}
[data-device="phone"] .tm-track {
  flex: 0 0 auto;
  width: 100%;
  height: 62px;
}
[data-device="phone"] .tm-line {
  left: 16px; right: 16px; top: 20px; height: 4px;
  border-radius: 2px;
}
[data-device="phone"] .tm-tick {
  font: 600 11.5px/1.15 ui-sans-serif, system-ui, sans-serif;
  color: #9a9080;
  z-index: 1;
}
[data-device="phone"] .tm-tick.on {
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0,0,0,.65);
}
[data-device="phone"] .tm-tick i {
  width: 8px; height: 8px; margin: 16px 0 10px;
}
[data-device="phone"] .tm-handle {
  /* sit on the 4px line at top:20 → center 22; 22px thumb → top 11 */
  top: 11px; width: 22px; height: 22px;
  margin-left: -11px;
  box-shadow: 0 0 0 1px #000, 0 2px 8px rgba(0,0,0,.5), 0 0 12px rgba(201,162,39,.4);
}
