:root {
  --v26-forest: #173d31;
  --v26-forest-2: #2f6651;
  --v26-mint: #dce8df;
  --v26-paper: #f7f8f3;
  --v26-ink: #14231d;
  --v26-copper: #bc7750;
}

.header-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--v26-forest);
  background: var(--v26-mint);
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 850;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.name-studio-banner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "signal kicker action" "signal title action";
  align-items: center;
  gap: 2px 14px;
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: calc(var(--header-height) + 14px) auto 0;
  padding: 13px 18px;
  overflow: hidden;
  color: #2b271a;
  background: #e9c55c;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(104, 78, 18, .18);
}

.name-studio-banner + .instant-entry {
  margin-top: 14px;
}

.name-studio-banner::after {
  content: "百家姓  ·  ROOTS  ·  声音  ·  CHARACTER  ·  名字  ·  STORY";
  position: absolute;
  right: -24px;
  bottom: -7px;
  color: rgba(55, 43, 12, .09);
  font-size: 1.4rem;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
}

.name-studio-signal {
  grid-area: signal;
  width: 34px;
  height: 34px;
  background: var(--v26-forest);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 0 6px rgba(255, 248, 218, .32), 0 6px 16px rgba(53, 45, 18, .18);
  animation: name-signal 2.8s ease-in-out infinite;
}

.name-studio-kicker {
  grid-area: kicker;
  color: #5a491d;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: 0;
}

.name-studio-banner > strong {
  grid-area: title;
  position: relative;
  z-index: 1;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.18;
}

.name-studio-action {
  grid-area: action;
  position: relative;
  z-index: 1;
  padding: 10px 12px;
  color: #fff;
  background: var(--v26-forest);
  border-radius: 5px;
  font-size: .7rem;
  font-weight: 900;
  white-space: nowrap;
}

.entry-memory-note {
  display: block;
  margin-top: 6px;
  color: #607068;
  font-size: .62rem;
  font-weight: 600;
  line-height: 1.35;
}

@keyframes name-signal {
  50% { transform: rotate(45deg) scale(.82); opacity: .68; }
}

.tip-layout {
  grid-template-columns: minmax(160px, .52fr) minmax(0, 1.48fr);
  gap: 16px;
}

.tip-offer {
  min-height: 270px;
  padding: 18px;
  background: #edf1eb;
}

.tip-croissant {
  width: min(166px, 78%);
  max-height: 174px;
  object-fit: contain;
}

.tip-board-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tip-board-list > li {
  border: 0;
  background: #eef2ed;
  box-shadow: inset 0 0 0 1px rgba(23, 61, 49, .06);
}

.tip-board-list > li > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
}

.tip-board-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.tip-board-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tip-board-avatar,
.tip-board-avatar .forest-avatar,
.tip-board-avatar svg {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.tip-board-gift {
  padding: 5px 7px;
  color: var(--v26-forest);
  background: #dce7df;
  border-radius: 4px;
  font-size: .61rem;
  font-weight: 850;
  white-space: nowrap;
}

.tip-board-list p {
  font-size: .77rem;
}

@media (max-width: 720px) {
  .site-header {
    padding-inline: 12px;
  }

  .brand {
    min-width: 0;
    gap: 6px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  .brand strong {
    display: block;
    max-width: 126px;
    overflow: hidden;
    font-size: .74rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .header-actions {
    gap: 6px;
  }

  .header-support {
    min-height: 30px;
    padding: 5px 7px;
    font-size: .6rem;
  }

  .name-studio-banner {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-areas: "signal kicker" "signal title" "action action";
    gap: 2px 10px;
    width: calc(100% - 20px);
    min-height: 0;
    margin-top: calc(var(--header-height) + 8px);
    padding: 11px 12px;
  }

  .name-studio-banner + .instant-entry {
    margin-top: 8px;
  }

  .name-studio-kicker,
  .name-studio-banner > strong,
  .tip-header > div,
  .tip-offer-copy {
    min-width: 0;
  }

  .name-studio-banner > strong {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  html:not([lang="zh-CN"]) .name-studio-banner > strong {
    max-width: 19ch;
    text-wrap: balance;
  }

  .instant-entry h1 {
    min-width: 0;
    font-size: clamp(1.55rem, 7.1vw, 1.92rem);
  }

  .instant-entry h1 span {
    min-width: 0;
  }

  .name-studio-signal {
    width: 27px;
    height: 27px;
  }

  .name-studio-action {
    justify-self: stretch;
    margin-top: 7px;
    padding: 8px;
    text-align: center;
  }

  .tip-layout {
    grid-template-columns: 1fr;
  }

  .tip-header h2 {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
  }

  .tip-offer {
    grid-template-columns: 96px minmax(0, 1fr);
    justify-items: start;
    min-height: 0;
    padding: 12px;
  }

  .tip-croissant {
    width: 96px;
    max-height: 96px;
  }

  .tip-offer-copy {
    align-self: center;
    justify-items: start;
    max-width: 100%;
    text-align: left;
  }

  .tip-offer-copy span {
    max-width: 100%;
    line-height: 1.25;
    white-space: normal;
  }

  .cafe-note-fields input,
  .cafe-note-fields textarea {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tip-board-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brand small {
    display: none;
  }

  .brand strong {
    max-width: 108px;
    font-size: .68rem;
  }

  .instant-entry-copy {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .entry-mascot {
    width: 92px;
  }

  .instant-entry h1,
  html[lang="zh-CN"] .instant-entry h1 {
    font-size: 23px;
  }

  .tip-board-list > li > div {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tip-board-list time {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .name-studio-signal {
    animation: none;
  }
}

/* V27: compact three-line support invitation without wrapping the offer. */
.cafe-float {
  grid-template-columns: 56px minmax(190px, 1fr) 58px;
  width: min(350px, calc(100vw - 24px));
  min-height: 86px;
  gap: 10px;
  padding: 9px 10px;
}

.cafe-float-profile {
  width: 56px;
  height: 56px;
}

.cafe-float-copy {
  display: grid;
  align-content: center;
  gap: 2px;
}

.cafe-float-copy small,
.cafe-float-copy strong,
.cafe-float-supporters {
  margin: 0;
  white-space: nowrap;
}

.cafe-float-copy strong {
  font-size: .86rem;
  line-height: 1.2;
}

.cafe-float-supporters {
  display: block;
  color: rgba(255, 255, 255, .66);
  font-size: .6rem;
  font-weight: 650;
  line-height: 1.2;
}

.cafe-float-croissant {
  width: 58px;
  height: 50px;
}

@media (max-width: 640px) {
  .cafe-float {
    grid-template-columns: 42px minmax(174px, 1fr) 44px;
    width: min(316px, calc(100vw - 20px));
    min-height: 70px;
    gap: 7px;
    padding: 7px 8px;
  }

  .cafe-float-profile {
    width: 42px;
    height: 42px;
  }

  .cafe-float-copy small {
    font-size: .55rem;
  }

  .cafe-float-copy strong {
    font-size: .74rem;
  }

  .cafe-float-supporters {
    font-size: .52rem;
  }

  .cafe-float-croissant {
    width: 44px;
    height: 40px;
  }
}
