/* Shared writing and account controls, scoped to the public forms. */
:root {
  --form-ink: #1c211e;
  --form-muted: #666d60;
  --form-paper: #fafaf7;
  --form-line: #dedfd8;
  --form-font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.portal-form {
  color: var(--form-ink);
  font-family: var(--form-font);
}
.portal-form label {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}
.portal-form
  :is(input:not([type="checkbox"]):not([type="file"]), textarea, select) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--form-line);
  border-radius: 12px;
  background: #fff;
  color: var(--form-ink);
  padding: 13px 15px;
  min-height: 50px;
  font: 400 15px/1.5 var(--form-font);
  letter-spacing: 0;
  outline: none;
  box-shadow: 0 1px 2px #1b211a04;
  transition:
    border-color 0.16s,
    box-shadow 0.16s,
    background 0.16s;
}
.portal-form :is(input, textarea)::placeholder {
  color: #6f756b;
  opacity: 1;
}
.portal-form
  :is(input:not([type="checkbox"]):not([type="file"]), textarea, select):hover {
  border-color: #bfc3b9;
}
.portal-form
  :is(input:not([type="checkbox"]):not([type="file"]), textarea, select):focus {
  border-color: #4d594c;
  background: #fff;
  box-shadow: 0 0 0 3px #4d594c13;
  outline: none;
}
.portal-form input[readonly] {
  background: #f1f2ec;
  color: #6b7167;
  box-shadow: none;
}
.portal-form textarea {
  resize: vertical;
  min-height: 152px;
  line-height: 1.8;
}
.portal-form select {
  padding-right: 32px;
}
.portal-form button:focus-visible,
.portal-form a:focus-visible {
  outline: 2px solid var(--form-ink);
  outline-offset: 4px;
}
.portal-form
  :is(
    .member-primary,
    .memo-submit-button,
    .button-primary,
    button[type="submit"]
  ) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid var(--form-ink);
  border-radius: 12px;
  background: var(--form-ink);
  color: #fff;
  font: 550 14px/1.5 var(--form-font);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  box-shadow: 0 1px 2px #0000000d;
  transition:
    background 0.16s,
    box-shadow 0.16s;
}
.portal-form
  :is(
    .member-primary,
    .memo-submit-button,
    .button-primary,
    button[type="submit"]
  ):hover:not(:disabled) {
  background: #353d36;
  border-color: #353d36;
  box-shadow: 0 3px 8px #1c211e13;
}
.portal-form button:disabled {
  cursor: not-allowed;
}
.portal-form
  :is(
    .member-primary,
    .memo-submit-button,
    .button-primary,
    button[type="submit"]
  ):disabled {
  background: #e8ebe3;
  border-color: #e8ebe3;
  color: #777e70;
  box-shadow: none;
  opacity: 1;
}
.portal-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 1px 0;
  accent-color: var(--form-ink);
}
.portal-form .form-optional {
  color: var(--form-muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 6px;
}
@media (max-width: 600px) {
  .portal-form
    :is(input:not([type="checkbox"]):not([type="file"]), textarea, select) {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portal-form *,
  .portal-form *::before,
  .portal-form *::after {
    transition: none !important;
  }
}

/* Homepage guestbook: one focused writing surface. */
.collab-message-panel {
  display: block;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--form-line);
  border-radius: 20px;
  background: var(--form-paper);
  box-shadow: none;
}
.collab-message-copy {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--form-line);
}
.collab-message-copy h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.collab-form {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.collab-form label {
  gap: 9px;
  font-weight: 550;
}
.collab-form > label:has(textarea),
.collab-form-actions {
  grid-column: 1 / -1;
}
.collab-form textarea {
  min-height: 176px;
}
.collab-form-actions {
  justify-content: flex-end;
  gap: 20px;
}
.collab-form-actions button {
  order: 2;
  min-width: 148px;
}
.collab-feedback {
  margin: 0;
  font: 13px/1.7 var(--form-font);
  letter-spacing: 0;
}
.collab-feedback:empty {
  display: none;
}
@media (max-width: 600px) {
  .collab-form {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .collab-message-copy {
    padding-bottom: 22px;
    margin-bottom: 24px;
  }
  .collab-form-actions button {
    width: 100%;
  }
}
