/* 词井 —— 纸感、衬线、慢。不追求热度，只保留温度。 */

:root {
  --paper: #f6f3ec;
  --ink: #2b2a26;
  --ink-soft: #6b675e;
  --line: #d8d2c4;
  --well: #4a4a44;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 620px; margin: 0 auto; padding: 4rem 1.25rem 5rem; }
.wrap.narrow { max-width: 540px; }
.wrap.admin { max-width: 760px; }

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
a:hover { border-bottom-color: var(--ink); }

/* ---- 头尾 ---- */

.site-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.site-head .brand {
  font-size: 1.25rem; letter-spacing: .5em; border: none;
  color: var(--well);
}
.site-nav a { margin-left: 1.2rem; font-size: .9rem; color: var(--ink-soft); }

.site-foot {
  max-width: 620px; margin: 0 auto; padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .85rem; text-align: center;
}

/* ---- 井口 ---- */

.well-mark { text-align: center; color: var(--well); margin-bottom: 1.5rem; }
.well-mark svg circle { animation: ripple 6s ease-in-out infinite; }
.well-mark svg circle:nth-child(2) { animation-delay: 1s; }
.well-mark svg circle:nth-child(3) { animation-delay: 2s; }
.well-mark svg circle:nth-child(4) { animation-delay: 3s; }

@keyframes ripple {
  0%, 100% { stroke-opacity: .2; }
  50% { stroke-opacity: .8; }
}

/* ---- 提示词 ---- */

.prompt { text-align: center; margin: 2rem 0 3rem; }
.prompt-label {
  font-size: .8rem; letter-spacing: .35em; color: var(--ink-soft);
  text-transform: uppercase; margin: 0 0 .8rem;
}
.prompt-body {
  font-size: 1.5rem; font-weight: 400; margin: 0;
  line-height: 2;
}

/* ---- 提交表单 ---- */

.compose textarea {
  width: 100%; resize: vertical;
  font: inherit; color: inherit;
  background: transparent;
  border: none; border-bottom: 1px solid var(--line);
  padding: .6rem .2rem;
  transition: border-color .6s ease;
}
.compose textarea:focus { outline: none; border-bottom-color: var(--ink); }

.tracks {
  border: none; margin: 2rem 0 0; padding: 0;
}
.tracks legend {
  font-size: .8rem; letter-spacing: .35em; color: var(--ink-soft);
  padding: 0; margin-bottom: .8rem;
}
.track {
  display: block; padding: .9rem 1rem; margin-bottom: .8rem;
  border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer;
  transition: border-color .5s ease, background .5s ease;
}
.track:has(input:checked) { border-color: var(--ink); background: rgba(43,42,38,.03); }
.track input { accent-color: var(--well); margin-right: .3rem; }
.track-title { display: block; }
.track-desc { display: block; font-size: .88rem; color: var(--ink-soft); margin-top: .1rem; }
.track-code-choice {
  display: block; font-size: .88rem; color: var(--ink-soft); margin-top: .4rem;
}

.ack {
  display: block; font-size: .88rem; color: var(--ink-soft);
  margin: 1.6rem 0; line-height: 1.8;
}

button {
  font: inherit; letter-spacing: .3em;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 2px;
  padding: .65rem 2.2rem; cursor: pointer;
  transition: all .5s ease;
}
button:hover { background: var(--ink); color: var(--paper); }

.hint { font-size: .85rem; color: var(--ink-soft); line-height: 1.9; }
.center { text-align: center; }
.form-error {
  color: #8a3030; font-size: .9rem; text-align: center;
  border: 1px solid #d9b8b8; border-radius: 2px; padding: .6rem 1rem;
}
.form-ok {
  color: #3d5a3a; font-size: .9rem; text-align: center;
  border: 1px solid #b8d0b5; border-radius: 2px; padding: .6rem 1rem;
}

/* ---- 打捞（展示） ---- */

.draw { margin-top: 1rem; }
.drawn { display: flex; flex-direction: column; gap: 2.2rem; margin-top: 2rem; }

.note {
  padding: 1.2rem 1.4rem;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line); border-radius: 2px;
  animation: surface 1.2s ease both;
}
.note:nth-child(2) { animation-delay: .25s; }
.note:nth-child(3) { animation-delay: .5s; }
.note:nth-child(4) { animation-delay: .75s; }
.note:nth-child(5) { animation-delay: 1s; }
.note p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.note-empty { color: var(--ink-soft); text-align: center; }

