:root {
  color-scheme: light;
  --paper: #f4f3f0;
  --white: #fff;
  --ink: #2d2d2b;
  --muted: #77766f;
  --line: #d8d6cf;
  --signal: #eee532;
  --signal-soft: #f7f3a7;
  --danger: #c8463c;
  --shadow: 0 22px 70px rgb(35 35 31 / 9%);
  font-family: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 94% 18%, rgb(238 229 50 / 22%) 0 15%, transparent 15.2%),
    linear-gradient(135deg, #f8f7f4 0%, var(--paper) 60%, #eeede9 100%);
}

.page-loading[hidden] { display: none; }
.page-loading {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(244 243 240 / 82%);
  backdrop-filter: blur(6px);
}
.page-loading-card {
  width: min(300px, 100%);
  padding: 28px 24px;
  display: grid;
  justify-items: center;
  gap: 9px;
  border: 2px solid var(--ink);
  border-radius: 16px 48px 16px 16px;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--signal);
  text-align: center;
}
.page-loading-card strong { font-size: 1rem; }
.page-loading-card small { color: var(--muted); font-size: .76rem; line-height: 1.6; }
.page-loading-spinner {
  width: 36px;
  height: 36px;
  margin-bottom: 5px;
  border: 4px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: page-loading-spin .75s linear infinite;
}
@keyframes page-loading-spin { to { transform: rotate(360deg); } }

a { color: inherit; overflow-wrap: anywhere; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid rgb(45 45 43 / 8%);
  backdrop-filter: blur(14px);
}

.site-header .inner {
  width: min(1180px, 100%);
  min-height: 78px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
}

.site-header a { text-decoration: none; }

.brand {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 55px;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: .04em;
}

.brand::before {
  content: "";
  position: absolute;
  left: 0;
  width: 38px;
  height: 38px;
  background: linear-gradient(90deg, transparent 0 42%, var(--signal) 42% 100%), var(--ink);
  border-radius: 4px 14px 4px 4px;
  clip-path: polygon(0 24%, 72% 0, 100% 18%, 100% 100%, 0 100%);
  box-shadow: inset 9px 0 0 var(--white);
}

.brand::after {
  content: "SHARED NOTES";
  position: absolute;
  left: 55px;
  top: calc(50% + 12px);
  color: var(--muted);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.site-header .inner > a:last-child {
  position: relative;
  min-width: 150px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-header .inner > a:last-child::before {
  content: "";
  position: absolute;
  left: 0;
  width: 4px;
  height: 52px;
  background: var(--signal);
  transform: skewY(-16deg);
}

main {
  position: relative;
  width: min(1040px, calc(100% - 40px));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 74px 0 100px;
}

main::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 22px;
  left: -190px;
  width: 520px;
  height: 290px;
  border-radius: 24px 180px 180px 24px;
  background: var(--signal);
  transform: rotate(-3deg);
}

.card {
  position: relative;
  background: rgb(255 255 255 / 97%);
  border: 0;
  border-radius: 18px 78px 18px 18px;
  padding: clamp(24px, 5vw, 54px);
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 28px; }

.card:first-child::before {
  content: "MEMO";
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 12px 6px;
  background: var(--ink);
  color: var(--white);
  border-radius: 3px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .2em;
}

h1, h2 {
  margin: 0 0 20px;
  color: var(--ink);
  line-height: 1.28;
  letter-spacing: -.03em;
}

h1 { font-size: clamp(1.8rem, 4.8vw, 3.35rem); font-weight: 900; }
h2 { font-size: clamp(1.15rem, 2.5vw, 1.55rem); font-weight: 900; }
p { line-height: 1.75; }

label {
  display: block;
  margin: 20px 0 8px;
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .03em;
}

input, select, textarea, button { font: inherit; }

input[type="text"], input[type="password"], select, textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 7px;
  padding: 13px 14px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: box-shadow .18s ease, border-color .18s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 5px rgb(238 229 50 / 55%);
}

