:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[data-site-theme="dark"] {
  --ui-bg: #0b0e14;
  --ui-surface: #141921;
  --ui-raised: #1c232d;
  --ui-hover: #263140;
  --ui-border: #303a48;
  --ui-text: #f5f7fb;
  --ui-secondary: #a8b4c3;
  --ui-tertiary: #788798;
  --ui-accent: #8eb5ff;
  --ui-focus: #a9c8ff;
  --ui-canvas: #0c121b;
  color-scheme: dark;
}

html[data-site-theme="light"] {
  --ui-bg: #f3f6fa;
  --ui-surface: #ffffff;
  --ui-raised: #eef2f7;
  --ui-hover: #e2ebf7;
  --ui-border: #d9e1ea;
  --ui-text: #192638;
  --ui-secondary: #506278;
  --ui-tertiary: #718399;
  --ui-accent: #315fa5;
  --ui-focus: #356fe0;
  --ui-canvas: #e8edf4;
  color-scheme: light;
}

button, select, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
}

/* The header is deliberately quiet. The wallpaper is the hero. */
.topbar {
  height: 72px;
  padding: 0 clamp(20px, 3vw, 44px);
  gap: 24px;
  background: var(--ui-bg) !important;
  border-color: var(--ui-border) !important;
  box-shadow: 0 1px 0 #ffffff08;
}
.editor-home { gap: 12px; }
.brand-mark, .landing-logo {
  border: 1px solid var(--ui-border) !important;
  background: var(--ui-raised) !important;
  color: var(--ui-text) !important;
  box-shadow: inset 0 1px #ffffff12;
}
.brand-mark { width: 42px; height: 42px; border-radius: 14px; font-size: 16px; }
.brand-mark .mark-dot { background: #86b1ff; width: 6px; height: 6px; right: 7px; top: 7px; }
.brand strong { color: var(--ui-text); letter-spacing: -.035em; font-size: 17px; }
.brand small { color: var(--ui-tertiary) !important; font-size: 12px; }
.topbar .editor-nav { margin-left: clamp(6px, 2.5vw, 35px); }
.editor-nav a, .editor-nav button {
  color: var(--ui-secondary) !important;
  font-size: 14px;
  font-weight: 650;
  padding: 10px 13px;
  transition: color .18s, background .18s;
}
.editor-nav a:hover, .editor-nav button:hover { color: var(--ui-text) !important; background: var(--ui-hover) !important; }
.topbar .site-theme-toggle, .site-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  padding: 0;
  color: var(--ui-text) !important;
  background: var(--ui-raised) !important;
  border-color: var(--ui-border) !important;
  transition: transform .18s, background .18s;
}
.site-theme-toggle:hover { transform: translateY(-2px); background: var(--ui-hover) !important; }
.site-theme-toggle svg { display: block; width: 20px; height: 20px; flex: none; }
.site-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: none;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--ui-border);
  border-radius: 11px;
  background: var(--ui-raised);
  color: var(--ui-tertiary);
  font: 700 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}
