:root {
  --pink-50: #fff5fb;
  --pink-100: #ffe2f2;
  --pink-300: #ff9ccc;
  --pink-500: #ff5aa8;
  --pink-700: #d92980;
  --cream: #fffaf2;
  --text: #573148;
  --muted: #93677f;
  --shadow: 0 18px 55px rgba(255, 90, 168, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.9), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(255, 226, 242, 0.9), transparent 30%),
    linear-gradient(135deg, #fff7fc 0%, #ffe2f2 48%, #fffaf2 100%);
}

.princess-page::before,
.princess-page::after {
  content: "♡";
  position: fixed;
  z-index: -1;
  color: rgba(255, 90, 168, 0.22);
  font-size: clamp(5rem, 12vw, 12rem);
}

.princess-page::before { top: 8%; left: 5%; }
.princess-page::after { right: 6%; bottom: 8%; }

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card,
.panel,
.project-card {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.login-card {
  width: min(100%, 430px);
  padding: clamp(28px, 6vw, 48px);
  text-align: center;
}

.eyebrow,
.project-key {
  margin: 0 0 8px;
  color: var(--pink-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; }

.login-copy,
.muted { color: var(--muted); }

.stack-form,
.project-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

label span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--pink-700);
}

input {
  width: 100%;
  border: 1px solid #ffc4df;
  border-radius: 18px;
  padding: 13px 15px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 4px rgba(255, 90, 168, 0.16);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--pink-500), #ff85c5);
  box-shadow: 0 10px 24px rgba(255, 90, 168, 0.28);
}

.secondary-button,
.ghost-button {
  color: var(--pink-700);
  background: #fff;
  border: 1px solid #ffc4df;
}

.danger-button {
  color: #b3165b;
  background: #ffe3ee;
}

.alert {
  margin: 18px 0;
  border-radius: 18px;
  padding: 12px;
  color: #b3165b;
  background: #ffe3ee;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 5vw, 56px) 8px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 24px;
  padding: 24px clamp(18px, 5vw, 56px) 56px;
}

.panel,
.project-card {
  padding: 24px;
}

.add-panel { align-self: start; }

.project-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
}

.card-head,
.card-actions {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--pink-700);
  background: var(--pink-100);
  font-weight: 900;
}

