/* ===================================================================
   iOS 27 美学设计系统 · 极简主义 (Apple Minimalist Standard)
   =================================================================== */

:root {
  --bg-deep: #000000;
  --ios-accent: #FFFFFF;
  --ios-subtle: rgba(255, 255, 255, 0.55);
  --ios-card-glass: rgba(255, 255, 255, 0.06);
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  --blur-val: 20px;
  --opacity-val: 0.08;
  --radius-val: 28px;
  --glow-display: block;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--ios-font);
  background: #000000;
  color: #FFFFFF;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

/* ===================================================================
   模拟 iPhone 屏幕机框 (iOS 纯黑极简机身)
   =================================================================== */
.device-frame {
  position: relative;
  width: 390px;
  height: 844px;
  background: #000000;
  border-radius: 54px;
  box-shadow: 
    0 0 0 2.5px #1c1d22,
    0 0 0 5px #0a0a0d,
    0 30px 90px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 顶部灵动岛 (Dynamic Island) */
.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 125px;
  height: 35px;
  background: #000000;
  border-radius: 20px;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  pointer-events: none;
}

.island-camera {
  width: 11px;
  height: 11px;
  background: #0c0f17;
  border-radius: 50%;
  box-shadow: inset 0 0 2px #1a2236;
}

.island-sensor {
  width: 9px;
  height: 9px;
  background: #080808;
  border-radius: 50%;
}

/* 底部 Home 指示条 */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 138px;
  height: 5px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  z-index: 110;
  pointer-events: none;
}

/* ===================================================================
   壁纸工作台画布
   =================================================================== */
.wallpaper-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.wallpaper-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #090e1f 0%, #171228 50%, #060914 100%);
  background-size: cover;
  background-position: center;
  transition: filter 0.3s ease;
}

/* ===================================================================
   极简液态玻璃待办面板 (Pure Liquid Glass)
   =================================================================== */
.glass-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
}

.liquid-glass-card {
  position: absolute;
  background: rgba(255, 255, 255, var(--opacity-val));
  backdrop-filter: blur(var(--blur-val));
  -webkit-backdrop-filter: blur(var(--blur-val));
  border-radius: var(--radius-val);
  cursor: grab;
  touch-action: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 
    0 20px 45px rgba(0, 0, 0, 0.38),
    0 0.5px 0.5px rgba(255, 255, 255, 0.15) inset;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  position: absolute;
}

.liquid-glass-card:active {
  cursor: grabbing;
}

.fresnel-sheen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 1;
  display: var(--glow-display);
}

.liquid-glass-card.selected {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 20px 45px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* 卡片头部 */
.card-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px 16px;
}

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

.card-title-text {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.95);
}

.hairline-divider {
  position: relative;
  z-index: 2;
  height: 0.5px;
  margin: 0 16px 8px 16px;
  background: rgba(255, 255, 255, 0.15);
}

.icon-btn-micro {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.15s;
}

.icon-btn-micro:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 待办项目列表 */
.todo-items-list {
  position: relative;
  z-index: 2;
  padding: 4px 16px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.todo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

.todo-leading-badge {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.todo-check-circle {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.todo-check-circle.done {
  background: #FFFFFF;
  border-color: #FFFFFF;
}

.todo-check-circle.done svg path {
  stroke: #000000;
}

.todo-emoji-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-block;
  user-select: none;
}

.todo-image-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  border: 0.5px solid rgba(255, 255, 255, 0.3);
}

.todo-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.1px;
}

.todo-text.completed {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.35);
}

.resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  cursor: se-resize;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 5px;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.15s ease;
}

.resize-handle:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ===================================================================
   悬浮式液态玻璃底部导航栏 (Floating Draggable Liquid Glass Tab Bar)
   =================================================================== */
.floating-liquid-tab-bar {
  position: absolute;
  bottom: 24px;
  left: 22px;
  right: 22px;
  height: 58px;
  border-radius: 30px;
  background: rgba(26, 26, 32, 0.42);
  backdrop-filter: blur(45px);
  -webkit-backdrop-filter: blur(45px);
  border: 0.6px solid rgba(255, 255, 255, 0.28);
  box-shadow: 
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0.5px 0.5px rgba(255, 255, 255, 0.2) inset;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 4px;
  touch-action: none;
}

