:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1d2420;
  --muted: #5f6b64;
  --line: #dcd8cf;
  --green: #2f6b4f;
  --green-dark: #24543e;
  --star: #c98a12;
  --low: #b5462f;
  --hl: #fff4cf;
  font-size: 17px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
[hidden] { display: none !important; }
.top { background: var(--green); color: #fff; padding: 18px 16px 14px; }
.top h1 { margin: 0; font-size: 1.3rem; font-weight: 650; }
.top .sub { margin: 2px 0 0; opacity: 0.9; font-size: 0.95rem; }
main { max-width: 640px; margin: 0 auto; padding: 12px 12px 24px; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.banner {
  background: #fff7e0; border: 1px solid #ecd9a0; color: #5a4300;
  border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 0.95rem;
}
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin: 0 0 14px;
}
.panel.note { border-color: #b9d3c4; background: #f0f7f2; }
.panel p { margin: 0 0 10px; }
.steps { margin: 0 0 12px; padding-left: 1.3em; }
.steps li { margin-bottom: 6px; }
.code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.4rem;
  letter-spacing: 0.06em; text-align: center; background: var(--bg); border-radius: 10px; padding: 10px;
}
label { display: block; font-weight: 600; margin: 4px 0 6px; font-size: 0.95rem; }
input, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
input { font-size: 1.15rem; letter-spacing: 0.04em; margin-bottom: 12px; }
textarea { resize: vertical; min-height: 7.5em; line-height: 1.4; }
input:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.error { color: var(--low); margin-top: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 16px; border-radius: 10px; font: inherit; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:active { background: var(--green-dark); }
.btn.link { background: transparent; border-color: transparent; color: var(--green); padding: 0 8px; min-height: 40px; }
.btn.wide { width: 100%; margin-top: 4px; }
.btn.small { font-size: 0.9rem; font-weight: 500; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin: 0 0 14px; scroll-margin-top: 12px; transition: background-color 0.6s;
}
.card.highlight { background: var(--hl); border-color: #e5c56a; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.stars { color: var(--star); font-size: 1.15rem; letter-spacing: 0.04em; }
.stars.low { color: var(--low); }
.when { color: var(--muted); font-size: 0.9rem; }
.who { margin: 2px 0 6px; font-weight: 650; }
.tag {
  display: inline-block; margin: 0 0 6px; font-size: 0.8rem; font-weight: 600;
  background: #eef0ff; color: #3a3f8f; border-radius: 6px; padding: 1px 8px;
}
.review { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { margin-bottom: 4px; }
.draft-note { font-size: 0.88rem; margin: 2px 0 8px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.after-copy { margin: 10px 0 0; font-size: 0.92rem; color: var(--green-dark); }
.secondary {
  display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid #eeebe4;
}
.secondary .muted { margin-left: 8px; }
#list-intro { margin: 2px 4px 12px; font-size: 0.95rem; }
.empty { text-align: center; padding: 48px 16px; }
.empty .big { font-size: 1.35rem; font-weight: 650; margin: 0 0 6px; }
.empty::before {
  content: "\2713"; display: block; margin: 0 auto 14px; width: 64px; height: 64px; line-height: 64px;
  border-radius: 50%; background: #e2efe7; color: var(--green); font-size: 2rem;
}
.foot { max-width: 640px; margin: 0 auto; padding: 0 16px 28px; text-align: center; font-size: 0.88rem; }
.foot p { margin: 0 0 4px; }