.project-meta {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.project-meta div,
.deploy-placeholder {
  border-radius: 20px;
  padding: 14px;
  background: var(--pink-50);
}

.project-meta dt,
.deploy-placeholder span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.deploy-placeholder {
  display: grid;
  gap: 12px;
}

.deploy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.deploy-actions button:disabled {
  color: #fff;
  background: #ffb3d5;
  cursor: not-allowed;
  opacity: 0.75;
}

.recent-versions ul {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.recent-versions li {
  display: grid;
  gap: 4px;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.recent-versions span,
.recent-versions small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.recent-version-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.version-title-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.recent-version-deploy-form {
  flex: 0 0 auto;
}

.recent-version-deploy-form button {
  min-height: 36px;
  padding: 8px 12px;
}

.card-actions { margin-top: 18px; }
.edit-form { margin-top: 16px; }

@media (max-width: 880px) {
  .topbar,
  .dashboard-layout { padding-left: 16px; padding-right: 16px; }
  .dashboard-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .deploy-actions { grid-template-columns: 1fr; }
  .card-actions { align-items: stretch; flex-direction: column; }
}

textarea {
  width: 100%;
  border: 1px solid #ffc4df;
  border-radius: 18px;
  padding: 13px 15px;
  color: var(--text);
  background: #fff;
  font: inherit;
  outline: none;
  resize: vertical;
}

textarea:focus {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 4px rgba(255, 90, 168, 0.16);
}

.page-alert,
.deploy-banner {
  margin: 16px clamp(18px, 5vw, 56px) 0;
  border-radius: 22px;
  padding: 14px 18px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.page-alert {
  color: #b3165b;
  background: #ffe3ee;
}

.deploy-banner {
  color: var(--pink-700);
  background: #fff;
  border: 1px solid #ffc4df;
}

.deploy-actions form,
.version-actions form,
.card-actions form {
  margin: 0;
}

.deploy-actions button,
.version-actions button {
  width: 100%;
}

.version-panel {
  margin-top: 18px;
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 245, 251, 0.88);
}

.section-head,
.version-line,
.version-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head {
  justify-content: space-between;
}

.mini-badge,
.stable-badge {
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink-500), #ff85c5);
  font-size: 0.76rem;
  font-weight: 900;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
}

.check-row span {
  margin: 0;
}

.compact-form {
  gap: 10px;
}

.version-actions {
  flex-wrap: wrap;
  margin-top: 8px;
}

.version-actions form,
.version-actions > button {
  flex: 1 1 130px;
}

.version-edit-form {
  margin-top: 12px;
  border-radius: 16px;
  padding: 12px;
  background: var(--pink-50);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.recent-histories ul {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.recent-histories li {
  display: grid;
  gap: 6px;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.report-layout {
  padding: 24px clamp(18px, 5vw, 56px) 56px;
}

.report-card {
  max-width: 1100px;
}

.report-content {
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 18px;
  padding: 16px;
  color: var(--text);
  background: #fff;
}

/* STEP 7 final princess UI polish */
:root {
  --rose-glow: rgba(255, 111, 181, 0.34);
  --gold: #f4b94f;
  --glass: rgba(255, 255, 255, 0.78);
}

html,
body {
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.95), transparent 22%),
    radial-gradient(circle at 85% 12%, rgba(255, 214, 235, 0.95), transparent 26%),
    radial-gradient(circle at 50% 92%, rgba(255, 246, 214, 0.9), transparent 30%),
    linear-gradient(135deg, #fff8fd 0%, #ffe3f2 42%, #fff4cf 100%);
}


.princess-page::before,
.princess-page::after {
  z-index: -2;
  text-shadow: 0 18px 38px rgba(255, 90, 168, 0.18);
}

.topbar {
  position: relative;
  margin: 20px clamp(14px, 4vw, 42px) 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 34px;
  padding: clamp(22px, 4vw, 36px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 229, 242, 0.72));
  box-shadow: 0 24px 70px rgba(255, 90, 168, 0.2);
  backdrop-filter: blur(16px);
}

.topbar h1,
.login-card h1 {
  margin-bottom: 8px;
  letter-spacing: -0.045em;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.02;
  background: linear-gradient(135deg, #c51672, #ff5aa8 48%, #f4b94f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar::after {
  content: "✦ Princess Deploy Room ✦";
  position: absolute;
  right: clamp(18px, 4vw, 36px);
  bottom: -14px;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: linear-gradient(135deg, #ff6fb5, #ffc0df);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(255, 90, 168, 0.25);
}

.dashboard-layout {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
}

.login-card,
.panel,
.project-card,
.report-card {
  border: 1px solid rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 252, 0.82)),
    var(--glass);
  box-shadow:
    0 24px 70px rgba(255, 90, 168, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  padding: clamp(20px, 3vw, 30px);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, #ff6fb5, #ffd1e6, #f4b94f);
}

.card-head h2 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.035em;
}

.badge,
.mini-badge,
.stable-badge {
  box-shadow: 0 10px 22px rgba(255, 90, 168, 0.18);
}

.project-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-meta div {
  border: 1px solid rgba(255, 196, 223, 0.72);
  background: rgba(255, 255, 255, 0.72);
}

.deploy-placeholder {
  position: relative;
  margin: 22px 0;
  border: 1px solid rgba(255, 190, 222, 0.95);
  border-radius: 30px;
  padding: clamp(18px, 3vw, 26px);
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 255, 255, 0.96), transparent 32%),
    linear-gradient(135deg, #fff4fb, #ffe0f0 58%, #fff3c7);
  box-shadow: 0 22px 50px rgba(255, 90, 168, 0.18);
}

.deploy-placeholder::before {
  content: "현재 운영중인 버전은.. ✨";
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: linear-gradient(135deg, #ff5aa8, #f4b94f);
  font-size: 0.8rem;
  font-weight: 900;
}

.deploy-placeholder > div:not(.deploy-actions) {
  border-radius: 20px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.deploy-placeholder strong {
  display: block;
  margin-top: 4px;
  color: #b81568;
  font-size: clamp(1rem, 2.1vw, 1.3rem);
  overflow-wrap: anywhere;
}

.deploy-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.deploy-actions form:nth-child(-n + 2) button {
  min-height: 74px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  font-size: clamp(1.02rem, 2.1vw, 1.28rem);
  letter-spacing: -0.02em;
  box-shadow: 0 18px 34px rgba(255, 90, 168, 0.28);
}

.deploy-actions form:first-child button {
  color: #fff;
  background: linear-gradient(135deg, #ff3f99, #ff88c8 55%, #ffc2df);
}

.deploy-actions form:nth-child(2) button {
  color: #9b3b00;
  background: linear-gradient(135deg, #fff5c2, #ffc75f 58%, #ff9ecf);
}

.deploy-actions > button {
  grid-column: 1 / -1;
  min-height: 44px;
  color: #fff;
  background: #ffb3d5;
}

.version-panel,
.recent-versions,
.recent-histories {
  border: 1px solid rgba(255, 196, 223, 0.72);
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.recent-versions li,
.recent-histories li {
  border: 1px solid rgba(255, 226, 242, 0.95);
  box-shadow: 0 10px 24px rgba(255, 90, 168, 0.08);
}

.recent-versions li strong,
.recent-histories li strong {
  color: #c51672;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.link-button {
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.link-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.seasonal-particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 999;
  opacity: 1;
  display: block;
}

.seasonal-particle {
  position: fixed;
  top: -40px;
  left: var(--x);
  color: inherit;
  font-size: var(--size);
  line-height: 1;
  opacity: 1;
  display: inline-block;
  visibility: visible;
  animation: seasonal-fall var(--duration) linear infinite;
  animation-delay: var(--delay);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 8px rgba(255, 105, 180, 0.26));
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.65), 0 0 12px rgba(255, 90, 168, 0.22);
  will-change: transform, opacity;
}

body[data-season="spring"] .seasonal-particle {
  color: rgba(255, 90, 168, 0.4);
}

body[data-season="summer"] .seasonal-particle {
  color: rgba(255, 190, 80, 0.42);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.72)) drop-shadow(0 0 8px rgba(82, 190, 255, 0.24));
}

body[data-season="autumn"] .seasonal-particle {
  color: rgba(197, 103, 35, 0.38);
}

body[data-season="winter"] .seasonal-particle {
  color: rgba(151, 204, 255, 0.44);
}

@keyframes seasonal-fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(-14deg); opacity: 0; }
  12% { transform: translate3d(var(--curve-a), 8vh, 0) rotate(26deg); opacity: 0.56; }
  38% { transform: translate3d(var(--curve-b), 38vh, 0) rotate(-38deg); opacity: 0.47; }
  68% { transform: translate3d(var(--curve-c), 72vh, 0) rotate(32deg); opacity: 0.41; }
  100% { transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin)); opacity: 0; }
}

