*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --rose: #be8a7a;
  --rose-light: #f5ebe8;
  --rose-dark: #9c6a5c;
  --text: #2c2c2c;
  --muted: #7a7a7a;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--rose-light);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

.container {
  width: 100%;
  max-width: 520px;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--rose-dark);
  letter-spacing: -0.02em;
}

.subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Drop zone */
.drop-zone {
  background: #fff;
  border: 2.5px dashed var(--rose);
  border-radius: var(--radius);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  box-shadow: var(--shadow);
}

.drop-zone:hover,
.drop-zone.drag-over {
  background: var(--rose-light);
  border-color: var(--rose-dark);
}

.drop-icon {
  width: 48px;
  height: 48px;
  color: var(--rose);
}

.drop-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rose-dark);
}

.drop-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Preview grid */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.preview-grid img,
.preview-grid video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

/* Upload button */
.btn-upload {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  background: var(--rose);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: var(--shadow);
}

.btn-upload:hover { background: var(--rose-dark); }
.btn-upload:active { transform: scale(0.98); }
.btn-upload:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Progress */
.progress-wrap {
  margin-top: 20px;
  text-align: center;
}

.progress-bar {
  height: 8px;
  background: var(--rose-light);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--rose);
  width: var(--pct, 0%);
  transition: width 0.3s ease;
}

.progress-label {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Success */
.state-success {
  margin-top: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.state-success svg {
  width: 56px;
  height: 56px;
  color: #4caf7d;
}

.state-success p {
  font-size: 1.05rem;
  font-weight: 600;
}

.btn-more {
  padding: 12px 28px;
  background: #fff;
  border: 2px solid var(--rose);
  color: var(--rose-dark);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-more:hover { background: var(--rose-light); }

.drive-link {
  font-size: 0.9rem;
  color: var(--rose-dark);
  text-decoration: underline;
}

.drive-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -6px;
}

/* Error */
.state-error {
  margin-top: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.state-error p {
  color: #c0392b;
  font-size: 0.95rem;
}

.btn-retry {
  padding: 12px 28px;
  background: #c0392b;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-retry:hover { background: #a93226; }

/* Entry page */
.container--entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  padding-bottom: 0;
}

.container--entry header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.entry-icon {
  width: 56px;
  height: 56px;
  color: var(--rose);
  margin-bottom: 16px;
}

.entry-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  border: 2px solid #e0d5d2;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
}

.entry-input:focus {
  border-color: var(--rose);
}

.entry-error {
  color: #c0392b;
  font-size: 0.9rem;
  text-align: center;
}

[hidden] { display: none !important; }
