:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f8f9fa;
  --border: #e0e3e7;
  --text: #202124;
  --muted: #5f6368;
  --primary: #1a73e8;
  --primary-hover: #1558b0;
  --danger: #d93025;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 20%, rgba(26, 115, 232, 0.06), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.page {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.panel {
  padding: 0;
}

.site-footer {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.site-footer-inner {
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
}

.site-footer-link {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.7;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer-link:hover {
  color: var(--primary);
}

.hero {
  margin-bottom: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 14px;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.intro,
.hint,
.status-note,
.empty-state {
  color: var(--muted);
  line-height: 1.7;
}

form {
  display: grid;
  gap: 28px;
}

.field,
.file-box,
.section {
  display: grid;
  gap: 12px;
}

.relationship-slider {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.relationship-header,
.relationship-input-row {
  display: flex;
  align-items: center;
}

.relationship-header {
  justify-content: space-between;
  gap: 12px;
}

.relationship-input-row {
  gap: 0;
}

.relationship-track {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 32px;
}

label {
  font-size: 0.95rem;
  font-weight: 600;
}

.relationship-header strong {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

textarea,
input,
select,
button {
  font: inherit;
}

textarea,
input,
select {
  width: 100%;
  padding: 15px 0 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dfe4ea 0%, #c9d7f8 50%, #dfe4ea 100%);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dfe4ea 0%, #c9d7f8 50%, #dfe4ea 100%);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px rgba(26, 115, 232, 0.25);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px rgba(26, 115, 232, 0.25);
  cursor: pointer;
}

textarea {
  min-height: 180px;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: inset 0 -1px 0 var(--primary);
}

.file-box,
.section {
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.file-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.file-list:empty {
  display: none;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border: 1px solid var(--border);
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.file-list-item + .file-list-item {
  margin-top: 0;
}

.file-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #eef1f4;
  background: #fff;
  flex: 0 0 auto;
}

.file-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 4px;
}

.file-name,
.file-size {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name {
  color: var(--text);
}

.file-size {
  color: var(--muted);
  font-size: 0.9rem;
}

.file-remove-btn {
  min-height: 32px;
  min-width: 32px;
  width: 32px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--danger);
  flex: 0 0 auto;
  font-size: 1.1rem;
  line-height: 1;
}

.file-remove-btn:hover {
  background: rgba(217, 48, 37, 0.1);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

button {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button:hover {
  background: var(--primary-hover);
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.28);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-label {
  position: relative;
  z-index: 1;
}

.button-shimmer {
  position: absolute;
  inset: 0;
  transform: translateX(-130%);
  background: linear-gradient(
    100deg,
    transparent 18%,
    rgba(255, 255, 255, 0.12) 34%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(255, 255, 255, 0.12) 66%,
    transparent 82%
  );
  opacity: 0;
  pointer-events: none;
}

button.is-loading {
  background: linear-gradient(90deg, #1a73e8 0%, #2b7de9 50%, #1a73e8 100%);
  box-shadow: 0 10px 24px rgba(26, 115, 232, 0.16);
}

button.is-loading .button-shimmer {
  opacity: 1;
  animation: button-shimmer 1.25s ease-in-out infinite;
}

button:active {
  transform: translateY(1px);
}

.content-grid {
  display: grid;
  gap: 28px;
}

.about-layout {
  display: grid;
  gap: 28px;
}

.about-card {
  display: grid;
  gap: 18px;
}

.about-kicker {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-story {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.about-closing {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.85;
}

.section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.section-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
}

.error {
  padding: 14px 0 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(217, 48, 37, 0.18);
  background: transparent;
  color: var(--danger);
}

@media (max-width: 640px) {
  .page {
    padding: 28px 16px 80px;
  }

  .site-footer {
    padding: 0 16px 32px;
  }

  .file-box,
  .section {
    padding-top: 18px;
  }

  button {
    width: 100%;
  }

  .file-remove-btn {
    width: 32px;
  }

  .file-thumb {
    width: 48px;
    height: 48px;
  }

  .about-story {
    font-size: 1rem;
    line-height: 1.85;
  }
}

@keyframes button-shimmer {
  0% {
    transform: translateX(-130%);
  }

  100% {
    transform: translateX(130%);
  }
}