body > :not(.seasonal-particles):not(.deploy-progress-overlay) {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .seasonal-particle {
    animation-name: seasonal-fall !important;
    animation-duration: 28s !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
    animation-delay: var(--delay) !important;
    opacity: 0.5;
  }
}

@media (max-width: 880px) {
  .topbar { margin-inline: 14px; }
  .project-meta { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .dashboard-layout {
    gap: 18px;
    padding: 18px 12px 40px;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar::after { display: none; }

  .deploy-actions {
    grid-template-columns: 1fr;
  }

  .deploy-actions form:nth-child(-n + 2) button {
    min-height: 64px;
  }

  .card-head,
  .section-head,
  .version-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-shell { padding: 14px; }
  .login-card { border-radius: 28px; }
}

@media (max-width: 620px) {
  .recent-versions .recent-version-title {
    align-items: center;
    flex-direction: row;
  }
}

/* Operator-first dashboard adjustments */
.operator-dashboard {
  grid-template-columns: 1fr;
}

.operator-dashboard .project-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.developer-tools {
  margin-top: 18px;
}

.developer-tools > summary {
  width: fit-content;
  border: 1px solid rgba(255, 196, 223, 0.86);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--pink-700);
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(255, 90, 168, 0.1);
  list-style: none;
}

.developer-tools > summary::-webkit-details-marker {
  display: none;
}

.developer-tools > summary::after {
  content: " ＋";
}

.developer-tools[open] > summary::after {
  content: " －";
}

.developer-tools[open] > summary {
  margin-bottom: 14px;
}

.global-developer-tools {
  justify-self: start;
  width: min(100%, 520px);
  opacity: 0.9;
}

.global-developer-tools:not([open]) {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 28px rgba(255, 90, 168, 0.1);
}

.global-developer-tools:not([open]) > summary {
  margin: 0;
}

.developer-version-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.developer-version-list > li {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 226, 242, 0.95);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.project-card > .project-meta,
.project-card > .version-panel,
.project-card > .card-actions,
.project-card > .edit-form {
  display: none;
}

.recent-versions .version-actions,
.recent-versions .version-edit-form {
  display: none;
}

.operator-dashboard .deploy-placeholder {
  margin-top: 18px;
}

.operator-dashboard .recent-versions,
.operator-dashboard .recent-histories {
  margin-top: 16px;
}

@media (max-width: 620px) {
  .operator-dashboard .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .developer-tools > summary {
    width: 100%;
    text-align: center;
  }
}

/* Folded project cards: keep the first screen scannable */
.project-fold {
  display: block;
}

.project-fold > summary {
  list-style: none;
}

.project-fold > summary::-webkit-details-marker {
  display: none;
}

.project-summary {
  display: grid;
  gap: 14px;
  cursor: pointer;
}

.project-summary-top {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 14px;
}

.project-summary-title h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  letter-spacing: -0.035em;
}

