:root {
  --ink: #080914;
  --wine: #1c1326;
  --wine-2: #2a1d33;
  --rose: #e9b9bd;
  --rose-dim: #a47986;
  --rose-faint: rgba(229, 168, 180, .16);
  --line: rgba(228, 171, 184, .20);
  --line-strong: rgba(236, 187, 200, .32);
  --gold: #d2b365;
  --gold-soft: rgba(222, 184, 92, .34);
  --cream: #f4dce0;
  --shadow: rgba(0,0,0,.52);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  color: var(--cream);
  font-family: "Cormorant Garamond", Georgia, serif;
  background:
    radial-gradient(circle at 52% 47%, rgba(77, 41, 71, .40) 0, rgba(30, 19, 43, .28) 18%, rgba(10, 10, 23, .0) 42%),
    radial-gradient(circle at 28% 18%, rgba(52, 29, 53, .26), transparent 38%),
    linear-gradient(135deg, #070815 0%, #11101f 42%, #090916 100%);
}

.ambience, .veil, #petalField { position: fixed; inset: 0; pointer-events: none; }
.ambience {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 36%, rgba(0,0,0,.30) 75%, rgba(0,0,0,.60) 100%),
    radial-gradient(circle at 48% 44%, rgba(255, 181, 200, .06), transparent 28%);
  filter: blur(.2px);
}
.veil {
  opacity: .38;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.01) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: screen;
}

.dot {
  position: absolute;
  width: var(--s);
  height: var(--s);
  left: var(--x);
  top: var(--y);
  border-radius: 999px;
  background: rgba(213, 143, 166, var(--o));
  box-shadow: 0 0 8px rgba(226, 164, 184, calc(var(--o) * .75));
  animation: drift var(--d) ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(var(--dx), var(--dy), 0) scale(1.18); }
}

.screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 2;
}
.hidden { display: none !important; }

.login-wrap {
  width: min(470px, calc(100vw - 40px));
  transform: translateY(-4px);
}

.brand { text-align: center; user-select: none; }
.brand h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 62px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: .018em;
  color: #f0c1c4;
  text-shadow:
    0 0 2px #fff0ed,
    0 0 12px rgba(239, 168, 174, .54),
    0 0 26px rgba(228, 135, 142, .24),
    0 7px 20px rgba(0,0,0,.60);
}
.brand p {
  margin: 7px 0 0;
  font-family: "IM Fell English SC", "Cormorant Garamond", serif;
  letter-spacing: .49em;
  color: rgba(222, 151, 166, .73);
  font-size: 14px;
  text-shadow: 0 0 10px rgba(236, 163, 176, .22);
}
.brand-login { margin-bottom: 38px; }
.sakura {
  display: inline-block;
  font-size: .82em;
  margin-left: 7px;
  filter: drop-shadow(0 0 8px rgba(255, 186, 204, .72)) drop-shadow(0 0 17px rgba(240, 205, 142, .22));
  transform: translateY(3px);
}

.glass-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(50, 36, 61, .72), rgba(38, 27, 48, .70)),
    radial-gradient(circle at 80% 72%, rgba(225, 161, 180, .06), transparent 24%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.055),
    inset 0 0 22px rgba(255,255,255,.018),
    0 18px 48px rgba(0,0,0,.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card-dots::before,
.card-dots::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(circle, rgba(229, 158, 178, .62) 0 2.2px, transparent 2.6px),
    radial-gradient(circle, rgba(229, 158, 178, .44) 0 1.9px, transparent 2.4px),
    radial-gradient(circle, rgba(229, 158, 178, .56) 0 2.7px, transparent 3.2px),
    radial-gradient(circle, rgba(229, 158, 178, .38) 0 1.7px, transparent 2.2px),
    radial-gradient(circle, rgba(229, 158, 178, .50) 0 2.3px, transparent 2.8px);
  background-position:
    23px 23px,
    34px 36px,
    calc(100% - 28px) calc(100% - 35px),
    calc(100% - 18px) calc(100% - 22px),
    calc(100% - 44px) calc(100% - 29px);
}
.card-dots::after {
  opacity: .72;
  background-image:
    radial-gradient(circle, rgba(229, 158, 178, .50) 0 2px, transparent 2.5px),
    radial-gradient(circle, rgba(229, 158, 178, .40) 0 1.7px, transparent 2.4px);
  background-position: 42px 29px, calc(100% - 22px) calc(100% - 47px);
}

