/* ---------- 留言册 / 表单 / 对话框 ---------- */

.gb__field {
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.gb__field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

input[type="text"],
textarea {
  width: 100%;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid;
  border-color: var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
  padding: 9px 10px;
  min-height: 44px;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #8a8578;
}

@media (prefers-color-scheme: dark) {
  input[type="text"]::placeholder,
  textarea::placeholder {
    color: #8b939b;
  }
}

.gb__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.gb__count {
  font-size: 12px;
  color: var(--ink-soft);
  border: 1px solid var(--win-dark);
  background: var(--paper);
  padding: 5px 8px;
  font-family: var(--font-ui);
}

.gb__list {
  list-style: none;
  margin: 16px 0 0;
  padding: 12px 0 0;
  border-top: 2px groove var(--win-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.note {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-left: 4px solid var(--title-b);
  padding: 9px 11px;
  min-width: 0;
}

.note__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-bottom: 4px;
}

.note__name {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  word-break: break-word;
}

.note__time {
  font-size: 11px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.note__body {
  margin: 0;
  font-family: var(--font-read);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note--new {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.gb__empty {
  margin: 14px 0 0;
  padding: 16px 12px;
  text-align: center;
  font-family: var(--font-read);
  font-size: 15px;
  color: var(--ink-soft);
  border: 1px dashed var(--win-dark);
}

@media (max-width: 879px) {
  .gb__list {
    max-height: none;
    overflow-y: visible;
  }
}

.gb__hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- 对话框 ---------- */

.dialog {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 2px solid;
  border-color: var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
  background: var(--win);
  color: var(--ink);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.dialog__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 8px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: var(--title-text);
}

.dialog__bar h2 {
  flex: 1 1 auto;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog__body {
  padding: 14px 14px 16px;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}

.dialog__intro {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  line-height: 1.6;
}

.dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.dialog__actions .btn {
  flex: 1 1 120px;
}

/* ---------- 链接清单 ---------- */

.links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.links li {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--win-dark);
  font-size: 14px;
  align-items: baseline;
}

.links li:last-child {
  border-bottom: 0;
}

.links .links__tag {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

.links a,
.links button.links__link {
  color: var(--link);
  text-decoration: underline;
  font-size: 14px;
  background: none;
  border: 0;
  padding: 4px 0;
  font-family: var(--font-ui);
  cursor: pointer;
  text-align: left;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
}

.links a:visited {
  color: var(--link-visited);
}

.links a:hover,
.links button.links__link:hover {
  color: var(--link-hover);
}

.about {
  font-family: var(--font-read);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin: 0;
}

.about strong {
  color: var(--ink);
}
