.landing-brand [data-character-open] {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  pointer-events: auto;
}
.landing-brand [data-character-open]:hover {
  filter: brightness(1.06);
}
.landing-brand [data-character-open]:focus-visible {
  outline: 3px solid #824e61;
  outline-offset: 6px;
}
.character-panel {
  position: fixed;
  z-index: 100;
  top: var(--panel-top, 150px);
  left: var(--panel-left, 32px);
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100dvh - var(--panel-top, 150px) - 16px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 22px;
  background: #fcf9f0;
  border: 1px solid #d4c8b5;
  border-radius: 20px;
  box-shadow: 0 16px 50px #2c382d33;
  color: #293a33;
  font:
    14px/1.5 system-ui,
    sans-serif;
}
.character-panel[hidden] {
  display: none;
}
.character-panel * {
  box-sizing: border-box;
}
.character-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6ded0;
  padding-bottom: 12px;
}
.character-panel h2 {
  font-family: Georgia, "Batang", serif;
  font-size: 21px;
  margin: 0;
}
.character-panel button,
.character-panel input,
.character-panel a {
  font: inherit;
}
.character-panel button {
  cursor: pointer;
  border: 1px solid #d8cfc2;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  padding: 10px 14px;
}
.character-panel button:disabled {
  opacity: 0.5;
  cursor: default;
}
.character-panel :focus-visible {
  outline: 3px solid #8b5368;
  outline-offset: 3px;
}
.character-panel button.character-close {
  border: 0;
  font-size: 26px;
  line-height: 1;
  padding: 5px 8px;
}
.character-summary {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 20px 0;
}
.character-summary img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #88576b;
  padding: 3px;
}
.character-summary strong {
  font-size: 21px;
}
.character-summary p {
  margin: 4px 0;
  color: #52615b;
  font-size: 13px;
}
.character-summary small {
  color: #7b7d70;
  font-size: 12px;
}
.character-tabs {
  display: flex;
  border-bottom: 1px solid #ded7cb;
  gap: 8px;
}
.character-panel .character-tabs button {
  flex: 1;
  border: 0;
  border-radius: 0;
  padding: 10px 2px;
  border-bottom: 3px solid transparent;
}
.character-tabs button[aria-selected="true"] {
  color: #814559;
  border-bottom-color: #814559;
  font-weight: 700;
}
.settings-content {
  padding: 18px 0 6px;
}
.character-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
}
.character-panel input:not([type="range"]):not([type="file"]) {
  width: 100%;
  border: 1px solid #d4ccbf;
  background: #fffdf8;
  border-radius: 9px;
  padding: 11px 12px;
  color: #293a33;
  margin-bottom: 20px;
}
.character-sects {
  display: flex;
  gap: 8px;
}
.character-sects button {
  flex: 1;
  border-radius: 24px;
}
.character-sects button[aria-pressed="true"] {
  background: #854b61;
  color: #fff;
  border-color: #854b61;
}
.character-help {
  font-size: 12px;
  line-height: 1.7;
  color: #7c7b70;
  margin: 16px 0 8px;
}
.character-panel footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid #e6ded0;
}
.character-panel .character-primary {
  display: inline-block;
  background: #344f46;
  color: #fff;
  border: 1px solid #344f46;
  border-radius: 10px;
  text-decoration: none;
  padding: 11px 24px;
  text-align: center;
}
.character-panel footer button:first-child {
  border-color: transparent;
}
.character-status {
  min-height: 18px;
  font-size: 12px;
  color: #6b675c;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
.character-arts {
  display: grid;
  gap: 9px;
}
.character-panel .character-arts button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 14px 12px;
}
.character-arts button[aria-pressed="true"] {
  border-color: #976478;
  background: #f1e8e5;
}
.character-arts strong {
  font-size: 15px;
}
.character-arts small {
  display: block;
  color: #79796d;
  font-size: 12px;
  margin-top: 6px;
}
.character-arts strong small {
  display: inline;
  font-weight: 400;
}
.character-portraits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.character-panel .character-portraits button {
  position: relative;
  border: 0;
  padding: 4px 0;
}
.character-portraits img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 3px;
  object-fit: cover;
}
.character-portraits [aria-pressed="true"] img {
  border-color: #875269;
}
.character-portraits span {
  font-size: 11px;
}
.character-portraits b {
  position: absolute;
  right: 3px;
  top: 2px;
  border-radius: 50%;
  background: #875269;
  color: white;
  width: 23px;
  height: 23px;
}
.character-upload {
  position: relative;
  display: block;
  border: 1px solid #b9b8a7;
  border-radius: 24px;
  text-align: center;
  cursor: pointer;
  margin-top: 20px;
  padding: 10px;
}
.character-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.character-upload:focus-within { outline: 3px solid #8b5368; outline-offset: 3px; }
.character-upload.unavailable {
  opacity: 0.6;
}
.character-crop {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #ded5c6;
  border-radius: 12px;
}
.character-crop canvas {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 16px;
}
.character-crop label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  margin: 10px 0;
}
.character-crop input {
  flex: 1;
  min-width: 0;
  accent-color: #854b61;
}
.character-crop > div {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}
.character-connect {
  text-align: center;
  padding: 20px 0 4px;
}
.character-connect > img {
  width: 84px;
  border-radius: 50%;
  border: 2px solid #875269;
  padding: 3px;
}
.character-connect h3 {
  font-size: 17px;
}
.character-connect p {
  color: #74786e;
  font-size: 13px;
}
@media (max-width: 600px) {
  .character-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: calc(100dvh - 30px);
    border-radius: 22px;
    padding: 20px;
  }
  .character-summary {
    margin: 14px 0;
  }
  .character-summary img {
    width: 64px;
    height: 64px;
  }
  .settings-content {
    padding-top: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .character-panel * {
    scroll-behavior: auto;
  }
}
