/* Reusable Mac app stages extracted from prototypes/one.html. */
.ar-app {
  --ar-app-aspect: 16 / 10;
  --ar-app-mobile-aspect: 4 / 5;
  --ar-app-meet-width: 460px;
  --ar-app-jot-width: 440px;
  --ar-app-ease: cubic-bezier(0.19, 1, 0.22, 1);
  --ar-app-mono: "Geist Mono", ui-monospace, monospace;
  position: relative;
  aspect-ratio: var(--ar-app-aspect);
  overflow: hidden;
  box-sizing: border-box;
  background: #e9e9ec;
  color: #1d1d1f;
  font: 13px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  letter-spacing: -0.005em;
  user-select: none;
  -webkit-user-select: none;
}

.ar-app *, .ar-app *::before, .ar-app *::after { box-sizing: border-box; }
.ar-app button, .ar-app input { font: inherit; color: inherit; letter-spacing: inherit; }
.ar-app img { display: block; max-width: 100%; }
.ar-app .hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  font-family: var(--ar-app-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #86868b;
}
.ar-app .ic { display: inline-block; width: 16px; height: 16px; flex: none; }
.ar-app .ic svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.ar-app .mb {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  background: rgba(246, 246, 248, 0.86);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  font-size: 13px;
}
.ar-app .mb-l, .ar-app .mb-r { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.ar-app .mb-l b { font-weight: 600; }
.ar-app .mb-r { gap: 12px; }
.ar-app .mb-item { display: grid; place-items: center; height: 22px; padding: 0 5px; border: 0; background: none; cursor: default; }
.ar-app .mb-item.on { background: rgba(0, 0, 0, 0.1); border-radius: 4px; }
.ar-app .pb-always { display: flex; align-items: center; gap: 12px; }
.ar-app.wall { background: #6b7a80 var(--ar-app-wall) center / cover no-repeat; }
.ar-app.wall .hint { color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }

.ar-app .mt-panel {
  position: absolute;
  left: 50%;
  top: 44px;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  width: min(var(--ar-app-meet-width), 88%);
  max-height: calc(100% - 100px);
  overflow: hidden;
  border-radius: 12px;
  background: rgba(250, 250, 252, 0.97);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 18px 50px rgba(0, 0, 0, 0.18);
}
.ar-app .mt-chips, .ar-app .mt-search { flex: none; }
.ar-app .mt-search { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.ar-app .mt-search .ic { width: 18px; height: 18px; color: #86868b; }
.ar-app .mt-search input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; font-size: 20px; letter-spacing: -0.015em; caret-color: #0a84ff; }
.ar-app .mt-search input::placeholder { color: #b0b0b5; }
.ar-app .mt-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; min-height: 0; }
.ar-app .mt-chips:empty { display: none; }
.ar-app .mt-chip { padding: 2px 9px; border-radius: 999px; background: rgba(10, 132, 255, 0.14); color: #0a64d8; font-size: 12px; font-weight: 600; }
.ar-app .mt-chip.bad { background: rgba(255, 159, 10, 0.16); color: #b25e00; }
.ar-app .mt-body { flex: 1; min-height: 0; overflow-y: auto; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.08); scrollbar-width: thin; }
.ar-app .mt-day { padding: 10px 14px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: #86868b; text-transform: uppercase; }
.ar-app .mt-slot { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 4px 14px; border: 0; background: none; text-align: left; cursor: default; }
.ar-app .mt-slot.sel { background: rgba(10, 132, 255, 0.16); }
.ar-app .mt-slot.sel::after { content: "↩"; color: #0a64d8; }
.ar-app .mt-empty { padding: 14px; }
.ar-app .mt-empty p { margin: 0 0 10px; font-size: 16px; color: #6e6e73; }
.ar-app .mt-teams { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-app .mt-team { padding: 3px 11px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ar-app .mt-book { padding: 14px; }
.ar-app .mt-book b { display: block; margin-bottom: 10px; font-size: 16px; font-weight: 600; }
.ar-app .mt-book .field { padding: 6px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.06); font-size: 15px; }
.ar-app .mt-book p { margin: 12px 0; color: #6e6e73; }
.ar-app .mt-book .row2 { display: flex; justify-content: flex-end; gap: 8px; }
.ar-app .mt-btn { padding: 3px 12px; border: 0; border-radius: 6px; background: rgba(0, 0, 0, 0.08); cursor: pointer; }
.ar-app .mt-btn.primary { background: #0a84ff; color: #fff; }
.ar-app .mt-foot { flex: none; padding: 7px 14px; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.08); font-size: 11.5px; color: #86868b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-app .mt-toast { position: absolute; left: 50%; bottom: 40px; translate: -50% 0; padding: 6px 12px; border-radius: 8px; background: rgba(29, 29, 31, 0.9); color: #fff; font-size: 12px; opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
.ar-app .mt-toast.on { opacity: 1; }

.ar-app .pb-hidden { display: flex; align-items: center; gap: 12px; overflow: hidden; max-width: 0; transition: max-width 450ms var(--ar-app-ease); }
.ar-app .pb-hidden.out { max-width: 40px; }
.ar-app .pb-hidden .mb-item { opacity: 0; transition: opacity 250ms ease; }
.ar-app .pb-hidden.out .mb-item.live { opacity: 1; }
.ar-app .pb-toggle { font-size: 12px; letter-spacing: -0.1em; }
.ar-app .pb-panel, .ar-app .pb-menu {
  position: absolute;
  top: 30px;
  z-index: 4;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(250, 250, 252, 0.97);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.2), 0 14px 40px rgba(0, 0, 0, 0.16);
  transform-origin: top right;
  transition: opacity 180ms ease, scale 220ms var(--ar-app-ease);
}
.ar-app .pb-panel[hidden], .ar-app .pb-menu[hidden] { display: block; opacity: 0; scale: 0.96; pointer-events: none; }
.ar-app .pb-panel { right: 70px; width: 250px; padding: 6px 0; }
.ar-app .pb-head { padding: 4px 12px 6px; font-size: 11px; color: #86868b; }
.ar-app .pb-sec { display: flex; justify-content: space-between; padding: 7px 12px 3px; font-size: 11px; font-weight: 600; color: #86868b; }
.ar-app .pb-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 4px 12px; border: 0; background: none; text-align: left; cursor: default; }
.ar-app .pb-row .eye { margin-left: auto; color: #b0b0b5; font-size: 11px; }
.ar-app .pb-row.hid { cursor: pointer; }
.ar-app .pb-row.hid:hover { background: #0a84ff; color: #fff; }
.ar-app .pb-row.hid:hover .eye { color: rgba(255, 255, 255, 0.7); }
.ar-app .pb-status { padding: 6px 12px 2px; font-size: 11px; color: #86868b; min-height: 1.4em; }
.ar-app .pb-menu { width: 200px; padding: 5px; transform-origin: top left; }
.ar-app .pb-menu button { display: block; width: 100%; padding: 3px 9px; border: 0; border-radius: 5px; background: none; text-align: left; cursor: default; }
.ar-app .pb-menu button:hover { background: #0a84ff; color: #fff; }
.ar-app .pb-menu hr { height: 1px; margin: 4px 9px; border: 0; background: rgba(0, 0, 0, 0.1); }

.ar-app .jt-win {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -52%;
  display: flex;
  flex-direction: column;
  width: min(var(--ar-app-jot-width), 86%);
  height: 80%;
  overflow: hidden;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.2), 0 22px 60px rgba(0, 0, 0, 0.16);
}
.ar-app .jt-title { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; }
.ar-app .jt-title i { width: 11px; height: 11px; border-radius: 50%; background: #d8d8dc; }
.ar-app .jt-title span { margin-left: auto; font-size: 12px; font-weight: 600; color: #6e6e73; }
.ar-app .jt-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 22px 12px; scrollbar-width: thin; }
.ar-app .jt-body h4 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.ar-app .jt-date { color: #86868b; font-size: 12px; }
.ar-app .jt-list { margin: 18px 0 0; padding: 0; list-style: none; }
.ar-app .jt-list li { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; animation: ar-app-jt-in 400ms var(--ar-app-ease); }
.ar-app .jt-list li::before { content: ""; flex: none; width: 15px; height: 15px; margin-top: 1px; border: 1.5px solid #c7c7cc; border-radius: 50%; }
.ar-app .jt-list small { display: block; margin-top: 2px; font-size: 11.5px; color: #86868b; }
@keyframes ar-app-jt-in { from { opacity: 0; translate: 0 6px; } }
.ar-app .jt-compose { padding: 10px 14px 12px; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.07); }
.ar-app .jt-parse { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; margin-bottom: 8px; }
.ar-app .jt-tag { padding: 2px 8px; border-radius: 5px; background: #f2f2f7; font-size: 11.5px; color: #3a3a3c; }
.ar-app .jt-tag b { font-weight: 600; }
.ar-app .jt-warn { font-size: 11.5px; color: #9a6700; }
.ar-app .jt-field { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: #f2f2f7; }
.ar-app .jt-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; }
.ar-app .jt-field kbd { font: 11px -apple-system, sans-serif; color: #86868b; }
.ar-app .jt-saved { margin-top: 8px; font-size: 11px; color: #86868b; }

.ar-app.s-squeeze { background: #fffcf7; color: #1e1e20; display: flex; flex-direction: column; padding: 14px 16px 34px; gap: 10px; }
.ar-app .sq-top { display: flex; align-items: center; gap: 10px; }
.ar-app .sq-top img { width: 26px; height: 26px; border-radius: 6px; }
.ar-app .sq-top b { font-size: 14px; font-weight: 700; }
.ar-app .sq-top small { display: block; font-size: 11px; color: #86868b; }
.ar-app .sq-seg { display: inline-flex; margin-left: auto; padding: 2px; border-radius: 7px; background: rgba(0, 0, 0, 0.06); }
.ar-app .sq-seg button { padding: 2px 10px; border: 0; border-radius: 5px; background: none; font-size: 12px; cursor: pointer; }
.ar-app .sq-seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.18); font-weight: 600; }
.ar-app .sq-vars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ar-app .sq-vars button { padding: 5px 6px; border: 1px solid #e4dfd5; border-radius: 6px; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.25; }
.ar-app .sq-vars button small { display: block; font-weight: 400; font-size: 11px; color: #86868b; font-variant-numeric: tabular-nums; }
.ar-app .sq-vars button[aria-pressed="true"] { border-color: #1e1e20; box-shadow: inset 0 0 0 1px #1e1e20; }
.ar-app .sq-view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #ede8de; cursor: ew-resize; touch-action: none; }
.ar-app .sq-view img { position: absolute; left: var(--ox, 0); top: var(--oy, 0); width: var(--iw, 100%); max-width: none; height: auto; }
.ar-app .sq-view .after { clip-path: inset(0 0 0 var(--split, 50%)); }
.ar-app .sq-view[data-mode="original"] .after { clip-path: inset(0 0 0 100%); }
.ar-app .sq-view[data-mode="squeezed"] .after { clip-path: inset(0 0 0 0); }
.ar-app .sq-line { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 1px; background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25); }
.ar-app .sq-line::after { content: "↔"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); font-size: 12px; }
.ar-app .sq-view[data-mode="original"] .sq-line, .ar-app .sq-view[data-mode="squeezed"] .sq-line { display: none; }
.ar-app .sq-tag { position: absolute; top: 8px; padding: 2px 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.92); font-size: 11px; }
.ar-app .sq-tag.l { left: 8px; }
.ar-app .sq-tag.r { right: 8px; }
.ar-app .sq-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #6e6e73; font-variant-numeric: tabular-nums; }
.ar-app .sq-foot b { color: #1e1e20; font-weight: 600; }

@media (max-width: 559px) {
  .ar-app { aspect-ratio: var(--ar-app-mobile-aspect); }
  .ar-app .mb-l span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ar-app *, .ar-app *::before, .ar-app *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
