:root {
  color-scheme: dark;
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-synthesis: none;
  --bg: #071411;
  --surface: #0d201b;
  --surface-strong: #112b24;
  --surface-soft: #13241f;
  --line: #29483f;
  --line-strong: #3f6c5e;
  --text: #effaf6;
  --muted: #a6bbb3;
  --muted-strong: #c9d9d3;
  --green: #63e1b5;
  --green-deep: #174f40;
  --gold: #f4c95d;
  --gold-soft: #3a321b;
  --coral: #f18d76;
  --danger: #ff9d8a;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  --page: min(1120px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(63, 108, 94, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 108, 94, 0.08) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  letter-spacing: 0;
}

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

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  min-height: 76px;
  padding: 12px max(20px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid rgba(63, 108, 94, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(7, 20, 17, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.brand span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 17px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.wallet-button,
.primary-button,
.secondary-button,
.quiet-button,
.danger-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.wallet-button {
  max-width: 260px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--muted-strong);
}

.wallet-button:hover,
.secondary-button:hover,
.quiet-button:hover {
  border-color: var(--green);
  color: var(--text);
}

.wallet-button:active,
.primary-button:active,
.secondary-button:active,
.quiet-button:active {
  transform: translateY(1px);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(244, 201, 93, 0.12);
}

.wallet-button.connected .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(99, 225, 181, 0.12);
}

.wallet-edit-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.wallet-edit-icon svg {
  width: 16px;
  height: 16px;
}

#app {
  width: var(--page);
  min-height: calc(100vh - 170px);
  margin: 0 auto;
  padding: 40px 0 72px;
  outline: none;
}

.loading-view {
  min-height: 50vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  margin-bottom: 32px;
}

