/* ==========================================================================
   Mac Mirroring — <mm-phone> R5 Precision Polish (gemini/craft-r5/phone-polish.css)
   Reference:
   - Packages/RemoteControlUI/Sources/RemoteControlUI/RemotePortraitLayout.swift
   - Packages/RemoteControlUI/Sources/RemoteControlUI/RemotePortraitViewController.swift
   - Packages/RemoteControlUI/Sources/RemoteControlUI/RemotePortraitMaterial.swift
   - Native Portrait Captures: keyboard.webp, control.webp, v76-01-portrait-collapsed-hud-on.png
   ========================================================================== */

/* 1. True 390 × 844 iPhone Portrait Coordinate System */
mm-phone,
.phone-stand mm-phone {
  display: block;
  width: 390px !important;
  max-width: 100%;
  height: 844px !important;
  aspect-ratio: 390 / 844 !important;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  color: #F5F6F8;
  user-select: none;
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
  outline: none;
  position: relative;
}

mm-phone * {
  box-sizing: border-box;
}

/* 2. Ultra-Thin 3.5pt Outer Bezel & Clean Silhouette Separation */
mm-phone .mmp-chassis {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 3.5px;
  border-radius: 52px;
  background: #1A1C21;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 20px 48px -12px rgba(0, 0, 0, 0.52),
    0 2px 8px rgba(0, 0, 0, 0.32);
  transition: box-shadow 0.2s ease;
}

mm-phone:focus-within .mmp-chassis,
mm-phone:focus-visible .mmp-chassis {
  box-shadow:
    0 0 0 1px rgba(117, 160, 255, 0.52) inset,
    0 20px 48px -12px rgba(0, 0, 0, 0.58),
    0 0 0 3px rgba(117, 160, 255, 0.14);
}

/* 3. Inner OLED Screen (383 × 837 inside 3.5pt bezel) */
mm-phone .mmp-screen {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 48.5px;
  background: #000000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
}

/* 4. iOS Status Bar (Safe Area Top = 44pt) */
mm-phone .mmp-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 12px 26px 4px 28px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  flex-shrink: 0;
}

mm-phone .mmp-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 6.5px;
}

mm-phone .mmp-signal-dots {
  display: inline-flex;
  gap: 2.5px;
  align-items: center;
}

mm-phone .mmp-signal-dots span {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
}

mm-phone .mmp-signal-dots span.lit {
  background: rgba(255, 255, 255, 0.42);
}

mm-phone .mmp-battery {
  width: 24px;
  height: 12px;
  border-radius: 3.8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 1.5px;
  position: relative;
  display: inline-flex;
  align-items: center;
}

mm-phone .mmp-battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3.2px;
  width: 1.5px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: rgba(255, 255, 255, 0.42);
}

mm-phone .mmp-battery-fill {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: #FFFFFF;
}

/* 5. Native 52pt Single-Row Header (RemotePortraitLayout.minimumHeaderHeight = 52) */
mm-phone .mmp-nav-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 52px;
  padding: 0 16px;
  flex-shrink: 0;
}

mm-phone .mmp-back-btn {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: 0.65px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(44, 46, 52, 0.86) 0%, rgba(28, 30, 35, 0.86) 100%);
  color: rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: background 0.16s ease, transform 0.12s ease;
}

mm-phone .mmp-back-btn:hover {
  background: rgba(56, 59, 68, 0.92);
}

mm-phone .mmp-back-btn:active {
  transform: scale(0.94);
}

mm-phone .mmp-host-title {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Native header has no green dot on the right; only show subtle indicator if host paused */
mm-phone .mmp-conn-dot-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 6px;
}

mm-phone .mmp-conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

mm-phone .mmp-conn-dot.paused {
  opacity: 1;
  background: #FF9F0A;
  box-shadow: 0 0 0 3px rgba(255, 159, 10, 0.18);
}

