/* ============================================================================
 * Hue & Seek — Cloud Save card (recovery code + restore)
 * ========================================================================== */
.gt-cloud { position: relative; background: #dcefff; }
.gt-cloud:hover { background: #c5e4fb; transform: none; }
.gt-cloud[data-state="error"]::after,
.gt-cloud[data-state="offline"]::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8a33d;
  box-shadow: 0 0 0 2px #fff8ea;
}

.cloud-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: rgba(30, 40, 28, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cloud-modal.hidden { display: none; }
.cloud-card {
  position: relative;
  width: min(440px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 18px 20px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fffdf6, #fbf2de);
  box-shadow: 0 6px 0 rgba(50, 62, 42, .25), 0 18px 40px rgba(20, 30, 18, .3);
  color: #3c4632;
  text-align: left;
}
.cloud-card h3 { margin: 0 0 6px; font: 700 22px/1.1 var(--fd, 'Fredoka', sans-serif); }
.cloud-x {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ede5d2;
  font: 900 14px/1 var(--fb, 'Nunito', sans-serif);
  color: #56664b;
  cursor: pointer;
}
.cloud-status { margin: 0 0 12px; font: 800 13px/1.35 var(--fb, 'Nunito', sans-serif); color: #5d6a52; }
.cloud-block { margin-top: 10px; padding: 11px 12px; border-radius: 16px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 2px rgba(223, 214, 193, .8); }
.cloud-block small { display: block; margin-bottom: 6px; font: 900 10.5px/1.2 var(--fb, 'Nunito', sans-serif); letter-spacing: .08em; text-transform: uppercase; color: #6b7a5f; }
.cloud-code-row { display: flex; align-items: center; gap: 8px; }
.cloud-code-row code,
.cloud-code-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px solid #dfd6c1;
  background: #fffdf7;
  font: 700 15px/1.2 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: .04em;
  color: #2f3a28;
  user-select: text;
  -webkit-user-select: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cloud-code-row input { outline: none; text-transform: uppercase; }
.cloud-code-row input::placeholder { color: #b9b19d; letter-spacing: .02em; }
.cloud-code-row input:focus { border-color: #f5a623; box-shadow: 0 0 0 3px rgba(245, 166, 35, .22); }
.cloud-btn {
  flex: 0 0 auto;
  min-width: 78px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffe69f, #ffc04d);
  box-shadow: 0 3px 0 rgba(135, 88, 12, .28);
  font: 700 14px/1 var(--fd, 'Fredoka', sans-serif);
  color: #4d3005;
  cursor: pointer;
  white-space: nowrap;
}
.cloud-btn:active { transform: translateY(2px); }
.cloud-btn.warn { background: linear-gradient(180deg, #d9f0ff, #a9d8f5); box-shadow: 0 3px 0 rgba(40, 90, 130, .28); color: #17425e; }
.cloud-btn.danger { background: linear-gradient(180deg, #ffd8d4, #f59f96); box-shadow: 0 3px 0 rgba(140, 42, 34, .28); color: #6e1c16; font-size: 13px; }
.cloud-privacy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cloud-privacy-link { font: 800 13px/1 var(--fb, 'Nunito', sans-serif); color: #3a7542; text-decoration: underline; }
.cloud-note { margin: 7px 0 0; min-height: 1em; font: 800 12px/1.35 var(--fb, 'Nunito', sans-serif); color: #6b7a5f; }

/* phones (landscape): the profile sheet gets one extra row that opens the card */
html.is-mobile-touch #mobCloudSaveBtn {
  touch-action: manipulation;
  width: 100%;
  height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  background: linear-gradient(180deg, #e6f5ff, #c3e4f8);
  color: #17425e;
  font-family: var(--fd, 'Fredoka', system-ui, sans-serif);
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 0 3px 0 rgba(40, 90, 130, .25);
  text-align: left;
}
html.is-mobile-touch #mobCloudSaveBtn:active { transform: translate3d(0, 2px, 0); }
@media (max-height: 430px) {
  .cloud-card { padding: 12px 14px 10px; border-radius: 18px; width: min(560px, 100%); }
  .cloud-card h3 { font-size: 18px; margin-bottom: 2px; }
  .cloud-status { margin-bottom: 4px; font-size: 12px; }
  .cloud-block { margin-top: 6px; padding: 7px 10px; }
  .cloud-note { margin-top: 4px; font-size: 11px; line-height: 1.25; }
  .cloud-code-row code, .cloud-code-row input { padding: 6px 9px; font-size: 14px; }
  .cloud-btn { height: 34px; }
}