.site-lang-toggle i { width: 1px; height: 15px; background: var(--ui-border); }
.site-lang-toggle .active { color: var(--ui-text); }
.site-lang-toggle:hover { border-color: var(--ui-accent); }
.preferences-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.preferences-tools strong {
  color: var(--ui-secondary);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.preferences-tools-editor {
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: var(--ui-surface);
}
.preferences-tools-editor strong { margin-right: auto; }
.preferences-tools-footer { margin-left: auto; }
.landing-footer > span { width: 100%; margin-left: 0; }
.header-open {
  background: var(--ui-raised) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 11px;
  font-size: 13px;
}

/* A small studio control is easier to find than an unlabeled hamburger. */
.topbar .menu-toggle {
  top: 92px; left: clamp(18px, 3vw, 44px);
  min-width: 139px; height: 46px;
  border-radius: 13px;
  background: var(--ui-surface) !important;
  border: 1px solid var(--ui-border) !important;
  box-shadow: 0 14px 35px #0005, inset 0 1px #ffffff12;
  transition: transform .2s, border-color .2s, opacity .2s;
}
.topbar .menu-toggle:hover { transform: translateY(-2px); border-color: var(--ui-accent) !important; }
.topbar .menu-toggle, .topbar .menu-toggle * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.menu-icon i { background: var(--ui-text) !important; }
.topbar .menu-label {
  background: transparent !important;
  color: var(--ui-text) !important;
  -webkit-text-fill-color: var(--ui-text);
  font-size: 14px;
  font-weight: 700;
  text-shadow: none;
}
.settings-hint {
  top: 145px; left: clamp(18px, 3vw, 44px);
  padding: 15px 34px 15px 16px;
  border-radius: 14px;
  background: var(--ui-surface) !important;
  color: var(--ui-secondary) !important;
  border-color: var(--ui-border) !important;
  font-size: 13px;
  box-shadow: 0 18px 40px #0006;
}
.settings-hint:before { border-color: var(--ui-border) !important; }

/* A single uninterrupted field around the device. */
.preview-col {
  background: radial-gradient(ellipse 60% 60% at 52% 47%, #39507045, transparent 78%), var(--ui-canvas) !important;
  padding: 22px 22px 30px;
}
html[data-site-theme="light"] .preview-col {
  background: radial-gradient(ellipse 60% 65% at 52% 47%, #b4c5db80, transparent 80%), var(--ui-canvas) !important;
}
.phone {
  box-shadow: 0 0 0 1px #ffffff30, 0 28px 68px #0008, 0 5px 16px #0005 !important;
}
.phone-screen { box-shadow: inset 0 0 0 1px #ffffff17; }
.phone[data-device="iphone18"], .phone[data-device="iphone18pro"], .phone[data-device="iphone18promax"] {
  --frame-light: #b8c2d0;
  --frame-dark: #424c5a;
  --rim: 5px;
  --corner: 51px;
  --screen-corner: 46px;
  --cutout-width: 25.5%;
  --cutout-height: 3.1%;
}
.phone[data-device="iphone18promax"] { height: min(calc(100dvh - 108px), 940px); }
/* Front-view device study. The frame follows chassis proportions, while the
   wallpaper remains a separate pixel-accurate canvas inside the screen. */
.phone {
  --shell-mid: #5f6469;
  --shell-edge: #d2d6d8;
  --screen-bezel: 5px;
  --body-radius: 48px;
  --pill-width: 29%;
  --pill-height: 3.25%;
  --pill-top: 1.25%;
  padding: var(--screen-bezel) !important;
  border-radius: var(--body-radius) !important;
  border: 1px solid var(--shell-edge) !important;
  background: linear-gradient(90deg,
    #171b20 0%,var(--shell-edge) 1.3%,var(--shell-mid) 2.5%,
    #11151a 4.1%,#101318 50%,#11151a 95.9%,
    var(--shell-mid) 97.5%,var(--shell-edge) 98.7%,#171b20 100%) !important;
  isolation: isolate;
}
.phone:before {
  inset: 2px;
  border: 1px solid #ffffff48;
  border-radius: calc(var(--body-radius) - 2px);
  z-index: 3;
  box-shadow: inset 0 0 0 1px #0008;
}
.phone:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
  background: linear-gradient(180deg,transparent 0 11%,#17191b 11% 11.3%,transparent 11.3% 84%,#17191b 84% 84.3%,transparent 84.3%);
  opacity: .7;
  -webkit-mask: linear-gradient(90deg,#000 0 2%,transparent 3% 97%,#000 98% 100%);
  mask: linear-gradient(90deg,#000 0 2%,transparent 3% 97%,#000 98% 100%);
}
.phone-screen {
  border: 2px solid #050608;
  border-radius: calc(var(--body-radius) - var(--screen-bezel) - 1px) !important;
  background: #050608;
  box-shadow: 0 0 0 1px #34383b, inset 0 0 0 1px #fff2;
}
.phone-screen:not(.is-ready) #wallpaper { visibility: hidden; }
.preview-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  color: #f3f6fc;
  text-align: center;
  background: radial-gradient(circle at 50% 47%, #1b2b44 0, #0c1421 35%, #070b12 76%);
}
.phone-screen:is(.is-generating,.is-error) .preview-loading { display: flex; }
.generation-noise {
  display: block;
  width: min(76%, 258px);
  height: auto;
  aspect-ratio: 1;
  margin: -20px 0 4px;
  pointer-events: none;
}
.preview-loading strong { font-size: clamp(13px, 1.4vw, 17px); font-weight: 650; }
.preview-loading span { max-width: 220px; color: #9caabd; font-size: clamp(10px, 1vw, 12px); line-height: 1.5; }
.preview-loading button { margin-top: 10px; padding: 8px 12px; color: #f3f6fc; background: #263446; border: 1px solid #53667d; border-radius: 9px; }
.phone-screen.is-error .generation-noise { opacity: .3; filter: grayscale(1); }
.phone .island {
  width: var(--pill-width);
  height: var(--pill-height);
  top: var(--pill-top);
  border-radius: 999px;
  background: #020305;
  box-shadow: inset 0 1px 1px #404447, 0 1px 2px #000a;
  padding-right: 6%;
  z-index: 2;
}
.phone .island-lens {
  width: 7px;
  height: 7px;
  background: radial-gradient(circle at 35% 35%,#405677 0,#131b29 33%,#030409 75%);
  box-shadow: 0 0 0 1px #2b313b;
}
.phone .notch-speaker { display: none; }
.phone-status {
  top: 2.05%; left: 8%; right: 7%; z-index: 2;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: clamp(11px, 1.4vw, 15px);
  font-weight: 650;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 3px #000b;
}
.phone-status .status-time { font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.phone-status .status-icons { gap: 3px; color: #fff; }
.phone-status .status-icons svg { display: block; flex: none; height: 11px; overflow: visible; filter: drop-shadow(0 1px 1px #0008); }
.phone-status .status-signal { width: 18px; }
.phone-status .status-wifi { width: 17px; }
.phone-status .status-battery { width: 25px; height: 12px; border: 0; border-radius: 0; }
.phone-status .status-battery::before,.phone-status .status-battery::after { content: none; display: none; }
.phone .phone-button {
  z-index: 0;
  width: 3px;
  border: 1px solid #0007;
  background: linear-gradient(90deg,var(--shell-mid),var(--shell-edge),var(--shell-mid));
  box-shadow: 0 1px 2px #0009;
}
.phone-button-left { left: -4px; top: 23%; height: 8%; }
.phone-button-left:before,.phone-button-left:after,.phone-button-right:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  left: -1px;
  border: inherit;
  border-radius: inherit;
  background: inherit;
}
.phone-button-left:before { height: 34%; top: -145%; }
.phone-button-left:after { height: 100%; top: 135%; }
.phone-button-right { right: -4px; top: 22%; height: 10%; }
.phone-button-right:after {
  /* Camera Control is a recessed insert in the side rail, not a raised key. */
  top: 155%;
  left: -4px;
  width: 2px;
  height: 58%;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(180deg,#222831,#090c11 18% 82%,#313943);
  box-shadow: inset 1px 0 0 #8998a366;
}
.phone[data-device^="iphone11"] {
  --shell-mid: #676a70; --shell-edge: #d8d9dc;
  --body-radius: 48px; --screen-bezel: 9px;
}
.phone[data-device="iphone11pro"],.phone[data-device="iphone11promax"] {
  --shell-mid: #777671; --shell-edge: #d4d2cb;
  --screen-bezel: 7px;
}
.phone[data-device^="iphone12"] {
  --shell-mid: #495e75; --shell-edge: #b3c3d0;
  --body-radius: 37px; --screen-bezel: 7px;
}
.phone[data-device="iphone12pro"],.phone[data-device="iphone12promax"] {
  --shell-mid: #6a7077; --shell-edge: #d3d6d8;
  --screen-bezel: 6px;
}
.phone[data-device^="iphone13"] {
  --shell-mid: #566b75; --shell-edge: #b9cbd2;
  --body-radius: 39px; --screen-bezel: 7px;
}
.phone[data-device="iphone13pro"],.phone[data-device="iphone13promax"] {
  --shell-mid: #79766f; --shell-edge: #d6d0c6;
  --screen-bezel: 6px;
}
.phone:is([data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) {
  --shell-mid: #526075; --shell-edge: #c2cbd8;
  --body-radius: 43px; --screen-bezel: 7px;
}
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .island {
  top: 0;
  width: 43%;
  height: 3.65%;
  border-radius: 0 0 13px 13px;
  padding: 0;
  background: #020305;
  box-shadow: inset 0 -1px 0 #74798033;
}
.phone[data-device^="iphone11"] .island { width: 45%; height: 3.9%; }
.phone:is([data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .island { width: 34%; height: 3.35%; }
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .island::before,
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .island::after {
  content: "";
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  pointer-events: none;
}
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .island::before {
  left: -9px;
  background: radial-gradient(circle at 0 100%, transparent 9px, #020305 9.5px);
}
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .island::after {
  right: -9px;
  background: radial-gradient(circle at 100% 100%, transparent 9px, #020305 9.5px);
}
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .notch-speaker {
  display: block;
  position: absolute;
  top: 36%;
  left: 50%;
  width: 25%;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: linear-gradient(#1c2935,#0c141c);
  box-shadow: 0 0 0 1px #1f2b35;
}
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .island-lens {
  position: absolute;
  top: 33%;
  right: 17%;
  width: 5px;
  height: 5px;
}
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .phone-status { right: 4%; }
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .status-icons { gap: 2px; }
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .status-signal { width: 16px; }
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .status-wifi { width: 15px; }
.phone:is([data-device^="iphone11"],[data-device^="iphone12"],[data-device^="iphone13"],[data-device="iphone14"],[data-device="iphone14plus"],[data-device="iphone16e"],[data-device="iphone17e"]) .status-battery { width: 23px; }
.phone[data-device="iphone14pro"],.phone[data-device="iphone14promax"] {
  --shell-mid: #5d4e67; --shell-edge: #b8adbd;
  --body-radius: 43px; --screen-bezel: 7px;
  --pill-width: 31%; --pill-top: 1.7%;
}
.phone[data-device^="iphone11"] .phone-button-left:before,
.phone[data-device^="iphone12"] .phone-button-left:before,
.phone[data-device^="iphone13"] .phone-button-left:before,
.phone[data-device="iphone14"] .phone-button-left:before,
.phone[data-device="iphone14plus"] .phone-button-left:before,
.phone[data-device="iphone14pro"] .phone-button-left:before,
.phone[data-device="iphone14promax"] .phone-button-left:before { height: 18%; top: -90%; }
.phone[data-device^="iphone11"] .phone-button-right:after,
.phone[data-device^="iphone12"] .phone-button-right:after,
.phone[data-device^="iphone13"] .phone-button-right:after,
.phone[data-device="iphone14"] .phone-button-right:after,
.phone[data-device="iphone14plus"] .phone-button-right:after,
.phone[data-device="iphone14pro"] .phone-button-right:after,
.phone[data-device="iphone14promax"] .phone-button-right:after,
.phone[data-device="iphone15"] .phone-button-right:after,
.phone[data-device="iphone15plus"] .phone-button-right:after,
.phone[data-device="iphone15pro"] .phone-button-right:after,
.phone[data-device="iphone15promax"] .phone-button-right:after { display: none; }
.phone[data-device="iphone15"],.phone[data-device="iphone15plus"] {
  --shell-mid: #596f85; --shell-edge: #c5d3e1;
  --body-radius: 46px; --screen-bezel: 6px;
  --pill-width: 29%; --pill-top: 1.55%;
}
.phone[data-device="iphone15pro"],.phone[data-device="iphone15promax"] {
  --shell-mid: #68645b; --shell-edge: #c4bdad;
  --body-radius: 46px; --screen-bezel: 6px;
  --pill-width: 29%; --pill-top: 1.55%;
}
.phone[data-device="iphone16"],.phone[data-device="iphone16plus"] {
  --shell-mid: #587381; --shell-edge: #a8c3cd;
  --body-radius: 47px; --screen-bezel: 6px;
  --pill-width: 28%; --pill-top: 1.45%;
}
.phone:is([data-device="iphone16e"],[data-device="iphone17e"]) {
  --shell-mid: #34383d; --shell-edge: #a9afb6;
  --body-radius: 43px; --screen-bezel: 7px;
}
.phone:is([data-device="iphone16e"],[data-device="iphone17e"]) .phone-button-right:after { display: none; }
.phone[data-device="iphone16pro"],.phone[data-device="iphone16promax"] {
  --shell-mid: #8a8278; --shell-edge: #d8d1c4;
  --body-radius: 48px; --screen-bezel: 5px;
  --pill-width: 27.5%; --pill-top: 1.38%;
}
.phone[data-device="iphone17"] {
  --shell-mid: #819cb0; --shell-edge: #c1d2dc;
  --body-radius: 49px; --screen-bezel: 5px;
  --pill-width: 26%; --pill-top: 1.32%;
}
.phone[data-device="iphone17pro"],.phone[data-device="iphone17promax"] {
  --shell-mid: #986f53; --shell-edge: #e2ad82;
  --body-radius: 50px; --screen-bezel: 4px;
  --pill-width: 25.5%; --pill-top: 1.26%;
}
.phone[data-device="iphone18pro"],.phone[data-device="iphone18promax"] {
  --shell-mid: #50545a; --shell-edge: #c3c8ce;
  --body-radius: 50px; --screen-bezel: 4px;
  --pill-width: 25%; --pill-top: 1.24%;
}
.phone[data-device="iphone18"] {
  --shell-mid: #8195a4; --shell-edge: #c7d5df;
  --body-radius: 49px; --screen-bezel: 5px;
  --pill-width: 26%; --pill-top: 1.32%;
}
.phone[data-device="iphoneair"] {
  --shell-mid: #44474b; --shell-edge: #aeb3b7;
  --body-radius: 48px; --screen-bezel: 3px;
  --pill-width: 26%; --pill-top: 1.3%;
  box-shadow: 0 0 0 1px #ffffff26,0 22px 44px #0007,0 4px 8px #0005 !important;
}
.phone[data-device="iphoneair"] .phone-button-right:after {
  left: -3px;
  width: 2px;
  height: 55%;
  background: linear-gradient(180deg,#191d22,#050607 20% 80%,#262c33);
  box-shadow: inset 1px 0 0 #95a5ad80;
}
.phone[data-device="iphoneair"] .phone-button,
.phone[data-device="iphoneair"] .phone-button-left:before,
.phone[data-device="iphoneair"] .phone-button-left:after,
.phone[data-device="iphoneair"] .phone-button-right:after { width: 2px; }
@media(max-width:800px) {
  .phone-status { font-size: clamp(10px, 2.7vw, 14px); }
  .phone .island-lens { width: 5px; height: 5px; }
}
.device-caption {
  bottom: 14px;
  padding: 8px 13px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  color: var(--ui-secondary) !important;
  background: var(--ui-surface);
  font-size: 12px;
  letter-spacing: .015em;
  box-shadow: 0 6px 20px #0003;
}
.preview-col .preview-footer {
  display: flex;
  position: absolute;
  right: clamp(18px, 3vw, 44px);
  top: 17px;
  z-index: 3;
  margin: 0;
}
.preview-col .preview-footer .resolution { display: none; }
.preview-col .preview-footer .text-button {
  padding: 13px 16px;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: var(--ui-surface);
  color: var(--ui-text);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 14px 35px #0004;
}
.preview-col .preview-footer .text-button:hover { border-color: var(--ui-accent); }
body.drawer-open .phone-wrap { transition: transform .3s ease; }

/* Settings look like part of the same product, not a stack of forms. */
.controls-col, html[data-site-theme="dark"] .controls-col {
  width: min(485px, 90vw);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--ui-bg) !important;
  color: var(--ui-text) !important;
  border-right: 1px solid var(--ui-border);
  box-shadow: 18px 0 60px #0007;
}
.sheet-head, html[data-site-theme="dark"] .sheet-head {
  background: var(--ui-bg) !important;
  color: var(--ui-text) !important;
  border-color: var(--ui-border) !important;
  padding: 0 22px;
}
.sheet-head strong { font-size: 17px; letter-spacing: -.025em; }
.sheet-actions { gap: 10px; }
.sheet-head #sheetToggle, .sheet-head .sheet-resize {
  background: var(--ui-raised) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 10px;
}
.sheet-head #sheetToggle { font-size: 24px; }
.controls-scroll {
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 25px 22px 36px;
}
.drawer-intro {
  color: var(--ui-secondary) !important;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 29px;
}
.sheet-gesture-tip { display: none; }
.controls-title { align-items: center; margin-bottom: 18px; }
.controls-title h2 { color: var(--ui-text); font-size: 25px; letter-spacing: -.04em; line-height: 1.15; }
.eyebrow { color: var(--ui-accent); font-size: 11px; letter-spacing: .17em; }
.reset { color: var(--ui-secondary); font-size: 13px; }
.reset:hover { color: var(--ui-text); }
.section-card, html[data-site-theme="dark"] .section-card {
  padding: 23px;
  margin-bottom: 12px;
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 18px;
  box-shadow: none;
}
.card-title { gap: 13px; margin-bottom: 20px; }
.card-title h3 { font-size: 17px; font-weight: 720; letter-spacing: -.035em; color: var(--ui-text); }
.card-title p { color: var(--ui-tertiary) !important; font-size: 13px; line-height: 1.4; }
.step {
  background: var(--ui-raised) !important;
  color: var(--ui-accent) !important;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.choice-label, .form-grid label, .holiday-grid label, .event-entry label,
.theme-select, .palette-row > span, .color-grid label, .select-row {
  color: var(--ui-secondary) !important;
  font-size: 14px !important;
  line-height: 1.3;
}
.hint { color: var(--ui-tertiary) !important; font-size: 12px; line-height: 1.55; }
.form-grid select, .holiday-grid select, .theme-select select,
.event-entry input, .share-panel input, .select-row select,
html[data-site-theme="dark"] .form-grid select,
html[data-site-theme="dark"] .holiday-grid select,
html[data-site-theme="dark"] .event-entry input,
html[data-site-theme="dark"] .theme-select select {
  height: 46px;
  background: var(--ui-raised) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 11px;
  font-size: 16px;
}
.event-entry input { padding: 0 12px; }
.form-grid select.search-native { display: none !important; }
.search-select-field { position: relative; min-width: 0; }
.search-onboarding {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid var(--ui-border);
  border-radius: 11px;
  background: var(--ui-raised);
  color: var(--ui-secondary);
  font-size: 12px;
  line-height: 1.5;
}
.search-onboarding span { flex: 1; }
.search-onboarding button {
  flex: none;
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: var(--ui-accent);
  font-size: 12px;
  font-weight: 700;
}
.search-select-button {
  position: absolute;
  inset: 1px 1px 1px auto;
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--ui-border);
  border-radius: 0 10px 10px 0;
  background: var(--ui-raised);
  color: var(--ui-secondary);
}
.search-select-button:hover { color: var(--ui-accent); background: var(--ui-hover); }
.search-select-button svg { width: 19px; height: 19px; }
.form-grid .search-input[readonly] { cursor: pointer; }
.form-grid .search-input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 54px 0 13px;
  border: 1px solid var(--ui-border);
  border-radius: 11px;
  background: var(--ui-raised);
  color: var(--ui-text);
  font-size: 15px;
  text-overflow: ellipsis;
  outline: none;
}
.form-grid .search-input:focus {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 18%, transparent);
}
.form-grid .search-input::placeholder { color: var(--ui-tertiary); }
.search-results {
  position: fixed;
  z-index: 100;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  border: 1px solid var(--ui-border);
  border-radius: 13px;
  background: var(--ui-surface);
  color: var(--ui-text);
  box-shadow: 0 18px 48px #0007;
  scrollbar-width: thin;
}
.search-results[hidden] { display: none !important; }
.search-group, .search-empty {
  padding: 10px 11px 6px;
  color: var(--ui-tertiary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}
.search-group { text-transform: uppercase; letter-spacing: .075em; }
.search-empty { font-size: 12px; font-weight: 500; text-transform: none; }
.search-option {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ui-text);
  font-size: 14px;
  text-align: left;
  white-space: normal;
}
.search-option:hover, .search-option.active { background: var(--ui-raised); }
.search-option[aria-selected="true"] { color: var(--ui-accent); font-weight: 700; }
.option, html[data-site-theme="dark"] .option,
.color-grid label, html[data-site-theme="dark"] .color-grid label,
.event-item, html[data-site-theme="dark"] .event-item {
  background: var(--ui-raised) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 12px;
}
.option { min-height: 86px; font-size: 13px; transition: border-color .18s, transform .18s; }
.option:hover { transform: translateY(-2px); border-color: var(--ui-accent) !important; }
.option.selected, html[data-site-theme="dark"] .option.selected,
.segmented button.selected, .event-mode button.selected {
  background: color-mix(in srgb, var(--ui-accent) 12%, var(--ui-surface)) !important;
  color: var(--ui-text) !important;
  border-color: var(--ui-accent) !important;
}
.option-icon { font-size: 24px; line-height: 1.1; }
.segmented, .event-mode, html[data-site-theme="dark"] .segmented,
html[data-site-theme="dark"] .event-mode {
  background: var(--ui-raised) !important;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  gap: 3px;
}
.segmented button, .event-mode button { color: var(--ui-secondary) !important; font-size: 13px; border: 1px solid transparent; }
.toggle-row { border-color: var(--ui-border) !important; }
.toggle-row strong { color: var(--ui-text); font-size: 14px; }
.toggle-row small { color: var(--ui-tertiary) !important; font-size: 12px; }
.glass-panel, html[data-site-theme="dark"] .glass-panel {
  border: 1px solid var(--ui-border);
  background: var(--ui-raised);
  border-radius: 13px;
  min-width: 0;
  max-width: 100%;
}
.photo-controls { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.photo-controls > label, .photo-controls > .glass-panel, .photo-controls > .hint { grid-column: 1 / -1; }
.glass-panel .toggle-row { min-width: 0; }
.glass-panel .toggle-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.glass-panel #glassControls { grid-template-columns: minmax(0, 1fr); }
.glass-panel #glassControls label { min-width: 0; }
.glass-panel #glassControls.disabled { opacity: 1; pointer-events: auto; }
.glass-panel #glassControls.disabled label { color: var(--ui-secondary); }
.glass-panel #glassControls.disabled input[type="range"] { opacity: .55; }
.photo-controls label { color: var(--ui-secondary); font-size: 14px; }
.swatch { border-color: var(--ui-border); }
.event-item { padding: 11px 12px; font-size: 13px; }
.secondary, .subtle, html[data-site-theme="dark"] .secondary, html[data-site-theme="dark"] .subtle {
  background: var(--ui-raised) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 10px;
  font-size: 13px;
}
.primary {
  background: #9bc1ff;
  color: #0a1830;
  border: 1px solid #b1cfff;
  box-shadow: none;
  border-radius: 10px;
  font-size: 14px;
}
.primary:hover { background: #bad5ff; }
.download-card, html[data-site-theme="dark"] .download-card {
  background: var(--ui-surface) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 18px;
  padding: 20px;
  gap: 16px;
}
.download-card h3 { color: var(--ui-text); font-size: 17px; }
.download-card p { color: var(--ui-tertiary) !important; }
.share-panel { border-color: var(--ui-border); }
.share-panel label { color: var(--ui-secondary) !important; }
.follow-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: var(--ui-raised);
}
.follow-copy { display: grid; gap: 4px; min-width: 0; }
.follow-copy strong { color: var(--ui-text); font-size: 14px; }
.follow-copy span { color: var(--ui-secondary); font-size: 12px; }
.follow-actions { display: flex; align-items: center; gap: 9px; }
.follow-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border: 1px solid var(--ui-border);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .18s, border-color .18s, transform .18s;
}
.follow-actions a:hover { transform: translateY(-2px); border-color: var(--ui-accent); }
.follow-subscribe { gap: 9px; padding: 0 14px; border-radius: 11px; background: var(--ui-text); color: var(--ui-bg); }
.follow-subscribe:hover { background: var(--ui-secondary); }
.follow-subscribe svg { width: 18px; height: 18px; flex: none; }
.follow-vk { width: 42px; border-radius: 11px; background: var(--ui-surface); color: var(--ui-text); letter-spacing: -.09em; }
.follow-vk:hover { background: var(--ui-hover); }
.editor-links { gap: 10px 18px; border-color: var(--ui-border); }
.editor-links a { color: var(--ui-tertiary); }

/* Landing page: editorial type and an intentional transition into the tool. */
body.landing-mode, html[data-site-theme="light"] body.landing-mode {
  background: var(--ui-bg);
  color: var(--ui-text);
}
.landing {
  background: radial-gradient(ellipse 60% 45% at 50% 48%, #28446f25, transparent 75%);
}
.landing-nav, html[data-site-theme="light"] .landing-nav,
.landing-footer, html[data-site-theme="light"] .landing-footer {
  box-sizing: border-box;
  width: min(calc(100% - 48px), 1440px);
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  background: color-mix(in srgb, var(--ui-surface) 91%, transparent) !important;
  color: var(--ui-text);
  border: 1px solid var(--ui-border) !important;
  border-radius: 22px;
  backdrop-filter: blur(18px);
}
.landing-nav, html[data-site-theme="light"] .landing-nav {
  margin-top: 22px;
  margin-bottom: 0;
  min-height: 78px;
  padding: 12px 20px;
}
.landing-logo { border-radius: 15px; }
.landing-nav nav a, html[data-site-theme="light"] .landing-nav nav a {
  color: var(--ui-secondary);
  font-size: 14px;
  font-weight: 620;
}
.landing-nav nav a[aria-current="page"], html[data-site-theme="light"] .landing-nav nav a[aria-current="page"] { color: var(--ui-text); }
.landing-create, html[data-site-theme="light"] .landing-create {
  color: var(--ui-text);
  background: var(--ui-raised);
  border-color: var(--ui-border);
  box-shadow: inset 0 1px #ffffff12;
  font-size: 14px;
  padding: 13px 24px;
  transition: transform .18s, border-color .18s, background .18s;
}
.landing-create:hover, html[data-site-theme="light"] .landing-create:hover {
  transform: translateY(-2px);
  border-color: var(--ui-accent);
  background: var(--ui-hover);
}
.landing-hero { min-height: min(800px, calc(100svh - 100px)); padding: 60px 24px 100px; }
.landing-kicker { color: var(--ui-accent) !important; font-size: 12px; letter-spacing: .2em; }
.landing-hero h1 {
  color: var(--ui-text);
  font-weight: 740;
  font-size: clamp(62px, 10vw, 148px);
  line-height: .99;
  letter-spacing: -.082em;
  margin-bottom: 52px;
}
.landing-down { color: var(--ui-accent); border-color: var(--ui-border); }
.landing-discover { min-height: 72svh; padding: 80px 24px 130px; }
.landing-emblem { color: var(--ui-text); font-weight: 620; }
.landing-discover h2 { color: var(--ui-text); letter-spacing: -.035em; }
.landing-discover p, .landing-subline { color: var(--ui-tertiary) !important; }
.landing-main-cta { font-size: 17px; padding: 17px 34px; }
.landing-footer, html[data-site-theme="light"] .landing-footer {
  min-height: 78px;
  margin-top: 0;
  margin-bottom: 22px;
  padding: 19px 20px;
  align-items: center;
  gap: 14px 26px;
}
.landing-footer > span {
  width: 100%;
  margin-left: 0;
  color: var(--ui-tertiary);
  font-size: 12px;
}
.landing-footer a, html[data-site-theme="light"] .landing-footer a { color: var(--ui-secondary); }
.landing-footer a:hover { color: var(--ui-text) !important; }
.landing-dots i.is-past, .landing-dots i.is-current,
html[data-site-theme="light"] .landing-dots i.is-past,
html[data-site-theme="light"] .landing-dots i.is-current {
  background: #85afff;
  box-shadow: 0 0 12px #6f9dfb45;
}
.landing-dots i.is-current { animation: product-month-pulse 2.5s ease-in-out infinite; }
@keyframes product-month-pulse {
  50% { background: #3e5e92; box-shadow: 0 0 0 6px #85afff25; }
}

@media (max-width: 800px) {
  .topbar { height: 64px; gap: 10px; padding: 0 15px; }
  .topbar .menu-toggle { top: 78px; left: 15px; min-width: 126px; height: 44px; }
  .settings-hint { top: 132px; left: 15px; }
  .editor-nav { margin-left: 0 !important; }
  .editor-nav button, .editor-nav a { padding: 8px 9px; font-size: 13px; }
  .topbar .site-theme-toggle { width: 38px; height: 38px; }
  .site-lang-toggle { height: 38px; padding: 0 8px; }
  .preview-col { top: 64px; padding: 14px 10px 22px; }
  .preview-col .preview-footer { top: 13px; right: 14px; }
  .preview-col .preview-footer .text-button { padding: 12px 13px; font-size: 12px; }
  .phone { max-width: calc(100vw - 30px); }
  .phone[data-device="iphone18promax"] { height: min(calc(100dvh - 95px), 760px); }
  .device-caption { bottom: 5px; font-size: 11px; }
  body .controls-col, body:not(.sheet-open) .controls-col {
    width: 100%; border-right: 0; border-top: 1px solid var(--ui-border);
    border-radius: 23px 23px 0 0;
    background: var(--ui-bg) !important;
    box-shadow: 0 -22px 65px #0008;
  }
  .sheet-head, html[data-site-theme="dark"] .sheet-head { padding: 9px 18px 0; }
  .sheet-head strong { font-size: 16px; }
  .sheet-head:before { background: var(--ui-tertiary); }
  .sheet-head .sheet-resize { font-size: 12px; }
  .controls-scroll, body:not(.sheet-open) .controls-scroll { padding: 22px 16px calc(28px + env(safe-area-inset-bottom)); }
  .sheet-gesture-tip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding: 13px;
    border: 1px solid var(--ui-accent);
    border-radius: 14px;
    background: var(--ui-raised);
    color: var(--ui-text);
    box-shadow: 0 8px 24px #0002;
    font-size: 13px;
    line-height: 1.35;
  }
  .sheet-gesture-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--ui-surface);
    color: var(--ui-accent);
    font-size: 21px;
  }
  .sheet-gesture-tip > span:nth-child(2) { flex: 1; }
  .sheet-gesture-tip button {
    flex: none;
    border: 0;
    padding: 8px 4px;
    background: transparent;
    color: var(--ui-accent);
    font-size: 12px;
    font-weight: 750;
  }
  .drawer-intro { margin-bottom: 21px; font-size: 13px; }
  .controls-title h2 { font-size: 22px; }
  .section-card { padding: 18px; }
  .download-card { padding: 18px; }
  .landing-nav, html[data-site-theme="light"] .landing-nav,
  .landing-footer, html[data-site-theme="light"] .landing-footer {
    width: calc(100% - 24px);
    margin-left: 12px;
    margin-right: 12px;
  }
  .landing-nav, html[data-site-theme="light"] .landing-nav { margin-top: 12px; margin-bottom: 0; min-height: 70px; padding: 10px 12px; }
  .landing-footer, html[data-site-theme="light"] .landing-footer { margin-top: 0; margin-bottom: 12px; padding: 18px 16px; }
  .landing-nav nav { flex: 1; min-width: 0; }
  .landing-nav .landing-create { flex: none; }
  .preferences-tools-footer { width: 100%; margin-left: 0; padding-top: 12px; }
  .landing-hero { min-height: calc(100svh - 86px); }
  .landing-hero h1 { font-size: clamp(54px, 10vw, 85px); }
}

@media (max-width: 600px) {
  .landing-footer, html[data-site-theme="light"] .landing-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .landing-footer > a { font-size: 14px; }
  .landing-footer .preferences-tools-footer,
  .landing-footer > span { grid-column: 1 / -1; }
  .landing-footer .preferences-tools-footer {
    width: 100%;
    margin-left: 0;
    padding-top: 14px;
    border-top: 1px solid var(--ui-border);
  }
  .landing-footer > span { padding-top: 2px; }
}

@media (max-width: 390px) {
  .editor-nav a { display: none; }
  .landing-nav nav a:nth-child(2) { display: inline; }
  .topbar .menu-toggle { min-width: 117px; }
  .option-row { gap: 6px; }
  .section-card { padding: 16px; }
}

@media (max-width: 430px) {
  .landing-nav nav a[aria-current="page"] { display: none; }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .topbar { gap: 12px; }
  .topbar .brand small { display: none; }
  .topbar .editor-nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .option, .landing-create, .topbar .menu-toggle, .site-theme-toggle { transition: none; }
}

@media (min-width: 801px) {
  /* Keep controls visible while their contents scroll, with the wallpaper beside them. */
  .workspace { display: block; height: 100dvh; }
  .controls-col, html[data-site-theme="dark"] .controls-col {
    top: 72px;
    bottom: 0;
    left: 0;
    right: auto;
    width: clamp(360px, 35vw, 500px);
    height: calc(100dvh - 72px);
    border-radius: 0;
    transform: none !important;
    box-shadow: none;
    z-index: 2;
  }
  /* Give the settings their own full-height scrollport. Firefox can shrink the
     flex child after a photo preview redraw, leaving the rest of the sidebar blank. */
  .controls-col .controls-scroll,
  body:not(.sheet-open) .controls-col .controls-scroll {
    position: absolute;
    inset: 64px 0 0;
    width: 100%;
    height: calc(100% - 64px);
    max-height: none;
    min-height: 0;
    flex: none;
    overflow-x: hidden;
    overflow-y: auto;
    visibility: visible;
    pointer-events: auto;
  }
  .preview-col {
    inset: 72px 0 0 clamp(360px, 35vw, 500px);
    border-left: 1px solid var(--ui-border);
  }
  .preview-col .phone-wrap, body.drawer-open .phone-wrap { transform: none; }
  .preview-col .phone,
  .preview-col .phone[data-device="iphone16promax"],
  .preview-col .phone[data-device="iphone17promax"],
  .preview-col .phone[data-device="iphone18promax"] {
    height: min(calc(100dvh - 156px), 870px);
    max-width: calc(100% - 40px);
  }
  .topbar .menu-toggle, .settings-hint, .drawer-scrim,
  .sheet-head .sheet-actions, .drawer-intro { display: none !important; }
  .controls-col .sheet-head {
    position: relative;
    z-index: 1;
    flex: 0 0 64px;
    height: 64px;
    min-height: 64px;
    border-bottom: 1px solid var(--ui-border);
  }
  .controls-scroll { padding-top: 24px; }
}

/* Independent collapsible settings sections, on desktop and mobile. */
.settings-section .card-title { position: relative; padding-right: 32px; min-height: 44px; }
.settings-section .settings-section-toggle { position: absolute; inset: -8px; width: calc(100% + 16px); border: 0; border-radius: 10px; background: transparent; color: var(--ui-secondary); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: flex-end; }
.settings-section-toggle svg { width: 20px; height: 20px; margin-right: 8px; flex: none; transition: transform .18s ease; }
.settings-section-toggle:hover { color: var(--ui-accent); }
.settings-section-toggle:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.settings-section.is-collapsed .card-title { margin-bottom: 0; }
.settings-section.is-collapsed .settings-section-toggle svg { transform: rotate(-90deg); }
.settings-section-body[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .settings-section-toggle svg { transition: none; } }

/* Keep form fields within the card, even with long native select labels. */
.settings-section-body { min-width: 0; }
.controls-scroll .form-grid,
.controls-scroll .holiday-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.controls-scroll .form-grid > label,
.controls-scroll .holiday-grid > label,
.controls-scroll .theme-select,
.controls-scroll .select-row { min-width: 0; }
.controls-scroll .form-grid select,
.controls-scroll .holiday-grid select,
.controls-scroll .theme-select select,
.controls-scroll .select-row select,
.controls-scroll .event-entry input {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.settings-section .card-title > div { min-width: 0; }
.settings-section .card-title h3,
.settings-section .card-title p { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .controls-scroll .form-grid,
  .controls-scroll .holiday-grid,
  .controls-scroll .event-entry { grid-template-columns: minmax(0, 1fr); }
  .controls-scroll .form-grid > label,
  .controls-scroll .holiday-grid > label,
  .controls-scroll .event-entry > label,
  .controls-scroll .event-entry .event-title,
  .controls-scroll .event-entry #addEvent { grid-column: 1 / -1; }
}

.link-setup-help { min-width: 0; border: 1px solid var(--ui-border); border-radius: 12px; padding: 14px; background: var(--ui-raised); }
.link-setup-help p { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ui-secondary); }
.link-setup-guide { display: inline-block; padding: 6px 0; color: var(--ui-accent); font-size: 14px; font-weight: 650; text-decoration: none; }
.link-setup-guide:hover { text-decoration: underline; }

.feedback-card { margin: 18px 0 0; border: 1px solid var(--ui-border); border-radius: 14px; background: var(--ui-surface); min-width: 0; }
.feedback-card summary { padding: 15px 16px; color: var(--ui-secondary); font-size: 14px; font-weight: 650; cursor: pointer; overflow-wrap: anywhere; }
.feedback-card summary:hover { color: var(--ui-accent); }
.feedback-card summary:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; border-radius: 12px; }
.feedback-content { padding: 0 16px 16px; }
.feedback-content p { color: var(--ui-secondary); font-size: 13px; line-height: 1.55; margin: 0 0 12px; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-actions a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-accent); background: var(--ui-raised); font-size: 13px; font-weight: 600; text-decoration: none; }
.feedback-actions a:hover { background: var(--ui-hover); }
.feedback-content .feedback-note { margin: 12px 0 0; color: var(--ui-tertiary); font-size: 12px; }
@media (max-width: 600px) { .feedback-actions { flex-direction: column; } .feedback-actions a { justify-content: center; } }

/* Hidden fields must stay hidden despite the form's flex/grid display rules. */
.controls-scroll .color-grid > label[hidden],
.controls-scroll .theme-select[hidden],
.controls-scroll #bgColors[hidden],
.controls-scroll #photoColorsHint[hidden] { display: none !important; }

/* Export stays in settings; the phone preview has no floating action. */
.preview-col .preview-footer { display: none !important; }
@media (max-width: 800px) {
  .topbar { gap: 10px; padding-inline: 12px; }
  .topbar .editor-home { order: 1; flex: none; min-width: 0; }
  .topbar .editor-home > span:last-child { display: none; }
  .topbar .editor-nav { order: 2; flex: 1; min-width: 0; display: flex; gap: 0; }
  .topbar .editor-nav a, .topbar .editor-nav button { display: inline-flex; align-items: center; padding: 8px 6px; font-size: 12px; white-space: nowrap; }
  .topbar .topbar-spacer { display: none; }
  .topbar .menu-toggle {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    order: 3;
    display: flex;
    flex: none;
    width: auto;
    min-width: 0;
    height: 42px;
    margin-left: auto;
    padding: 10px 12px;
    box-shadow: none;
  }
  .topbar .menu-label { font-size: 13px; }
  .settings-hint { top: 72px; right: 12px; left: auto; max-width: calc(100vw - 24px); }
  .settings-hint:before { left: auto; right: 25px; }
}
@media (max-width: 350px) {
  .topbar { gap: 6px; padding-inline: 8px; }
  .topbar .menu-toggle { padding-inline: 9px; }
  .topbar .editor-nav a, .topbar .editor-nav button { padding-inline: 4px; font-size: 11px; }
}

/* Keep navigation at the actual centre, independently of the logo and actions. */
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.topbar .editor-home { grid-column: 1; grid-row: 1; justify-self: start; }
.topbar .editor-nav { grid-column: 2; grid-row: 1; display: flex; justify-content: center; align-items: center; margin-left: 0; gap: 12px; }
.topbar .topbar-spacer { display: none; }
.topbar .menu-toggle { flex-direction: row; gap: 8px; }
.topbar .menu-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; background: transparent !important; color: var(--ui-text); }
.topbar .menu-icon svg { display: block; width: 22px; height: 22px; }
@media (max-width: 800px) {
  .topbar { column-gap: 8px; }
  .topbar .editor-nav { flex: none; gap: 2px; }
  .topbar .menu-toggle { grid-column: 3; grid-row: 1; justify-self: end; margin-left: 0; padding-inline: 8px; }
  .topbar .menu-icon, .topbar .menu-icon svg { width: 20px; height: 20px; }
}
@media (max-width: 380px) {
  .topbar .menu-label { display: none; }
  .topbar .menu-toggle { width: 42px; padding: 0; }
}

.follow-max { width: 42px; border-radius: 11px; color: var(--ui-text); background: var(--ui-surface); }
.follow-max svg { width: 25px; height: 25px; }
.follow-max:hover { background: var(--ui-hover); }
.follow-actions { flex-wrap: wrap; }

.support-project-link { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 16px; border: 1px solid var(--ui-border); border-radius: 12px; color: var(--ui-accent); background: var(--ui-raised); font-size: 14px; font-weight: 650; text-decoration: none; }
.support-project-link:hover { background: var(--ui-hover); border-color: var(--ui-accent); text-decoration: none; }

.follow-card > .support-project-link { flex: 0 0 100%; width: 100%; background: var(--ui-surface); }

/* Color controls must fit narrow desktop drawers and mobile sheets. */
.controls-scroll .color-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap:8px; min-width:0; }
.controls-scroll .color-grid > label { display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;gap:8px;min-width:0;min-height:58px;padding:10px; }
.controls-scroll .color-grid .color-label-text { min-width:0;overflow-wrap:anywhere;line-height:1.35;font-size:12px; }
.controls-scroll .color-grid input[type="color"] { display:block;flex:none;width:30px!important;min-width:30px!important;max-width:30px!important;height:30px;margin:0;padding:0;justify-self:end; }
.controls-scroll .gradient-direction { display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-top:16px;margin-bottom:0;min-width:0; }
.controls-scroll .gradient-direction select { width:100%;min-width:0;max-width:100%;margin:0; }
.controls-scroll .color-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;align-items:stretch; }
.controls-scroll .color-actions > button { display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-height:36px;margin:0;white-space:normal;line-height:1.3; }
.controls-scroll #themeCustomHint { margin:12px 0 0; }

.controls-scroll .palette-row { display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;max-width:100%; }
.controls-scroll .palette-row .swatches { display:flex;flex-wrap:wrap;gap:10px;min-width:0;max-width:100%;padding:4px; }
.controls-scroll .palette-row .swatch { flex:none;margin:0; }

.controls-scroll .event-import-label { display:grid;gap:8px;min-width:0;color:var(--ui-secondary);font-size:13px; }
.controls-scroll #importEventsUrl { width:100%;min-width:0;padding:12px;border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-raised);color:var(--ui-text); }
.controls-scroll #importEventsBtn { margin-top:10px; }
.controls-scroll #importEventsStatus { margin:10px 0 0;overflow-wrap:anywhere; }

/* Lock screen furniture is a DOM overlay, never part of the wallpaper canvas. */
.phone-screen { container-type: inline-size; }
.lock-screen-ui { position:absolute; inset:0; z-index:4; pointer-events:none; color:#fff; text-shadow:0 1px 5px #0008; }
.phone-screen:not(.is-ready) .lock-screen-ui { visibility:hidden; }
.lock-screen-heading { position:absolute; top:9.5%; left:3%; right:3%; text-align:center; }
.lock-screen-lock { display:none; width:5cqw; height:5cqw; margin:0 auto 1.5cqw; filter:drop-shadow(0 1px 3px #0008); }
.lock-screen-date { font:600 5.3cqw/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.lock-screen-date::first-letter { text-transform:uppercase; }
.lock-screen-time { font:600 30cqw/1.05 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-variant-numeric:tabular-nums; letter-spacing:-.055em; }
.lock-screen-shortcuts { position:absolute; bottom:5.5%; left:11%; right:11%; display:flex; justify-content:space-between; }
.lock-screen-shortcut { display:grid; place-items:center; width:13cqw; height:13cqw; border-radius:50%; background:#25252570; border:1px solid #ffffff25; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
.lock-screen-shortcut svg { width:6cqw; height:6cqw; }
.phone .status-time { visibility:hidden; }

.controls-scroll .calendar-position { display:grid; gap:10px; margin:18px 0 10px; font-size:13px; color:var(--text-secondary); }
.calendar-position output { font-variant-numeric:tabular-nums; }
.calendar-position input { width:100%; min-width:0; }
.calendar-position-ends { display:flex; justify-content:space-between; font-size:12px; }

.phone-status .status-time { display:none; }
.phone .phone-status { top:2.7%; left:10%; right:8%; }
.phone .phone-status .status-icons { gap:.8cqw; }
.phone .phone-status .status-signal { width:4.8cqw; height:3.4cqw; }
.phone .phone-status .status-wifi { width:4.6cqw; height:3.4cqw; }
.phone .phone-status .status-battery { width:6.6cqw; height:3.4cqw; }

.phone .phone-status { justify-content:flex-end; }

/* Compact choices and clearly grouped settings. */
.controls-scroll .swatches { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.controls-scroll .theme-option { min-width:0; display:flex; align-items:center; gap:8px; padding:10px; border:1px solid var(--ui-border); border-radius:10px; background:var(--ui-raised); color:var(--ui-text); font-size:13px; text-align:left; }
.theme-option::before { content:''; width:18px; height:18px; border-radius:50%; background:var(--sw); border:1px solid #ffffff40; flex:none; }
.controls-scroll .theme-option.selected { border-color:#8eafff; box-shadow:0 0 0 1px #8eafff; }
.appearance-group h4,#personalEventsEditor h4 { margin:18px 0 10px; font-size:14px; color:var(--ui-text); }
.advanced-settings { margin:14px 0; padding:12px; border:1px solid var(--ui-border); border-radius:10px; }
.advanced-settings summary { cursor:pointer; font-size:13px; color:var(--ui-text); }
.advanced-settings[open] summary { margin-bottom:12px; }
.settings-section .card-title p { overflow-wrap:anywhere; font-size:12px; line-height:1.5; }
.follow-card .follow-copy span { max-width:32em; line-height:1.5; }
.follow-card .follow-subscribe { width:100%; justify-content:center; }
.follow-card { display:grid; grid-template-columns:minmax(0,1fr); }
.follow-card .follow-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:8px; }
.follow-card .follow-actions a { width:100%; min-width:0; height:44px; box-sizing:border-box; border-radius:11px; }
.follow-card .follow-subscribe { grid-column:1 / -1; }
.follow-card .follow-max { gap:8px; }
.follow-card .follow-max svg { width:22px; height:22px; flex:none; }
.background-color-grid { margin-top:16px; }

.preview-col { flex-direction:column; }
.controls-scroll .segmented button:not(.selected) { background:transparent !important; color:var(--ui-secondary) !important; }
@media(min-width:801px) {
 .preview-col .phone,.preview-col .phone[data-device="iphone16promax"],.preview-col .phone[data-device="iphone17promax"],.preview-col .phone[data-device="iphone18promax"] { height:min(calc(100dvh - 232px),800px); }
}

/* Keep checkbox focus inside its visible switch instead of an unanchored
   absolute input that can scroll the settings sheet out of view. */
.controls-scroll .toggle-row { position:relative; min-height:44px; }
.controls-scroll .toggle-row > input[type="checkbox"] {
 position:absolute; right:0; left:auto; top:50%; transform:translateY(-50%);
 width:40px; height:24px; min-width:0; margin:0; padding:0; opacity:0;
 cursor:pointer; z-index:1;
}
.controls-col { overflow:hidden; }
.controls-col .sheet-head { flex:0 0 auto; }
.controls-col .controls-scroll { overscroll-behavior:contain; overflow-anchor:none; }
@media(max-width:800px) {
 .controls-col .sheet-head { position:relative; height:58px; min-height:58px; }
 .controls-col .controls-scroll,
 body:not(.sheet-open) .controls-col .controls-scroll {
  position:absolute; inset:58px 0 0; width:100%; height:calc(100% - 58px);
  max-height:none; flex:none; overflow-y:auto; overflow-x:hidden;
 }
}

/* Draw the separator independently of the platform font's colon baseline. */
.lock-screen-time { display:flex; align-items:center; justify-content:center; }
.lock-screen-colon {
 display:inline-flex; flex:none; flex-direction:column; justify-content:space-between;
 width:.13em; height:.44em; margin:0 .035em; transform:translateY(-.035em);
 font-size:inherit; line-height:0; color:transparent; text-shadow:none; letter-spacing:0;
}
.lock-screen-colon::before,.lock-screen-colon::after {
 content:''; display:block; width:.13em; height:.13em;
 border-radius:50%; background:#fff; box-shadow:0 2px 8px #0002;
}