/* 6. Segmented Mode Switch: 216 × 44pt (RemotePortraitModeSwitch) */
mm-phone .mmp-access-wrap {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 10px;
  flex-shrink: 0;
  transition: margin-top 0.28s cubic-bezier(0.22, 1, 0.36, 1), margin-bottom 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When keyboard is dismissed (trackpad / clipboard / tools / viewonly), add native breathing room */
mm-phone:has(.mmp-pane[data-pane="trackpad"].active) .mmp-access-wrap,
mm-phone:has(.mmp-pane[data-pane="clipboard"].active) .mmp-access-wrap,
mm-phone:has(.mmp-pane[data-pane="tools"].active) .mmp-access-wrap,
mm-phone[data-phone-view="watch"] .mmp-access-wrap {
  margin-top: 22px;
  margin-bottom: 12px;
}

mm-phone .mmp-access-pill {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 216px;
  height: 44px;
  padding: 3px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(44, 46, 52, 0.88) 0%, rgba(29, 31, 36, 0.88) 100%);
  border: 0.65px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

mm-phone .mmp-access-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.18);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

mm-phone .mmp-access-pill[data-view-only="true"] .mmp-access-thumb {
  transform: translateX(0%);
}

mm-phone .mmp-access-btn {
  position: relative;
  z-index: 1;
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 500;
  padding: 0 10px;
  border-radius: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.18s ease;
}

mm-phone .mmp-access-btn.active {
  color: rgba(255, 255, 255, 0.98);
  font-weight: 600;
}

mm-phone .mmp-access-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* 7. Remote Mac Desktop Stage (1470 × 956 aspect-fit, uniform shrink when keyboard is docked) */
mm-phone .mmp-remote-stage {
  position: relative;
  width: 304px;
  margin: 0 auto;
  aspect-ratio: 1470 / 956;
  border-radius: 12px;
  overflow: hidden;
  border: 0.75px solid rgba(255, 255, 255, 0.14);
  background-color: #162244;
  background-image:
    radial-gradient(120% 90% at 15% 10%, rgba(44, 82, 158, 0.72) 0%, rgba(20, 33, 68, 0.92) 58%, #0E152B 100%);
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  cursor: crosshair;
  flex-shrink: 0;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.28s ease;
}

/* In Trackpad / Clipboard / Tools / Watch modes, desktop spans full available width (379 × 246.5pt) */
mm-phone:has(.mmp-pane[data-pane="trackpad"].active) .mmp-remote-stage,
mm-phone:has(.mmp-pane[data-pane="clipboard"].active) .mmp-remote-stage,
mm-phone:has(.mmp-pane[data-pane="tools"].active) .mmp-remote-stage,
mm-phone[data-phone-view="watch"] .mmp-remote-stage {
  width: calc(100% - 4px);
  border-radius: 12px;
}

mm-phone .mmp-mac-menubar {
  position: relative;
  z-index: 2;
  height: 18px;
  padding: 0 8px;
  background: rgba(14, 18, 30, 0.64);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

mm-phone .mmp-xcode-back {
  display: block !important;
  position: absolute;
  top: 26px;
  left: 14px;
  width: 52%;
  height: 60%;
  border-radius: 7px;
  background: rgba(34, 38, 48, 0.84);
  border: 0.75px solid rgba(255, 255, 255, 0.11);
  padding: 5px 7px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

mm-phone .mmp-xcode-front {
  position: absolute;
  top: 36px !important;
  left: 20% !important;
  right: 10px !important;
  bottom: 24px !important;
  border-radius: 7.5px;
  background: rgba(25, 28, 36, 0.96) !important;
  border: 0.75px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.54);
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  overflow: hidden;
}

mm-phone .mmp-xcode-front .mmp-win-bar {
  min-height: 19px;
  padding: 3.5px 7px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.09);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.75);
}

mm-phone .mmp-code-block {
  font: 500 15px / 1.38 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif !important;
  color: #F0F2F8;
  text-align: left;
  white-space: normal;
  padding: 7px 10px !important;
  margin: 0;
  overflow: auto;
  scrollbar-width: none;
}

mm-phone .mmp-mac-dock {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(46, 53, 74, 0.72);
  border: 0.65px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  gap: 6px;
  pointer-events: none;
}

/* 8. 4-Item Control Toolbar (312 × 48pt collapsed pill; fuses into 268pt card when Trackpad expands) */
mm-phone .mmp-toolbar-shell {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  transition: margin 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

mm-phone .mmp-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  width: 312px;
  height: 48px;
  padding: 0 8px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(40, 42, 48, 0.9) 0%, rgba(27, 29, 34, 0.92) 100%);
  border: 0.65px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.36);
  transition: width 0.26s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.26s ease, background 0.22s ease;
}