/* 连续可拖动的胶囊指示器 */
.tab-indicator-capsule {
  position: absolute;
  top: 5px;
  left: 4px;
  width: calc((100% - 8px) / 4);
  height: 48px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.tab-indicator-capsule.dragging {
  transition: none; /* 拖拽时实时跟随，无延迟过渡 */
}

.tab-item {
  position: relative;
  z-index: 2;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: rgba(235, 235, 245, 0.55);
  cursor: pointer;
  transition: color 0.15s ease;
}

.tab-item.active {
  color: #FFFFFF;
}

.tab-icon-wrapper {
  width: 26px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-label {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

/* ===================================================================
   边看边调：实时非模态悬浮质感调节 HUD (Live Texture Inspector)
   =================================================================== */
.live-texture-hud {
  position: absolute;
  bottom: 92px;
  left: 20px;
  right: 20px;
  background: rgba(24, 24, 30, 0.75);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border-radius: 24px;
  border: 0.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  padding: 14px 16px;
  z-index: 90;
  animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
}

.hud-tabs {
  display: flex;
  gap: 6px;
}

.hud-tab-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.hud-tab-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-weight: 600;
}

.hud-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hud-sliders-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hud-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.hud-badge {
  font-family: monospace;
  font-weight: 600;
  color: #FFFFFF;
}

/* ===================================================================
   初始界面与教程引导 (Onboarding Carousel Flow)
   =================================================================== */
.onboarding-overlay {
  position: absolute;
  inset: 0;
  background: #000000;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px 24px 34px 24px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.onboarding-overlay.hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.onboarding-top-bar {
  display: flex;
  justify-content: flex-end;
}

.skip-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.tutorial-carousel {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tutorial-slide {
  position: absolute;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tutorial-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.step-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.glass-icon-stage {
  width: 120px;
  height: 120px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
}

.tutorial-slide h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.tutorial-slide p {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
  max-width: 280px;
}

.onboarding-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
}

.carousel-dots .dot.active {
  width: 18px;
  background: #FFFFFF;
}

.onboarding-next-btn {
  width: 100%;
  height: 52px;
  background: #FFFFFF;
  color: #000000;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

/* ===================================================================
   iOS 极简抽屉弹窗 (Clean Half-Sheet Modals)
   =================================================================== */
.ios27-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 150;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios27-sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.ios27-sheet {
  background: rgba(26, 26, 30, 0.94);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.16);
  padding: 12px 20px 34px 20px;
  max-height: 82%;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -15px 45px rgba(0, 0, 0, 0.65);
}

.ios27-sheet-backdrop.active .ios27-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  margin: 0 auto 16px auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sheet-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
}

.close-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #FFFFFF;
  cursor: pointer;
  opacity: 0.9;
}

.setting-group {
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 16px;
  border-radius: 18px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
}

.group-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ios-slider {
  width: 100%;
  appearance: none;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  outline: none;
}

.ios-slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  background: #FFFFFF;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* 图标模式切换器 */
.icon-mode-segmented {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 12px;
}

.mode-btn {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-weight: 600;
}

.emoji-picker-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.emoji-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emoji-preset-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.emoji-preset-btn.active {
  background: rgba(255, 255, 255, 0.25);
}

.emoji-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emoji-input-box {
  width: 50px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #FFFFFF;
  text-align: center;
  font-size: 18px;
  outline: none;
}

.emoji-custom-tip {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
}

.image-icon-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.image-icon-preview {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-icon-label {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #FFFFFF;
  cursor: pointer;
}

.ios-text-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  padding: 12px 14px;
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 14px;
  outline: none;
}

.add-todo-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.btn-primary-mini {
  background: #FFFFFF;
  color: #000000;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.todo-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  font-size: 13.5px;
}

.btn-del-todo {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 14px;
}

.btn-del-todo:hover {
  color: #FF453A;
}

/* 导出弹窗 */
.applied-sheet {
  text-align: center;
  padding-bottom: 34px;
}

.applied-hero {
  margin-bottom: 18px;
}

.preview-mini-container {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.preview-thumb {
  width: 100px;
  height: 160px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.applied-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 16px;
  margin-bottom: 8px;
}

.applied-hero h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.applied-hero p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.jump-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.jump-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 12px 14px;
  text-align: left;
}

.jc-icon {
  font-size: 22px;
}

.jc-info {
  flex: 1;
}

.jc-info h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.jc-info p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.3;
}

.btn-action-jump {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  color: #000000;
  border: none;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-action-jump.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.reminder-footer-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}

