* {
  box-sizing: border-box;
}

:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  color: #151515;
  background: #ececef;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.controls {
  padding: 32px;
  overflow-y: auto;
  height: 100vh;
}

.brand {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #8b8b91;
  font-weight: 700;
}

h1 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin: 0;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #5c5c62;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input[type="text"],
textarea,
select {
  width: 100%;
  border: 1px solid #d7d7dc;
  background: #f7f7f9;
  color: #111;
  border-radius: 12px;
  outline: none;
  padding: 12px 13px;
  transition: 0.16s ease;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: #f0b400;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.14);
  background: white;
}

textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.5;
}

input[type="range"] {
  width: 100%;
  accent-color: #ffcc00;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  font-size: 13px;
  color: #444;
}

.check input {
  accent-color: #ffcc00;
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 26px;
}

.actions3 {
  grid-template-columns: 1fr 1fr;
}

.actions3 .secondary {
  grid-column: 1 / -1;
}

.actions button {
  border: 0;
  border-radius: 13px;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 800;
}

.primary {
  background: #ffcc00;
  color: #151515;
}

.primary:hover {
  filter: brightness(0.97);
}

.secondary {
  background: #ededf0;
  color: #555;
}

.xButton {
  background: #111;
  color: #fff;
}

.xButton span {
  margin-right: 4px;
  font-size: 17px;
}

.xButton:hover {
  background: #262626;
}

.actions button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.hint {
  font-size: 11px;
  color: #999;
  line-height: 1.55;
  margin: 18px 0 0;
}

.previewArea {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.previewHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 2px 16px;
}

.previewHeader strong {
  font-size: 15px;
}

#scaleLabel {
  font-size: 12px;
  color: #777;
}

.previewStage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 26px;
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%);
  background-size: 24px 24px;
  background-position:
    0 0,
    0 12px,
    12px -12px,
    -12px 0px;
}

.previewSizer {
  --preview-w: 283px;
  --preview-h: 613px;
  width: var(--preview-w);
  height: var(--preview-h);
  position: relative;
  flex: 0 0 auto;
}

.phoneCanvas {
  --canvas-w: 1179px;
  --canvas-h: 2556px;
  --canvas-scale: 0.24;
  width: var(--canvas-w);
  height: var(--canvas-h);
  transform: scale(var(--canvas-scale));
  transform-origin: top left;
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  background: #fff;
  color: #111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  -webkit-font-smoothing: antialiased;
}

.phoneCanvas.theme-dark {
  background: #000;
  color: #f5f5f7;
}

.phoneCanvas.theme-paper {
  background: #fbfaf5;
  color: #181816;
}

