/* settings.css v9 */
#screen-settings,
#screen-presets { background: #0d0d0d; font-family: 'Google Sans', -apple-system, sans-serif; overflow: hidden; }
.settings-container { display: flex; flex-direction: column; height: 100%; }

.settings-header {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px 14px;
  padding-top: calc(env(safe-area-inset-top) + 16px);
  border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
}
.settings-back {
  background: rgba(52,199,89,0.12); border: none; color: #34c759;
  font-size: 30px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding-bottom: 2px;
  cursor: pointer; transition: background 0.15s;
}
.settings-back:active { background: rgba(52,199,89,0.24); }
.settings-title { font-size: 22px; font-weight: 700; color: #fff; flex: 1; }
.settings-header-spacer { width: 42px; height: 42px; flex-shrink: 0; }
.settings-badge {
  background: linear-gradient(135deg, #34c759, #1a8a3a);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 11px; border-radius: 20px; letter-spacing: 0.05em;
}

.settings-scroll {
  flex: 1; overflow-y: auto; padding: 16px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 40px);
  -webkit-overflow-scrolling: touch;
}
.settings-scroll::-webkit-scrollbar { display: none; }

.settings-section { margin-bottom: 20px; }
.section-label { font-size: 13px; font-weight: 700; color: #34c759; letter-spacing: 0.12em; margin-bottom: 9px; padding-left: 4px; }

.settings-card { background: #1a1a1a; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.card-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 12px; }
.card-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 0 16px; }
.row-label { font-size: 14px; font-weight: 500; color: #fff; flex-shrink: 0; }
.row-sub { font-size: 12px; color: #666; display: block; margin-top: 2px; }

/* Segmented */
.segmented-control { display: flex; background: #0d0d0d; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; max-width: 100%; }
.seg-btn { background: none; border: none; color: #555; font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; font-family: 'Google Sans', sans-serif; transition: background 0.15s, color 0.15s; flex: 1 1 58px; }
.seg-btn.active { background: #34c759; color: #000; }
.force-mode-row { align-items: flex-start; flex-wrap: wrap; }
.force-mode-row .segmented-control { width: 100%; }
#force-mode .seg-btn { font-size: 12px; min-height: 34px; }

/* Digit inputs */
.digits-row { flex-wrap: wrap; padding: 12px 16px; }
.digit-inputs { display: flex; gap: 8px; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; }
.digit-input-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.digit-input-group label { font-size: 10px; color: #34c759; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.digit-input-group input {
  width: 62px; height: 54px; background: #0d0d0d; border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px; color: #fff; font-size: 28px; font-weight: 700; text-align: center;
  font-variant-numeric: tabular-nums; outline: none; -webkit-appearance: none;
  font-family: 'Google Sans', sans-serif; transition: border-color 0.15s;
}
.digit-input-group input:focus { border-color: #34c759; }

/* Perform button */
.confirm-row { padding: 8px 16px 16px; }
.perform-btn {
  width: 100%; height: 52px; background: #2a2a2a; border: none; border-radius: 14px;
  color: #444; font-size: 16px; font-weight: 700; cursor: not-allowed;
  letter-spacing: 0.04em; font-family: 'Google Sans', sans-serif;
  transition: background 0.25s, color 0.25s, transform 0.1s;
}
.perform-btn.ready {
  background: linear-gradient(135deg, #1a5c2e, #218a3e);
  /* White gradient text */
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(135deg, #1a5c2e, #218a3e);
  position: relative;
  cursor: pointer;
}
/* Use a layered approach: green bg + white text overlay */
.perform-btn.ready {
  background: linear-gradient(135deg, #1a5c2e, #218a3e);
  color: #fff;
  -webkit-background-clip: unset;
  background-clip: unset;
  background-image: unset;
  text-shadow: 0 1px 8px rgba(255,255,255,0.3);
  box-shadow: 0 0 18px rgba(52,199,89,0.45), 0 4px 20px rgba(52,199,89,0.18);
}
.perform-btn.ready:active { transform: scale(0.97); }
.perform-lock-note {
  margin-top: 10px;
  color: #75cf91;
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
}
.preset-editor-scroll {
  padding-top: calc(env(safe-area-inset-top) + 18px);
}
.preset-editor-section {
  margin-bottom: 0;
}

/* Presets */
.presets-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.presets-header-btn {
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: #e1e1e1;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Google Sans', sans-serif;
  cursor: pointer;
  padding: 0 12px;
}
.presets-header-btn:active { transform: scale(0.98); }
.presets-add-header-btn {
  color: #34c759;
  border-color: rgba(52,199,89,0.24);
  background: rgba(52,199,89,0.10);
}
.presets-reorder-toggle {
  min-width: 40px;
  padding: 0 10px;
  font-size: 18px;
  line-height: 1;
}
.presets-reorder-toggle.is-saving {
  min-width: 52px;
  font-size: 13px;
  color: #34c759;
  border-color: rgba(52,199,89,0.24);
  background: rgba(52,199,89,0.10);
}
.presets-scroll {
  display: block;
  padding-top: 24px;
}
.presets-empty {
  color: #666;
  text-align: center;
  font-size: 14px;
  padding: 28px 16px 12px;
}
.presets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preset-card {
  width: 100%;
  background: transparent;
  border: 2px solid #5e5e5e;
  border-radius: 11px;
  padding: 14px 16px;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.preset-card.selected {
  border-color: #34c759;
  box-shadow: 0 0 0 1px rgba(52,199,89,0.12), 0 10px 26px rgba(52,199,89,0.08);
  background: rgba(52,199,89,0.04);
}
.preset-card.reorder-mode {
  cursor: default;
}
.preset-card-top,
.preset-card-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.preset-card-bottom {
  align-items: center;
  margin-top: 16px;
}
.preset-card-name {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.preset-card-value {
  color: #d5d5d5;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: right;
}
.preset-card-method {
  color: #8b8b8b;
  font-size: 12px;
  text-align: right;
  line-height: 1.35;
}
.preset-card-method strong {
  font-weight: 700;
  color: #d3d3d3;
}
.preset-edit-btn {
  min-width: 68px;
  height: 34px;
  padding: 0 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #d8d8d8;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Google Sans', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.preset-edit-btn:active { border-color: #34c759; color: #34c759; }
.preset-edit-icon { font-size: 13px; line-height: 1; }
.preset-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.preset-reorder-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.preset-reorder-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: #ddd;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Google Sans', sans-serif;
  cursor: pointer;
}
.preset-reorder-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.preset-reorder-btn:not(:disabled):active {
  border-color: #34c759;
  color: #34c759;
}
.preset-delete-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(210,80,80,0.28);
  background: rgba(210,80,80,0.14);
  color: #f1a0a0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.preset-delete-btn:active {
  background: rgba(210,80,80,0.24);
  border-color: rgba(210,80,80,0.44);
}
.preset-delete-icon {
  font-size: 15px;
  line-height: 1;
}
.preset-name-input {
  flex: 1;
  height: 42px;
  background: #0d0d0d;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 0 12px;
  outline: none;
  font-family: 'Google Sans', sans-serif;
}
.preset-name-input:focus { border-color: #34c759; }
.preset-editor-actions {
  display: flex;
  gap: 10px;
  padding: 16px;
}
.preset-save-btn,
.preset-cancel-btn {
  flex: 1 1 50%;
  width: calc(50% - 5px);
  height: 52px;
}
.preset-save-btn {
  margin: 0;
}
.preset-cancel-btn {
  background: rgba(212, 84, 84, 0.16);
  border: 1px solid rgba(212, 84, 84, 0.34);
  border-radius: 14px;
  color: #f0a4a4;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Google Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.preset-cancel-btn:active {
  background: rgba(212, 84, 84, 0.28);
  transform: scale(0.98);
}

/* Method options */
.method-options { padding: 4px 0; }
.method-option { display: block; cursor: pointer; }
.method-option input[type="radio"] { display: none; }
.method-content {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border-left: 3px solid transparent; transition: border-color 0.15s, background 0.15s;
}
.method-option.selected .method-content {
  border-left-color: #34c759;
  background: rgba(52,199,89,0.10);
}
.method-option.selected .method-icon {
  background: rgba(52,199,89,0.18);
}
.method-option.selected .method-title { color: #34c759; }
.method-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.method-title { font-size: 13px; font-weight: 500; color: #fff; }
.method-desc  { font-size: 12px; color: #666; }
.method-sub {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 13px 52px; font-size: 14px; color: #aaa;
  background: rgba(52,199,89,0.03); border-left: 3px solid rgba(52,199,89,0.35);
}
.method-sub.hidden { display: none; }

/* Steppers */
.num-stepper { display: flex; align-items: center; gap: 10px; background: #0d0d0d; border-radius: 12px; padding: 4px 8px; }
.stepper-btn { background: #2a2a2a; border: none; color: #34c759; font-size: 22px; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.1s; }
.stepper-btn:active { background: #34c759; color: #000; }
.stepper-val { font-size: 22px; font-weight: 700; color: #34c759; min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }

/* Toggle */
.toggle-switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; inset: 0; background: #2a2a2a; border-radius: 30px; cursor: pointer; transition: background 0.22s; }
.toggle-slider::before { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #555; border-radius: 50%; transition: transform 0.22s, background 0.22s; box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.toggle-switch input:checked + .toggle-slider { background: rgba(52,199,89,0.25); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); background: #34c759; }

/* Add Up */
.addUp-detail { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.addUp-input-row { display: flex; align-items: center; gap: 10px; }
.sum-input { width: 100%; height: 56px; background: #0d0d0d; border: 1.5px solid rgba(255,255,255,0.1); border-radius: 12px; color: #fff; font-size: 30px; font-weight: 700; text-align: center; outline: none; -webkit-appearance: none; font-family: 'Google Sans', sans-serif; transition: border-color 0.15s; }
.sum-input:focus { border-color: #34c759; }
.addUp-hint { font-size: 12px; color: #555; text-align: center; }

/* ── Customize panel ───────────────────────────────────── */
.cust-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 16px; padding: 12px 16px; }
.cust-field { display: flex; flex-direction: column; gap: 5px; }
.cust-field label { font-size: 11px; color: #34c759; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.cust-field input[type="number"], .cust-field input[type="text"] {
  height: 42px; background: #0d0d0d; border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: #fff; font-size: 16px; font-weight: 600; text-align: center;
  outline: none; -webkit-appearance: none; width: 100%;
}
.cust-field input[type="color"] {
  height: 42px; border: 1.5px solid rgba(255,255,255,0.1); border-radius: 10px;
  background: #0d0d0d; cursor: pointer; width: 100%; padding: 4px;
}
.cust-field input:focus { border-color: #34c759; }
.cust-save-row { padding: 8px 16px 10px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.cust-save-btn {
  width: 100%; height: 46px; background: linear-gradient(135deg, #1a5c2e, #218a3e);
  border: none; border-radius: 12px; color: #4cde80; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: 'Google Sans', sans-serif;
}
.cust-save-feedback { font-size: 12px; color: #34c759; opacity: 0; transition: opacity 0.3s; text-align: center; line-height: 1.1; min-height: 13px; }

/* Font upload */
.font-upload-row { padding: 8px 16px 14px; }
.font-upload-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 12px 14px; background: #0d0d0d; border-radius: 12px;
  border: 1.5px dashed rgba(52,199,89,0.35); color: #34c759; font-size: 14px; font-weight: 600;
}
.font-upload-label input { display: none; }

/* Edit Language */
.lang-trigger-row { padding: 0 16px 12px; }
.lang-trigger-btn {
  width: 100%; height: 46px; background: #1a1a1a; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.lang-panel {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  background: #111; border-radius: 12px; margin: 0 16px;
}
.lang-panel.open { max-height: 600px; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.lang-field { display: flex; flex-direction: column; gap: 4px; }
.lang-field label { font-size: 10px; color: #888; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.lang-field input {
  height: 36px; background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: #fff; font-size: 13px; padding: 0 10px; outline: none; width: 100%;
}
.lang-field input:focus { border-color: #34c759; }
.lang-save-row { padding: 8px 12px 12px; }
.lang-save-btn {
  width: 100%; height: 42px; background: #34c759; border: none; border-radius: 10px;
  color: #000; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* Peek Method */
.peek-desc { font-size: 12px; color: #666; padding: 0 16px 12px; line-height: 1.5; }
.peek-delay-row { padding: 12px 16px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.peek-delay-input {
  width: 88px; height: 40px; background: #1a1a1a;
  border: 1.5px solid rgba(255,255,255,0.1); border-radius: 10px;
  color: #fff; font-size: 14px; font-weight: 600; text-align: center;
  outline: none;
}
.peek-delay-input:focus { border-color: #34c759; }

/* Perform button glow */
.perform-btn.ready {
  box-shadow: 0 0 18px rgba(52,199,89,0.45), 0 4px 20px rgba(52,199,89,0.18) !important;
}

/* Offset inputs: allow full negative range */
#cust-btn-x, #cust-btn-y {
  -moz-appearance: textfield;
}
#cust-btn-x::-webkit-inner-spin-button,
#cust-btn-y::-webkit-inner-spin-button { display: none; }

/* API select styling */
#api-mode-select option { background: #1a1a1a; }

/* Offset stepper arrows (replace number inputs) */
.offset-stepper {
  display: flex; flex-direction: column; align-items: center;
  background: #0d0d0d; border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px; overflow: hidden; width: 62px;
}
.offset-stepper-val {
  font-size: 18px; font-weight: 700; color: #fff; text-align: center;
  padding: 4px 0; min-width: 40px; font-variant-numeric: tabular-nums;
}
.offset-stepper-btn {
  background: rgba(52,199,89,0.08); border: none; color: #34c759;
  font-size: 16px; width: 100%; height: 26px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s; line-height: 1;
}
.offset-stepper-btn:active { background: rgba(52,199,89,0.22); }

/* API URL input inside card */
.api-url-wrap {
  padding: 0 16px 12px;
  display: flex; gap: 8px; align-items: center;
}
.api-url-input {
  flex: 1; height: 44px; background: #0d0d0d;
  border: 1.5px solid rgba(255,255,255,0.1); border-radius: 10px;
  color: #fff; font-size: 13px; padding: 0 12px; outline: none;
}
.api-url-input:focus { border-color: #34c759; }
.api-paste-btn {
  width: 40px; height: 44px; background: #1a1a1a;
  border: 1.5px solid rgba(255,255,255,0.1); border-radius: 10px;
  color: #888; font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.api-paste-btn:active { color: #34c759; border-color: #34c759; }
.api-save-btn {
  height: 44px; padding: 0 16px; background: rgba(52,199,89,0.12);
  border: 1.5px solid rgba(52,199,89,0.3); border-radius: 10px;
  color: #34c759; font-size: 13px; font-weight: 700; cursor: pointer;
  flex-shrink: 0; transition: background 0.15s;
}
.api-save-btn:active { background: rgba(52,199,89,0.25); }
.api-mode-row { padding: 0 16px 14px; display: flex; align-items: center; justify-content: space-between; }
.api-mode-select {
  background: #1a1a1a; border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: #fff; font-size: 15px; font-weight: 600;
  padding: 8px 14px; outline: none; cursor: pointer;
}
.api-delay-input {
  width: 88px; height: 40px; background: #1a1a1a;
  border: 1.5px solid rgba(255,255,255,0.1); border-radius: 10px;
  color: #fff; font-size: 14px; font-weight: 600; text-align: center;
  outline: none;
}
.api-delay-input:focus { border-color: #34c759; }
.api-help {
  padding: 0 16px 14px;
  color: #7a7a7a;
  font-size: 12px;
  line-height: 1.45;
}
#api-send-detail .card-divider { display: none; }

/* ── Card Stack select ─────────────────────────────────── */
.stack-select {
  background: #0d0d0d; border: 1.5px solid rgba(255,255,255,0.12);
  color: #fff; font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px; outline: none;
  font-family: 'Google Sans', sans-serif; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2334c759'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px; min-width: 160px;
}
.stack-select option { background: #1a1a1a; color: #fff; }

/* ── Card Picker Screen ─────────────────────────────────── */
#screen-cardpicker {
  background: #0a0a0a;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}
#screen-cardpicker.active {
  display: flex;
}

.cp-container {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 420px; padding: 0 14px;
  box-sizing: border-box; gap: 0;
}

/* Display — separated with big gap from values */
.cp-display {
  width: 100%; min-height: 72px;
  background: rgba(255,255,255,0.04); border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px;
}

.cp-display-label {
  font-size: 24px; font-weight: 700; color: #4e4e4e;
  font-family: 'Google Sans', sans-serif; letter-spacing: 0.04em;
  transition: color 0.2s, font-size 0.15s;
}
.cp-display-label.has-card { color: #fff; font-size: 28px; }
.cp-display-label.has-full { color: #34c759; font-size: 32px; }

.cp-row { display: flex; gap: 8px; width: 100%; }

/* Value rows group */
.cp-values-group {
  width: 100%; display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 28px;
}

/* Suits row */
.cp-suits-group {
  width: 100%;
  margin-bottom: 20px;
}

/* Cancel row */
.cp-cancel-group {
  width: 100%;
}

.cp-val-btn {
  flex: 1; height: 70px; background: transparent; border: 1.5px solid #333;
  border-radius: 14px; color: #ddd; font-size: 22px; font-weight: 700;
  font-family: 'Google Sans', sans-serif; cursor: pointer;
  transition: border-color 0.12s, color 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.cp-val-btn.selected {
  border-color: #34c759; color: #34c759;
  background: rgba(52,199,89,0.08);
}
.cp-val-btn:active { transform: scale(0.93); border-color: #555; }

.cp-suit-btn {
  flex: 1; height: 70px; background: transparent;
  border: 1.5px solid #333;
  border-radius: 14px; font-size: 36px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}
.cp-suit-btn.selected { background: rgba(255,255,255,0.06); border-color: currentColor; }
.cp-suit-btn:active { transform: scale(0.93); }

.cp-cancel-btn {
  width: 100%; height: 50px; background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 14px; color: #7b7b7b; font-size: 14px; font-weight: 700;
  font-family: 'Google Sans', sans-serif; letter-spacing: 0.1em;
  cursor: pointer; transition: border-color 0.12s, color 0.12s, background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.cp-cancel-btn:active { border-color: #4a4a4a; color: #9a9a9a; background: rgba(255,255,255,0.08); }

/* Stack top-card hint */
.stack-hint {
  display: flex; justify-content: flex-end;
  font-size: 14px; color: #555; padding: 0 16px 12px;
  font-family: 'Google Sans', sans-serif; letter-spacing: 0.03em; text-align: right;
}

/* ── Alarm Screens ──────────────────────────────────────── */

/* iOS Alarm */
#screen-alarm-ios {
  background: #000; flex-direction: column;
  padding-top: calc(env(safe-area-inset-top) + 0px);
  padding-bottom: calc(env(safe-area-inset-bottom) + 0px);
}
#screen-alarm-ios.active { display: flex; }
.alarm-ios-container { display: flex; flex-direction: column; height: 100%; }
.alarm-ios-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 18px) 20px 14px;
  border-bottom: 0.5px solid rgba(255,255,255,0.10);
}
.alarm-ios-title { font-size: 17px; font-weight: 600; color: #fff; font-family: -apple-system, sans-serif; }
.alarm-ios-add {
  background: none; border: none; color: #F7A01F;
  font-size: 28px; font-weight: 300; cursor: pointer; line-height: 1;
  padding: 0 4px; font-family: -apple-system, sans-serif;
}
.alarm-ios-scroll { flex: 1; overflow-y: auto; padding: 24px 16px 16px; }
.alarm-ios-section-title {
  font-size: 12px; font-weight: 600; color: #888; letter-spacing: 0.08em;
  margin-bottom: 10px; font-family: -apple-system, sans-serif;
}
.alarm-ios-card {
  background: #1c1c1e; border-radius: 14px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; min-height: 12vh;
}
.alarm-ios-card-left { display: flex; flex-direction: column; gap: 4px; }
.alarm-ios-time { font-size: 42px; font-weight: 200; color: #fff; font-family: -apple-system, sans-serif; line-height: 1; }
.alarm-ios-ampm { font-size: 22px; font-weight: 300; }
.alarm-ios-label { font-size: 13px; color: #888; font-family: -apple-system, sans-serif; }
.alarm-ios-toggle { flex-shrink: 0; }
.alarm-ios-back {
  background: none; border: none; color: #F7A01F;
  font-size: 17px; font-weight: 400; cursor: pointer;
  padding: calc(env(safe-area-inset-bottom) + 16px) 20px 20px;
  text-align: left; font-family: -apple-system, sans-serif;
  flex-shrink: 0;
}

/* Android Alarm */
#screen-alarm-android {
  background: #000; flex-direction: column;
}
#screen-alarm-android.active { display: flex; }
.alarm-android-container { display: flex; flex-direction: column; height: 100%; }
.alarm-android-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 20px) 20px 16px;
}
.alarm-android-title { font-size: 22px; font-weight: 500; color: #fff; font-family: 'Google Sans', sans-serif; }
.alarm-android-add {
  background: none; border: none; color: #fff;
  font-size: 28px; font-weight: 300; cursor: pointer; line-height: 1;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
}
.alarm-android-scroll { flex: 1; overflow-y: auto; padding: 8px 16px; }
.alarm-android-card {
  background: #1a1a1a; border-radius: 16px; border: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; min-height: 12vh; width: 100%;
}
.alarm-android-card-left { display: flex; flex-direction: column; gap: 4px; }
.alarm-android-time { font-size: 44px; font-weight: 200; color: #fff; font-family: 'Google Sans', sans-serif; line-height: 1.1; }
.alarm-android-sublabel { font-size: 13px; color: #888; font-family: 'Google Sans', sans-serif; }
.alarm-android-back {
  background: none; border: none; color: rgba(255,255,255,0.6);
  font-size: 32px; cursor: pointer;
  padding: 16px 20px calc(env(safe-area-inset-bottom) + 16px);
  flex-shrink: 0; line-height: 1;
}