.btn-full-dismiss {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* v0.1 functional PWA: readable controls, viewport/keyboard and safe areas. */
[hidden] { display: none !important; }
button, input { font-family: inherit; }
button:disabled { opacity: 0.35; cursor: default; }
button:focus-visible, input:focus-visible, label.info-button:focus-within {
  outline: 2px solid white;
  outline-offset: 3px;
}
input[type="text"] { font-size: 16px; user-select: text; -webkit-user-select: text; }
.app-loading .wallpaper-stage { pointer-events: none; }
.app-status-bar {
  position: absolute; top: 58px; left: 18px; right: 18px; z-index: 130;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  font-size: 11px; color: rgba(255,255,255,0.8); pointer-events: none;
}
.app-status-bar button {
  pointer-events: auto; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px; padding: 7px 10px; background: #161924; color: white;
  min-height: 34px; font-size: 11px; cursor: pointer;
}
#saveStatus { padding: 3px 7px; background: rgba(0,0,0,0.6); border-radius: 5px; max-width: 100%; }
#saveStatus[data-phase="error"] { color: #ffb4ab; }
.liquid-glass-card { touch-action: pan-y; }
.card-header, .resize-handle { touch-action: none; }
.todo-items-list { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
button.todo-row {
  background: none; border: none; text-align: left; min-height: 36px;
  width: 100%; padding: 3px 0; flex-shrink: 0;
}
.todo-check-circle.done { color: black; font-size: 12px; font-weight: 700; }
.empty-state, .section-note { font-size: 12px; color: rgba(255,255,255,0.65); line-height: 1.6; }
.section-note { margin: 8px 0 12px; }
.ios27-sheet-backdrop {
  position: fixed; top: var(--viewport-top, 0px); bottom: auto;
  height: var(--app-height, 100dvh); align-items: center;
}
.ios27-sheet {
  width: 100%; max-width: 540px; max-height: 92%;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.ios27-sheet-backdrop:not(.active) { visibility: hidden; }
.onboarding-overlay { padding-top: max(50px, calc(env(safe-area-inset-top) + 12px)); }
.onboarding-overlay.hidden { visibility: hidden; }
.btn-primary-mini { width: auto; min-width: 64px; height: 46px; font-size: 15px; }
.text-action { color: rgba(255,255,255,0.75); background: none; border: none; min-height: 36px; font-size: 12px; }
.editor-row { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; }
.editor-toggle { display: flex; align-items: center; gap: 10px; background: none; border: none; color: white; padding: 4px 0; min-height: 40px; text-align: left; }
.editor-title { overflow-wrap: anywhere; line-height: 1.5; }
.editor-title.completed { text-decoration: line-through; color: rgba(255,255,255,0.5); }
.editor-actions { display: flex; justify-content: flex-end; gap: 5px; }
.editor-actions button {
  min-width: 44px; min-height: 40px; padding: 6px 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: white; font-size: 12px;
}
.editor-actions button[data-action="delete"] { color: #ffb4ab; }
.preview-actions { display: flex; justify-content: center; gap: 12px; margin: 16px 0; }
.preview-actions button { min-height: 44px; }
.preview-thumb { -webkit-touch-callout: default; user-select: auto; }
.info-sheet p { margin: 12px 0; line-height: 1.65; font-size: 13px; color: rgba(255,255,255,0.8); user-select: text; }
.info-sheet h4 { margin-top: 22px; font-size: 14px; }
.info-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.info-button {
  display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px;
  min-height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2);
  color: white; background: rgba(255,255,255,0.08); font-size: 13px; cursor: pointer;
}
.update-banner, .startup-error, .app-toast {
  position: fixed; left: 50%; transform: translateX(-50%); width: min(92%, 480px);
  background: #242733; color: white; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px; padding: 14px 16px; font-size: 13px; line-height: 1.5; z-index: 400;
}
.update-banner { top: calc(env(safe-area-inset-top) + 70px); }
.update-banner button, .startup-error button { min-height: 40px; padding: 8px 12px; margin-left: 8px; border: 0; border-radius: 8px; }
.startup-error { top: 30%; }
.startup-error button { margin: 10px 0 0; }
.app-toast { bottom: calc(env(safe-area-inset-bottom) + 90px); z-index: 450; }
@media (max-width: 600px), (display-mode: standalone) {
  body { padding: 0; min-height: 100dvh; align-items: flex-start; }
  .device-frame { width: 100vw; height: var(--app-height, 100dvh); border-radius: 0; box-shadow: none; }
  .dynamic-island, .home-indicator { display: none; }
  .app-status-bar { top: calc(env(safe-area-inset-top) + 10px); }
  .floating-liquid-tab-bar { bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px)); left: 18px; right: 18px; }
  .live-texture-hud { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 78px); }
  .onboarding-overlay { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