.statusBar {
  height: 138px;
  padding: 52px 70px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.statusIcons {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 42px;
}

.signalBars {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  height: 34px;
}

.signalBars i {
  display: block;
  width: 8px;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.22;
}

.signalBars i:nth-child(1) {
  height: 10px;
}
.signalBars i:nth-child(2) {
  height: 17px;
}
.signalBars i:nth-child(3) {
  height: 24px;
}
.signalBars i:nth-child(4) {
  height: 31px;
}

.signalBars[data-level="1"] i:nth-child(-n + 1),
.signalBars[data-level="2"] i:nth-child(-n + 2),
.signalBars[data-level="3"] i:nth-child(-n + 3),
.signalBars[data-level="4"] i:nth-child(-n + 4) {
  opacity: 1;
}

.networkLabel {
  font-size: 39px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-left: 1px;
}

.batteryWrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.battery {
  width: 76px;
  height: 38px;
  border: 4px solid currentColor;
  border-radius: 9px;
  padding: 4px;
  position: relative;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  opacity: 0.92;
}

.batteryFill {
  position: absolute;
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: 73%;
  max-width: calc(100% - 6px);
  border-radius: 3px;
  background: currentColor;
  z-index: 0;
}

.batteryWrap[data-level="100"] .batteryFill.low {
  background: #ff3b30;
}

.batteryFill.charging,
.batteryFill.medium {
  background: #ffcc00;
}

.batteryCap {
  width: 5px;
  height: 13px;
  border-radius: 0 4px 4px 0;
  background: currentColor;
  opacity: 0.35;
}

.topToolbar {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 54px 20px 44px;
  color: #e6af00;
}

.iconButton,
.circleIcon {
  border: 0;
  background: transparent;
  color: inherit;
}

.back {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
}

.back span {
  font-family: inherit;
  font-size: 90px;
  font-weight: 200;
  line-height: 0.5;
  transform: translateY(-3px);
}

.back small {
  font-size: 40px;
  font-weight: 500;
}

.toolbarRight {
  display: flex;
  gap: 40px;
}

.circleIcon {
  font-size: 39px;
  font-weight: 700;
  min-width: 62px;
}

.note {
  padding: 0 84px 250px;
}

.noteDate {
  text-align: center;
  font-size: 31px;
  color: #929296;
  margin: 2px 0 26px;
}

.note h2 {
  margin: 0 0 24px;
  font-size: 62px;
  line-height: 1.16;
  letter-spacing: -0.04em;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.noteBody {
  font-size: 48px;
  line-height: 1.45;
  letter-spacing: -0.018em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bottomToolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 72px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 52px;
  border-top: 2px solid rgba(127, 127, 127, 0.18);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.theme-dark .bottomToolbar {
  background: rgba(0, 0, 0, 0.92);
}

.theme-paper .bottomToolbar {
  background: rgba(251, 250, 245, 0.94);
}

.bottomToolbar button {
  border: 0;
  background: transparent;
  color: #e6af00;
  font-size: 45px;
  font-weight: 600;
  min-width: 100px;
}

.homeIndicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 15px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .app {
    display: block;
  }

  .controls {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .previewArea {
    height: 78vh;
    min-height: 620px;
  }
}

@media (max-width: 540px) {
  .controls {
    padding: 22px 18px;
  }

  .previewArea {
    padding: 16px;
    min-height: 560px;
  }

  .grid2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.batteryFill.normal {
  background: currentColor;
}

.theme-light .batteryText,
.theme-paper 

.theme-dark 


/* ===== iPhone Notes fidelity overrides ===== */

.phoneCanvas {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  background: #fff;
  color: #000;
  border-radius: 0;
}

.phoneCanvas.theme-light {
  background: #fff;
  color: #000;
}

.phoneCanvas.theme-dark {
  background: #000;
  color: #fff;
}

.phoneCanvas.theme-paper {
  background: #fffdf8;
  color: #111;
}

/* iOS status bar */
.statusBar {
  height: 132px;
  padding: 42px 62px 0 64px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 43px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.statusIcons {
  display: flex;
  align-items: center;
  gap: 13px;
  height: 42px;
}

.signalBars {
  gap: 5px;
  height: 29px;
}

.signalBars i {
  width: 7px;
  border-radius: 3px;
}

.signalBars i:nth-child(1) {
  height: 9px;
}
.signalBars i:nth-child(2) {
  height: 15px;
}
.signalBars i:nth-child(3) {
  height: 22px;
}
.signalBars i:nth-child(4) {
  height: 29px;
}

.networkLabel {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.035em;
  margin-left: 0;
}

.batteryWrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.battery {
  width: 65px;
  height: 31px;
  border: 3px solid currentColor;
  border-radius: 7px;
  padding: 3px;
  overflow: hidden;
  position: relative;
  opacity: 0.55;
}

.batteryFill {
  position: absolute;
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: 73%;
  border-radius: 3px;
  background: currentColor;
}

.batteryFill.low {
  background: #ff3b30;
}
.batteryFill.medium {
  background: #ffcc00;
}
.batteryFill.normal {
  background: currentColor;
}

.batteryCap {
  width: 4px;
  height: 12px;
  border-radius: 0 3px 3px 0;
  background: currentColor;
  opacity: 0.28;
}

/* iOS Notes nav bar */
.topToolbar {
  height: 132px;
  padding: 0 54px 0 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #dca900;
}

.navBack {
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  font: inherit;
}

.chevron {
  font-family: inherit;
  font-size: 84px;
  font-weight: 200;
  line-height: 0.6;
  transform: translateY(-5px);
}

.backText {
  font-size: 39px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.toolbarRight {
  display: flex;
  align-items: center;
  gap: 30px;
}

.toolbarCircle {
  width: 66px;
  height: 66px;
  border: 0;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.09);
  color: inherit;
  display: grid;
  place-items: center;
  font-size: 35px;
  font-weight: 600;
  padding: 0;
}

.moreButton {
  font-size: 31px;
  letter-spacing: 1px;
}

.shareGlyph {
  display: inline-block;
  transform: translateY(-3px);
  font-size: 41px;
}

/* Note body */
.note {
  padding: 0 78px 260px 78px;
}

.noteDate {
  text-align: center;
  font-size: 29px;
  font-weight: 400;
  color: #8e8e93;
  margin: 4px 0 31px;
  letter-spacing: -0.015em;
}

.note h2 {
  margin: 0 0 18px;
  font-size: 60px;
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.noteBody {
  font-size: 48px;
  line-height: 1.43;
  letter-spacing: -0.025em;
  font-weight: 400;
}

/* iOS Notes bottom toolbar */
.bottomToolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 69px;
  height: 122px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0 36px;
  border-top: 2px solid rgba(60, 60, 67, 0.14);
  background: rgba(250, 250, 250, 0.94);
  backdrop-filter: blur(22px);
}

.theme-dark .bottomToolbar {
  background: rgba(28, 28, 30, 0.95);
  border-top-color: rgba(84, 84, 88, 0.55);
}

.theme-paper .bottomToolbar {
  background: rgba(255, 253, 248, 0.95);
}

.bottomToolbar button {
  border: 0;
  background: transparent;
  color: #dca900;
  font-size: 42px;
  font-weight: 500;
  min-width: 0;
  padding: 0;
}

.toolAa {
  font-size: 37px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.composeGlyph {
  font-size: 39px;
  display: inline-block;
  transform: rotate(-3deg);
}

.homeIndicator {
  bottom: 22px;
  width: 414px;
  height: 15px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.95;
}

/* Better native calendar control */
input[type="date"] {
  width: 100%;
  border: 1px solid #d7d7dc;
  background: #f7f7f9;
  color: #111;
  border-radius: 12px;
  outline: none;
  padding: 11px 13px;
  min-height: 44px;
}

input[type="date"]:focus {
  border-color: #f0b400;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.14);
  background: white;
}

@media (max-width: 540px) {
  input[type="date"] {
    font-size: 16px;
  }
}

.batteryFill.low-power {
  background: #ffcc00 !important;
}

.lowPowerCheck {
  margin-top: -4px;
  margin-bottom: 18px;
}

/* ===== v8 iOS UI polish ===== */

body {
  background: #f2f2f7;
}

.app {
  background: #f2f2f7;
}

.iosControls {
  background: #f2f2f7;
  border-right: 1px solid rgba(60, 60, 67, 0.12);
  padding: 24px 20px 28px;
}

.brand {
  padding: 4px 4px 10px;
  margin-bottom: 18px;
}

.brand h1 {
  font-size: 31px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.eyebrow {
  color: #8e8e93;
  letter-spacing: 0.12em;
}

.badge {
  background: #1c1c1e;
  color: #fff;
  padding: 7px 10px;
  font-size: 10px;
  border-radius: 999px;
}

/* iOS grouped-control surfaces */
.iosControls .field,
.iosControls .check {
  background: #fff;
  border: 1px solid rgba(60, 60, 67, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  margin-bottom: 10px;
}

.iosControls .grid2 {
  gap: 10px;
}

.iosControls .grid2 .field {
  margin-bottom: 10px;
}

.iosControls .field label {
  margin-bottom: 8px;
  color: #3a3a3c;
  font-size: 12px;
  font-weight: 600;
}

.iosControls input[type="text"],
.iosControls input[type="date"],
.iosControls textarea,
.iosControls select {
  border: 0;
  background: #f2f2f7;
  border-radius: 12px;
  min-height: 44px;
  padding: 11px 12px;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.06);
}

.iosControls textarea {
  min-height: 160px;
  line-height: 1.55;
}

.iosControls input[type="text"]:focus,
.iosControls input[type="date"]:focus,
.iosControls textarea:focus,
.iosControls select:focus {
  background: #fff;
  box-shadow:
    inset 0 0 0 1.5px #ffcc00,
    0 0 0 3px rgba(255, 204, 0, 0.14);
}

.iosControls input[type="range"] {
  accent-color: #ffcc00;
}

/* iOS switch */
.iosControls .check {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1c1c1e;
  font-size: 14px;
}

.iosControls .check > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.iosControls .check small {
  color: #8e8e93;
  font-size: 11px;
  font-weight: 400;
}

.iosControls .check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: #e5e5ea;
  position: relative;
  flex: 0 0 auto;
  transition: background 0.18s ease;
  outline: none;
  margin: 0;
}

.iosControls .check input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease;
}

.iosControls .check input[type="checkbox"]:checked {
  background: #ffcc00;
}

.iosControls .check input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.actions {
  margin-top: 18px;
  gap: 10px;
}

.actions button {
  min-height: 50px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.iosPrimary {
  background: #ffcc00;
  color: #111;
}

.iosShare {
  background: #1c1c1e;
  color: #fff;
}

.iosSecondary {
  background: #e5e5ea;
  color: #3a3a3c;
}

.hint {
  color: #8e8e93;
  padding: 2px 5px;
}

.iosPreviewArea {
  background: #e9e9ee;
  padding: 22px;
}

.previewHeader {
  padding: 0 4px 14px;
}

.previewHeader strong {
  font-weight: 650;
}

.previewStage {
  border-radius: 30px;
  background: #dedee3;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.06);
}

.previewSizer {
  transition:
    width 0.2s ease,
    height 0.2s ease;
}

.phoneCanvas {
  transition: height 0.2s ease;
}

/* tighter desktop visual rhythm */
@media (min-width: 901px) {
  .iosControls {
    width: 100%;
  }
}

/* narrow screens */
@media (max-width: 540px) {
  .iosControls {
    padding: 18px 14px 22px;
  }

  .brand h1 {
    font-size: 27px;
  }

  .iosPreviewArea {
    padding: 12px;
  }

  .previewStage {
    border-radius: 22px;
  }
}

/* ===== v10 Battery controls ===== */

.batteryOptions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: -2px 0 12px;
}

.iosControls .batteryOptions .check {
  margin: 0;
  min-width: 0;
}

.iosControls .batteryOptions .check > span {
  white-space: nowrap;
}

.chargingBolt {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  display: none;
  color: #fff;
  font-family: inherit;
  font-size: 23px;
  line-height: 1;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.batteryWrap.is-charging .chargingBolt {
  display: block;
}

.batteryFill.is-charging {
  background: #34c759 !important;
}

.batteryWrap.is-charging .battery {
  opacity: 0.92;
}

@media (max-width: 390px) {
  .batteryOptions {
    grid-template-columns: 1fr;
  }
}

/* ===== v12 Unified iOS Tone ===== */

:root {
  --ios-bg: #f2f2f7;
  --ios-card: #ffffff;
  --ios-label: #000000;
  --ios-secondary: #6e6e73;
  --ios-tertiary: #8e8e93;
  --ios-separator: rgba(60, 60, 67, 0.18);
  --ios-fill: rgba(118, 118, 128, 0.12);
  --ios-yellow: #dca900;
  --ios-green: #34c759;
  --ios-red: #ff3b30;
}

body,
.app {
  background: var(--ios-bg);
}

.app {
  grid-template-columns: minmax(350px, 420px) minmax(0, 1fr);
}

/* Settings rail */
.iosControls {
  background: var(--ios-bg);
  border-right: 1px solid var(--ios-separator);
  padding: 20px 16px 28px;
}

.brand {
  padding: 9px 5px 17px;
  margin: 0;
  align-items: center;
}

.brand h1 {
  font-size: 29px;
  line-height: 1.08;
  font-weight: 700;
  color: var(--ios-label);
  letter-spacing: -0.045em;
}

.brand .eyebrow {
  color: var(--ios-tertiary);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.13em;
  margin-bottom: 5px;
}

.badge {
  background: #1c1c1e;
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 9px;
}

.settingsSectionTitle {
  margin: 19px 8px 7px;
  color: var(--ios-secondary);
  font-size: 12px;
  font-weight: 600;
}

.iosControls .field,
.iosControls .check {
  background: var(--ios-card);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 0 0 0.5px rgba(60, 60, 67, 0.1);
}

.iosControls .field {
  padding: 12px 13px;
  margin-bottom: 8px;
}

.iosControls .grid2 {
  gap: 8px;
}

.iosControls .grid2 .field {
  margin-bottom: 8px;
}

.iosControls .field label {
  color: #3a3a3c;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 7px;
}

.iosControls input[type="text"],
.iosControls input[type="date"],
.iosControls textarea,
.iosControls select {
  background: var(--ios-fill);
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  color: var(--ios-label);
  min-height: 42px;
  padding: 9px 10px;
  font-size: 14px;
}

.iosControls textarea {
  min-height: 150px;
}

.iosControls input[type="text"]:focus,
.iosControls input[type="date"]:focus,
.iosControls textarea:focus,
.iosControls select:focus {
  background: rgba(118, 118, 128, 0.08);
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.32);
}

.iosControls .check {
  min-height: 54px;
  margin: 0 0 8px;
  padding: 10px 13px;
  font-size: 14px;
}

.iosControls .check small {
  color: var(--ios-tertiary);
  font-size: 10px;
  margin-top: 2px;
}

.batteryOptions {
  gap: 8px;
  margin: 0 0 8px;
}

.iosControls .check input[type="checkbox"] {
  width: 48px;
  height: 28px;
  background: #e9e9eb;
}

.iosControls .check input[type="checkbox"]::after {
  width: 24px;
  height: 24px;
}

.iosControls .check input[type="checkbox"]:checked {
  background: #34c759;
}

.iosControls .check input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.actions {
  gap: 8px;
  margin-top: 18px;
}

.actions button {
  border-radius: 12px;
  min-height: 48px;
  font-size: 14px;
  font-weight: 650;
}

.iosPrimary {
  background: #ffcc00;
}

.iosShare {
  background: #1c1c1e;
}

.iosSecondary {
  background: #e5e5ea;
}

.hint {
  color: var(--ios-tertiary);
  font-size: 10px;
  padding: 0 6px;
}

/* Preview shell */
.iosPreviewArea {
  background: #e7e7ec;
  padding: 20px;
}

.previewHeader {
  padding: 2px 4px 14px;
}

.previewHeader .eyebrow {
  color: var(--ios-tertiary);
  font-size: 10px;
  margin-bottom: 4px;
}

.previewHeader strong {
  color: #1c1c1e;
  font-size: 14px;
  font-weight: 650;
}

#scaleLabel {
  background: rgba(255, 255, 255, 0.66);
  color: #6e6e73;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
}

.previewStage {
  background: #dcdce1;
  border-radius: 26px;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.08);
}

/* iPhone system font: preview and exported image use the same SF system stack. */
.phoneCanvas,
.phoneCanvas * {
  font-family: inherit;
}

/* Export image — iOS Notes */
.phoneCanvas {
  --note-yellow: #dca900;
  background: #fff;
  color: #000;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.phoneCanvas.theme-light {
  background: #fff;
  color: #000;
}

.phoneCanvas.theme-paper {
  background: #fff;
  color: #000;
}

.phoneCanvas.theme-dark {
  background: #000;
  color: #f5f5f7;
}

/* Status bar */
.statusBar {
  position: relative;
  height: 132px;
  padding: 42px 63px 0 65px;
  font-size: 42px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.045em;
  z-index: 4;
}

.statusIcons {
  gap: 12px;
  height: 35px;
}

.signalBars {
  gap: 5px;
  height: 29px;
}

.signalBars i {
  width: 7px;
  border-radius: 3px;
  background: currentColor;
}

.networkLabel {
  font-size: 34px;
  font-weight: 500;
}

.battery {
  width: 67px;
  height: 31px;
  border-width: 3px;
  border-radius: 8px;
  padding: 0;
  opacity: 0.58;
  overflow: hidden;
}

.batteryFill {
  left: 3px;
  top: 3px;
  bottom: 3px;
  max-width: calc(100% - 6px);
  border-radius: 4px;
}

.batteryCap {
  width: 4px;
  height: 12px;
}

.chargingBolt {
  font-size: 21px;
}

/* Navigation */
.topToolbar {
  height: 126px;
  padding: 0 50px 0 48px;
  color: var(--note-yellow);
}

.navBack {
  gap: 11px;
  min-height: 72px;
}

.backChevron {
  width: 25px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.backText {
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.toolbarRight {
  gap: 25px;
}

.toolbarCircle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.1);
  color: var(--note-yellow);
}

.iosIcon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.moreIcon {
  fill: currentColor;
  stroke: none;
}

/* Note */
.note {
  padding: 0 78px 255px;
}

.noteDate {
  color: #8e8e93;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 5px 0 30px;
}

.note h2 {
  font-size: 59px;
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.045em;
  margin: 0 0 17px;
}

.noteBody {
  font-weight: 400;
  letter-spacing: -0.026em;
}

/* Bottom editor bar */
.bottomToolbar {
  bottom: 68px;
  height: 121px;
  padding: 0 43px;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(250, 250, 250, 0.96);
  border-top: 1.5px solid rgba(60, 60, 67, 0.18);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
}

.theme-dark .bottomToolbar {
  background: rgba(28, 28, 30, 0.96);
}

.bottomToolbar button {
  color: var(--note-yellow);
  min-width: 0;
  height: 86px;
  display: grid;
  place-items: center;
}

.bottomIcon {
  width: 43px;
  height: 43px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolAa {
  font-size: 37px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.homeIndicator {
  bottom: 22px;
  width: 405px;
  height: 15px;
  border-radius: 999px;
  opacity: 0.94;
}

/* Dark Notes */
.theme-dark .toolbarCircle {
  background: rgba(118, 118, 128, 0.26);
}

.theme-dark .noteDate {
  color: #8e8e93;
}

.theme-dark .homeIndicator {
  background: #fff;
}

@media (max-width: 900px) {
  .app {
    display: block;
  }

  .iosControls {
    height: auto;
  }

  .iosPreviewArea {
    min-height: 650px;
  }
}

@media (max-width: 540px) {
  .iosControls {
    padding: 14px 12px 20px;
  }

  .brand h1 {
    font-size: 26px;
  }

  .settingsSectionTitle {
    margin-top: 16px;
  }

  .iosPreviewArea {
    padding: 10px;
  }

  .previewStage {
    border-radius: 20px;
  }
}

/* ===== v13 iOS Version Themes ===== */

.previewMeta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.iosBadge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #6e6e73;
  font-size: 10px;
  font-weight: 650;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.12);
}

/* -----------------------------------------------------------
   iOS 18
   Flat, opaque navigation/tool bars, no Liquid Glass.
----------------------------------------------------------- */

.phoneCanvas.ios-18 {
  --note-yellow: #d9a600;
}

.phoneCanvas.ios-18 .toolbarCircle {
  background: transparent;
  width: 60px;
  height: 60px;
}

.phoneCanvas.ios-18 .topToolbar {
  background: #fff;
}

.phoneCanvas.ios-18.theme-dark .topToolbar {
  background: #000;
}

.phoneCanvas.ios-18 .bottomToolbar {
  background: #fafafa;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top-color: rgba(60, 60, 67, 0.2);
}

.phoneCanvas.ios-18.theme-dark .bottomToolbar {
  background: #1c1c1e;
}

.phoneCanvas.ios-18 .toolbarRight {
  gap: 20px;
}

.phoneCanvas.ios-18 .note {
  padding-left: 78px;
  padding-right: 78px;
}

/* -----------------------------------------------------------
   iOS 26
   First-generation Liquid Glass.
----------------------------------------------------------- */

.phoneCanvas.ios-26 {
  --glass-alpha: 0.64;
  --glass-border-alpha: 0.28;
  --glass-shadow-alpha: 0.1;
  --glass-blur: 30px;
}

.phoneCanvas.ios-26 .toolbarCircle {
  position: relative;
  overflow: hidden;
  background: rgba(245, 245, 247, var(--glass-alpha));
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04),
    0 5px 18px rgba(0, 0, 0, var(--glass-shadow-alpha));
  backdrop-filter: blur(var(--glass-blur)) saturate(175%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(175%);
}

.phoneCanvas.ios-26 .toolbarCircle::before {
  content: "";
  position: absolute;
  inset: 1px 4px auto;
  height: 44%;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

.phoneCanvas.ios-26 .toolbarCircle > * {
  position: relative;
  z-index: 1;
}

.phoneCanvas.ios-26 .bottomToolbar {
  left: 38px;
  right: 38px;
  bottom: 88px;
  height: 104px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 52px;
  padding: 0 28px;
  background: rgba(247, 247, 249, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(34px) saturate(190%);
  -webkit-backdrop-filter: blur(34px) saturate(190%);
}

.phoneCanvas.ios-26.theme-dark .toolbarCircle {
  background: rgba(58, 58, 60, 0.62);
  border-color: rgba(255, 255, 255, 0.16);
}

.phoneCanvas.ios-26.theme-dark .bottomToolbar {
  background: rgba(40, 40, 42, 0.66);
  border-color: rgba(255, 255, 255, 0.15);
}

.phoneCanvas.ios-26 .note {
  padding-bottom: 270px;
}

/* OS-specific auto-height reserve works visually with floating bars */
.phoneCanvas.ios-26 .homeIndicator {
  bottom: 22px;
}

/* Make version switching feel immediate without animating export */
.previewStage .phoneCanvas {
  transition:
    height 0.18s ease,
    background-color 0.18s ease;
}

/* ===== v14 Accurate iOS 26 Notes Chrome ===== */

.ios26TopChrome,
.ios26BottomChrome {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  pointer-events: none;
}

.ios26TopChrome {
  top: 132px;
  height: 122px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
}

.ios26Back,
.ios26TopCapsule,
.ios26BottomCapsule,
.ios26Compose {
  pointer-events: auto;
}

.ios26Back,
.ios26Compose {
  width: 86px;
  height: 86px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(28, 28, 30, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  display: grid;
  place-items: center;
  color: #f5f5f7;
  padding: 0;
}

.ios26Back svg,
.ios26Compose svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ios26TopCapsule {
  height: 86px;
  min-width: 205px;
  padding: 0 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 43px;
  background: rgba(28, 28, 30, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.ios26TopCapsule button {
  width: 66px;
  height: 66px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: #f5f5f7;
  padding: 0;
}

.ios26TopCapsule svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ios26TopCapsule .dots {
  fill: currentColor;
  stroke: none;
}

.ios26BottomChrome {
  bottom: 70px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
}

.ios26BottomCapsule {
  height: 100px;
  min-width: 330px;
  padding: 0 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  background: rgba(28, 28, 30, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 26px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(34px) saturate(165%);
  -webkit-backdrop-filter: blur(34px) saturate(165%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: center;
}

.ios26BottomCapsule button {
  width: 82px;
  height: 82px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: #f5f5f7;
  padding: 0;
}

.ios26BottomCapsule svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ios26Compose {
  width: 100px;
  height: 100px;
}

.ios26Compose svg {
  width: 48px;
  height: 48px;
  stroke-width: 2.35;
}

/* Light mode iOS26 glass */
.phoneCanvas.ios-26.theme-light .ios26Back,
.phoneCanvas.ios-26.theme-light .ios26TopCapsule,
.phoneCanvas.ios-26.theme-light .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-light .ios26Compose,
.phoneCanvas.ios-26.theme-paper .ios26Back,
.phoneCanvas.ios-26.theme-paper .ios26TopCapsule,
.phoneCanvas.ios-26.theme-paper .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-paper .ios26Compose {
  background: rgba(245, 245, 247, 0.76);
  border-color: rgba(255, 255, 255, 0.78);
  color: #1c1c1e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 22px rgba(0, 0, 0, 0.1);
}

/* For iOS26, hide the legacy bars and use the floating chrome */
.phoneCanvas.ios-26 .topToolbar,
.phoneCanvas.ios-26 .bottomToolbar {
  display: none !important;
}

.phoneCanvas.ios-26 .ios26TopChrome,
.phoneCanvas.ios-26 .ios26BottomChrome {
  display: flex !important;
}

/* iOS26 content positioning more like the screenshot */
.phoneCanvas.ios-26 .note {
  padding: 36px 78px 290px;
}

.phoneCanvas.ios-26 .noteDate {
  display: none;
}

.phoneCanvas.ios-26 .note h2 {
  margin-top: 12px;
  margin-bottom: 22px;
  font-size: 62px;
  line-height: 1.12;
}

.phoneCanvas.ios-26 .noteBody {
  line-height: 1.44;
}

/* Dark mode screenshot vibe */
.phoneCanvas.ios-26.theme-dark .statusBar {
  color: #f5f5f7;
}

.phoneCanvas.ios-26.theme-dark .note h2,
.phoneCanvas.ios-26.theme-dark .noteBody {
  color: #f5f5f7;
}

/* Keep home indicator independent */
.phoneCanvas.ios-26 .homeIndicator {
  bottom: 20px;
}

/* Smaller spacing for narrow exports */
@media (max-width: 540px) {
  .ios26TopChrome,
  .ios26BottomChrome {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* ===== v16 iOS26 light icon + list fixes ===== */

/* iOS 26 light mode uses dark monochrome symbols inside glass controls */
.phoneCanvas.ios-26.theme-light .ios26Back,
.phoneCanvas.ios-26.theme-light .ios26TopCapsule,
.phoneCanvas.ios-26.theme-light .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-light .ios26Compose,
.phoneCanvas.ios-26.theme-paper .ios26Back,
.phoneCanvas.ios-26.theme-paper .ios26TopCapsule,
.phoneCanvas.ios-26.theme-paper .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-paper .ios26Compose {
  color: #1c1c1e !important;
}

/* Give the floating top controls their own row; note begins below them */
.phoneCanvas.ios-26 .note {
  padding-top: 148px;
}

/* iOS-style note lists */
.noteList {
  margin-top: 42px;
  margin-bottom: 42px;
  font-size: inherit;
  line-height: 1.48;
}

.noteList:empty {
  display: none;
}

.noteListItem {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin: 13px 0;
}

.noteListMark {
  flex: 0 0 auto;
  width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  margin-top: 3px;
}

.noteListText {
  min-width: 0;
  flex: 1;
}

.noteListItem.checklist .noteListMark {
  width: 32px;
  height: 32px;
  border: 3px solid #aeaeb2;
  border-radius: 50%;
}

.noteListItem.checklist.checked .noteListMark {
  background: #1c1c1e;
  border-color: #1c1c1e;
}

.noteListItem.checklist.checked .noteListMark::after {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: translateY(-2px) rotate(-45deg);
}

.theme-dark .noteListItem.checklist .noteListMark {
  border-color: #636366;
}

.theme-dark .noteListItem.checklist.checked .noteListMark {
  background: #f5f5f7;
  border-color: #f5f5f7;
}

.theme-dark .noteListItem.checklist.checked .noteListMark::after {
  border-color: #1c1c1e;
}

.noteListItem.bullets .noteListMark {
  font-size: 28px;
  line-height: 1;
}

.noteListItem.numbers .noteListMark {
  width: 48px;
  justify-content: end;
  font-variant-numeric: tabular-nums;
}

/* ===== v17 iOS26 icon color specificity fix ===== */

/*
  v16では親カプセルの color だけを上書きしていたが、
  子button側に color:#f5f5f7 が直接指定されていたため
  share / more / bottom 3 icons が白のまま残っていた。
*/

/* Light / paper: every floating control symbol is dark */
.phoneCanvas.ios-26.theme-light .ios26Back,
.phoneCanvas.ios-26.theme-light .ios26Back svg,
.phoneCanvas.ios-26.theme-light .ios26TopCapsule,
.phoneCanvas.ios-26.theme-light .ios26TopCapsule button,
.phoneCanvas.ios-26.theme-light .ios26TopCapsule svg,
.phoneCanvas.ios-26.theme-light .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-light .ios26BottomCapsule button,
.phoneCanvas.ios-26.theme-light .ios26BottomCapsule svg,
.phoneCanvas.ios-26.theme-light .ios26Compose,
.phoneCanvas.ios-26.theme-light .ios26Compose svg,
.phoneCanvas.ios-26.theme-paper .ios26Back,
.phoneCanvas.ios-26.theme-paper .ios26Back svg,
.phoneCanvas.ios-26.theme-paper .ios26TopCapsule,
.phoneCanvas.ios-26.theme-paper .ios26TopCapsule button,
.phoneCanvas.ios-26.theme-paper .ios26TopCapsule svg,
.phoneCanvas.ios-26.theme-paper .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-paper .ios26BottomCapsule button,
.phoneCanvas.ios-26.theme-paper .ios26BottomCapsule svg,
.phoneCanvas.ios-26.theme-paper .ios26Compose,
.phoneCanvas.ios-26.theme-paper .ios26Compose svg {
  color: #1c1c1e !important;
  stroke: currentColor !important;
}

/* Dots are fill-based rather than stroke-based */
.phoneCanvas.ios-26.theme-light .ios26TopCapsule .dots,
.phoneCanvas.ios-26.theme-paper .ios26TopCapsule .dots {
  fill: #1c1c1e !important;
  stroke: none !important;
}

/* Dark: explicitly lock all floating symbols to white */
.phoneCanvas.ios-26.theme-dark .ios26Back,
.phoneCanvas.ios-26.theme-dark .ios26Back svg,
.phoneCanvas.ios-26.theme-dark .ios26TopCapsule,
.phoneCanvas.ios-26.theme-dark .ios26TopCapsule button,
.phoneCanvas.ios-26.theme-dark .ios26TopCapsule svg,
.phoneCanvas.ios-26.theme-dark .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-dark .ios26BottomCapsule button,
.phoneCanvas.ios-26.theme-dark .ios26BottomCapsule svg,
.phoneCanvas.ios-26.theme-dark .ios26Compose,
.phoneCanvas.ios-26.theme-dark .ios26Compose svg {
  color: #f5f5f7 !important;
  stroke: currentColor !important;
}

.phoneCanvas.ios-26.theme-dark .ios26TopCapsule .dots {
  fill: #f5f5f7 !important;
  stroke: none !important;
}

/* ===== v18 list sizing fix ===== */

.noteList {
  margin-top: 34px;
  margin-bottom: 34px;
  font-size: var(--note-body-size, 48px);
  line-height: var(--note-body-line-height, 1.45);
  letter-spacing: -0.022em;
}

.noteListItem {
  gap: 18px;
  margin: 8px 0;
  align-items: center;
}

.noteListText {
  font: inherit;
  line-height: inherit;
}

.noteListMark {
  width: 30px;
  min-height: 30px;
  margin-top: 0;
  font-size: 0.88em;
  line-height: 1;
}

.noteListItem.checklist .noteListMark {
  width: 28px;
  height: 28px;
  border-width: 2.5px;
}

.noteListItem.checklist.checked .noteListMark::after {
  width: 10px;
  height: 6px;
  border-left-width: 2.5px;
  border-bottom-width: 2.5px;
}

.noteListItem.bullets .noteListMark {
  font-size: 0.78em;
}

.noteListItem.numbers .noteListMark {
  width: 44px;
  font-size: 0.88em;
}

@media (max-width: 540px) {
  .noteListItem {
    gap: 16px;
  }
}

/* ===== v20 screenshot-matched iOS26 ===== */

.fieldHelp {
  display: block;
  margin-top: 7px;
  color: #8e8e93;
  font-size: 10px;
  line-height: 1.45;
}

/* Status bar: screenshot proportions */
.phoneCanvas.ios-26 .statusBar {
  height: 126px;
  padding: 42px 64px 0 66px;
  font-size: 43px;
  font-weight: 600;
}

.phoneCanvas.ios-26 .statusIcons {
  gap: 13px;
}

/* Wi-Fi icon */
.wifiIcon {
  position: relative;
  width: 45px;
  height: 31px;
  display: inline-block;
}

.wifiArc {
  position: absolute;
  left: 50%;
  border: 5px solid currentColor;
  border-left-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: translateX(-50%);
}

.wifiArc1 {
  width: 43px;
  height: 43px;
  top: 0;
}

.wifiArc2 {
  width: 25px;
  height: 25px;
  top: 9px;
}

.wifiDot {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: currentColor;
}

.networkLabel {
  margin-left: -2px;
}

/* iOS26 numeric battery pill */
.phoneCanvas.ios-26 .batteryWrap {
  gap: 3px;
}

.phoneCanvas.ios-26 .battery {
  width: 74px;
  height: 34px;
  border-width: 0;
  border-radius: 9px;
  padding: 0;
  opacity: 1;
  background: rgba(118, 118, 128, 0.26);
}

.phoneCanvas.ios-26 .batteryFill {
  left: 0;
  top: 0;
  bottom: 0;
  max-width: 100%;
  border-radius: 9px;
  z-index: 0;
}

.phoneCanvas.ios-26 .batteryCap {
  width: 5px;
  height: 13px;
  opacity: 0.2;
}

.batteryNumber {
  display: none;
}

.phoneCanvas.ios-26 .batteryNumber {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  color: #000;
  letter-spacing: -0.05em;
}

.phoneCanvas.ios-26 .batteryFill.normal {
  background: #8e8e93;
}

.phoneCanvas.ios-26 .batteryFill.medium,
.phoneCanvas.ios-26 .batteryFill.low-power {
  background: #ffd60a !important;
}

.phoneCanvas.ios-26 .batteryFill.low {
  background: #ff3b30;
}

.phoneCanvas.ios-26 .batteryFill.is-charging {
  background: #34c759 !important;
}

/* Screenshot-like: 95% + low-power looks like solid yellow pill */
.phoneCanvas.ios-26 .batteryWrap.low-power-active .battery {
  background: #ffd60a;
}

.phoneCanvas.ios-26 .batteryWrap.low-power-active .batteryFill {
  background: #ffd60a !important;
}

/* Floating top row */
.phoneCanvas.ios-26 .ios26TopChrome {
  top: 125px;
  height: 118px;
  padding: 0 48px;
  display: grid !important;
  grid-template-columns: 92px 1fr 216px;
  align-items: center;
}

.phoneCanvas.ios-26 .ios26Back,
.phoneCanvas.ios-26 .ios26Undo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(250, 250, 250, 0.8);
  color: #1c1c1e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 14px 34px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  display: grid;
  place-items: center;
  padding: 0;
}

.phoneCanvas.ios-26 .ios26Back {
  grid-column: 1;
}

.phoneCanvas.ios-26 .ios26Undo {
  grid-column: 2;
  justify-self: center;
}

.phoneCanvas.ios-26 .ios26Back svg,
.phoneCanvas.ios-26 .ios26Undo svg {
  width: 45px;
  height: 45px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phoneCanvas.ios-26 .ios26TopCapsule {
  grid-column: 3;
  width: 214px;
  min-width: 214px;
  height: 88px;
  justify-self: end;
  padding: 0 18px;
  border-radius: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  background: rgba(250, 250, 250, 0.82);
  color: #1c1c1e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 14px 34px rgba(0, 0, 0, 0.12);
}

.phoneCanvas.ios-26 .ios26TopCapsule button,
.phoneCanvas.ios-26 .ios26TopCapsule svg,
.phoneCanvas.ios-26 .ios26TopCapsule .dots {
  color: #1c1c1e !important;
  stroke: currentColor !important;
}

.phoneCanvas.ios-26 .ios26TopCapsule .dots {
  fill: #1c1c1e !important;
  stroke: none !important;
}

.phoneCanvas.ios-26.theme-dark .ios26Back,
.phoneCanvas.ios-26.theme-dark .ios26Undo,
.phoneCanvas.ios-26.theme-dark .ios26TopCapsule {
  background: rgba(28, 28, 30, 0.86);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

.phoneCanvas.ios-26.theme-dark .ios26TopCapsule button,
.phoneCanvas.ios-26.theme-dark .ios26TopCapsule svg {
  color: #f5f5f7 !important;
  stroke: currentColor !important;
}

.phoneCanvas.ios-26.theme-dark .ios26TopCapsule .dots {
  fill: #f5f5f7 !important;
}

/* Date + note position */
.phoneCanvas.ios-26 .note {
  padding: 0 76px 285px;
}

.phoneCanvas.ios-26 .noteDate {
  display: block !important;
  margin: 6px 0 35px;
  font-size: 29px;
  line-height: 1.2;
  color: #8e8e93;
  text-align: center;
}

.phoneCanvas.ios-26 .note h2 {
  margin: 0 0 22px;
  font-size: 62px;
  line-height: 1.08;
  font-weight: 700;
}

.phoneCanvas.ios-26 .noteBody {
  margin-bottom: 34px;
}

/* Mixed list rendering */
.noteList {
  margin-top: 0;
  font-size: var(--note-body-size, 48px);
  line-height: var(--note-body-line-height, 1.45);
}

.noteListSpacer {
  height: 0.78em;
}

.noteListItem {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 7px 0;
  min-height: 1.48em;
}

.noteListMark {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  margin: 0;
  display: grid;
  place-items: center;
  font-size: 0.9em;
  line-height: 1;
}

.noteListItem.checklist .noteListMark {
  width: 42px;
  height: 42px;
  border: 3px solid #aeaeb2;
  border-radius: 50%;
}

.noteListItem.checklist.checked .noteListMark {
  background: #ffd60a;
  border-color: #ffd60a;
}

.noteListItem.checklist.checked .noteListMark::after {
  content: "";
  width: 16px;
  height: 9px;
  border-left: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: translateY(-2px) rotate(-45deg);
}

.noteListItem.bullets .noteListMark {
  font-size: 0.64em;
}

.noteListItem.numbers .noteListMark {
  width: 54px;
  min-width: 54px;
  justify-content: end;
  font-size: 0.88em;
}

.noteListText {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: inherit;
}

/* Bottom floating controls */
.phoneCanvas.ios-26 .ios26BottomChrome {
  bottom: 74px;
  height: 126px;
  padding: 0 48px;
}

.phoneCanvas.ios-26 .ios26BottomCapsule {
  min-width: 342px;
  width: 342px;
  height: 100px;
  border-radius: 50px;
  padding: 0 22px;
  background: rgba(250, 250, 250, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  color: #1c1c1e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 14px 34px rgba(0, 0, 0, 0.12);
}

.phoneCanvas.ios-26 .ios26BottomCapsule button,
.phoneCanvas.ios-26 .ios26BottomCapsule svg,
.phoneCanvas.ios-26 .ios26Compose,
.phoneCanvas.ios-26 .ios26Compose svg {
  color: #1c1c1e !important;
  stroke: currentColor !important;
}

.phoneCanvas.ios-26 .ios26Compose {
  width: 100px;
  height: 100px;
  background: rgba(250, 250, 250, 0.82);
  border-color: rgba(255, 255, 255, 0.9);
  color: #1c1c1e;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 14px 34px rgba(0, 0, 0, 0.12);
}

.phoneCanvas.ios-26.theme-dark .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-dark .ios26Compose {
  background: rgba(28, 28, 30, 0.86);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

.phoneCanvas.ios-26.theme-dark .ios26BottomCapsule button,
.phoneCanvas.ios-26.theme-dark .ios26BottomCapsule svg,
.phoneCanvas.ios-26.theme-dark .ios26Compose,
.phoneCanvas.ios-26.theme-dark .ios26Compose svg {
  color: #f5f5f7 !important;
  stroke: currentColor !important;
}

/* ===== v21 Markdown editor + vertical positioning ===== */
.phoneCanvas.ios-26 .note {
  /* status bar 126 + floating controls ~118 + comfortable gap */
  padding-top: 270px !important;
  padding-left: 76px;
  padding-right: 76px;
}

.phoneCanvas.ios-26 .noteDate {
  margin-top: 0 !important;
  margin-bottom: 34px !important;
}

.noteMarkdownBlock {
  margin: 0 0 30px;
}

.noteList {
  margin: 0 0 30px !important;
}

.noteListSpacer {
  height: 0.72em;
}

/* ===== v22 visual polish ===== */

:root {
  --app-bg: #f4f4f6;
  --app-panel: #ffffff;
  --app-text: #1c1c1e;
  --app-subtle: #6e6e73;
  --app-muted: #8e8e93;
  --app-line: rgba(60, 60, 67, 0.12);
  --app-fill: #f2f2f7;
  --app-accent: #ffcc00;
}

body,
.app {
  background: var(--app-bg);
  color: var(--app-text);
}

.app {
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
}

.iosControls {
  background: var(--app-bg);
  border-right: 1px solid var(--app-line);
  padding: 22px 18px 30px;
}

.brand {
  padding: 8px 6px 18px;
  align-items: flex-start;
  gap: 12px;
}

.brand > div {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: var(--app-text);
}

.brandSub {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--app-muted);
}

.badge {
  margin-top: 2px;
  background: #1c1c1e;
  color: #fff;
  border-radius: 11px;
  padding: 7px 10px;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.settingsSectionTitle {
  margin: 20px 7px 7px;
  color: var(--app-subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.iosControls .field,
.iosControls .check {
  background: var(--app-panel);
  border-radius: 15px;
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.02);
}

.iosControls .field {
  padding: 13px 14px;
  margin-bottom: 9px;
}

.iosControls .field label {
  color: #3a3a3c;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.iosControls input[type="text"],
.iosControls input[type="date"],
.iosControls textarea,
.iosControls select {
  width: 100%;
  background: var(--app-fill);
  border: 0;
  border-radius: 10px;
  color: var(--app-text);
  min-height: 44px;
  padding: 10px 11px;
  font-size: 14px;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.06);
}

.iosControls textarea {
  min-height: 250px;
  line-height: 1.58;
  resize: vertical;
}

.iosControls input[type="text"]:focus,
.iosControls input[type="date"]:focus,
.iosControls textarea:focus,
.iosControls select:focus {
  background: #fff;
  box-shadow:
    inset 0 0 0 1.5px var(--app-accent),
    0 0 0 3px rgba(255, 204, 0, 0.12);
}

.fieldHelp {
  margin-top: 8px;
  color: var(--app-muted);
  font-size: 10px;
  line-height: 1.5;
}

.iosControls .check {
  min-height: 56px;
  padding: 11px 13px;
}

.iosControls .check > span {
  font-size: 13px;
}

.iosControls .check small {
  font-size: 10px;
  color: var(--app-muted);
}

.iosControls .check input[type="checkbox"] {
  width: 49px;
  height: 29px;
}

.actions {
  gap: 9px;
  margin-top: 20px;
}

.actions button {
  min-height: 50px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
}

.iosPrimary {
  background: var(--app-accent);
  color: #111;
}

.iosShare {
  background: #1c1c1e;
  color: #fff;
}

.iosSecondary {
  background: #e5e5ea;
  color: #3a3a3c;
}

.hint {
  padding: 2px 6px 0;
  font-size: 10px;
  color: var(--app-muted);
}

/* Preview framing */
.iosPreviewArea {
  background: #e9e9ee;
  padding: 22px;
}

.previewHeader {
  padding: 2px 4px 14px;
}

.previewMeta {
  gap: 7px;
}

.iosBadge {
  min-height: 22px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #6e6e73;
  border-radius: 999px;
  font-size: 10px;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.1);
}

.previewStage {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.35), transparent 45%),
    #dedee3;
  border-radius: 28px;
  box-shadow:
    inset 0 0 0 1px rgba(60, 60, 67, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.45);
}

.phoneCanvas {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

/* Markdown content rhythm */
.phoneCanvas.ios-26 .noteBody,
.phoneCanvas.ios-26 .noteList {
  color: inherit;
}

.phoneCanvas.ios-26 .noteBody {
  margin-bottom: 28px;
}

.noteListItem {
  margin: 6px 0;
}

.noteListSpacer {
  height: 0.9em;
}

.noteListItem.checklist .noteListMark {
  border-color: #aeaeb2;
}

.noteListItem.checklist.checked .noteListMark {
  background: #ffd60a;
  border-color: #ffd60a;
}

/* Mobile */
@media (max-width: 900px) {
  .iosControls {
    padding: 18px 14px 24px;
  }

  .iosPreviewArea {
    padding: 14px;
  }
}

@media (max-width: 540px) {
  .brand h1 {
    font-size: 27px;
  }

  .iosControls textarea {
    min-height: 220px;
  }

  .previewStage {
    border-radius: 22px;
  }
}

/* ===== v23 requested fixes ===== */

/* 1. Markdown bullet dot: iOS Notesに近い存在感まで拡大 */
.phoneCanvas .noteListItem.bullets .noteListMark {
  font-size: 0.88em !important;
  font-weight: 700;
  transform: translateY(-0.02em);
}

/* 2. iOS26 Undo: 中央ではなく右側コントロールの左隣 */
.phoneCanvas.ios-26 .ios26TopChrome {
  display: block !important;
  position: absolute;
}

.phoneCanvas.ios-26 .ios26Back {
  position: absolute;
  left: 48px;
  top: 15px;
}

.phoneCanvas.ios-26 .ios26Undo {
  position: absolute;
  right: 286px;
  top: 15px;
}

.phoneCanvas.ios-26 .ios26TopCapsule {
  position: absolute;
  right: 48px;
  top: 15px;
}

/* 3. is-hidden must beat the iOS26 !important display declarations */
.phoneCanvas.ios-26 .ios26TopChrome.is-hidden,
.phoneCanvas.ios-26 .ios26BottomChrome.is-hidden,
.phoneCanvas .is-hidden {
  display: none !important;
}

/* iOS26 bottom chrome visible only when JS removes is-hidden */
.phoneCanvas.ios-26 .ios26BottomChrome:not(.is-hidden) {
  display: flex !important;
}

/* 4. Wi-Fi remains selectable, but 4G is the default handled in HTML/JS */

/* 5. Charging icon: real lightning silhouette inside battery */
.chargingBolt {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  pointer-events: none;
  color: #000;
  text-shadow: none;
}

.chargingBolt svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

.batteryWrap.is-charging .chargingBolt {
  display: grid;
}

/* charging = green proportional battery; no yellow low-power appearance */
.phoneCanvas.ios-26 .batteryWrap.is-charging .battery {
  background: rgba(118, 118, 128, 0.26);
}

.phoneCanvas.ios-26 .batteryWrap.is-charging .batteryFill {
  background: #34c759 !important;
}

/* non-iOS26 battery keeps a readable lightning symbol too */
.phoneCanvas:not(.ios-26) .batteryWrap.is-charging .chargingBolt {
  color: currentColor;
}

/* Dark mode: green fill still uses a dark lightning like iOS */
.phoneCanvas.ios-26.theme-dark .batteryWrap.is-charging .chargingBolt {
  color: #000;
}


/* ===== v24 refinement ===== */

:root {
  --ui-bg: #f5f5f7;
  --ui-card: rgba(255,255,255,.96);
  --ui-label: #1c1c1e;
  --ui-secondary: #6e6e73;
  --ui-tertiary: #8e8e93;
  --ui-line: rgba(60,60,67,.11);
  --ui-fill: rgba(118,118,128,.10);
  --ui-accent: #ffcc00;
}

.iosControls {
  padding: 20px 16px 26px;
}

.brand {
  padding: 6px 6px 16px;
}

.brand h1 {
  font-size: 29px;
}

.settingsSectionTitle {
  margin: 19px 8px 7px;
  text-transform: none;
}

.iosControls .field,
.iosControls .check {
  background: var(--ui-card);
  border-radius: 16px;
  box-shadow:
    0 0 0 .5px var(--ui-line),
    0 1px 2px rgba(0,0,0,.025);
}

.fieldLabelRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.fieldLabelRow label {
  margin-bottom: 0 !important;
}

.miniBadge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #7a6200;
  background: rgba(255,204,0,.20);
  padding: 3px 6px;
  border-radius: 999px;
}

.markdownTools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.markdownTools button {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: rgba(118,118,128,.10);
  color: #3a3a3c;
  font-size: 10px;
  font-weight: 650;
  padding: 6px 5px;
}

.markdownTools button:hover {
  background: rgba(118,118,128,.16);
}

.markdownTools button:active {
  transform: scale(.98);
}

.iosControls textarea#markdownContent {
  min-height: 310px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.62;
  tab-size: 2;
}

.actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 12px 0 4px;
  margin-top: 14px;
  background: linear-gradient(
    180deg,
    rgba(245,245,247,0),
    rgba(245,245,247,.94) 22%,
    rgba(245,245,247,.99)
  );
}

.previewStage {
  padding: 18px;
}

.phoneCanvas {
  border-radius: 2px;
}

/* iOS 26 top controls: consistent baseline and spacing */
.phoneCanvas.ios-26 .ios26TopChrome {
  top: 124px;
  height: 118px;
}

.phoneCanvas.ios-26 .ios26Back,
.phoneCanvas.ios-26 .ios26Undo,
.phoneCanvas.ios-26 .ios26TopCapsule {
  top: 14px;
}

.phoneCanvas.ios-26 .ios26Undo {
  right: 284px;
}

/* Note starts below the complete top floating control row */
.phoneCanvas.ios-26 .note {
  padding-top: 272px !important;
  padding-left: 76px;
  padding-right: 76px;
}

.phoneCanvas.ios-26 .noteDate {
  margin-bottom: 32px !important;
}

.phoneCanvas.ios-26 .note h2 {
  margin-bottom: 24px;
}

/* Unified markdown renderer */
.legacyList {
  display: none !important;
}

.noteMarkdown {
  white-space: normal !important;
}

.mdParagraph {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}

.mdParagraph + .mdParagraph {
  margin-top: .74em;
}

.mdSpacer {
  height: .78em;
}

/* List rhythm */
.noteMarkdown .noteListItem {
  display: flex;
  align-items: baseline;
  gap: 19px;
  min-height: 1.46em;
  margin: 3px 0;
}

.noteMarkdown .noteListMark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  align-self: center;
}

.noteMarkdown .noteListItem.bullets .noteListMark {
  width: 30px;
  min-width: 30px;
  font-size: .94em !important;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-.01em);
}

.noteMarkdown .noteListItem.numbers {
  gap: 15px;
}

.noteMarkdown .noteListItem.numbers .noteListMark {
  width: 46px;
  min-width: 46px;
  justify-content: end;
  font-size: .88em;
  font-variant-numeric: tabular-nums;
}

.noteMarkdown .noteListItem.checklist {
  gap: 18px;
}

.noteMarkdown .noteListItem.checklist .noteListMark {
  width: 35px;
  height: 35px;
  min-width: 35px;
  min-height: 35px;
  border-width: 2.5px;
}

.noteMarkdown .noteListItem.checklist.checked .noteListMark::after {
  width: 13px;
  height: 7px;
  border-left-width: 3px;
  border-bottom-width: 3px;
}

/* Floating bars feel closer to iOS: lighter shell, stronger symbol */
.phoneCanvas.ios-26.theme-light .ios26Back,
.phoneCanvas.ios-26.theme-light .ios26Undo,
.phoneCanvas.ios-26.theme-light .ios26TopCapsule,
.phoneCanvas.ios-26.theme-light .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-light .ios26Compose {
  background: rgba(248,248,250,.88);
  border-color: rgba(255,255,255,.94);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 12px 32px rgba(0,0,0,.10);
}

/* Show/hide always wins */
.phoneCanvas.ios-26 .ios26TopChrome.is-hidden,
.phoneCanvas.ios-26 .ios26BottomChrome.is-hidden,
.phoneCanvas .is-hidden {
  display: none !important;
}

/* Status bar fine tuning */
.phoneCanvas.ios-26 .networkLabel {
  font-size: 33px;
  margin-left: -1px;
}

.phoneCanvas.ios-26 .battery {
  overflow: hidden;
}

.phoneCanvas.ios-26 .batteryNumber {
  font-size: 21px;
}

.phoneCanvas.ios-26 .chargingBolt svg {
  width: 19px;
  height: 19px;
}

/* Preview UI */
.previewHeader {
  align-items: center;
}

#scaleLabel {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 540px) {
  .markdownTools {
    grid-template-columns: repeat(2, 1fr);
  }

  .iosControls textarea#markdownContent {
    min-height: 250px;
  }
}


/* ===== v25 date + toolbar spacing ===== */

/* 日付未選択時は完全に余白も消す */
.noteDate:empty,
.noteDate[style*="display: none"] {
  margin: 0 !important;
}

/* iOS 26: 上部Floating UIあり */
.phoneCanvas.ios-26:not(.top-toolbar-hidden) .note {
  padding-top: 272px !important;
}

/* iOS 26: 上部Floating UIなし → 本文を上へ詰める */
.phoneCanvas.ios-26.top-toolbar-hidden .note {
  padding-top: 118px !important;
}

/* iOS 18も上部ツールバー非表示時に余白を縮める */
.phoneCanvas.ios-18.top-toolbar-hidden .note {
  padding-top: 34px !important;
}

/* 日付がない場合はタイトル/本文が自然に続く */
.phoneCanvas .noteDate[style*="display: none"] + h2 {
  margin-top: 0 !important;
}


/* ===== v26 iOS26 top spacing refinement ===== */

/* 上部Floating UI表示中でも本文を少し上へ寄せる */
.phoneCanvas.ios-26:not(.top-toolbar-hidden) .note {
  padding-top: 226px !important;
}

/* ツールバーOFF時は既存の詰めた位置を維持 */
.phoneCanvas.ios-26.top-toolbar-hidden .note {
  padding-top: 112px !important;
}

/* 日付ありでもなしでも、タイトル開始位置を自然に */
.phoneCanvas.ios-26 .noteDate {
  margin-bottom: 28px !important;
}


/* ===== v27 tighter iOS26 note spacing ===== */

/* Floating UIとの距離をさらに縮小 */
.phoneCanvas.ios-26:not(.top-toolbar-hidden) .note {
  padding-top: 198px !important;
}

/* 上部ツールバーOFF時も少しだけ詰める */
.phoneCanvas.ios-26.top-toolbar-hidden .note {
  padding-top: 96px !important;
}

/* 日付がある場合の縦間隔もコンパクトに */
.phoneCanvas.ios-26 .noteDate {
  margin-bottom: 24px !important;
}


/* ===== v28 screenshot-matched vertical spacing ===== */

/*
  iOS 26 reference:
  - Floating controls end around 220px
  - Date baseline starts around 245px
  - Title begins around 300px
  Keep the note container closer to the controls and let its own date/title
  margins create the remaining rhythm.
*/
.phoneCanvas.ios-26:not(.top-toolbar-hidden) .note {
  padding-top: 150px !important;
}

/* No top controls: content starts directly below the status bar */
.phoneCanvas.ios-26.top-toolbar-hidden .note {
  padding-top: 72px !important;
}

/* Date sits close below the floating controls */
.phoneCanvas.ios-26 .noteDate {
  margin-top: 0 !important;
  margin-bottom: 25px !important;
  line-height: 1.18;
}

/* Screenshot-like title/body rhythm */
.phoneCanvas.ios-26 .note h2 {
  margin-top: 0 !important;
  margin-bottom: 22px !important;
}

/* When date is blank, don't preserve the date slot */
.phoneCanvas.ios-26 .noteDate[style*="display: none"] {
  display: none !important;
  margin: 0 !important;
}

/* With no date, give the title a small intentional gap below controls */
.phoneCanvas.ios-26:not(.top-toolbar-hidden)
  .noteDate[style*="display: none"] + h2 {
  margin-top: 18px !important;
}

/* Toolbar hidden + no date: no artificial top gap */
.phoneCanvas.ios-26.top-toolbar-hidden
  .noteDate[style*="display: none"] + h2 {
  margin-top: 0 !important;
}

/* iOS Notes: checked checklist is yellow in both light and dark mode. */
.phoneCanvas .noteListItem.checklist.checked .noteListMark,
.noteMarkdown .noteListItem.checklist.checked .noteListMark,
.theme-dark .noteListItem.checklist.checked .noteListMark,
.phoneCanvas.theme-dark .noteListItem.checklist.checked .noteListMark {
  background: #ffd60a !important;
  border-color: #ffd60a !important;
}

.phoneCanvas .noteListItem.checklist.checked .noteListMark::after,
.noteMarkdown .noteListItem.checklist.checked .noteListMark::after,
.theme-dark .noteListItem.checklist.checked .noteListMark::after,
.phoneCanvas.theme-dark .noteListItem.checklist.checked .noteListMark::after {
  border-color: #ffffff !important;
}

/* ===== Final iOS Notes checklist sizing / spacing ===== */
.phoneCanvas .noteListItem.checklist,
.noteMarkdown .noteListItem.checklist {
  gap: 20px !important;
  margin-top: 11px !important;
  margin-bottom: 11px !important;
  align-items: center !important;
}

.phoneCanvas .noteListItem.checklist .noteListMark,
.noteMarkdown .noteListItem.checklist .noteListMark {
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  border-width: 3px !important;
}

.phoneCanvas .noteListItem.checklist.checked .noteListMark::after,
.noteMarkdown .noteListItem.checklist.checked .noteListMark::after {
  width: 18px !important;
  height: 10px !important;
  border-left-width: 4px !important;
  border-bottom-width: 4px !important;
}

/* ===== v36 export-stable toolbar renderer =====
   Keep preview and PNG identical by avoiding backdrop-filter/currentColor edge cases
   in html2canvas. Chrome is drawn with ordinary backgrounds, borders and SVG strokes. */
.phoneCanvas {
  --stable-chrome-bg: #f8f8fa;
  --stable-chrome-fg: #1c1c1e;
  --stable-chrome-border: rgba(255,255,255,.96);
  --stable-chrome-shadow: rgba(0,0,0,.10);
}
.phoneCanvas.theme-dark {
  --stable-chrome-bg: #1c1c1e;
  --stable-chrome-fg: #f5f5f7;
  --stable-chrome-border: rgba(255,255,255,.12);
  --stable-chrome-shadow: rgba(0,0,0,.30);
}
.phoneCanvas.theme-paper {
  --stable-chrome-bg: #f7f5ef;
  --stable-chrome-fg: #1c1c1e;
  --stable-chrome-border: rgba(255,255,255,.96);
  --stable-chrome-shadow: rgba(0,0,0,.09);
}

/* iOS 26 floating chrome: no live glass filter. This is intentionally the
   same rendering primitive that html2canvas sees during PNG export. */
.phoneCanvas.ios-26 .ios26Back,
.phoneCanvas.ios-26 .ios26Undo,
.phoneCanvas.ios-26 .ios26TopCapsule,
.phoneCanvas.ios-26 .ios26BottomCapsule,
.phoneCanvas.ios-26 .ios26Compose {
  background: var(--stable-chrome-bg) !important;
  color: var(--stable-chrome-fg) !important;
  border-color: var(--stable-chrome-border) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 12px 30px var(--stable-chrome-shadow) !important;
  background-clip: padding-box;
}

.phoneCanvas.ios-26 .ios26Back,
.phoneCanvas.ios-26 .ios26Undo,
.phoneCanvas.ios-26 .ios26Compose {
  overflow: hidden;
}

.phoneCanvas.ios-26 .ios26TopCapsule,
.phoneCanvas.ios-26 .ios26BottomCapsule {
  overflow: hidden;
}

/* Do not let inherited/currentColor resolution change between live DOM and clone. */
.phoneCanvas.ios-26 .ios26Back svg,
.phoneCanvas.ios-26 .ios26Undo svg,
.phoneCanvas.ios-26 .ios26TopCapsule svg,
.phoneCanvas.ios-26 .ios26BottomCapsule svg,
.phoneCanvas.ios-26 .ios26Compose svg {
  color: var(--stable-chrome-fg) !important;
  stroke: var(--stable-chrome-fg) !important;
  fill: none !important;
}
.phoneCanvas.ios-26 .ios26TopCapsule .dots,
.phoneCanvas.ios-26 .ios26TopCapsule .dots circle {
  color: var(--stable-chrome-fg) !important;
  fill: var(--stable-chrome-fg) !important;
  stroke: none !important;
}
.phoneCanvas.ios-26 .ios26TopCapsule button,
.phoneCanvas.ios-26 .ios26BottomCapsule button {
  color: var(--stable-chrome-fg) !important;
  background: transparent !important;
}

/* Disable old highlight pseudo layers that can be clipped differently by html2canvas. */
.phoneCanvas.ios-26 .toolbarCircle::before {
  content: none !important;
  display: none !important;
}

/* iOS 18 bottom bar also uses only ordinary paint primitives. */
.phoneCanvas.ios-18 .bottomToolbar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ===== v37 PNG-safe iOS 26 chrome =====
   Do not use backdrop-filter on the actual UI. html2canvas/WebKit rasterize
   filtered rounded layers inconsistently. The glass look is built from a
   normal gradient + border + inset highlight, so preview and PNG share the
   exact same rendering path. */
.phoneCanvas.ios-26 .ios26Back,
.phoneCanvas.ios-26 .ios26TopCapsule,
.phoneCanvas.ios-26 .ios26BottomCapsule,
.phoneCanvas.ios-26 .ios26Compose {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background-image: linear-gradient(180deg, #303033 0%, #28282b 48%, #242426 100%) !important;
  background-color: #29292c !important;
  border-color: #444448 !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(0,0,0,.22),
    0 7px 18px rgba(0,0,0,.20) !important;
}
.phoneCanvas.ios-26.theme-light .ios26Back,
.phoneCanvas.ios-26.theme-light .ios26TopCapsule,
.phoneCanvas.ios-26.theme-light .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-light .ios26Compose,
.phoneCanvas.ios-26.theme-paper .ios26Back,
.phoneCanvas.ios-26.theme-paper .ios26TopCapsule,
.phoneCanvas.ios-26.theme-paper .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-paper .ios26Compose {
  background-image: linear-gradient(180deg, #f5f5f7 0%, #ededf0 52%, #e6e6e9 100%) !important;
  background-color: #eeeeF1 !important;
  border-color: #d4d4d8 !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(0,0,0,.07),
    0 7px 18px rgba(0,0,0,.10) !important;
}
/* Keep SVG rasterization deterministic in html2canvas. */
.phoneCanvas.ios-26 .ios26TopChrome svg,
.phoneCanvas.ios-26 .ios26BottomChrome svg {
  overflow: visible;
}

/* ===== v38 flat, uniform floating chrome =====
   Use one solid paint for each floating control. No gradients / filters,
   so the capsule keeps exactly one color in both preview and PNG. */
.phoneCanvas.ios-26.theme-dark .ios26Back,
.phoneCanvas.ios-26.theme-dark .ios26Undo,
.phoneCanvas.ios-26.theme-dark .ios26TopCapsule,
.phoneCanvas.ios-26.theme-dark .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-dark .ios26Compose {
  background: #2c2c2e !important;
  background-image: none !important;
  border: 1.5px solid #3a3a3c !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.phoneCanvas.ios-26.theme-light .ios26Back,
.phoneCanvas.ios-26.theme-light .ios26Undo,
.phoneCanvas.ios-26.theme-light .ios26TopCapsule,
.phoneCanvas.ios-26.theme-light .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-light .ios26Compose {
  background: #f2f2f7 !important;
  background-image: none !important;
  border: 1.5px solid #e5e5ea !important;
  box-shadow: none !important;
}

.phoneCanvas.ios-26.theme-paper .ios26Back,
.phoneCanvas.ios-26.theme-paper .ios26Undo,
.phoneCanvas.ios-26.theme-paper .ios26TopCapsule,
.phoneCanvas.ios-26.theme-paper .ios26BottomCapsule,
.phoneCanvas.ios-26.theme-paper .ios26Compose {
  background: #f3f1eb !important;
  background-image: none !important;
  border: 1.5px solid #e3e0d8 !important;
  box-shadow: none !important;
}

/* Child buttons must never paint their own tiles/segments. */
.phoneCanvas.ios-26 .ios26TopCapsule > button,
.phoneCanvas.ios-26 .ios26BottomCapsule > button {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