.summary-deploy-actions {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(76px, 0.42fr) minmax(112px, 0.62fr);
  gap: 10px;
  align-items: stretch;
}

.summary-deploy-actions form {
  min-width: 0;
}

.summary-deploy-actions button,
.summary-deploy-actions .site-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(255, 90, 168, 0.22);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.summary-deploy-actions form:first-child button {
  color: #9b3b00;
  background: linear-gradient(135deg, #fff5c2, #ffc75f 58%, #ff9ecf);
  font-size: clamp(1rem, 1.9vw, 1.2rem);
}

.summary-deploy-actions form:nth-child(2) button {
  padding-inline: 14px;
  color: #fff;
  background: linear-gradient(135deg, #ff3f99, #ff88c8 55%, #ffc2df);
  font-size: 0.94rem;
}

.summary-deploy-actions .site-open-button {
  padding-inline: 16px;
  color: var(--pink-700);
  background: linear-gradient(135deg, #fff, #ffe8f4);
  font-size: 0.92rem;
}

.summary-deploy-actions .site-open-button.is-disabled {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.68;
}

.project-summary-status {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 196, 223, 0.72);
  border-radius: 20px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.project-summary-status span,
.project-summary-status small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-summary-status strong {
  color: #b81568;
  overflow-wrap: anywhere;
}

.fold-hint {
  display: grid;
  width: 100%;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--pink-700);
  background: rgba(255, 226, 242, 0.78);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  transition: color 0.18s ease, background 0.18s ease;
}

.fold-hint::before {
  content: "▾";
}

.project-fold[open] .fold-hint {
  color: #fff;
  background: linear-gradient(135deg, #ff5aa8, #ff9ccc);
}

.project-fold[open] .fold-hint::before {
  content: "▴";
}

.project-fold:not([open]) {
  padding-bottom: 20px;
}

.project-fold:not([open]) .project-summary:hover .fold-hint {
  color: #fff;
  background: linear-gradient(135deg, #ff5aa8, #f4b94f);
}

.project-fold[open] > .deploy-placeholder {
  margin-top: 22px;
}

@media (max-width: 760px) {
  .project-summary-top {
    grid-template-columns: 1fr;
  }

  .summary-deploy-actions {
    grid-template-columns: minmax(0, 9fr) minmax(44px, 1fr);
  }

  .summary-deploy-actions .site-open-button {
    grid-column: 1 / -1;
    min-height: 44px;
    padding-block: 8px;
    font-size: 0.84rem;
  }

}

/* Deployment request/response feedback */
.deploy-feedback,
.card-deploy-status,
.report-operation-result {
  border: 1px solid rgba(255, 196, 223, 0.9);
  border-radius: 22px;
  padding: 14px 18px;
  color: var(--pink-700);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(255, 90, 168, 0.14);
  font-weight: 900;
}

.deploy-feedback {
  margin: 16px clamp(18px, 5vw, 56px) 0;
}

.card-deploy-status {
  margin-bottom: 6px;
}

.deploy-feedback[data-status="running"],
.card-deploy-status[data-status="running"],
.report-operation-result[data-status="running"] {
  color: #a45c00;
  background: #fff4d3;
}

.deploy-feedback[data-status="success"],
.card-deploy-status[data-status="success"],
.report-operation-result[data-status="success"] {
  color: #147a52;
  background: #dcfff0;
}

.deploy-feedback[data-status="failed"],
.card-deploy-status[data-status="failed"],
.report-operation-result[data-status="failed"] {
  color: #b3165b;
  background: #ffe3ee;
}

.deploy-feedback .link-button {
  margin-left: 10px;
  padding: 7px 12px;
}

/* Report failure guide/operation card */
.report-operation-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 168, 210, 0.95);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 247, 252, 0.95);
  box-shadow: 0 18px 40px rgba(255, 90, 168, 0.14);
}

.report-operation-card h2 {
  margin: 4px 0 8px;
  color: #b81568;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
}

.report-operation-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.65;
}