/* Active selection pill matching RemotePortraitViewController (36 × 28pt rounded capsule, #75CCFF tint) */
mm-phone .mmp-toolbar::before {
  content: "";
  pointer-events: none;
  position: absolute;
  width: 38px;
  height: 30px;
  margin-left: -19px;
  top: 50%;
  margin-top: -15px;
  left: calc(8px + (100% - 16px) * var(--tool-pos, 0.375));
  border-radius: 15px;
  border: 0.65px solid rgba(122, 199, 255, 0.38);
  background: rgba(56, 148, 255, 0.22);
  transition: left 0.22s cubic-bezier(0.22, 0.8, 0.3, 1);
}

mm-phone .mmp-tool-btn {
  position: relative;
  height: 44px;
  color: rgba(255, 255, 255, 0.88);
}

mm-phone .mmp-tool-btn.active {
  color: #75CCFF;
}

mm-phone .mmp-tool-btn.active .mmp-tool-disc {
  background: transparent !important;
  border-color: transparent !important;
  color: #75CCFF;
}

/* When Trackpad is active, fuse Toolbar + Trackpad into RemotePortraitMaterial (355 × 268pt, radius 28pt) */
mm-phone:has(.mmp-pane[data-pane="trackpad"].active) .mmp-toolbar-shell {
  margin-top: 12px;
  padding: 0 14px;
}

mm-phone:has(.mmp-pane[data-pane="trackpad"].active) .mmp-toolbar {
  width: 100%;
  height: 48px;
  border-radius: 28px 28px 0 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(26, 28, 33, 0.94);
  box-shadow: none;
}

/* 9. Dynamic Bottom Drawer (Exact fit for 390 × 844 without clipping or scrollbars) */
mm-phone .mmp-drawer {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin-top: 10px;
}

mm-phone:has(.mmp-pane[data-pane="trackpad"].active) .mmp-drawer {
  margin-top: 0;
  padding: 0 14px;
}

mm-phone .mmp-pane {
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden !important;
}

mm-phone .mmp-pane.active {
  display: flex;
}

/* ==========================================================================
   PANE 1: KEYBOARD MODE (Matches keyboard.webp 1:1)
   ========================================================================== */
mm-phone .mmp-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 44px;
  margin: 0 14px;
  padding: 0 10px 0 14px;
  border-radius: 12px;
  background: rgba(28, 30, 36, 0.96);
  border: 0.65px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

mm-phone .mmp-input-text {
  font-size: 16.5px !important;
  font-weight: 450 !important;
  color: #FFFFFF !important;
  caret-color: #3B82F6 !important;
}

mm-phone .mmp-input-text::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

mm-phone .mmp-cand-chip {
  border: 0.65px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 500;
}

/* Native Accessory Bar: Esc | Tab | ← | ↑ | ↓ | → | Keyboard Dismiss */
mm-phone .mmp-accessory-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  height: 38px;
  margin: 2px 6px 2px;
  padding: 0 4px;
  flex-shrink: 0;
}

mm-phone .mmp-acc-btn {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13.5px;
  font-weight: 500;
  height: 32px;
  border-radius: 7px;
}

mm-phone .mmp-acc-btn:last-child {
  color: rgba(255, 255, 255, 0.92);
}

