:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #163931;
  background: #eef4ef;
  --ink: #163931;
  --muted: #516a62;
  --green: #155a47;
  --border: #dbe7de;
  --paper: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
a { color: var(--green); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
a:focus-visible, button:focus-visible, :is(input, select, textarea):focus-visible {
  outline: 3px solid #2b7b60;
  outline-offset: 3px;
}

.card-page {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #daeade, transparent 44rem), #eef4ef;
}
.card-shell { width: min(100% - 36px, 480px); margin: 0 auto; padding: 52px 0 42px; }
.business-card, .share-panel, .admin-panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.business-card { overflow: hidden; box-shadow: 0 12px 36px #1e483211; }
.card-hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  min-height: 234px;
  background: linear-gradient(126deg, #dbeddf, #c2dfce);
  padding: 26px 28px 34px;
  display: grid;
  align-content: space-between;
  gap: 32px;
}
.card-hero::before {
  content: "";
  z-index: -1;
  position: absolute;
  width: 366px;
  height: 366px;
  right: -183px;
  bottom: -162px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 19px, #f2fbf473 20px 21px);
  pointer-events: none;
}
.hero-org { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 650; }
.org-logo { display: block; object-fit: contain; flex: 0 0 44px; }
.identity h1 { font-size: clamp(38px, 10vw, 52px); line-height: 1.2; letter-spacing: .07em; overflow-wrap: anywhere; }
.card-role { margin-top: 10px; color: #255a4b; font-size: 18px; font-weight: 650; }
.card-details { display: grid; gap: 22px; padding: 26px 28px 22px; overflow-wrap: anywhere; }
.card-details h2, .share-panel h2 { font-size: 15px; line-height: 1.4; }
.title-list { padding: 0; margin: 10px 0 0; list-style: none; }
.title-list li { padding: 9px 0; line-height: 1.6; }
.title-list li + li { border-top: 1px solid #edf2ef; }
.contact-list { display: grid; gap: 9px; margin: 13px 0 0; }
.contact-list div { display: grid; grid-template-columns: auto 1fr; gap: 15px; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; }
.card-actions { padding: 0 28px 25px; }
.card-hero + .card-actions { padding-top: 24px; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 650;
  font-size: 14px;
  text-decoration: none;
}
.primary { background: var(--green); color: #fff; }
.primary:hover { background: #104a3a; }
.secondary { background: #edf5ef; color: #204f40; border-color: #dce9df; }
.secondary:hover { background: #e0efe5; }
.share-panel {
  margin-top: 14px;
  padding: 15px 17px 15px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.share-panel p { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.share-panel img { width: 106px; height: 106px; display: block; }
.text-button { background: transparent; border: 0; color: var(--green); padding: 5px 0; text-decoration: underline; text-underline-offset: .2em; }
.share-panel button { font-size: 13px; min-height: 36px; }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; font-size: 13px; }
.share-actions a { display: inline-flex; align-items: center; min-height: 36px; }
.copy-status { margin-top: 9px; color: var(--green); font-size: 13px; }
.card-actions textarea, .share-panel input { margin-top: 7px; }
.preview-bar { padding: 0 0 15px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }

.admin-page { min-height: 100vh; }
.admin-shell { width: min(100% - 36px, 740px); margin-inline: auto; padding: 28px 0 48px; }
.admin-header, .panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.admin-header { margin-bottom: 21px; }
.admin-header > a { font-weight: 750; text-decoration: none; }
.admin-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.admin-nav a { font-weight: 650; text-decoration: none; }
.admin-nav [aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: .3em; }
.admin-panel { padding: clamp(20px, 5vw, 34px); }
.admin-panel + .admin-panel { margin-top: 18px; }
.admin-panel h1 { font-size: 25px; }
.panel-heading h2 { font-size: 17px; }
.admin-panel h1 + p { margin-top: 12px; line-height: 1.7; }
.login-panel { max-width: 440px; }
.login-form, .editor { display: grid; gap: 8px; margin-top: 20px; }
.login-form button { margin-top: 8px; justify-self: start; min-width: 90px; }
.editor label:not(:first-of-type) { margin-top: 8px; }
label { font-size: 14px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  background: #fafcfb;
  border: 1px solid #c7d9ce;
  border-radius: 7px;
  padding: 8px 11px;
}
textarea { resize: vertical; }
.card-actions textarea { min-height: 110px; }
.editor small { color: var(--muted); }
.panel-note, .form-note { color: var(--muted); font-size: 14px; line-height: 1.6; }
.panel-note { margin-top: 14px; }
.settings-form fieldset { margin: 0; padding: 22px 0 4px; border: 0; border-top: 1px solid var(--border); }
.settings-form legend { padding: 0; font-size: 17px; font-weight: 700; line-height: 1.4; }
.settings-form fieldset > p { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.editor.settings-form fieldset label { display: block; margin-top: 16px; }
.editor.settings-form fieldset input, .editor.settings-form fieldset select { display: block; margin-top: 6px; }
.settings-form small { display: block; margin-top: 6px; }
.editor-actions { margin-top: 10px; }
.editor-actions, .row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.card-list { list-style: none; padding: 0; margin: 14px 0 0; }
.card-list li { padding: 15px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.card-list p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.person-link { font-weight: 650; }
.status-label { color: var(--muted); font-size: 13px; }
.error, .success { border-radius: 7px; margin-top: 16px; padding: 10px 14px; }
ul.error { padding-inline-start: 32px; }
.error { color: #942e31; background: #fbefed; }
.success { color: #185640; background: #e8f4eb; }

@media (max-width: 500px) {
  .card-shell { padding-top: 22px; }
  .card-hero { padding-inline: 22px; }
  .card-details, .card-actions { padding-inline: 22px; }
}