.page-eyebrow,
.section-eyebrow,
.field-label,
.meta-label {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.page-head h1,
.detail-title {
  max-width: 760px;
  margin: 8px 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: auto-phrase;
}

.page-head p:not(.page-eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 16px;
  line-height: 1.85;
}

.primary-button {
  background: var(--green);
  color: #071411;
}

.primary-button:hover {
  background: #80ebc6;
}

.page-head [data-create-pool] {
  white-space: nowrap;
}

.secondary-button {
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.quiet-button {
  border-color: var(--line);
  background: transparent;
  color: var(--muted-strong);
}

.danger-button {
  border-color: rgba(241, 141, 118, 0.5);
  background: rgba(241, 141, 118, 0.12);
  color: var(--danger);
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.concept-band {
  margin-bottom: 34px;
  border: 1px solid #635629;
  border-left: 5px solid var(--gold);
  border-radius: 7px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  background: rgba(58, 50, 27, 0.72);
}

.concept-band svg {
  width: 24px;
  height: 24px;
  color: var(--gold);
}

.concept-band strong {
  display: block;
  margin-bottom: 6px;
}

.concept-band p {
  margin: 0;
  color: #e2d5ad;
  line-height: 1.75;
}

.home-scope {
  width: fit-content;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px;
  display: flex;
  gap: 4px;
  background: var(--surface);
}

.home-scope button {
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  padding: 0 18px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}

.home-scope button[aria-current="page"] {
  color: var(--text);
  background: var(--green-deep);
}

.compact-page-head h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.toolbar {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.segmented {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
  background: var(--surface);
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  padding: 0 15px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.segmented button[aria-selected="true"] {
  background: var(--green-deep);
  color: var(--text);
}

.pool-count {
  color: var(--muted);
  font-size: 13px;
}

.pool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pool-card {
  min-width: 0;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(13, 32, 27, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  transition: border-color 160ms ease, transform 160ms ease;
}

.pool-card-link {
  min-width: 0;
  height: 100%;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}

.pool-card:has(.pool-card-link:focus-visible) {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(99, 225, 181, 0.12);
}

.pool-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.manage-pool-card {
  cursor: default;
}

.manage-pool-card:hover {
  transform: none;
}

.pool-card-actions {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pool-card-actions > * {
  min-height: 40px;
  padding: 0 13px;
  font-size: 12px;
}

.pool-card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.pool-card-badges {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pool-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.pool-menu-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted-strong);
  background: rgba(17, 40, 34, 0.82);
  cursor: pointer;
}

.pool-menu-toggle:hover,
.pool-menu-toggle:focus-visible {
  border-color: var(--line-strong);
  color: var(--text);
}

.pool-menu-toggle span {
  transform: none;
  font-size: 24px;
  line-height: 1;
}

.pool-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  right: 0;
  min-width: 178px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #102923;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.pool-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  padding: 0 11px;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pool-menu button:hover,
.pool-menu button:focus-visible {
  background: var(--green-deep);
}

.pool-menu button.danger-menu-item {
  color: #ffb2aa;
}

.pool-menu button.danger-menu-item:hover,
.pool-menu button.danger-menu-item:focus-visible {
  background: rgba(130, 48, 48, 0.52);
}

.menu-disabled-action {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  border-radius: 5px;
  padding: 0 11px;
  color: rgba(255, 178, 170, 0.48);
  font-size: 12px;
  font-weight: 700;
  cursor: not-allowed;
  outline: none;
}

.menu-disabled-action:hover,
.menu-disabled-action:focus-visible,
.menu-disabled-action.is-open {
  background: rgba(130, 48, 48, 0.2);
}

.menu-disabled-action:focus-visible {
  box-shadow: 0 0 0 2px rgba(99, 225, 181, 0.5);
}

.menu-disabled-tooltip {
  position: absolute;
  z-index: 1;
  top: calc(100% + 6px);
  right: 0;
  width: min(248px, calc(100vw - 64px));
  padding: 10px 11px;
  border: 1px solid rgba(255, 178, 170, 0.45);
  border-radius: 6px;
  color: var(--text);
  background: #35211f;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.menu-disabled-action:hover .menu-disabled-tooltip,
.menu-disabled-action:focus-visible .menu-disabled-tooltip,
.menu-disabled-action.is-open .menu-disabled-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.manage-note {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.loading-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
  background: rgba(13, 32, 27, 0.7);
}

.manage-empty-state {
  max-width: 760px;
  margin: 0 auto;
}

.legacy-recovery {
  margin: -10px 0 28px;
  border: 1px solid #665827;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 18px;
  background: rgba(58, 50, 27, 0.58);
}

.legacy-recovery h2 {
  margin: 6px 0 8px;
  font-size: 20px;
}

.legacy-recovery p:not(.section-eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #e2d5ad;
  font-size: 13px;
  line-height: 1.7;
}

.legacy-recovery-list {
  display: grid;
  gap: 10px;
}

.legacy-recovery-item {
  border-top: 1px solid rgba(226, 213, 173, 0.24);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legacy-recovery-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-card-head,
.detail-kicker,
.section-heading,
.summary-row,
.modal-actions,
.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visibility-badge,
.status-badge,
.expiry-badge {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 750;
}

.status-badge {
  border-color: rgba(99, 225, 181, 0.38);
  background: rgba(99, 225, 181, 0.1);
  color: var(--green);
}

.expiry-badge-urgent {
  border-color: rgba(229, 187, 90, 0.76);
  color: #f0cf75;
  background: rgba(124, 89, 24, 0.2);
}

.pool-card h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.42;
  overflow-wrap: anywhere;
  word-break: auto-phrase;
}

.pool-card-description {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pool-stats {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pool-stat {
  min-width: 0;
}

.pool-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.pool-stat strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 52px 24px;
  grid-column: 1 / -1;
  text-align: center;
  background: rgba(13, 32, 27, 0.7);
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 22px;
  color: var(--muted);
}

.back-button {
  min-height: 44px;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted-strong);
  font-weight: 750;
  cursor: pointer;
}

.back-button svg {
  width: 18px;
  height: 18px;
}

.detail-layout {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
  align-items: start;
  gap: 24px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.detail-main {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 32, 27, 0.96);
}

.detail-intro {
  padding: 30px;
}

.detail-title {
  max-width: 100%;
  margin-top: 14px;
}

.detail-description {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
  white-space: pre-wrap;
}

.detail-summary {
  border-top: 1px solid var(--line);
  padding: 24px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

.supporter-section {
  border-top: 1px solid var(--line);
  padding: 26px 30px 30px;
}

.message-list-wrap {
  margin-top: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

.message-list {
  margin: 0;
  padding: 0;
  display: grid;
  list-style: none;
}

.message-item {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
}

.message-item:first-child {
  border-top: 0;
}

.message-item p {
  margin: 0 0 7px;
  line-height: 1.65;
}

.message-item small {
  color: var(--muted);
}

.message-item strong {
  color: var(--green);
}

.detail-side {
  position: sticky;
  top: 98px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 24px;
  display: grid;
  gap: 18px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.detail-side h2 {
  margin: 0;
  font-size: 20px;
}

.detail-side > p {
  margin: -8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--muted-strong);
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 78px;
}

.input-suffix {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  font-size: 12px;
  transform: translateY(-50%);
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text);
  background: #091a16;
  outline: none;
}

textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.65;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(99, 225, 181, 0.12);
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.amount-summary,
.message-count {
  color: var(--muted-strong);
}

.amount-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amount-quick-button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted-strong);
  background: rgba(17, 40, 34, 0.8);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.amount-quick-button:hover,
.amount-quick-button:focus-visible {
  border-color: var(--green);
  color: var(--text);
}

.safety-note {
  border: 1px solid #665827;
  border-radius: 6px;
  padding: 13px;
  color: #e7d8a7;
  background: var(--gold-soft);
  font-size: 12px;
  line-height: 1.6;
}

.claim-expiry-note {
  margin-top: 12px;
}

.expiry-note-urgent {
  border-color: rgba(229, 187, 90, 0.82);
  color: #f5d98d;
}

.reissued-claim-link-note {
  margin-top: 18px;
}

.operation-safety-note,
.operation-complete-box,
.operation-status-box {
  border: 1px solid rgba(99, 225, 181, 0.42);
  border-radius: 6px;
  padding: 14px;
  background: rgba(23, 79, 64, 0.42);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.65;
}

.operation-status-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.operation-status-box .spinner {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.operation-status-box strong,
.operation-complete-box strong {
  color: var(--green);
}

.operation-status-box p,
.operation-complete-box p {
  margin: 4px 0 0;
  color: var(--muted);
}

.operation-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.operation-note .spinner {
  width: 16px;
  height: 16px;
}

.success-note {
  color: var(--green);
}

.full-button {
  width: 100%;
}

.site-footer {
  width: var(--page);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 22px 0 calc(26px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.site-footer p {
  max-width: 760px;
  margin: 0;
}

.site-footer-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer-meta a {
  color: var(--muted-strong);
  text-decoration: none;
}

.site-footer-meta a:hover {
  color: var(--green);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 7, 0.78);
  backdrop-filter: blur(12px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 30px;
  background: #0b1d18;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted-strong);
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.modal-copy {
  padding-right: 42px;
}

.modal-copy h2 {
  margin: 6px 0 10px;
  font-size: 27px;
}

.modal-copy > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.operation-modal-copy {
  padding-right: 0;
}

.operation-steps {
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  list-style: none;
}

.operation-steps li {
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.operation-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 44px;
  bottom: -2px;
  left: 16px;
  width: 1px;
  background: var(--line);
}

.operation-steps li > span {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
}

.operation-steps li.active {
  color: var(--text);
}

.operation-steps li.active > span,
.operation-steps li.complete > span {
  border-color: var(--green);
  color: #071411;
  background: var(--green);
}

.operation-steps li.complete {
  color: var(--muted-strong);
}

.operation-steps li .spinner {
  width: 18px;
  height: 18px;
}

.operation-help {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.wallet-link-address {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--surface);
}

.wallet-link-address span {
  color: var(--muted);
  font-size: 12px;
}

.wallet-link-address strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.wallet-link-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.7;
}

.wallet-link-actions {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.wallet-link-actions button {
  width: 100%;
}

.button-spinner {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid rgba(7, 20, 17, 0.28);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.modal-form {
  margin-top: 26px;
  display: grid;
  gap: 18px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 5px;
  background: var(--surface);
  cursor: pointer;
}

.choice strong {
  font-size: 13px;
}

.choice small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.choice input:checked + span {
  border-color: var(--green);
  background: rgba(23, 79, 64, 0.72);
}

.summary-box,
.link-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: var(--surface);
}

.shared-link-box {
  border-color: rgba(99, 225, 181, 0.34);
}

.claim-link-box {
  border-color: rgba(231, 216, 167, 0.58);
  background: rgba(91, 73, 23, 0.16);
}

.claim-link-box p {
  margin: 0;
  color: #e7d8a7;
  font-size: 12px;
  line-height: 1.65;
}

.claim-link-warning {
  color: #f0d887 !important;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.summary-row + .summary-row {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.summary-row span {
  color: var(--muted);
  font-size: 12px;
}

.summary-row strong {
  text-align: right;
}

.modal-actions {
  margin-top: 24px;
  justify-content: flex-end;
}

.modal-actions .primary-button,
.modal-actions .secondary-button {
  min-width: 130px;
}

.link-box {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.link-box + .safety-note {
  margin-top: 12px;
}

.link-box label {
  color: var(--muted);
  font-size: 12px;
}

.link-box code {
  overflow-wrap: anywhere;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.6;
}

.compact-loading {
  min-height: 180px;
}

.readonly-field {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  display: grid;
  gap: 5px;
  background: var(--surface);
}

.readonly-field span,
.readonly-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.readonly-field strong {
  color: var(--muted-strong);
}

.invite-manager-summary {
  margin-top: 20px;
  border: 1px solid rgba(84, 222, 171, 0.42);
  border-radius: 6px;
  padding: 16px;
  background: rgba(22, 91, 70, 0.24);
}

.invite-manager-summary strong {
  color: var(--green);
}

.invite-manager-summary p {
  margin: 7px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.7;
}

.invite-manager-form {
  margin-top: 20px;
}

.invite-form-actions {
  margin-top: 0;
}

.invite-role-help {
  margin-top: 10px;
  border-left: 3px solid var(--green);
  padding: 10px 12px;
  color: var(--muted-strong);
  background: rgba(22, 91, 70, 0.18);
  font-size: 12px;
  line-height: 1.65;
}

.invite-role-help strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.invite-role-help p {
  margin: 4px 0 0;
}

.invite-member-section {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.compact-heading {
  margin-bottom: 10px;
}

.invite-member-list {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  list-style: none;
  background: var(--surface);
}

.invite-member-row {
  min-width: 0;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.invite-member-row + .invite-member-row {
  border-top: 1px solid var(--line);
}

.invite-member-row > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.invite-role-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--green);
  background: rgba(45, 176, 131, 0.14);
  font-size: 11px;
  font-weight: 700;
}

.invite-role-badge.admin {
  color: var(--yellow);
  background: rgba(213, 170, 67, 0.15);
}

.invite-member-wallet {
  overflow: hidden;
  color: var(--muted-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-member-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.invite-member-empty {
  padding: 22px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.danger-text-button {
  color: var(--coral);
}

.share-row {
  align-items: stretch;
}

.share-row .secondary-button {
  flex: 0 0 auto;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 200;
  width: min(380px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
}

.toast {
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--green);
  border-radius: 7px;
  padding: 14px 16px;
  color: var(--muted-strong);
  background: #10241e;
  box-shadow: var(--shadow);
}

.toast.error {
  border-left-color: var(--coral);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 800px) {
  :root {
    --page: min(100% - 28px, 680px);
  }

  .site-header {
    min-height: 68px;
    padding: 10px 14px;
  }

  .brand small {
    display: none;
  }

  .wallet-button {
    min-height: 44px;
    max-width: 150px;
    padding: 0 12px;
    font-size: 12px;
  }

  #app {
    padding-top: 26px;
  }

  .page-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-head .primary-button {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
  }

  .pool-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .pool-card {
    min-height: 230px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice span {
    min-height: 64px;
  }

  .modal-panel {
    max-height: calc(100dvh - 20px);
    padding: 24px 18px;
  }

  .modal-layer {
    align-items: end;
    padding: 10px;
  }

  .site-footer {
    display: grid;
  }

  .site-footer-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .brand strong {
    font-size: 14px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .wallet-button {
    max-width: 132px;
  }

  .page-head h1,
  .detail-title {
    font-size: 30px;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-scope {
    width: 100%;
  }

  .home-scope button {
    min-width: 0;
    flex: 1 1 50%;
    padding: 0 10px;
    font-size: 12px;
  }

  .pool-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legacy-recovery-item {
    align-items: stretch;
    flex-direction: column;
  }

  .legacy-recovery-item .secondary-button {
    width: 100%;
  }

  .pool-card-actions > * {
    width: 100%;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segmented button {
    flex: 1 0 auto;
  }

  .concept-band {
    grid-template-columns: 1fr;
  }

  .detail-intro,
  .detail-summary,
  .supporter-section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .detail-summary {
    grid-template-columns: 1fr;
  }

  .message-item {
    grid-template-columns: 1fr;
  }

  .share-row,
  .modal-actions {
    flex-direction: column;
  }

  .invite-member-row {
    align-items: stretch;
    flex-direction: column;
  }

  .share-row .secondary-button,
  .modal-actions .primary-button,
  .modal-actions .secondary-button,
  .modal-actions .danger-button,
  .modal-actions .quiet-button {
    width: 100%;
  }

  .link-actions {
    width: 100%;
  }

  .link-actions .secondary-button {
    flex: 1 1 140px;
  }

  .invite-member-row .quiet-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
