:root {
  --bg: #fff5f6;
  --surface: #ffffff;
  --text: #1f2a33;
  --accent: #fe5260;
  --accent-strong: #dc3343;
  --accent-soft: #fff0f2;
  --accent-focus: rgba(254, 82, 96, 0.25);
  --border: #ead5d8;
  --muted: #68737d;
  --danger-bg: #ffe5e5;
  --danger-text: #7a1d1d;
  --success-bg: #ecfdf3;
  --success-text: #166534;
  --success-border: #bbf7d0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #fff0f2 0%, #fffafb 100%);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.menu {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.menu-title {
  font-weight: 700;
  letter-spacing: 0.3px;
}

.menu-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.menu-link {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

.menu-link:hover {
  background: var(--accent);
  color: #fff;
}

.content {
  width: min(900px, 94vw);
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  width: min(900px, 94vw);
  margin: 0 auto;
  padding: 1.1rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 1.25rem;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
}

.footer-brand img {
  display: block;
  width: 116px;
  height: auto;
}

.footer-copy {
  flex: 0 1 520px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.footer-copy p {
  margin: 0.1rem 0;
}

.footer-copy a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.footer-copy a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.footer-links a {
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
  background: var(--surface);
}

.footer-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.panel-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

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

.alert {
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #f4c4c4;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.field {
  margin-bottom: 0.95rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.64rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background-color: var(--surface);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  cursor: pointer;
  padding-right: 2.4rem;
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent-focus);
  border-color: var(--accent);
}

.field input[readonly] {
  background: #eef1f2;
  color: var(--muted);
  border-color: #c7d0d4;
  cursor: not-allowed;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.choice-field {
  min-width: 0;
}

.choice-group {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.8rem;
  margin: 0;
  padding: 0.64rem 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-weight: 400;
  transition: background 0.15s ease, color 0.15s ease;
}

.choice-option:last-child {
  border-bottom: 0;
}

.choice-option input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.choice-option:has(input:checked) {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.choice-group:focus-within {
  outline: 2px solid var(--accent-focus);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .choice-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.field-error {
  color: var(--danger-text);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.highlight-fill {
  background: #ffeb3b;
  color: #c1121f;
  font-weight: 700;
}

.qr-container {
  display: flex;
  justify-content: flex-start;
  margin: 1rem 0;
}

.qr-frame {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: min(260px, 70vw);
  block-size: min(260px, 70vw);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.qr-frame img {
  display: block;
  width: calc(100% - 1rem);
  height: auto;
  image-rendering: pixelated;
}

.qr-frame.is-loading img {
  opacity: 0;
}

.qr-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.qr-spinner {
  width: 2.4rem;
  height: 2.4rem;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: qr-spin 0.8s linear infinite;
}

@keyframes qr-spin {
  to {
    transform: rotate(360deg);
  }
}

.feedback-form {
  border-top: 1px solid var(--border);
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}

.feedback-form .comment-field {
  margin-top: 0.8rem;
}

.feedback-form textarea {
  min-height: 140px;
  line-height: 1.5;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.96rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: var(--accent-strong);
}

.btn:disabled {
  background: var(--accent);
  cursor: wait;
  opacity: 0.65;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.35rem;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.empty {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 640px) {
  .content {
    margin: 1rem auto;
    padding: 1rem;
  }

  .footer-inner {
    gap: 0.75rem;
  }

  .footer-links {
    justify-content: center;
  }

  .menu {
    flex-direction: column;
    align-items: flex-start;
  }
}