@keyframes surface {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---- 码 ---- */

.drop-done { text-align: center; margin: 2.5rem 0; }
.done-line { font-size: 1.05rem; }

.code-card {
  text-align: center; margin: 2rem 0;
  border: 1px solid var(--ink); border-radius: 2px;
  padding: 2rem 1.5rem;
}
.code-card-calm { border-color: var(--line); }
.code-kind { font-size: .85rem; letter-spacing: .3em; color: var(--ink-soft); margin: 0 0 1rem; }
.code-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.35rem; letter-spacing: .12em; margin: 0 0 1.2rem;
}
.code-warn { color: #8a3030; font-size: .88rem; margin: 0 0 1rem; }
.code-what { font-size: .88rem; color: var(--ink-soft); margin: 0; }

.redeem { text-align: center; margin-top: 3rem; }
.redeem form { margin: 1.5rem 0; }
.code-input {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.1rem; letter-spacing: .1em; text-align: center;
  width: 100%; padding: .7rem .5rem;
  background: transparent; color: inherit;
  border: 1px solid var(--line); border-radius: 2px;
}
.code-input:focus { outline: none; border-color: var(--ink); }
.redeem-done { text-align: center; margin-top: 3rem; }

/* ---- 说明页 ---- */

.prose h1 { font-size: 1.3rem; font-weight: 400; letter-spacing: .15em; margin: 3rem 0 1rem; }
.prose h1:first-child { margin-top: 0; }
.prose h2 { font-size: 1.02rem; font-weight: 400; margin: 2rem 0 .5rem; }
.prose p, .prose li { color: var(--ink); font-size: .98rem; }

/* ---- 管理后台 ---- */

.admin h1 { font-size: 1.2rem; font-weight: 400; letter-spacing: .2em; }
.admin h2 { font-size: 1rem; font-weight: 400; margin: 2.2rem 0 .8rem; color: var(--ink-soft); }
.admin-stats p { font-size: .9rem; color: var(--ink-soft); }

.prompt-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.prompt-form input[type="date"], .prompt-form input[type="text"] {
  font: inherit; font-size: .9rem;
  padding: .5rem .6rem; background: transparent; color: inherit;
  border: 1px solid var(--line); border-radius: 2px;
}
.prompt-form input[type="text"] { flex: 1; min-width: 220px; }

.review-item {
  border: 1px solid var(--line); border-radius: 2px;
  padding: 1rem 1.2rem; margin-bottom: 1rem;
}
.review-meta { font-size: .8rem; color: var(--ink-soft); margin: 0 0 .5rem; }
.review-body { margin: 0 0 .8rem; white-space: pre-wrap; word-break: break-word; }
.review-actions form { display: flex; gap: .6rem; }
.review-actions button {
  font-size: .82rem; letter-spacing: .15em; padding: .4rem 1rem;
}
.act-approve { border-color: #3d5a3a; color: #3d5a3a; }
.act-approve:hover { background: #3d5a3a; color: var(--paper); }
.act-reject { border-color: #8a6d1f; color: #8a6d1f; }
.act-reject:hover { background: #8a6d1f; color: var(--paper); }
.act-illegal { border-color: #8a3030; color: #8a3030; }
.act-illegal:hover { background: #8a3030; color: var(--paper); }

.audit-list { list-style: none; padding: 0; margin: 0; }
.audit-list li {
  font-size: .82rem; color: var(--ink-soft); line-height: 1.9;
}
.audit-at { margin-right: .6rem; font-variant-numeric: tabular-nums; }

/* ---- 移动端 ---- */

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding-top: 2.5rem; }
  .prompt-body { font-size: 1.25rem; }
  .site-head .brand { letter-spacing: .3em; }
}