.login-card {
  padding: 32px;
}
label, .mega-card h2, .petals-card h2 {
  display: block;
  margin: 0 0 14px;
  color: rgba(237, 185, 196, .88);
  font-family: "IM Fell English SC", "Cormorant Garamond", serif;
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: 15px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 48px;
  border-radius: 11px;
  border: 1px solid rgba(229, 165, 181, .28);
  background: rgba(25, 19, 34, .45);
  color: #f4dce0;
  padding: 0 16px;
  font-family: Georgia, serif;
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: rgba(198, 143, 161, .62); }
input:focus {
  border-color: rgba(235, 181, 195, .58);
  background: rgba(31, 23, 41, .62);
  box-shadow: 0 0 0 3px rgba(229, 165, 181, .075), inset 0 0 18px rgba(255,255,255,.025);
}

.gold-button {
  width: 100%;
  margin-top: 22px;
  height: 54px;
  border-radius: 12px;
  border: 1px solid rgba(229, 189, 91, .58);
  background:
    linear-gradient(180deg, rgba(88, 70, 80, .70), rgba(66, 52, 64, .70)),
    radial-gradient(circle at 50% 0, rgba(255,255,255,.07), transparent 50%);
  color: rgba(255, 231, 221, .92);
  font: 700 16px "Cormorant Garamond", Georgia, serif;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(229, 189, 91, .10),
    0 0 16px rgba(215, 174, 78, .28),
    inset 0 0 16px rgba(255, 222, 129, .055);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.gold-button:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 204, 119, .80);
  box-shadow: 0 0 22px rgba(215, 174, 78, .38), inset 0 0 18px rgba(255, 222, 129, .075);
}
.gold-button.small { width: 170px; height: 42px; margin-top: 16px; }
.message { min-height: 18px; margin: 12px 0 0; color: rgba(244, 188, 200, .82); text-align: center; }

.dashboard-screen {
  align-items: start;
  padding-top: 24px;
  overflow-y: auto;
}
.dashboard-wrap {
  width: min(956px, calc(100vw - 52px));
  padding-bottom: 48px;
}
.brand-dashboard { margin-top: 12px; margin-bottom: 38px; }
.brand-dashboard h1 { font-size: clamp(48px, 5vw, 61px); }
.brand-dashboard p { font-size: 13px; }
.welcome-pill {
  width: max-content;
  margin: 0 auto -10px;
  padding: 7px 14px 8px;
  border: 1px solid rgba(232, 174, 189, .24);
  border-radius: 12px;
  background: rgba(34, 24, 43, .76);
  color: rgba(244, 210, 214, .92);
  box-shadow: 0 10px 24px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.05);
  font-weight: 700;
  letter-spacing: .02em;
}
.welcome-pill span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 99px;
  background: #52ce4d;
  color: white;
  font-size: 12px;
  box-shadow: 0 0 10px rgba(75, 255, 84, .28);
}