textarea { min-height: 50vh; resize: vertical; line-height: 1.7; }
.memo-editor {
  min-height: 50vh;
  width: 100%;
  padding: 15px 16px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  cursor: text;
  caret-color: #111;
  user-select: text;
  -webkit-user-select: text;
  border: 2px solid var(--ink);
  border-radius: 7px 30px 7px 7px;
  background: var(--white);
  color: var(--ink);
  line-height: 1.7;
  outline: none;
  display: flow-root;
}
.memo-editor * { caret-color: #111; }
.memo-editor::selection, .memo-editor *::selection { background: var(--signal); color: #111; }
.memo-editor:focus { border-color: var(--ink); box-shadow: 5px 5px 0 var(--signal); }
.memo-editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.memo-editor a { color: #155d8d; cursor: pointer; text-decoration-thickness: 2px; }
.memo-image {
  max-width: 100%;
  margin: 8px 16px 12px 0;
  padding: 0;
  white-space: normal;
  user-select: none;
  -webkit-user-select: none;
}
.memo-image-align-left { float: left; clear: left; }
.memo-image-align-right { float: right; clear: right; margin-right: 0; margin-left: 16px; }
.memo-image-align-center { float: none; clear: both; margin: 14px auto; }
.memo-image-size-small { width: min(30%, 220px); }
.memo-image-size-medium { width: min(48%, 380px); }
.memo-image-size-large { width: min(100%, 680px); }
.memo-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #f2f0ea;
}
.memo-image-controls {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(255 255 255 / 94%);
}
.memo-image.is-selected .memo-image-controls { display: flex; }
.memo-image.is-selected img { box-shadow: 0 0 0 4px var(--signal); }
.memo-image-control-group { display: inline-flex; gap: 3px; }
.memo-image-controls button {
  min-height: 30px;
  min-width: 34px;
  padding: 4px 7px;
  border-width: 1px;
  border-radius: 5px;
  background: #efede7;
  font-size: .68rem;
  box-shadow: none;
}
.memo-image-controls button::after { content: none; }
.memo-image-controls .memo-image-delete { color: #9d2e27; background: #ffe3e0; }
.memo-image-add::after { content: "＋"; }
.memo-image[data-image-size="small"] [data-image-set-size="small"],
.memo-image[data-image-size="medium"] [data-image-set-size="medium"],
.memo-image[data-image-size="large"] [data-image-set-size="large"],
.memo-image[data-image-align="left"] [data-image-set-align="left"],
.memo-image[data-image-align="center"] [data-image-set-align="center"],
.memo-image[data-image-align="right"] [data-image-set-align="right"] { background: var(--signal); }
.link-confirm-open { overflow: hidden; }
.memo-link-confirm[hidden] { display: none; }
.memo-link-confirm {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(45 45 43 / 46%);
  backdrop-filter: blur(5px);
}
.memo-link-confirm-card {
  width: min(460px, 100%);
  padding: 28px 26px;
  border: 2px solid var(--ink);
  border-radius: 14px 44px 14px 14px;
  background: var(--white);
  box-shadow: 9px 9px 0 var(--signal);
}
.memo-link-confirm-card h2 { margin-bottom: 10px; }
.memo-link-confirm-url { margin: 0 0 24px; color: var(--muted); font-size: .86rem; font-weight: 750; }
.memo-link-confirm-actions { display: grid; gap: 10px; }
.memo-link-confirm-actions .button,
.memo-link-confirm-actions button { width: 100%; }
.memo-link-confirm-cancel {
  min-height: 46px;
  padding: 9px 18px;
  background: #e8e6e0;
}
.memo-link-confirm-cancel::after { content: none; }
.memo-text-size-xsmall .memo-editor { font-size: .72rem; }
.memo-text-size-small .memo-editor { font-size: .86rem; }
.memo-text-size-medium .memo-editor { font-size: 1rem; }
.memo-text-size-large .memo-editor { font-size: 1.18rem; }
.memo-text-size-xlarge .memo-editor { font-size: 1.38rem; }
.memo-participants {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -8px 0 24px;
  padding: 11px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.memo-participants-heading { flex: 0 0 auto; }
.memo-participants-heading h2 { margin: 0; font-size: .72rem; letter-spacing: .04em; }
.memo-participants-heading span { color: var(--muted); font-size: .68rem; font-weight: 800; }
.memo-participant-list {
  display: flex;
  flex: 1 1 auto;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 2px 2px 4px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}
.memo-participant {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}
.memo-participant.is-current { border-color: var(--ink); background: var(--signal-soft); }
.memo-participant.is-owner { border-color: var(--ink); }
.memo-participant.is-owner .memo-participant-avatar { box-shadow: 0 0 0 2px var(--signal); }
.memo-participant-avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgb(45 45 43 / 18%);
  border-radius: 50%;
  color: var(--ink);
  font-size: .76rem;
  font-weight: 900;
}
.memo-participant-avatar.tone-1 { background: #f4dd7d; }
.memo-participant-avatar.tone-2 { background: #c9e8d0; }
.memo-participant-avatar.tone-3 { background: #d8d2f2; }
.memo-participant-avatar.tone-4 { background: #f4c9c3; }
.memo-participant-avatar.tone-5 { background: #c9e1f0; }
.memo-participant-avatar.tone-6 { background: #e1dfd5; }
.memo-participant-name { display: grid; color: var(--ink); font-size: .72rem; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.memo-participant-name small { margin-top: 2px; color: var(--muted); font-size: .56rem; font-weight: 700; }

button, .button {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: linear-gradient(90deg, var(--signal) 0 calc(100% - 54px), var(--ink) calc(100% - 54px));
  color: var(--ink);
  padding: 11px 70px 11px 22px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 900;
  transition: transform .16s ease, box-shadow .16s ease;
}

button::after, .button::after {
  content: "\2197";
  position: absolute;
  right: 18px;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
}

button:hover, .button:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgb(45 45 43 / 13%); }
.danger { background: linear-gradient(90deg, #ffb8b1 0 calc(100% - 54px), var(--danger) calc(100% - 54px)); }
.secondary { background: linear-gradient(90deg, #e8e6e0 0 calc(100% - 54px), var(--ink) calc(100% - 54px)); }
.line-login-button { background: linear-gradient(90deg, #06c755 0 calc(100% - 54px), #04a344 calc(100% - 54px)); color: var(--white); }
.account-intro { margin-top: 32px; padding-top: 26px; border-top: 2px solid var(--line); }
.account-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.account-heading > div { min-width: 0; }
.account-heading .eyebrow { margin: 0 0 8px; color: #04a344; font-size: .7rem; font-weight: 900; letter-spacing: .14em; }
.account-heading > a { flex: 0 0 auto; font-weight: 800; white-space: nowrap; }
.account-settings-form label {
  margin: 30px 0 10px;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.28;
  letter-spacing: -.03em;
}
.field-help { margin: -4px 0 9px; color: var(--muted); font-size: .86rem; }
.pin-input-compact { width: min(220px, 100%); }
.account-settings-form .setting-toggle {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 26px 0 4px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 7px 24px 7px 7px;
  background: var(--signal-soft);
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 0;
}
.setting-toggle input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.setting-toggle span { display: grid; gap: 4px; }
.setting-toggle strong { font-size: .95rem; line-height: 1.5; }
.setting-toggle small { color: var(--muted); font-size: .76rem; font-weight: 700; line-height: 1.55; }
.owner-setup-step { padding: 26px 0 32px; border-bottom: 2px solid var(--line); }
.owner-setup-step h2, .account-settings-heading h2 { margin-bottom: 8px; }
.owner-setup-step > p:not(.owner-step-label) { margin: 0; color: var(--muted); }
.owner-step-label { margin: 0 0 8px; color: #04a344; font-size: .72rem; font-weight: 900; letter-spacing: .16em; }
.owner-open-step { padding-top: 32px; }
.owner-open-step .memo-open-action { margin-bottom: 0; }
.account-settings-heading { padding-top: 34px; }
.owner-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 7px 28px 7px 7px;
  background: var(--signal-soft);
}
.owner-notice strong { font-size: .95rem; }
.owner-notice .button { flex: 0 0 auto; }
.update-check-button::after { content: "\21bb"; }
.update-check-button.stale { background: linear-gradient(90deg, var(--signal-soft) 0 calc(100% - 54px), var(--danger) calc(100% - 54px)); }
.update-check-button.stale::after { content: "\2193"; }
.update-status { color: var(--danger); font-size: .9rem; font-weight: 800; }
.vote-voters {
  margin: 22px 0;
  padding: 18px 20px;
  border: 2px solid var(--ink);
  border-radius: 7px 28px 7px 7px;
  background: var(--signal-soft);
}
.vote-voters h3 { margin: 0 0 12px; font-size: 1rem; }
.vote-voters ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.vote-voters li { padding: 7px 11px; border-radius: 999px; background: var(--white); font-size: .86rem; font-weight: 800; }
.vote-voters .muted { margin: 0; }
.line-browser-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: 8px 30px 8px 8px;
  background: var(--signal-soft);
}
.line-browser-help h2 { margin-bottom: 6px; font-size: 1.05rem; }
.line-browser-help p { margin: 3px 0; }
.line-browser-help .button { flex: 0 0 auto; }
.app-install-guide {
  margin-top: 28px;
  padding: 20px 22px;
  border: 2px solid var(--ink);
  border-radius: 8px 30px 8px 8px;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--signal);
}
.app-install-guide[hidden] { display: none; }
.app-install-intro { display: flex; align-items: center; gap: 16px; }
.app-install-intro h2 { margin: 0 0 4px; font-size: 1.05rem; }
.app-install-intro p { margin: 0; color: var(--muted); font-size: .9rem; }
.app-install-icon {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 9px 18px 9px 9px;
  background: linear-gradient(90deg, var(--ink) 0 36%, var(--signal) 36% 100%);
}
.app-install-icon::after {
  content: "+";
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  font-weight: 900;
  line-height: 1;
}
.app-install-guide details {
  margin: 14px 0 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.app-install-guide summary {
  position: relative;
  padding: 13px 28px 0 0;
  background: transparent;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 900;
  list-style: none;
}
.app-install-guide summary::-webkit-details-marker { display: none; }
.app-install-guide summary::after { content: "+"; position: absolute; right: 2px; font-size: 1.15rem; }
.app-install-guide details[open] summary::after { content: "−"; }
.app-install-steps { padding-top: 12px; }
.app-install-steps > p:not(.muted) { display: grid; grid-template-columns: 76px 1fr; gap: 10px; margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.app-install-steps > p:first-child { border-top: 0; }
.app-install-steps span { color: var(--muted); font-size: .86rem; line-height: 1.65; }
.app-install-steps [hidden],
.app-install-button[hidden] { display: none !important; }
.app-install-button {
  width: auto;
  min-height: 0;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: .86rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.app-install-button::after { display: none; }
.app-install-button:hover { transform: none; box-shadow: none; }
.app-install-steps .muted { margin: 12px 0 0; font-size: .76rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.actions form { margin: 0; }
.muted, .meta { color: var(--muted); font-size: .9rem; }
.meta { margin: -7px 0 24px; font-weight: 650; }
.privacy-notice {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.55;
}
.memo-privacy-notice { margin: 18px 0 0; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: .72rem; font-weight: 900; letter-spacing: .14em; }
.legal-card h2 { margin-top: 38px; font-size: 1.35rem; }
.legal-card li + li { margin-top: 8px; }
.legal-card a { font-weight: 800; }
.operator-info { margin: 30px 0 0; }
.operator-info > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.operator-info > div:last-child { border-bottom: 1px solid var(--line); }
.operator-info dt { color: var(--muted); font-weight: 850; }
.operator-info dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .operator-info > div { grid-template-columns: 1fr; gap: 5px; }
}
.contact-card textarea { min-height: 260px; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.site-footer { padding: 28px 20px 34px; border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: .7rem; }
.site-footer > div { width: min(100%, 1160px); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.site-footer a { color: inherit; text-underline-offset: 3px; }

.notice, .error { border-radius: 8px 42px 8px 8px; padding: 15px 18px; margin-bottom: 20px; font-weight: 750; }
.notice { background: var(--signal-soft); border: 2px solid var(--ink); }
.error { background: #fff0ee; border: 2px solid var(--danger); color: #812e28; }

details { margin: 22px 0; overflow: hidden; border: 2px solid var(--ink); border-radius: 8px 34px 8px 8px; background: var(--white); }
summary { padding: 14px 18px; background: var(--signal); cursor: pointer; font-weight: 900; }
.memo-view { min-height: 160px; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.memo-view a { color: #155d8d; white-space: normal; text-decoration-thickness: 2px; }

table { width: 100%; border-collapse: collapse; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 760px; }
th, td { padding: 15px 10px; border-bottom: 2px solid var(--ink); text-align: left; vertical-align: middle; }
th { background: var(--signal); color: var(--ink); font-size: .78rem; font-weight: 900; letter-spacing: .06em; }
td a { font-weight: 800; text-decoration-thickness: 2px; }
td button { min-height: 40px; padding: 7px 58px 7px 14px; font-size: .8rem; }
.admin-table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-table-actions form { margin: 0; }
.admin-small-button { min-height: 40px; padding: 7px 58px 7px 14px; font-size: .8rem; white-space: nowrap; }
.admin-search-form { margin: 0 0 18px; }
.admin-search-controls { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.admin-search-controls input { flex: 1 1 300px; margin: 0; }
.admin-search-controls button,
.admin-search-clear { flex: 0 0 auto; width: auto; margin: 0; }
.admin-memo-readonly { margin-top: 26px; }
.admin-memo-readonly h2 { margin: 24px 0 10px; font-size: 1rem; }
.admin-memo-title { margin: 0; font-size: 1.2rem; font-weight: 850; }
.admin-memo-content { min-height: 160px; padding: 18px; border: 2px solid var(--ink); border-radius: 10px; background: #f8f7f3; white-space: pre-wrap; overflow-wrap: anywhere; }
.participant-client { display: grid; gap: 3px; min-width: 190px; font-size: .76rem; line-height: 1.35; }
.participant-client > strong { color: var(--ink); font-size: .82rem; }
.participant-client > span { color: var(--muted); }
.participant-match { display: inline-block; width: fit-content; margin-top: 4px; padding: 4px 7px; border-radius: 5px; background: #fff3bf; color: #6f5600; font-size: .7rem; font-style: normal; font-weight: 850; }
.participant-match.is-strong { background: #ffd5cf; color: #8b251b; }
.participant-match.is-network { background: #e8e6df; color: #55544f; }

.url-copy { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.url-copy input { margin: 0; }
.copy-button { min-width: 138px; }
.copy-button::after { content: "\2398"; }
.copy-button.copied { background: linear-gradient(90deg, var(--signal-soft) 0 calc(100% - 54px), var(--ink) calc(100% - 54px)); }
.memo-open-action { margin: 24px 0 28px; }
.memo-open-action .button { width: 100%; }
.account-manage-button { width: 100%; }
.account-memo-title { font-weight: 850; }
.account-memo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 360px; }
.account-memo-actions .button { min-width: 0; }
.invite-admin-action { margin-top: 18px; }
.invite-admin-action .invite-text { margin-bottom: 18px; }
.invite-card { overflow: hidden; }
.invite-card::after {
  content: "";
  position: absolute;
  right: -65px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--signal);
  opacity: .22;
  pointer-events: none;
}
.invite-text {
  position: relative;
  z-index: 1;
  margin: 18px 0;
  padding: 18px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 2px solid var(--ink);
  border-radius: 7px 34px 7px 7px;
  background: var(--paper);
  font: inherit;
  line-height: 1.7;
}
.invite-copy-button { position: relative; z-index: 1; }
.conflict-card { border: 2px solid rgb(238 229 50 / 70%); }
.conflict-card .memo-view { border: 1px solid var(--line); border-radius: 7px 28px 7px 7px; background: var(--paper); }
.delete-vote-card { border: 2px solid rgb(200 70 60 / 35%); }
.delete-vote-card .vote-count { margin: 18px 0 2px; }
.delete-vote-card .vote-count strong { color: var(--danger); font-size: 1.35rem; }
.inline { display: inline; }
.stack { display: grid; gap: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Landing page */
.landing main {
  width: 100%;
  max-width: none;
  padding: 0;
  overflow: hidden;
}
.landing main::before { display: none; }
.landing-page { --lp-width: min(1160px, calc(100% - 48px)); }
.lp-hero {
  position: relative;
  width: var(--lp-width);
  min-height: 660px;
  margin: 0 auto;
  padding: 110px 0 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
}
.lp-hero-copy { min-width: 0; }
.lp-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -150px;
  right: -280px;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background: var(--signal);
  opacity: .94;
}
.lp-eyebrow, .lp-section-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.lp-hero h1 {
  margin-bottom: 24px;
  font-size: clamp(2.85rem, 4.2vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.065em;
}
.lp-title-line { position: relative; white-space: nowrap; }
.lp-title-mobile-break { display: none; }
.lp-title-highlight::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -5px;
  right: -10px;
  bottom: 5px;
  height: 18px;
  background: var(--signal);
  transform: rotate(-1deg);
}
.lp-lead { max-width: 590px; margin: 0; color: #55544f; font-size: clamp(1rem, 1.7vw, 1.16rem); font-weight: 650; }
.lp-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
.lp-text-link { font-weight: 900; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.lp-login-note { margin: 15px 0 0; color: var(--muted); font-size: .78rem; }
.lp-note-art { position: relative; min-height: 450px; }
.lp-note {
  position: absolute;
  display: flex;
  flex-direction: column;
  box-shadow: 18px 26px 60px rgb(31 31 27 / 18%);
}
.lp-note-front {
  top: 24px;
  right: 8%;
  width: min(340px, 80%);
  aspect-ratio: 1 / 1.08;
  padding: 38px 34px;
  border: 2px solid var(--ink);
  border-radius: 5px 54px 5px 5px;
  background: var(--white);
  transform: rotate(3deg);
}
.lp-note-front::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 38%;
  width: 92px;
  height: 34px;
  background: rgb(255 255 255 / 68%);
  border: 1px solid rgb(45 45 43 / 10%);
  transform: rotate(-5deg);
}
.lp-note-front span { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .18em; }
.lp-note-front strong { margin-top: 34px; font-size: clamp(1.8rem, 3.5vw, 2.65rem); line-height: 1.25; letter-spacing: -.04em; }
.lp-note-front i { margin-top: auto; color: var(--muted); font-size: .82rem; font-style: normal; font-weight: 750; }
.lp-note-back {
  top: 205px;
  left: -14%;
  width: 210px;
  height: 185px;
  justify-content: center;
  padding: 26px 108px 26px 22px;
  border-radius: 4px;
  background: var(--signal-soft);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.45;
  transform: rotate(-8deg);
}
.lp-pencil {
  position: absolute;
  right: -20px;
  bottom: 58px;
  width: 230px;
  height: 18px;
  border: 2px solid var(--ink);
  background: #ff9f91;
  transform: rotate(-34deg);
  box-shadow: 10px 13px 28px rgb(31 31 27 / 16%);
}
.lp-pencil::after { content: ""; position: absolute; right: -31px; top: -2px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 31px solid var(--ink); }

.lp-intro {
  padding: 104px max(24px, calc((100% - 960px) / 2));
  text-align: center;
  background: var(--ink);
  color: var(--white);
}
.lp-intro .lp-section-label { color: var(--signal); }
.lp-intro h2, .lp-cta h2 { color: inherit; font-size: clamp(2rem, 4.6vw, 3.9rem); }
.lp-intro-title-line { display: inline; }
.lp-intro > p:last-child { max-width: 750px; margin: 0 auto; color: #d8d7d1; font-size: 1.05rem; }
.lp-features {
  width: var(--lp-width);
  margin: 0 auto;
  padding: 105px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.lp-feature {
  position: relative;
  min-height: 305px;
  padding: 30px 24px;
  border: 2px solid var(--ink);
  border-radius: 7px 42px 7px 7px;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--signal);
}
.lp-feature:nth-child(even) { transform: translateY(28px); }
.lp-feature > span { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--white); font-size: .75rem; font-weight: 900; }
.lp-feature h3 { margin: 48px 0 12px; font-size: 1.22rem; }
.lp-feature p { margin: 0; color: var(--muted); font-size: .9rem; }

.lp-howto {
  padding: 105px max(24px, calc((100% - 1160px) / 2));
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(55px, 10vw, 130px);
  background: var(--white);
}
.lp-howto-heading { align-self: start; position: sticky; top: 120px; }
.lp-howto-heading h2, .lp-ideas h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.lp-howto-heading > p:last-child { color: var(--muted); }
.lp-howto ol { margin: 0; padding: 0; list-style: none; }
.lp-howto li { display: grid; grid-template-columns: 72px 1fr; gap: 24px; padding: 12px 0 34px; border-bottom: 2px solid var(--ink); }
.lp-howto li + li { padding-top: 34px; }
.lp-howto li > span { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 8px 28px 8px 8px; background: var(--signal); font-size: 1.3rem; font-weight: 900; }
.lp-howto h3 { margin: 3px 0 5px; font-size: 1.3rem; }
.lp-howto li p { margin: 0; color: var(--muted); }

.lp-ideas { width: var(--lp-width); margin: 0 auto; padding: 110px 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: center; }
.lp-idea-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-idea-tags span { padding: 14px 20px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font-size: .9rem; font-weight: 850; }
.lp-idea-tags span:nth-child(3n + 1) { background: var(--signal-soft); }
.lp-faq {
  width: var(--lp-width);
  margin: 0 auto;
  padding: 100px 0;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 72px;
}
.lp-faq-heading h2 { max-width: 430px; font-size: clamp(2rem, 4vw, 3.25rem); }
.lp-faq-heading > p:last-child { color: var(--muted); }
.lp-faq-list { display: grid; gap: 14px; }
.lp-faq-list details { border: 2px solid var(--ink); border-radius: 7px 28px 7px 7px; background: var(--white); overflow: hidden; }
.lp-faq-list summary { position: relative; padding: 20px 56px 20px 20px; cursor: pointer; font-weight: 900; list-style: none; }
.lp-faq-list summary::-webkit-details-marker { display: none; }
.lp-faq-list summary::after { content: "+"; position: absolute; top: 14px; right: 20px; font-size: 1.65rem; line-height: 1; }
.lp-faq-list details[open] summary::after { content: "−"; }
.lp-faq-list details p { margin: 0; padding: 0 20px 20px; color: var(--muted); }
.lp-cta { padding: 110px 24px 90px; text-align: center; background: var(--signal); color: var(--ink); }
.lp-cta > p:not(.lp-eyebrow, .lp-privacy, .lp-account-note) { max-width: 620px; margin: 0 auto 30px; }
.lp-cta .button { min-width: 270px; }
.lp-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px; }
.lp-account-note { margin: 0 0 22px; }
.lp-privacy { margin: 28px 0 0; color: #6e6b25; font-size: .72rem; }

@media (max-width: 920px) {
  .lp-hero { min-height: auto; padding: 80px 0 64px; grid-template-columns: 1fr; gap: 42px; }
  .lp-hero::before { top: 360px; right: -250px; width: 620px; height: 620px; }
  .lp-hero h1 { font-size: clamp(2.85rem, 8vw, 4rem); }
  .lp-note-art { min-height: 420px; }
  .lp-note-back { left: 1%; width: 190px; padding: 28px; font-size: 1.1rem; }
}

@media (max-width: 700px) {
  .site-header .inner { min-height: 66px; padding: 0 16px; }
  .brand { padding-left: 43px; font-size: 1rem; }
  .brand::before { width: 32px; height: 32px; }
  .brand::after { left: 43px; top: calc(50% + 10px); font-size: .48rem; }
  .site-header .inner > a:last-child { min-width: auto; padding: 0 10px 0 18px; font-size: .74rem; }
  .site-header .inner > a:last-child::before { height: 42px; }
  main { width: min(100% - 24px, 1040px); padding: 52px 0 70px; }
  main::before { top: 14px; left: -170px; width: 390px; height: 220px; }
  .card { padding: 24px 18px 28px; border-radius: 14px 48px 14px 14px; }
  .card + .card { margin-top: 18px; }
  h1 { font-size: 1.85rem; }
  textarea { min-height: 48vh; }
  .memo-participants { gap: 10px; }
  .memo-participants-heading h2 { font-size: .68rem; }
  .split { grid-template-columns: 1fr; }
  .url-copy { grid-template-columns: 1fr; }
  th:nth-child(2), td:nth-child(2) { display: none; }
  .actions { align-items: stretch; }
  .actions > button, .actions > .button { width: 100%; }
  .actions form { width: 100%; }
  .actions form button { width: 100%; }
  .line-browser-help { align-items: stretch; flex-direction: column; }
  .line-browser-help .button { width: 100%; }
  .app-install-guide { padding: 18px; }
  .app-install-steps > p:not(.muted) { grid-template-columns: 1fr; gap: 3px; }
  .account-heading { flex-direction: column; gap: 10px; }
  .account-heading h1 { margin-bottom: 0; font-size: 1.72rem; }
  .account-heading > a { align-self: flex-end; }
  .owner-notice { align-items: stretch; flex-direction: column; }
  .owner-notice .button { width: 100%; }
  .delete-vote-card { padding-top: 22px; padding-bottom: 22px; }
  .delete-vote-card h2 { margin-bottom: 12px; }
  .delete-vote-card p { margin: 9px 0; line-height: 1.55; }
  .delete-vote-card .vote-count { margin: 14px 0 6px; }
  .delete-vote-card form { margin-top: 14px; }
  .delete-vote-card button { min-height: 48px; }
  .account-memo-list table,
  .account-memo-list tbody,
  .account-memo-list tr,
  .account-memo-list td { display: block; width: 100%; }
  .account-memo-list thead { display: none; }
  .account-memo-list tr { padding: 16px 0; border-bottom: 2px solid var(--ink); }
  .account-memo-list td { padding: 4px 0; border: 0; }
  .account-memo-list td:nth-child(2) { display: block; color: var(--muted); font-size: .78rem; }
  .account-memo-list td:last-child { padding-top: 10px; }
  .account-memo-list td button { width: 100%; }
  .account-memo-actions { grid-template-columns: 1fr; min-width: 0; }

  .landing-page { --lp-width: min(calc(100% - 28px), 1160px); }
  .lp-hero { min-height: auto; padding: 70px 0 58px; grid-template-columns: 1fr; gap: 34px; }
  .lp-hero::before { top: 315px; right: -250px; width: 570px; height: 570px; }
  .lp-hero h1 { font-size: clamp(2.55rem, 13.8vw, 4.2rem); }
  .lp-hero-actions { align-items: stretch; flex-direction: column; }
  .lp-hero-actions .button { width: 100%; }
  .lp-text-link { align-self: center; }
  .lp-login-note { text-align: center; }
  .lp-note-art { min-height: 430px; }
  .lp-note-front { top: 6px; right: 2%; width: 78%; padding: 30px 25px; }
  .lp-note-front strong { margin-top: 25px; font-size: 1.8rem; }
  .lp-note-back { z-index: 2; top: 320px; left: 0; width: 165px; height: 88px; padding: 16px; font-size: .9rem; }
  .lp-pencil { z-index: 3; right: -25px; bottom: 20px; width: 180px; }
  .lp-intro { padding: 68px 22px; }
  .lp-intro h2 { font-size: 1.85rem; line-height: 1.28; letter-spacing: -.035em; }
  .lp-intro h2 br { display: none; }
  .lp-intro-title-line { display: block; }
  .lp-intro > p:last-child { max-width: 34em; font-size: .95rem; line-height: 1.85; }
  .lp-features { padding: 70px 0 90px; grid-template-columns: 1fr; gap: 16px; }
  .lp-feature { min-height: 230px; padding: 25px 22px; }
  .lp-feature:nth-child(even) { transform: none; }
  .lp-feature h3 { margin-top: 35px; }
  .lp-howto { padding: 76px 20px; grid-template-columns: 1fr; gap: 42px; }
  .lp-howto-heading { position: static; }
  .lp-howto li { grid-template-columns: 54px 1fr; gap: 18px; }
  .lp-howto li > span { width: 50px; height: 50px; }
  .lp-ideas { padding: 76px 0; grid-template-columns: 1fr; gap: 28px; }
  .lp-idea-tags { gap: 9px; }
  .lp-idea-tags span { padding: 11px 14px; font-size: .78rem; }
  .lp-faq { padding: 76px 0; grid-template-columns: 1fr; gap: 32px; }
  .lp-cta { padding: 78px 20px 68px; }
  .lp-cta .button { width: 100%; min-width: 0; }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 700px) {
    input[type="text"], input[type="password"], select, textarea,
    .memo-text-size-xsmall .memo-editor,
    .memo-text-size-small .memo-editor,
    .memo-text-size-medium .memo-editor { font-size: 16px; }
  }
}

@media (max-width: 520px) {
  .memo-image-size-small { width: 42%; }
  .memo-image-size-medium { width: 62%; }
  .memo-image-size-large { width: 100%; }
  .memo-image-controls { gap: 4px; }
  .memo-image-controls button { padding-inline: 6px; }
  .lp-hero h1 { font-size: clamp(2.4rem, 11vw, 3rem); }
  .lp-title-mobile-break { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
