.account-page { margin: 0; padding: 130px 20px 40px; background: #f6f2e9; color: #25231e; font: 16px/1.5 Arial, sans-serif; }
.account-page *, .account-toolbar * { box-sizing: border-box; }
.account-card { max-width: 580px; margin: auto; padding: 32px; background: #fff; border: 2px solid #25231e; border-radius: 18px; box-shadow: 6px 6px 0 #d8c8ac; }
.account-card h1 { margin: 0; font-size: clamp(32px, 6vw, 48px); text-align: center; }
.account-intro { text-align: center; color: #686155; }
.account-card h2 { font-size: 20px; margin-top: 24px; }
.account-card label { display: block; margin: 18px 0 6px; font-weight: bold; }
.account-card input:not([type="file"]), .account-card textarea { width: 100%; padding: 13px; border: 2px solid #b7b1a6; border-radius: 8px; background: #faf9f6; color: #25231e; font: inherit; }
.account-card input[type="checkbox"] { width: auto; }
.account-card textarea { resize: vertical; }
.account-card button, .account-primary { display: inline-block; padding: 11px 16px; border: 2px solid #25231e; border-radius: 8px; background: #fff; color: #25231e; font: bold 15px Arial, sans-serif; cursor: pointer; text-decoration: none; }
.account-card button:disabled { opacity: .5; cursor: wait; }
.account-card .account-primary { background: #246b45; border-color: #164a2e; color: #fff; }
#account-submit { width: 100%; margin-top: 20px; }
.account-tabs { display: flex; gap: 8px; margin: 20px 0; }
.account-tabs button { flex: 1; }
.account-tabs [aria-pressed="true"] { background: #25231e; color: #fff; }
.account-hint { color: #686155; font-size: 13px; }
#account-status { padding: 12px; border-radius: 8px; background: #f6f2e9; overflow-wrap: anywhere; }
.account-card .account-text-button { padding: 12px 0; border: 0; background: transparent; text-decoration: underline; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.account-avatar { display: grid; place-items: center; position: relative; width: 90px; height: 100px; padding-top: 26px; flex-shrink: 0; }
.account-avatar-head { display: block; position: relative; width: 58px; height: 58px; border-radius: 50%; box-shadow: 0 1px 0 2px #d0c9bc; }
.account-avatar-head.account-avatar-toothless { background: transparent !important; box-shadow: none; }
.account-avatar-toothless > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.player-profile-only .account-avatar-head, .player-only-body { z-index: 1; }
.player-only-wings { position: absolute; top: 158px; left: -58px; width: 276px; height: 161px; pointer-events: none; }
.player-only-wings svg { display: block; width: 100%; height: 100%; }
.account-avatar-hat { position: absolute; width: 160%; left: -30%; top: -43%; pointer-events: none; }
.account-avatar-hat svg { display: block; width: 100%; height: auto; }
.account-avatar-face { position:absolute;inset:0;z-index:3;pointer-events:none; }
.account-avatar-face svg { display:block;width:100%;height:100%; }
.account-avatar-hat { z-index:2; }
.account-avatar-hat[data-hat="party"], .account-avatar-hat[data-hat="dunce"] { top: -85%; }
.account-avatar-hat[data-hat="coral"] { top: -85%; }
.account-avatar-hat[data-hat="crown"] { top: -65%; }
.account-avatar-toothless .account-avatar-hat { top: -85%; }
.account-corner { position: absolute; top: 8px; left: 16px; display: flex; align-items: center; gap: 8px; color: #25231e; text-decoration: none; font-weight: bold; }
.account-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 110px; padding: 0 390px 0 16px; font: 16px Arial, sans-serif; text-align: left; }
.account-toolbar a { color: #25231e; }
.account-toolbar .account-identity { display: flex; align-items: center; gap: 6px; text-decoration: none; font-weight: bold; }
.account-toolbar .account-avatar { width: 70px; }
.account-toolbar .account-avatar-head { width: 48px; height: 48px; }
.account-toolbar .account-search-form { display: flex; gap: 6px; margin-left: auto; }
.account-search-form input { min-width: 0; max-width: 200px; padding: 10px; border: 1px solid #aaa; border-radius: 6px; font: inherit; }
.account-search-form button { padding: 10px; cursor: pointer; }
.player-search-corner { position: absolute; top: 16px; right: 16px; width: 350px; max-width: calc(100% - 32px); z-index: 30; color: #25231e; text-align: left; font: 16px/1.5 Arial, sans-serif; }
.player-search-corner *, .player-profile * { box-sizing: border-box; }
.player-search-form { padding: 12px; border: 2px solid #25231e; border-radius: 12px; background: #fff; }
.player-search-form label { display: block; font-weight: bold; margin-bottom: 6px; }
.player-search-corner button { padding: 10px 12px; border: 2px solid #25231e; border-radius: 8px; background: #fff; color: #25231e; font: bold 14px Arial, sans-serif; cursor: pointer; }
.player-search-corner input { width: 100%; min-width: 0; padding: 10px; border: 1px solid #aaa; border-radius: 6px; font: inherit; }
.player-search-results { position: absolute; top: calc(100% + 8px); width: 100%; padding: 12px; border: 2px solid #25231e; border-radius: 12px; background: #fff; box-shadow: 3px 4px 0 #d8c8ac; max-height: 60vh; overflow-y: auto; }
.player-search-status { margin: 0; font-size: 14px; }
.player-search-row { display: flex; gap: 8px; }
.player-search-filters { margin-top:6px;border:1px solid #b7b1a6;border-radius:8px;background:#fff;font-size:13px; }
.player-search-filters summary { padding:5px 10px;cursor:pointer;font-weight:bold; }
.player-search-filters fieldset { display:grid;grid-template-columns:1fr 1fr;gap:5px 12px;margin:0;padding:4px 10px 10px;border:0; }
.player-search-filters legend { font-size:12px;color:#686155;padding:0 0 4px; }
.player-search-filters label { display:flex;align-items:center;gap:6px;cursor:pointer; }
.player-search-corner .player-search-filters input[type="checkbox"] { width:16px;height:16px;min-width:16px;margin:0;padding:0;accent-color:#4264c5; }
.role-name[data-role="owner"] { color:#8b3fcc;background:linear-gradient(90deg,#dc2626,#ea580c,#a16207,#16803b,#2563eb,#9333ea);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent; }
.role-name[data-role="coowner"] { color:#c69714; }
.role-name[data-role="coder"] { color:#ea580c; }
.role-name[data-role="artist"] { color:#22d3ee;-webkit-text-stroke:.5px #111;paint-order:stroke fill;text-shadow:.5px 0 #111,-.5px 0 #111,0 .5px #111,0 -.5px #111; }
.role-name[data-role="helper"] { color:#dc2626; }
.player-profile-name-group { min-width:0; }
.player-profile-role { width:fit-content;margin:3px auto 0;font-size:14px;font-weight:bold; }
.player-results { padding: 0; margin: 0; list-style: none; }
.player-result { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ddd; text-align: left; }
.player-result:last-child { border-bottom: 0; }
.player-result .account-avatar { width: 54px; height: 70px; padding-top: 20px; }
.player-result .account-avatar-head { width: 36px; height: 36px; }
.player-result strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.player-profile { width: 700px; max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 2px solid #25231e; border-radius: 18px; background: #fff; color: #25231e; text-align: center; font: 16px/1.5 Arial, sans-serif; }
.player-profile-content:not([hidden]) { display: grid; grid-template-columns: minmax(0,1fr) 190px; gap: 24px; }
.player-profile-details { min-width: 0; }
.player-profile-games { border-left: 2px solid #e6dfd3; padding-left: 20px; text-align: left; }
.player-profile-games h3 { margin: 12px 0 18px; font-size: 18px; }
.player-profile-games a { display: block; margin: 12px 0; padding: 14px 10px; border: 2px solid #25231e; border-radius: 10px; background: #eef8ef; color: #205e40; font-weight: bold; text-decoration: none; }
.player-profile-games a:hover { background: #d5ebd7; }
.profile-more-games summary { padding:12px 0;cursor:pointer;font-weight:bold; }
.profile-extra-games { padding-right:5px; }
@media(max-width: 570px) { .player-profile-content:not([hidden]) { grid-template-columns: minmax(0,1fr); } .player-profile-games { border-left: 0; border-top: 2px solid #e6dfd3; padding: 12px 0 0; } }
.player-profile::backdrop { background: rgb(0 0 0 / 55%); }
.player-profile-close { display: block; margin-left: auto; }
.player-profile-status:empty { display: none; }
.player-profile h2 { margin: 12px 0 4px; font-size: 30px; overflow-wrap: anywhere; }
.player-profile-title { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 12px 0 6px; }
.player-profile-title h2 { min-width: 0; margin: 0; font-size: clamp(20px, 5vw, 30px); }
.player-profile-pet-slot { display: grid; justify-items: center; gap: 4px; flex: 0 0 64px; }
.player-profile-pet { display: block; width: 64px; height: 64px; object-fit: contain; }
.player-profile-pet-rarity { font-size: 12px; line-height: 1.2; font-weight: bold; }
.player-profile-pet-rarity[data-tier="standard"] { color: #16803b; }
.player-profile-pet-rarity[data-tier="unique"] { color: #2563eb; }
.player-profile-pet-rarity[data-tier="magic"] { color: #9333ea; }
.player-profile-pet-rarity[data-tier="mystic"] { color: #ea580c; }
.player-profile-pet-rarity[data-tier="kitty"] { color: #d9bf32; text-shadow: 0 1px 0 #756320; }
.player-profile-pet-rarity[data-tier="beach"] { color: #b5efff; text-shadow: 0 1px 1px #3c6a7f; }
.player-profile-pet-rarity[data-tier="space"] { color: #69e7ee; text-shadow: 0 1px 1px #316d7a; }
.player-profile-pet-rarity[data-tier="emoji"] { color: #ffde32; -webkit-text-stroke:.5px #111; paint-order:stroke fill; text-shadow:1px 0 #111,-1px 0 #111,0 1px #111,0 -1px #111; }
.player-profile-pet-rarity[data-tier="celestial"] {
  color: #7c3aed;
  background-image: linear-gradient(90deg, #dc2626, #ea580c, #a16207, #16803b, #2563eb, #9333ea);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.player-profile-description { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.player-profile-only.account-avatar { width: 160px; height: 300px; margin: 0 auto; padding: 0; }
.player-profile-only .account-avatar-head { position: absolute; top: 85px; left: 35px; width: 90px; height: 90px; }
.player-only-body { position: absolute; top: 175px; left: 12px; width: 136px; height: 126px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.player-profile-only { filter: drop-shadow(0 0 1px #686155); }
.player-profile-cp { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 24px; font-weight: bold; margin: 18px 0 4px; }
.player-profile-trade { display: inline-block; padding: 10px 22px; margin-top: 16px; border: 2px solid #164a2e; border-radius: 8px; background: #246b45; color: #fff; font-weight: bold; text-decoration: none; }
.profile-coin { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 3px solid #5c331d; border-radius: 50%; background: #925c35; color: #86ef7b; font-weight: 900; }
.player-search-corner [hidden] { display: none; }
.cloud-status { display: block; padding: 10px 16px; font: 13px Arial, sans-serif; color: #5c4826; background: #fff3d5; }
.account-card [hidden], [hidden].account-primary { display: none; }
@media (max-width: 480px) { .account-card { padding: 20px; } .account-toolbar .account-search-form { width: 100%; margin-left: 0; } }
@media (max-width: 760px) {
  .account-toolbar { padding: 125px 16px 0; }
  .account-page { padding-top: 245px; }
  .account-page .player-search-corner { top: 125px; }
}