.report-operation-card > button {
  justify-self: start;
}

.report-operation-result {
  margin-top: 4px;
}

.operation-log {
  margin: 12px 0 0;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
}

/* Deployment progress overlay and operation lock */
.deploy-progress-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.deploy-progress-overlay[hidden] {
  display: none;
}

.deploy-progress-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000000;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: min(620px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 168, 210, 0.95);
  border-radius: 28px;
  padding: 20px 22px;
  color: #b81568;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32), 0 20px 60px rgba(255, 90, 168, 0.2);
  pointer-events: auto;
}

.deploy-progress-modal strong {
  display: block;
  margin: 4px 0 6px;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: 1.45;
}

.deploy-progress-modal small {
  color: var(--muted);
  font-weight: 800;
}

.deploy-progress-content {
  min-width: 0;
  width: 100%;
}

.deploy-progress-status-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.deploy-progress-status-group {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 196, 223, 0.7);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 245, 251, 0.82);
}

.deploy-progress-status-group > span {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.deploy-progress-status-group[data-state="success"] > span {
  color: #147a52;
  background: #dcfff0;
}

.deploy-progress-status-group[data-state="running"] > span {
  color: #a45c00;
  background: #fff4d3;
}

.deploy-progress-status-group[data-state="pending"] > span {
  color: #6f5b67;
  background: #f1edf0;
}

.deploy-progress-status-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deploy-progress-status-group li {
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 900;
}

.deploy-progress-spinner {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 4px solid rgba(0, 0, 0, 0.15);
  border-top-color: currentColor;
  border-radius: 9999px;
  animation: deploySpin 0.8s linear infinite !important;
  animation-play-state: running !important;
  will-change: transform;
}

@keyframes deploySpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .deploy-progress-spinner {
    animation: deploySpin 0.8s linear infinite !important;
    animation-play-state: running !important;
  }
}

body[data-operation-locked="true"] main a,
body[data-operation-locked="true"] main button,
body[data-operation-locked="true"] main input,
body[data-operation-locked="true"] main textarea,
body[data-operation-locked="true"] main select,
body[data-operation-locked="true"] main summary,
body.is-deploying main a,
body.is-deploying main button,
body.is-deploying main input,
body.is-deploying main textarea,
body.is-deploying main select,
body.is-deploying main summary {
  pointer-events: none;
  cursor: not-allowed;
}

.home-button {
  width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.35rem;
  box-shadow: 0 12px 26px rgba(255, 90, 168, 0.16);
}

.system-restore-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
  border: 1px solid rgba(255, 124, 124, 0.32);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 241, 246, 0.82));
  box-shadow: 0 18px 36px rgba(174, 31, 78, 0.08);
}

.system-restore-panel h2 {
  margin: 2px 0 8px;
  color: #a3203f;
}

.system-log-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.system-log {
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(40, 40, 48, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: rgba(26, 28, 36, 0.94);
  color: #f4f7fb;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.system-install-status {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(142, 127, 255, 0.28);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.system-install-status[data-status="installed"] {
  border-color: rgba(49, 170, 104, 0.34);
  background: rgba(239, 255, 247, 0.82);
}

.system-install-status[data-status="missing"] {
  border-color: rgba(255, 124, 124, 0.46);
  background: rgba(255, 246, 246, 0.86);
}

.system-check-list,
.missing-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.system-check-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
}

.system-check-list small,
.missing-list li {
  display: block;
  color: var(--muted);
  word-break: break-all;
}

.missing-list {
  display: grid;
  gap: 6px;
}

.missing-list > span {
  color: #a3203f;
  font-weight: 900;
}