.mega-card { padding: 30px 30px 28px; min-height: 220px; }
.mega-card h2, .petals-card h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 26px;
  margin-bottom: 2px;
  color: rgba(244, 203, 209, .92);
}
.hint { margin: 0 0 20px; color: rgba(187, 139, 155, .75); font-size: 13px; font-weight: 700; }
.credential-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.upload-card {
  min-height: 174px;
  margin-top: 28px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px;
  cursor: pointer;
}
.upload-card.dragging {
  border-color: rgba(238, 203, 117, .75);
  box-shadow: 0 0 28px rgba(215, 174, 78, .20), inset 0 0 20px rgba(255, 227, 132, .04);
}
.cloud-icon {
  font-size: 40px;
  line-height: .75;
  color: rgba(255, 210, 217, .95);
  text-shadow: 0 0 15px rgba(255, 185, 200, .22);
}
.upload-card h3 { margin: 18px 0 0; font-size: 21px; color: rgba(244, 205, 211, .91); }
.upload-card p { margin: 0; color: rgba(183, 136, 154, .70); font-weight: 700; }
.upload-progress {
  width: min(360px, 70%);
  height: 7px;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 99px;
  background: rgba(13, 10, 20, .5);
  border: 1px solid rgba(229, 165, 181, .14);
}
.upload-progress span { display:block; width: 28%; height:100%; background: linear-gradient(90deg, rgba(236,188,107,.45), rgba(255,230,165,.9)); border-radius: inherit; animation: loading 1s ease-in-out infinite alternate; }
@keyframes loading { from { transform: translateX(-60%); } to { transform: translateX(260%); } }

.petals-card { margin-top: 28px; min-height: 162px; overflow: hidden; }
.petals-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(229, 165, 181, .13);
}
.petals-card h2 { margin: 0; }
#fileCount { color: rgba(188, 139, 154, .74); font-weight: 700; }
.file-list.empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  color: rgba(184, 137, 153, .72);
  font-weight: 700;
  font-size: 17px;
}
.file-list:not(.empty) { padding: 10px 16px 16px; }
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(229, 165, 181, .11);
}
.file-row strong { display:block; color: rgba(245, 213, 217, .94); font-size: 16px; }
.file-row small { display:block; color: rgba(188, 139, 154, .74); margin-top: 3px; }
.copy-link {
  border: 1px solid rgba(229, 189, 91, .40);
  background: rgba(53, 40, 51, .65);
  color: rgba(255, 231, 221, .88);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: "Cormorant Garamond", Georgia, serif;
  box-shadow: 0 0 12px rgba(215, 174, 78, .15);
}

.danger-link {
  border-color: rgba(229, 126, 145, .38);
  color: rgba(255, 206, 214, .9);
  box-shadow: 0 0 12px rgba(229, 126, 145, .10);
}
.danger-link:hover {
  border-color: rgba(255, 161, 176, .58);
  box-shadow: 0 0 16px rgba(229, 126, 145, .18);
}
.danger-link:disabled {
  opacity: .55;
  cursor: wait;
}

@media (max-width: 700px) {
  body { overflow: auto; }
  .screen { padding: 18px; }
  .login-card, .mega-card { padding: 24px; }
  .credential-row { grid-template-columns: 1fr; }
  .gold-button.small { width: 100%; }
  .dashboard-wrap { width: 100%; }
  .brand p { letter-spacing: .29em; }
}

/* --- Amoriel polish patch: falling petals, corner-only UI dots, no exposed MEGA form --- */
.dot.dust-dot {
  animation: drift var(--d) ease-in-out infinite alternate;
}