/* iOS Dark System Keyboard Tray — Flush to bottom of screen with Globe & Mic bar */
mm-phone .mmp-kb-tray {
  position: relative;
  flex: 1 1 auto;
  background: linear-gradient(180deg, #24252A 0%, #1B1C20 100%);
  border-radius: 26px 26px 0 0;
  border-top: 0.65px solid rgba(255, 255, 255, 0.11);
  border-left: none;
  border-right: none;
  border-bottom: none;
  padding: 13px 5px 52px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}

/* iOS Bottom Left Globe Icon & Bottom Right Dictation Mic Icon */
mm-phone .mmp-kb-row {
  display: flex;
  justify-content: center;
  gap: 5.5px;
}

mm-phone .mmp-kb-row.row-2 {
  padding: 0 16px;
}

mm-phone .mmp-key {
  height: 42px;
  min-width: 0;
  flex: 1;
  border-radius: 8.5px;
  background: #4A4B51;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 430;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

mm-phone .mmp-key.key-fn {
  background: #303137;
  font-size: 14px;
  font-weight: 500;
  flex: 1.32;
}

mm-phone .mmp-key.key-space {
  background: #4A4B51;
  flex: 4.3;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  justify-content: flex-end;
  padding-right: 11px;
  padding-top: 12px;
}

mm-phone .mmp-key.key-return {
  background: #4A4B51;
  color: #FFFFFF;
  flex: 2.05;
}

mm-phone .mmp-key.key-return:hover {
  background: #5B5C63;
}

/* ==========================================================================
   PANE 2: EXPANDED TRACKPAD (Matches RemotePortraitMaterial & control.webp)
   ========================================================================== */
mm-phone .mmp-trackpad-card {
  position: relative;
  flex: 0 0 220px !important;
  height: 220px !important;
  min-height: 220px !important;
  border-radius: 0 0 28px 28px;
  background: rgba(26, 28, 33, 0.94);
  border: 0.65px solid rgba(255, 255, 255, 0.16);
  border-top: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Inner recessed trackpad well (RemotePortraitMaterial.trackpadWell, cornerRadius = 20) */
mm-phone .mmp-trackpad-card::before {
  content: "";
  position: absolute;
  inset: 5px 8px 8px 8px;
  border-radius: 20px;
  background: rgba(8, 9, 12, 0.68);
  border: 0.5px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 0;
}

/* Bottom center trackpad grip pill (RemotePortraitMaterial.trackpadGrip: 36 × 3.5pt) */
mm-phone .mmp-trackpad-card::after {
  content: "";
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 3.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  z-index: 2;
}

mm-phone .mmp-tp-top,
mm-phone .mmp-tp-bottom {
  position: relative;
  z-index: 2;
  padding: 6px 10px;
}

mm-phone .mmp-tp-bottom {
  padding-bottom: 14px;
}

/* ==========================================================================
   PANE 3, 4, 5: CLIPBOARD / TOOLS / VIEW-ONLY SHEETS
   ========================================================================== */
mm-phone .mmp-sheet-card,
mm-phone .mmp-viewonly-card {
  flex: 0 0 220px !important;
  height: 220px !important;
  min-height: 220px !important;
  margin: 0 14px;
  border-radius: 24px;
  background: rgba(26, 28, 33, 0.94);
  border: 0.65px solid rgba(255, 255, 255, 0.14);
  padding: 14px;
}

mm-phone .mmp-viewonly-card {
  background: transparent;
  border: none;
}

/* 10. Floating Bottom Status Toast & Native Home Indicator */
mm-phone .mmp-footer-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  z-index: 15;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

mm-phone .mmp-toast {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  min-height: 14px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(12, 13, 16, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

mm-phone .mmp-toast:empty {
  display: none;
}

mm-phone .mmp-home-indicator {
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

/* The physical edge surrounds a native 390 × 844 canvas. Scaling is only done on the outside. */
.phone-fit mm-phone {position:absolute!important;width:398px!important;height:852px!important;aspect-ratio:398/852!important;max-width:none!important;margin:0;zoom:1}
mm-phone .mmp-chassis{padding:4px;border-radius:51px;background:linear-gradient(125deg,#9da2ac,#575a62 17%,#25272d 53%,#7d828c 82%,#363a42);box-shadow:0 0 0 .55px #c8cbd454,0 12px 23px #01040b66}
mm-phone .mmp-screen{width:390px!important;height:844px!important;border-radius:47px;isolation:isolate}
mm-phone:focus-within .mmp-chassis,mm-phone:focus-visible .mmp-chassis{box-shadow:0 0 0 1px #b7c5da99,0 12px 23px #01040b66}
mm-phone .mmp-statusbar{height:46px;padding:10px 27px 2px 40px;font-size:16px}
mm-phone .mmp-nav-row{height:55px}
mm-phone .mmp-access-wrap{margin:6px 0 10px}
mm-phone .mmp-remote-stage{border-radius:8px;width:304px;border:0;overflow:hidden}
mm-phone .mmp-remote-cursor{z-index:4}
mm-phone .mmp-toolbar-shell{margin-top:12px}
mm-phone .mmp-toolbar::before{left:calc(8px + (100% - 16px) * var(--tool-pos,.375));transform:translate(-50%,-50%);top:50%;margin:0}
mm-phone .mmp-drawer{margin-top:8px;flex:1 1 auto;min-height:0;width:100%;height:auto}
mm-phone .mmp-pane[data-pane=keyboard]{gap:0;height:100%;min-height:0;overflow:hidden}
mm-phone .mmp-input-row{width:calc(100% - 32px);height:44px;min-height:44px;margin:0 16px;padding:0 14px;box-shadow:none;border-radius:12px;background:#1b1c20}
mm-phone .mmp-input-text{appearance:none;display:block;border:0;outline:0;background:transparent;color:#f6f6f7;width:100%;font:400 17px/1.35 var(--ui);caret-color:#66a5ff;user-select:text}
mm-phone .mmp-input-display{width:100%;overflow:visible}mm-phone .mmp-accessory-strip{width:100%;height:43px;flex:0 0 43px;margin:0;gap:0;padding:0}
mm-phone .mmp-acc-btn{font-weight:400}
mm-phone .ios-input-plane{flex:1;display:flex;flex-direction:column;min-height:0;width:100%;background:#201f21;border-radius:24px 24px 0 0;border-top:.65px solid #47464a;overflow:hidden}
mm-phone .mmp-candidates{height:51px;min-height:51px;display:flex;justify-content:flex-start;align-items:center;gap:0;padding:0 12px;overflow:hidden}
mm-phone .mmp-cand-chip{min-width:34px;max-width:92px;padding:3px 13px;border:0;border-right:1px solid #ffffff25;background:none;border-radius:0;color:#f1f1f2;font-size:19px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
mm-phone .mmp-kb-tray{position:static;background:transparent;display:flex;flex-direction:column;gap:10px;border:0;box-shadow:none;border-radius:0;padding:0 6px;width:100%;flex:0 0 auto;height:auto!important;min-height:0}
mm-phone .mmp-kb-tray::before,mm-phone .mmp-kb-tray::after{display:none}
mm-phone .mmp-kb-row{display:flex;gap:6px;align-items:center;justify-content:center;width:100%;padding:0}
mm-phone .mmp-kb-row.row-2{padding:0 18.5px}
mm-phone .mmp-key{height:43px;min-width:0;flex:1;border-radius:7px;border:0;background:#434245;font:400 23px/1 var(--ui);box-shadow:0 1px 0 #101012;letter-spacing:-.025em}
mm-phone .mmp-key.key-fn{height:43px;flex:1.35;background:#424144;font-size:17px;font-weight:400;color:white}
mm-phone .mmp-kb-row:nth-child(3) .mmp-key.key-fn:first-child{margin-right:6px}
mm-phone .mmp-kb-row:nth-child(3) .mmp-key.key-fn:last-child{margin-left:6px}
mm-phone .mmp-kb-row:last-child .key-fn{flex:0 0 42px}
mm-phone .mmp-key.key-space{flex:1;font-size:13px;color:#98989b;background:#434245;justify-content:flex-end;padding:0 8px 4px;align-items:flex-end}
mm-phone .mmp-key.key-return{flex:0 0 89px;background:#434245;color:white}
mm-phone .mmp-key:active,mm-phone .mmp-key.pressed{background:#77767a;transform:translateY(1px)}
mm-phone .ios-system-row{display:flex;flex:1;min-height:45px;align-items:center;justify-content:space-between;padding:0 27px 7px;background:#201f21}
mm-phone .ios-system-row button,.ios-mic{display:grid;place-items:center;width:32px;height:34px;color:#fff}
mm-phone .ios-system-row svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
mm-phone .mmp-footer-bar{position:absolute;inset:auto 0 0;pointer-events:none}
mm-phone .mmp-footer-bar .mmp-toast{position:absolute;left:22px;bottom:10px;max-width:346px;padding:0;background:transparent;opacity:0;pointer-events:none}
mm-phone:not(:has([data-pane="keyboard"].active)) .mmp-home-indicator{width:116px;height:4.5px;margin:0 auto 7px}
mm-phone:has([data-pane="keyboard"].active) .mmp-home-indicator{display:none}
mm-phone .mmp-paused-overlay[aria-hidden=true]{visibility:hidden}
mm-phone .mmp-trackpad-card{touch-action:none}
mm-phone .mmp-tp-coord{display:none}
mm-phone .mmp-sheet-card,.mmp-viewonly-card{width:calc(100% - 32px);min-height:0;margin:0 auto}
mm-phone .mmp-item-desc,mm-phone .mmp-item-title{display:block}
mm-phone .mmp-clip-list,mm-phone .mmp-tools-list{text-align:left}
mm-phone .mmp-clip-paste,mm-phone .mmp-tools-back{min-height:35px;padding:5px 9px;color:#8fb9ef;font:500 14px/1.4 var(--ui)}
mm-phone .mmp-sample-content{padding:10px;color:#eee}
