:root {
  --bg: #f3eee6;
  --ink: #2c241c;
  --muted: #7a6d5f;
  --card: #fffaf4;
  --line: rgba(70, 52, 36, 0.12);
  --accent: #c45c3e;
  --accent-soft: #f0d2c4;
  --ok: #2f6b4f;
  --wait: #8a6a2f;
  --no: #8a3d3d;
  --shadow: 0 18px 40px rgba(70, 52, 36, 0.08);
  --font: "DM Sans", "PingFang SC", sans-serif;
  --display: "Fraunces", "Songti SC", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 45% at 10% 0%, rgba(240, 210, 196, 0.55), transparent 55%),
    radial-gradient(ellipse 55% 40% at 90% 10%, rgba(214, 226, 210, 0.45), transparent 50%),
    linear-gradient(180deg, #f7f2eb 0%, #efe7db 100%);
}

.tg-shell {
  width: min(640px, 92vw);
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 0 calc(48px + env(safe-area-inset-bottom));
}

.tg-back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.tg-back:hover { color: var(--accent); }

.tg-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.tg-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tg-sub {
  margin: 10px 0 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
}

.tg-card {
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.tg-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tg-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tg-form label.full { grid-column: 1 / -1; }
.tg-form span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.tg-form input,
.tg-form select,
.tg-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  font-weight: 600;
  outline: none;
  min-height: 46px;
}
.tg-form textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.45;
}
.tg-form input:focus,
.tg-form select:focus,
.tg-form textarea:focus {
  border-color: rgba(196, 92, 62, 0.45);
  box-shadow: 0 0 0 4px rgba(196, 92, 62, 0.1);
}

.tg-submit {
  grid-column: 1 / -1;
  margin-top: 4px;
  border: none;
  border-radius: 999px;
  min-height: 50px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #fffaf4;
  background: linear-gradient(135deg, #d06a4a 0%, #c45c3e 55%, #a84a34 100%);
  box-shadow: 0 12px 24px rgba(196, 92, 62, 0.22);
}
.tg-submit:disabled { opacity: 0.55; cursor: wait; }
.tg-submit:active { transform: scale(0.98); }

.tg-list-wrap { margin-top: 28px; }
.tg-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.tg-list-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
}
.tg-list-head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.tg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tg-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
}

.tg-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tg-kind {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.tg-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tg-status.pending {
  color: var(--wait);
  background: rgba(138, 106, 47, 0.1);
  border-color: rgba(138, 106, 47, 0.22);
}
.tg-status.approved {
  color: var(--ok);
  background: rgba(47, 107, 79, 0.1);
  border-color: rgba(47, 107, 79, 0.22);
}
.tg-status.rejected {
  color: var(--no);
  background: rgba(138, 61, 61, 0.1);
  border-color: rgba(138, 61, 61, 0.22);
}

.tg-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}
.tg-item p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
}
.tg-reply {
  margin-top: 8px !important;
  color: var(--accent) !important;
  font-weight: 700 !important;
}
.tg-empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 250, 244, 0.55);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.tg-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  background: #2c241c;
  color: #fffaf4;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  max-width: min(92vw, 360px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.tg-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 560px) {
  .tg-form { grid-template-columns: 1fr; }
}