.falling-petal {
  position: absolute;
  left: var(--x);
  top: -12vh;
  width: var(--size);
  height: calc(var(--size) * 1.35);
  border-radius: 70% 30% 70% 30%;
  background: rgba(229, 158, 178, .42);
  box-shadow: 0 0 9px rgba(226, 164, 184, .28);
  opacity: .72;
  animation: petalFall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

@keyframes petalFall {
  0% { transform: translate3d(0, -12vh, 0) rotate(0deg); opacity: 0; }
  8% { opacity: .62; }
  50% { transform: translate3d(var(--sway), 55vh, 0) rotate(calc(var(--spin) * 190deg)); }
  92% { opacity: .58; }
  100% { transform: translate3d(calc(var(--sway) * -0.45), 116vh, 0) rotate(calc(var(--spin) * 360deg)); opacity: 0; }
}

.card-dots { overflow: hidden; }
.card-dots::before,
.card-dots::after {
  background-position:
    22px 22px,
    34px 34px,
    48px 25px,
    calc(100% - 38px) calc(100% - 26px),
    calc(100% - 24px) calc(100% - 40px) !important;
}
.card-dots::after {
  background-position:
    30px calc(100% - 24px),
    calc(100% - 26px) 28px !important;
}

/* Keep the decorative dots away from text-heavy card centers. */
.mega-card.card-dots::before,
.mega-card.card-dots::after,
.petals-card.card-dots::before,
.petals-card.card-dots::after {
  opacity: .75;
}
.upload-card.card-dots::before,
.upload-card.card-dots::after {
  opacity: .55;
}

.mega-connected {
  min-height: 190px;
}

.server-lock {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(520px, 100%);
  margin-top: 22px;
  padding: 17px 18px;
  border-radius: 14px;
  border: 1px solid rgba(229, 189, 91, .24);
  background: rgba(25, 19, 34, .32);
  box-shadow: inset 0 0 18px rgba(255, 222, 129, .035), 0 0 18px rgba(215, 174, 78, .08);
}
.lock-orb {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(229, 189, 91, .45);
  color: rgba(255, 225, 170, .95);
  background: rgba(66, 52, 64, .58);
  box-shadow: 0 0 16px rgba(215, 174, 78, .22);
}
.server-lock strong {
  display: block;
  color: rgba(244, 213, 217, .94);
  font-size: 18px;
}
.server-lock small {
  display: block;
  margin-top: 2px;
  color: rgba(188, 139, 154, .80);
  font-weight: 700;
}

.welcome-pill {
  animation: welcomeFade 4.8s ease forwards;
}
@keyframes welcomeFade {
  0%, 62% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); pointer-events: none; }
}

/* --- Client petal download page --- */
.client-body { overflow: auto; }
.client-screen {
  align-items: start;
  padding-top: 36px;
  padding-bottom: 48px;
}
.client-wrap {
  width: min(720px, calc(100vw - 42px));
}
.client-card {
  padding: 30px;
  text-align: center;
}
.client-cloud {
  font-size: 42px;
  line-height: 1;
  color: rgba(255, 210, 217, .95);
  text-shadow: 0 0 15px rgba(255, 185, 200, .22);
}
.client-kicker {
  margin: 14px 0 6px;
  font-family: "IM Fell English SC", "Cormorant Garamond", serif;
  letter-spacing: .34em;
  color: rgba(222, 151, 166, .76);
  font-size: 12px;
  font-weight: 700;
}
.client-card h2,
.thank-card h2 {
  margin: 0;
  color: rgba(244, 203, 209, .94);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  text-shadow: 0 0 14px rgba(239, 168, 174, .18);
}
.client-file-box {
  width: min(440px, 100%);
  margin: 22px auto 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(229, 165, 181, .18);
  background: rgba(25, 19, 34, .34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.client-file-box span,
.client-file-box small {
  display: block;
  color: rgba(188, 139, 154, .76);
  font-weight: 700;
}
.client-file-box strong {
  display: block;
  margin: 5px 0;
  color: rgba(245, 213, 217, .96);
  font-size: 18px;
  overflow-wrap: anywhere;
}
.client-download {
  display: inline-grid;
  place-items: center;
  width: min(300px, 100%);
  margin-top: 22px;
  text-decoration: none;
}
.thank-card {
  margin-top: 24px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 22px;
  align-items: center;
  overflow: hidden;
}
.thank-copy { text-align: left; }
.thank-copy .client-kicker { margin-top: 0; }
.thank-copy h2 { font-size: clamp(24px, 3vw, 32px); }
.thank-copy p:last-child {
  margin: 10px 0 0;
  color: rgba(221, 173, 185, .86);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
}
.amoriel-note-img {
  justify-self: end;
  width: 150px;
  max-width: 100%;
  filter: drop-shadow(0 0 18px rgba(239, 168, 174, .22));
}
.file-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
a.copy-link {
  text-decoration: none;
  display: inline-block;
}
@media (max-width: 700px) {
  .thank-card { grid-template-columns: 1fr; text-align: center; }
  .thank-copy { text-align: center; }
  .amoriel-note-img { justify-self: center; width: 132px; }
  .file-row { align-items: flex-start; flex-direction: column; }
  .file-actions { justify-content: flex-start; }
}
