:root {
  color-scheme: light;
  --page: #f1ebe2;
  --surface: #fffdf9;
  --ink: #2d2926;
  --muted: #786f67;
  --line: #d9cfc3;
  --clay: #c96f4f;
  --clay-dark: #9e5038;
  --clay-soft: #f1d7cc;
  --sage: #6f8878;
  --sage-soft: #dce7df;
  --gold-soft: #f3e4c5;
  --danger: #a84040;
  --font: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "SimHei", sans-serif;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; }

body {
  margin: 0;
  min-width: 980px;
  min-height: 650px;
  overflow: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font);
  line-height: 1.6;
}

button, input, textarea { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.feedback-page {
  --scene-scale: 1;
  position: relative;
  width: 100%;
  height: 100dvh;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow: hidden;
  background: var(--page);
}

.brand {
  position: absolute;
  top: clamp(28px, 5.5vh, 54px);
  left: clamp(34px, 5vw, 78px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  transform: scale(var(--scene-scale));
  transform-origin: left top;
}

.brand > span:last-child { display: grid; line-height: 1.25; }
.brand strong { font-size: 14px; letter-spacing: .08em; }
.brand small { color: var(--muted); font: 9px/1.5 ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }

.brand-mark {
  position: relative;
  width: 39px;
  height: 35px;
  border: 2px solid var(--ink);
  border-radius: 48% 48% 45% 45%;
  background: var(--clay-soft);
}

.brand-ear { position: absolute; z-index: -1; top: -7px; width: 14px; height: 15px; border: 2px solid var(--ink); background: var(--clay-soft); transform: rotate(45deg); }
.brand-ear--left { left: 2px; border-radius: 4px 1px 4px 1px; }
.brand-ear--right { right: 2px; border-radius: 4px 1px 4px 1px; }
.brand-eye { position: absolute; top: 14px; width: 3px; height: 5px; border-radius: 50%; background: var(--ink); }
.brand-eye--left { left: 10px; }
.brand-eye--right { right: 10px; }

.form-panel {
  position: relative;
  z-index: 3;
  width: 740px;
  margin-top: 3.5vh;
  transform: scale(var(--scene-scale));
  transform-origin: top center;
}

.feedback-card {
  width: 100%;
  min-height: 885px;
  padding: 40px 42px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(108,88,72,.15);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(82,62,47,.13);
}

.card-header { margin-bottom: 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-number { color: var(--clay-dark); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .17em; }
.card-header h1 { margin: 8px 0 0; font-family: var(--font); font-size: 34px; font-weight: 700; line-height: 1.2; letter-spacing: -.04em; }
.status-pill { flex: 0 0 auto; margin-top: 4px; padding: 8px 11px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(111,136,120,.38); border-radius: 999px; color: #536b5b; background: rgba(220,231,223,.42); font-size: 11px; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #6b9277; box-shadow: 0 0 0 4px rgba(107,146,119,.12); }

.card-summary { margin-bottom: 23px; padding-bottom: 18px; border-bottom: 1px solid rgba(120,111,103,.16); color: var(--muted); font-size: 10px; }
.card-summary p { margin: 0 0 9px; }
.card-summary > div { display: flex; flex-wrap: wrap; gap: 7px 19px; }
.card-summary span { position: relative; padding-left: 11px; }
.card-summary span::before { content: ""; position: absolute; top: .66em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--sage); }

.feedback-card form { flex: 1; display: flex; flex-direction: column; }
.form-block { margin: 0 0 23px; padding: 0; border: 0; }
.form-block legend, .field > span { display: block; margin-bottom: 9px; color: #3c3631; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.form-block legend span, .field > span b { color: var(--clay-dark); }
.field > span small { margin-left: 5px; color: #968a80; font-size: 9px; font-weight: 400; }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.type-card { position: relative; min-height: 96px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.type-card:hover { border-color: #b8aa9e; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(74,55,42,.06); }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card:has(input:focus-visible) { outline: 3px solid rgba(201,111,79,.2); outline-offset: 2px; }
.type-card:has(input:checked) { border-color: var(--clay); background: #fff8f3; box-shadow: inset 0 0 0 1px var(--clay); }
.type-card > i { position: absolute; top: 9px; right: 9px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--clay); font-size: 10px; font-style: normal; opacity: 0; transform: scale(.7); transition: .2s; }
.type-card:has(input:checked) > i { opacity: 1; transform: scale(1); }
.type-card > span:nth-of-type(2) { display: grid; }
.type-card strong { margin-top: 4px; font-size: 12px; }
.type-card small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.type-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; font-size: 14px; font-weight: 700; }
.type-icon--bug { color: #9c4b3f; background: var(--clay-soft); }
.type-icon--idea { color: #9a6a20; background: var(--gold-soft); }
.type-icon--other { color: #536d5d; background: var(--sage-soft); letter-spacing: 1px; }

.field { display: block; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--ink); background: var(--surface); transition: border-color .2s, box-shadow .2s, background .2s; }
.field input { height: 49px; padding: 0 14px; font-size: 14px; }
.field textarea { height: 222px; padding: 13px 14px; resize: none; font-size: 14px; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: #aaa097; }
.field input:focus, .field textarea:focus { border-color: var(--clay); background: white; box-shadow: 0 0 0 3px rgba(201,111,79,.11); }
.field-meta { margin-top: 6px; display: flex; justify-content: space-between; gap: 16px; color: #91867c; font-size: 9px; }
.field-hint { display: block; margin-top: 5px; color: #91867c; font-size: 9px; }
.field-error { min-height: 0; margin: 6px 0 0; color: var(--danger); font-size: 10px; }
.field-error:empty { display: none; }
.has-error { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(168,64,64,.09) !important; }
.form-block--contact { margin-bottom: 20px; }

.form-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.draft-status { margin: 0; color: #8c8177; font-size: 10px; }
.submit-button { min-width: 158px; height: 50px; padding: 0 8px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border: 0; border-radius: 999px; color: white; background: var(--ink); cursor: pointer; box-shadow: 0 10px 20px rgba(45,41,38,.15); transition: transform .2s, background .2s; }
.submit-button:hover { background: var(--clay-dark); transform: translateY(-2px); }
.submit-button:disabled { opacity: .6; cursor: wait; transform: none; }
.submit-button i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: white; font-size: 18px; font-style: normal; }

.cat-parade {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 320px;
  pointer-events: none;
}

.page-cat {
  position: absolute;
  z-index: var(--z);
  left: var(--x);
  bottom: 0;
  width: auto;
  height: var(--h);
  object-fit: contain;
  transform: translateX(-50%) scale(var(--scene-scale));
  transform-origin: center bottom;
  filter: drop-shadow(0 7px 7px rgba(72,53,41,.11));
}

.result-dialog { width: min(430px, calc(100% - 34px)); padding: 34px; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 80px rgba(37,30,25,.25); text-align: center; }
.result-dialog::backdrop { background: rgba(45,41,38,.42); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; font-size: 23px; }
.dialog-cat { margin: 3px 0 14px; color: var(--clay); font-size: 28px; }
.result-dialog h2 { margin: 0 0 9px; font-family: var(--font); font-size: 24px; }
.result-dialog p { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.dialog-actions { display: flex; justify-content: center; gap: 9px; }
.dialog-actions button { min-height: 41px; padding: 0 17px; border-radius: 999px; cursor: pointer; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: white; }
.primary-button { border: 1px solid var(--ink); color: white; background: var(--ink); }

@media (max-height: 820px) {
  .form-panel { margin-top: 18px; }
  .feedback-card { padding-top: 34px; padding-bottom: 34px; }
}

@media (max-width: 2400px) {
  .feedback-page { --scene-scale: .92; }
}

@media (max-width: 2200px) {
  .feedback-page { --scene-scale: .84; }
}

@media (max-width: 2000px) {
  .feedback-page { --scene-scale: .76; }
}

@media (max-width: 1800px) {
  .feedback-page { --scene-scale: .68; }
}

@media (max-width: 1600px) {
  .feedback-page { --scene-scale: .61; }
}

@media (max-width: 1400px) {
  .feedback-page { --scene-scale: .54; }
}

@media (max-width: 1200px) {
  .feedback-page { --scene-scale: .47; }
}

@media (max-width: 1000px) {
  .feedback-page { --scene-scale: .4; }
  .brand { left: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
