:root {
  color-scheme: light;
  --bg: #edf4ef;
  --ink: #17211b;
  --muted: #66756b;
  --line: #c9d7ce;
  --panel: rgba(255, 255, 255, 0.92);
  --accent: #126b4b;
  --accent-strong: #0b563d;
  --danger: #b42318;
  --shadow: 0 22px 70px rgba(26, 54, 39, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  min-height: 100dvh;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(18, 107, 75, 0.14), transparent 42%),
    radial-gradient(circle at 82% 10%, rgba(255, 178, 81, 0.26), transparent 28%),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: max(10px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom));
}

.panel {
  width: min(100%, 460px);
  max-height: calc(100dvh - 20px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.actions {
  display: flex;
  gap: 10px;
}

.field,
.compose {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.field {
  margin-bottom: 8px;
}

.field input,
.compose textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.field input {
  height: 44px;
  padding: 0 12px;
  text-transform: uppercase;
}

.compose textarea {
  height: clamp(112px, 25dvh, 170px);
  min-height: 112px;
  resize: vertical;
  padding: 12px;
  line-height: 1.55;
  font-size: 18px;
}

.field input:focus,
.compose textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 107, 75, 0.14);
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    opacity 0.16s ease;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.secondary {
  width: 100%;
  margin-bottom: 12px;
  background: #25362c;
}

.actions {
  position: sticky;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 2;
  margin-top: 10px;
  padding-top: 8px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--panel) 34%);
}

.actions button {
  flex: 1;
}

.ghost {
  color: var(--accent-strong);
  border: 1px solid rgba(18, 107, 75, 0.18);
  background: rgba(18, 107, 75, 0.08);
}

.message {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 420px) {
  .shell {
    padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom));
  }

  .panel {
    padding: 12px;
  }

  .compose textarea {
    height: clamp(96px, 22dvh, 140px);
    min-height: 96px;
    font-size: 17px;
  }
}
