* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0; background: #111017; color: #fff4df; font: 1rem/1.55 system-ui, sans-serif }
a { color: #f9d695 }
header, main, footer { max-width: 70rem; margin: auto; padding: 1.25rem clamp(1rem, 5vw, 3rem) }
header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid #765d40 }
h1, h2, h3 { font-family: Georgia, serif; line-height: 1.15 }
h1 { font-size: clamp(2.15rem, 7vw, 4.5rem); margin: .5em 0 .25em }
h2 { margin-top: 0 }
section { border: 1px solid #765d40; background: #1d1720; border-radius: 1rem; padding: clamp(1rem, 4vw, 2rem); margin: 1rem 0 }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; align-items: start }
label { display: block; margin: .7rem 0; color: #fff4df }
small { color: #e9cfad; display: block }
input:not([type=checkbox]), textarea, select { font: inherit; color: inherit; background: #14111a; border: 1px solid #ac8d68; border-radius: .35rem; display: block; width: 100%; padding: .5rem }
button { font: inherit; font-weight: 650; color: #18131f; background: #f9d695; padding: .55rem .9rem; border: 0; border-radius: .35rem; cursor: pointer }
button:disabled { opacity: .65; cursor: wait }
:focus-visible { outline: 2px solid #fff4df; outline-offset: 4px }
.preview { overflow-wrap: anywhere }
.preview[data-theme=Amethyst] { background: #382448 }
.preview[data-theme=Champagne] { background: #372a1a }
.avatar { display: grid; place-items: center; width: 4rem; min-height: 4rem; padding: .25rem; border: 1px solid #f9d695; border-radius: 50%; font-size: 1.2rem }
dt { font-weight: 700 }
dd { margin: 0 0 .5rem }
.skip { position: absolute; top: -5rem; left: 1rem; background: #111017; padding: .5rem }
.skip:focus { top: 0 }
@media (max-width: 680px) { .columns { grid-template-columns: minmax(0,1fr); gap: 0 } }
body { background: #101010 }
section { background: #191714 }
.tiers, .orbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 1rem; list-style: none; padding: 0 }
.tiers > *, .orbs > * { border: 1px solid #765d40; padding: 1rem; overflow-wrap: anywhere }
.orbs > * { border-radius: 6rem; text-align: center; background: radial-gradient(ellipse at top, #59401d, #16130e) }
.action { display: inline-block; padding: .65rem 1rem; background: #f9d695; color: #18131f; border-radius: .35rem }
.preview[data-theme=Onyx] section { background: #252423 }
.preview[data-theme=Champagne] section { background: #372a1a }

.graphics-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,19rem),1fr)); gap: 1rem }
.graphic-card { background: #18191f; border: 1px solid #49404d; border-radius: 1rem; padding: 1rem; min-width: 0 }
.graphic-card h2 { margin-bottom: .75rem }
.graphic-banner { display:flex; align-items:center; min-height:8rem; padding:1rem 0; overflow:hidden; isolation:isolate; background:#1a1b2c; color:#ffe4aa; border:1px solid #ad8750; border-radius:.7rem; background-size:200% 200%; margin-bottom:1rem }
.graphic-banner > span { display:block; min-width:max-content; padding:0 1rem; white-space:nowrap; font-weight:800; letter-spacing:.12em; text-shadow: 0 0 .8rem currentColor }
.graphic-banner[data-motion=drift] { animation:graphic-shift 12s ease-in-out infinite alternate }
.graphic-banner[data-motion=pulse] > span { animation:graphic-pulse 4s ease-in-out infinite alternate }
.graphic-banner:not([data-motion=still]) > span { animation:graphic-scroll 12s linear infinite }
.graphic-banner[data-motion=pulse] > span { animation:graphic-scroll 14s linear infinite, graphic-pulse 4s ease-in-out infinite alternate }
@keyframes graphic-scroll { from { transform:translateX(35%) } to { transform:translateX(-100%) } }
@keyframes graphic-shift { to { background-position:100% 100% } }
@keyframes graphic-pulse { from { opacity:.75 } to { opacity:1 } }
@media (prefers-reduced-motion:reduce) { .graphic-banner, .graphic-banner > span { animation:none !important } }

#profile fieldset, #profile details { min-width: 0; margin: 1rem 0; padding: 1rem; border: 1px solid #765d40; }
#profile summary { cursor: pointer; }
#profile-studio .saved-profile { grid-template-columns: minmax(0,1fr); }
.world { --hue: 42; --light: hsl(var(--hue) 91% 71%); position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: end; min-height: 27rem; border: 1px solid var(--light); border-radius: .8rem; background: #120f17; }
.world-art, .skyline, .world-lights, .street { position: absolute; inset: 0; pointer-events: none; }
.world-art { z-index: -1; background: var(--scene-background), radial-gradient(ellipse at 40% 10%, hsl(var(--hue) 56% 32%), #100e18 75%); }
.skyline { background: repeating-linear-gradient(110deg,transparent 0 12%, hsl(var(--hue) 65% 50% / .35) 13% 14%, transparent 15% 26%); }
.world[data-scene=city] .skyline { top: 12%; bottom: 18%; background: repeating-linear-gradient(90deg, transparent 0 5%, #130d1b 5% 8%, transparent 8% 14%), repeating-linear-gradient(0deg, #1b1223 0 10px, hsl(var(--hue) 77% 48%) 11px 13px, #201225 14px 23px); clip-path: polygon(0 0,14% 0,14% 18%,28% 18%,28% 35%,42% 35%,42% 64%,56% 64%,56% 42%,70% 42%,70% 23%,84% 23%,84% 0,100% 0,100% 100%,0 100%); }
.world[data-scene=city] .street { background: repeating-linear-gradient(90deg, transparent 0 9%, #ffebad5c 9.5% 10%, transparent 11% 20%); inset: 48% -70% -60%; transform: perspective(180px) rotateX(61deg); }
.billboard { display:none; position:absolute; top:12%; right:4%; padding:.45em; background:#16101e; border:1px solid var(--light); color:var(--light); box-shadow:0 0 3rem var(--light); font:bold clamp(.75rem, 3vw, 1.5rem)/1 system-ui; transform:rotate(4deg); }
.world[data-scene=city] .billboard { display: block; }
.world[data-scene=water] .skyline { background: repeating-radial-gradient(ellipse at top, transparent 0 30px, #a1f9ed44 35px, transparent 58px); }
.world[data-scene=space] .skyline { background: radial-gradient(circle at 72% 25%, var(--light), transparent 12%), radial-gradient(circle at 60% 45%, #8671fa, transparent 38%); }
.world[data-scene=garden] .skyline { background: repeating-conic-gradient(from 50deg at 50% 100%, #151a14 0 7deg, #3f613b 7deg 12deg, transparent 12deg 16deg); }
.world-lights { background: repeating-linear-gradient(127deg, transparent 0 20%, hsl(var(--hue) 81% 72% / .3) 22%, transparent 23% 40%); background-size: 180% 180%; }
.world[data-motion=drift] .world-lights { animation: world-drift 9s linear infinite alternate; }
.world[data-motion=pulse] .world-lights { animation: world-pulse 4s ease-in-out infinite alternate; }
@keyframes world-drift { to { background-position: 100% 100%; } }
@keyframes world-pulse { to { opacity: .22; } }
.world-content { text-align: center; padding: .8rem; background: linear-gradient(transparent,#100c16e8); }
.world-content img { width: min(52%, 16rem); height: clamp(11rem, 34vw, 17rem); object-fit: cover; object-position: center 28%; border-radius: 9rem 9rem .65rem .65rem; border: 2px solid var(--light); box-shadow: 0 0 2.8rem hsl(var(--hue) 70% 58% / .65); }
.world-content h2 { font-size: clamp(2.6rem, 8vw, 5.5rem); margin: 0; text-shadow: 0 2px 18px #09050b; }
.world-content .avatar { margin: 1rem auto; }
#realm-title { display:inline-block; color: #fff5de; background: #100c16e8; padding:.35em .6em; }
#member-photo { margin: auto; display: block; }
#profile-graphic { margin: 0; padding: .7rem; border-radius: 0; color: var(--light); background: #130d18; }
#profile-graphic:not(:empty) span { display:inline-block; white-space:nowrap; animation: scroll-profile-words 12s linear infinite; }
@keyframes scroll-profile-words { from { transform:translateX(100%); } to { transform:translateX(-100%); } }
#player iframe { width: min(100%, 40rem); min-height: 200px; aspect-ratio: 16/9; border: 0; }
#player audio { width:100%; }
@media (prefers-reduced-motion: reduce) { .world .world-lights, #profile-graphic:not(:empty) span { animation:none; white-space:normal; } }
#portrait-canvas { display:block; max-width:min(100%,18rem); height:auto; border:1px solid #765d40; margin:.75rem auto; }
.album-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap:1rem; }
.album-grid figure { margin:0; overflow-wrap:anywhere; }
.album-grid img { width:100%; aspect-ratio:4/3; object-fit:contain; background:#111; }
#playlist-player li { margin:.5rem 0; }
#playlist-player [aria-current=true] { outline:2px solid #fff4df; outline-offset:2px; }
#stampdmeta-inbox { border:1px solid #765d40; padding:1rem; border-radius:.75rem; }
#inbox-history article { padding:.6rem; overflow-wrap:anywhere; border-bottom:1px solid #765d40; }
#inbox-threads li { margin:.5rem 0; }

.preview { position: relative; isolation: isolate; }
.profile-weather {
  position: absolute; inset: 0 0 auto; height: min(100%, 100svh); z-index: 5;
  display: none; overflow: hidden; pointer-events: none; user-select: none;
}
.saved-profile .profile-weather { position: fixed; inset: 0; height: 100%; }
.preview[data-weather=sunshine] .profile-weather,
.preview[data-weather=rain] .profile-weather,
.preview[data-weather=storm] .profile-weather { display: block; }
.profile-weather i {
  position: absolute; top: -48px; left: var(--x); width: 1px; height: var(--length);
  background: linear-gradient(transparent, #c3e9ffbd);
  animation: profile-rain var(--duration) linear var(--delay) infinite;
}
.preview[data-weather=rain] .profile-weather i:nth-child(2n),
.preview[data-weather=sunshine] .profile-weather i { display: none; }
.preview[data-weather=storm] .profile-weather {
  background: linear-gradient(155deg, #22345155, transparent 70%);
}
.preview[data-weather=storm] .profile-weather::before,
.preview[data-weather=sunshine] .profile-weather::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
}
.preview[data-weather=storm] .profile-weather::before {
  background: radial-gradient(ellipse at 84% 0, #aeccff, transparent 65%);
  animation: profile-storm-glow 9s ease-in-out infinite;
}
.preview[data-weather=sunshine] .profile-weather::before {
  background: radial-gradient(ellipse at 85% 4%, #ffdf86a8 0, #ffc36955 24%, transparent 62%),
    conic-gradient(from 105deg at 85% 4%, transparent, #ffe59b42 23deg, transparent 47deg, #ffe9a338 75deg, transparent 97deg);
  animation: profile-sunshine 6s ease-in-out infinite alternate;
  transform-origin: 85% 4%;
}
@keyframes profile-rain { to { transform: translate(-15vw, calc(100svh + 48px)) rotate(10deg); } }
@keyframes profile-storm-glow {
  0%, 72%, 100% { opacity: .03; }
  84% { opacity: .22; }
}
@keyframes profile-sunshine { from { opacity: .55; transform: scale(1); } to { opacity: 1; transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .profile-weather i { display: none; }
  .preview[data-weather] .profile-weather::before { animation: none; opacity: .35; }
}

.feeling-lights { position:absolute; inset:0; pointer-events:none; }
.preview[data-feeling=happy] .feeling-lights, .preview[data-feeling=excited] .feeling-lights {
 background-image:radial-gradient(circle, #fff5c4 0 1px, transparent 2px),radial-gradient(circle, #ffd986 0 2px, transparent 3px);
 background-size:71px 97px,113px 113px;
 animation:profile-sparkles 10s linear infinite;
}
.preview[data-feeling=excited] .feeling-lights { animation-duration:4.5s; }
@keyframes profile-sparkles { to { background-position:0 -97px, 0 -113px; } }
.preview[data-feeling=sad] .world-art { filter:saturate(.53); }
.preview[data-floating=true] .skyline, .preview[data-floating=true] .billboard {
 animation:profile-float 5s ease-in-out infinite alternate;
}
.preview[data-feeling=calm] .world-lights { animation:profile-float 12s ease-in-out infinite alternate; }
@keyframes profile-float { to { translate:0 -11px; } }
.preview[data-feeling=romantic] .feeling-lights {
 background:radial-gradient(ellipse at 70% 22%,#ffb18180,transparent 62%),radial-gradient(ellipse at 20% 70%,#e8798660,transparent 65%);
 animation:profile-float 8s ease-in-out infinite alternate;
}
.preview[data-feeling=crying] .profile-weather i { opacity:.45; }
.preview[data-effects=off] .profile-weather,
.preview[data-effects=off] .feeling-lights { display:none; }
.preview[data-effects=off] * { animation:none!important; }
#active-checkin { color:#fff5de; background:#100c16e8; padding:.32rem .65rem; overflow-wrap:anywhere; }
@media(prefers-reduced-motion:reduce) {
 .preview .world-art *, .preview .profile-weather *, .preview .profile-weather::before { animation:none!important; }
 .preview .feeling-lights, .preview[data-feeling=crying] .profile-weather i { display:none; }
}

.studio-action{display:inline-block;padding:.55rem .9rem;border-radius:.35rem;background:#f9d695;color:#18131f;font-weight:650}

/* Accepted connection orbs */
.orbs a{display:flex;flex-direction:column;align-items:center;gap:8px;overflow-wrap:anywhere}.orbs img{width:64px;height:64px;object-fit:cover;border-radius:50%;border:2px solid #d8b469}#connection-list li{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-block:12px}#connection-list button{width:auto}

/* Shared comment threads; decoration never blocks the controls. */
.shared-comments{min-width:0}.shared-comments textarea{width:100%;max-width:100%;min-height:6rem}.shared-comment{border-top:1px solid #765d40;margin-top:1rem;padding-top:1rem;overflow-wrap:anywhere}.shared-comment .comment-author{display:flex;align-items:center;gap:.65rem}.shared-comment .comment-author img{width:40px;height:40px;object-fit:cover;border-radius:50%}.shared-comment .comment-text{white-space:pre-wrap}.shared-comment time{font-size:.85rem;color:#e9cfad}.post-comments{margin-top:1rem}.post-comments summary{cursor:pointer}.shared-comments form{margin-top:1rem}.shared-comments button{max-width:100%}
