.cloud-sync-modal {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(104, 118, 97, 0.16);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(51, 62, 49, 0.18);
}

.cloud-sync-head {
  position: relative;
  padding: 28px 30px 24px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 255, 255, 0.7) 0 52px, transparent 53px),
    linear-gradient(135deg, #edf3e8, #f6efe4);
}

.cloud-sync-kicker {
  margin-bottom: 7px;
  color: #76826f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.cloud-sync-head h3 {
  margin: 0;
  color: #354233;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 25px;
  letter-spacing: 0.02em;
}

.cloud-sync-head p {
  max-width: 410px;
  margin: 9px 0 0;
  color: #748070;
  font-size: 13px;
  line-height: 1.7;
}

.cloud-sync-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(80, 96, 75, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #64705f;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.cloud-sync-body {
  padding: 26px 30px 30px;
  background: #fffdf9;
}

.cloud-panel[hidden] {
  display: none;
}

.cloud-sync-field {
  margin-bottom: 15px;
}

.cloud-sync-field label {
  display: block;
  margin-bottom: 7px;
  color: #596355;
  font-size: 13px;
  font-weight: 650;
}

.cloud-sync-field input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  border: 1px solid #dfe4da;
  border-radius: 13px;
  background: #fff;
  color: #394237;
  font-size: 15px;
  outline: none;
  padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cloud-sync-field input:focus {
  border-color: #8fa486;
  box-shadow: 0 0 0 4px rgba(143, 164, 134, 0.13);
}

.cloud-login-note,
.cloud-media-note {
  margin: 13px 0 0;
  color: #879083;
  font-size: 12px;
  line-height: 1.65;
}

.cloud-account-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border: 1px solid #e2e7dd;
  border-radius: 16px;
  background: #f8faf6;
}

.cloud-account-mark {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #dce9d5;
  color: #52654c;
  font-size: 18px;
}

.cloud-account-copy {
  min-width: 0;
}

.cloud-account-copy small {
  display: block;
  color: #879182;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.cloud-account-copy strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #3d473a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 18px;
}

.cloud-time-card {
  padding: 13px 14px;
  border-radius: 14px;
  background: #f4f1ea;
}

.cloud-time-card span {
  display: block;
  margin-bottom: 4px;
  color: #8a8a80;
  font-size: 11px;
}

.cloud-time-card strong {
  color: #50594d;
  font-size: 13px;
  font-weight: 650;
}

.cloud-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cloud-btn {
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.18s, opacity 0.18s, box-shadow 0.18s;
}

.cloud-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.cloud-btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

.cloud-btn-primary {
  width: 100%;
  background: #697f61;
  color: #fff;
  box-shadow: 0 8px 20px rgba(105, 127, 97, 0.18);
}

.cloud-btn-upload {
  background: #697f61;
  color: #fff;
}

.cloud-btn-restore {
  border: 1px solid #d5dacd;
  background: #fff;
  color: #596452;
}

.cloud-btn-quiet {
  display: block;
  margin: 15px auto 0;
  border: 0;
  background: transparent;
  color: #90978c;
  cursor: pointer;
  font-size: 12px;
}

.cloud-message {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #f2f3f0;
  color: #697065;
  font-size: 13px;
  line-height: 1.55;
}

.cloud-message[hidden] {
  display: none;
}

.cloud-message.is-success {
  background: #edf6e9;
  color: #54724b;
}

.cloud-message.is-error {
  background: #fff0ed;
  color: #a45246;
}

.cloud-message.is-working {
  background: #f3f0e8;
  color: #796f5e;
}

#syncStatus.is-connected {
  color: #5f7c56;
}

@media (max-width: 560px) {
  .cloud-sync-modal {
    width: calc(100vw - 20px);
    border-radius: 20px;
  }

  .cloud-sync-head,
  .cloud-sync-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cloud-time-grid,
  .cloud-action-grid {
    grid-template-columns: 1fr;
  }
}
