    html,
    body {
      max-width: 100%;
      overflow-x: hidden;
    }

    .profile-pic {
      width: 200px;
      height: 200px;
      border-radius: 50%;
      object-fit: cover;
      margin-top: 30px;
      border: 4px solid white;
    }

    h1 {
      font-size: 2.5rem;
      font-weight: 900;
      margin: 20px 0;
      cursor: default;

      background: #ffffff;

      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .button {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 15px auto;
      width: 80%;
      max-width: 600px;
      padding: 15px;
      border-radius: 30px;
      font-size: 1.2rem;
      font-weight: bold;
      text-decoration: none;
      color: white;
      transition: transform 0.2s;
    }

    .button i {
      margin-right: 10px;
    }

    .button:hover {
      transform: scale(1.05);
    }

    .instagram {
      background-color: #c83789;
    }

    .telegram {
      background-color: #1c96d1;
    }

    .twitter {
      background-color: #444;
    }

    .discord {
      background-color: #5865f2;
    }

    .insta-section {
      background-color: #f7f7f7;
      padding-top: 0.5px;
    }

    body.dark-mode .music {
      color: #d4d4d4;
    }

    body.dark-mode .insta-section {
      background-color: #1e1e1e;
    }

    .insta-section h2 {
      margin-bottom: 17px;
      cursor: default;
    }


    .insta-section p {
      margin-top: 0;
      margin-bottom: 16px;
    }

    #insta-feed {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
      width: 100vw;
      margin-left: calc(-50vw + 50%);
      padding: 40px 0;
      background-color: #ade8f4;
    }

    body.dark-mode #insta-feed {
      background-color: #121212;
    }

    @media (max-width: 600px) {
      #insta-feed {
        flex-direction: column;
        align-items: center;
      }
    }

    .calendar {
      background-color: #222;
    }



    .site-footer {
      width: 100%;
      padding: 20px;
      background: #222;
      color: white;
      text-align: center;
      box-sizing: border-box;
      font-size: 14px;
    }

    .site-footer p {
      margin: 0;
    }
    #themeToggle {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: #222;
      color: #fff;
      border: none;
      border-radius: 50%;
      font-size: 20px;
      width: 44px;
      height: 44px;
      cursor: pointer;
      z-index: 9999;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
      transition: background 0.3s ease;
    }

    #themeToggle:hover {
      background: #444;
    }

    body.dark-mode a:hover {
      color: #ffffff;
    }

    body.dark-mode .social-button {
      background-color: #004f6f;
      color: white;
    }

    body.dark-mode .button.music {
      background-color: #d32f2f !important;
      color: #d4d4d4 !important;
    }

    body.dark-mode .social-button:hover {
      background-color: #007da1;
    }

    body.dark-mode .footer-icons a:hover {
      color: #00bfff;
    }

    #openMapBtn {
      margin-top: 10px;
    }

    .bio-box {
      margin: 20px auto 50px;
      padding: 20px;
      max-width: 600px;
      background: rgba(255, 255, 255, 0.3);
      border-radius: 16px;
      backdrop-filter: blur(6px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      color: #333;
      cursor: default;
    }

    .dark-mode .bio-box {
      background: rgba(30, 30, 30, 0.6);
      color: #ddd;
    }

    .bio-box .flags {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin-bottom: 12px;
    }

    .bio-box .flags img.current {
      transform: scale(1.2);
    }

    .bio-box .flags img {
      width: 36px;
      height: 24px;
      object-fit: cover;
      border-radius: 4px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      transition: transform 0.2s ease;
    }

    .flags img:hover {
      transform: scale(1.2);
    }

    .bio-box .bio-text {
      font-size: 1rem;
      line-height: 1.6;
    }

    .bio-box .bio-text a {
      color: #4a6cf7;
      font-weight: bold;
      text-decoration: none;
    }

    .bio-box .bio-text a:hover {
      text-decoration: underline;
    }

    body.dark-mode .bio-box {
      background-color: #1e1e1e;
      color: #f0f0f0;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
      border: 1px solid #222;
    }

    body.dark-mode .bio-box .bio-text a {
      color: #4a90ff;
    }

    body.dark-mode .bio-box .bio-text a:hover {
      color: #80c0ff;
    }

    .card-inner {
      width: 100%;
      height: 100%;
      position: relative;
      transform-style: preserve-3d;
      transition: transform 0.6s;
    }

    .avatar-card.flipped .card-inner {
      transform: rotateY(180deg);
    }

    .card-front,
    .card-back {
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      backface-visibility: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #ffffff;
      transition: background 0.3s ease;
    }

    .card-front img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
    }

    .avatar-card {
      width: 200px;
      height: 200px;
      margin: 30px auto;
      perspective: 1000px;
      border-radius: 50%;
      overflow: hidden;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .card-front::before,
    .card-back::before {
      content: "";
      position: absolute;
      inset: 0;
      border: 4px solid white;
      border-radius: 50%;
      pointer-events: none;
      transform: translateZ(0.01px);
    }

    .card-back {
      transform: rotateY(180deg);
    }

    .qr-img-square {
      width: 140px;
      height: 140px;
      border-radius: 8px;
      background: white;
      padding: 8px;
      box-sizing: border-box;
    }
    .blog-post h3 {
      text-align: left;
      margin-top: 16px;
      margin-bottom: 5px;
      font-size: 1.5em;
    }
    .blog-post p {
      text-align: left;
      margin-top: 0;
      line-height: 1.6;
    }

    .author-name {
      font-weight: bold;
    }

    .post-date {
      font-size: 0.85em;
      color: #777;
    }

    body.dark-mode .post-date {
      color: #aaa;
    }

    .blog-preview-img {
      display: block;
      margin: 10px 0;
      max-width: 100%;
      width: auto;
      height: auto;
      max-height: 400px;
      object-fit: contain;
      box-sizing: border-box;
      border-radius: 8px;
    }

    .blog-post {
      width: 100%;
      max-width: 700px;
      margin: 2rem auto;
      padding: 1.2rem;
      background: white;
      border-radius: 16px;
      box-sizing: border-box;
      overflow-wrap: break-word;
      word-wrap: break-word;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    body.dark-mode .blog-post {
      background: #1e1e1e;
      border-color: #444;
      color: #e0e0e0;
    }
    .blog-list {
      display: grid;
      padding: 0;
      margin: 0;
      width: 100%;
      max-width: 100%;
      gap: 20px;
      box-sizing: border-box;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .author-text .post-date {
      font-size: 0.85em;
      color: gray;
    }

    .post-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
    }

    .blog-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }

    .author-text {
      display: flex;
      flex-direction: column;
      justify-content: center;
      line-height: 0.7;
      align-items: flex-start;
      text-align: left;
    }

    .blog-toggle-button {
      background-color: #4a6cf7;
      color: white;
      border: none;
      padding: 10px 18px;
      border-radius: 6px;
      font-size: 16px;
      cursor: pointer;
      font-family: 'Roboto', sans-serif;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: background-color 0.3s ease;
    }

    .blog-toggle-button:hover {
      background-color: #3a57c5;
    }

    .blog-area {
      width: 100%;
      margin: 0;
      padding: 2rem 1rem;
      background: transparent;
    }

    body.dark-mode .blog-area {
      background: #121212;
    }


    .blog-container {
      width: 100%;
      margin: 0;
      padding: 0;
      background: transparent;
      border-radius: 0;
      box-shadow: none;
    }

    #blogPostsWrapper {
      margin-bottom: 0;
      padding-bottom: 0;
      background: transparent;
    }

    .blog-header-section {
      background: white;
      padding: 40px 20px;
      text-align: center;
    }

    .blog-section {
      background: #ade8f4;
      margin-top: 2rem;
      margin-bottom: 2rem;
      margin: 0;
      box-sizing: border-box;
    }

    body.dark-mode .blog-section {
      background: rgba(10, 14, 24, 0.75);
      border: 1px solid rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(6px);
    }

    .blog-header-box {
      background: white;
      padding-top: 10px;
      padding-bottom: 10px;
      text-align: center;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .blog-header-box h2 {
      margin: 0.5rem 0;
    }

    .blog-header-box .search-bar {
      margin-top: 1rem;
      padding-bottom: 25px;
    }

    .blog-section,
    .blog-area,
    .blog-container,
    .blog-post {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: hidden;
    }

    .search-bar input {
      width: 90%;
      max-width: 400px;
      padding: 12px 16px;
      font-size: 1rem;
      border: 2px solid #ddd;
      border-radius: 12px;
      outline: none;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
      transition: all 0.3s ease;
      font-family: 'Roboto', sans-serif;
      box-sizing: border-box;
      display: block;
      margin: 0 auto;
    }

    .search-bar input:focus {
      border-color: #4a6cf7;
      box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
    }

    .no-results {
      text-align: center;
      font-style: italic;
      padding: 2rem;
      color: #777;
    }

    body.dark-mode .no-results {
      color: #aaa;
    }

    body.dark-mode .blog-header-box {
      background: #1e1e1e;
      color: #f0f0f0;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    body.dark-mode .search-bar input {
      background: #2a2a2a;
      color: #e0e0e0;
      border: 2px solid #444;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    body.dark-mode .search-bar input::placeholder {
      color: #aaa;
    }

    body.dark-mode .search-bar input:focus {
      border-color: #4a6cf7;
      box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.4);
      outline: none;
    }

    .blog-post.preview p {
      font-size: 0.95rem;
      color: #000000;
    }

    body.dark-mode .blog-post.preview p {
      color: #e0e0e0;
    }

    .blog-post.preview {
      cursor: pointer;
    }

    .blog-preview-thumb {
      width: 100%;
      height: 150px;
      object-fit: cover;
      border-radius: 8px;
      margin-top: 8px;
    }

    .blog-avatar.small {
      width: 32px;
      height: 32px;
    }

    .blog-list.single-post {
      max-width: 600px;
      margin: 0 auto;
    }

    .insta-feed-static {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 10px;
      padding: 40px 0;
    }

    .insta-feed-static img {
      width: 250px;
      height: 250px;
      object-fit: cover;
      border-radius: 12px;
      cursor: pointer;
      transition: transform 0.2s ease;
    }

    .insta-feed-static img:hover {
      transform: scale(1.03);
    }

    #emojiRainBtn {
      position: fixed;
      bottom: 75px;
      right: 20px;
      z-index: 9999;
      background: #4a6cf7;
      color: white;
      border: none;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      font-size: 20px;
      cursor: pointer;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    #emojiRainBtn:hover {
      background: #3554d1;
    }

    #todaysEvent {
      position: relative;
      background: url("/map2.png") center / cover no-repeat;
      color: #fff;
      font-weight: bold;
      font-size: 20px;
      display: flex;
      align-items: center;
      gap: 8px;
      justify-content: center;
      width: 80%;
      max-width: 600px;
      padding: 15px;
      border-radius: 30px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
      overflow: hidden;
    }

    #todaysEvent::before {
      content: "";
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      border-radius: 30px;
    }

    #todaysEvent * {
      position: relative;
      z-index: 1;
    }

    #todaysEvent i {
      position: relative;
      z-index: 2;
      color: #ff4a4a;
    }

    #recentPictures img.zoomable {
      cursor: pointer;
      pointer-events: auto;
    }

    #floatingMenu {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 9998;
    }
    #recentPictures {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      max-width: 900px;
      margin: 0 auto;
      grid-auto-rows: 1fr;
    }
    #recentPictures>div {
      position: relative;
      width: 100%;
      aspect-ratio: 1 / 1;
      overflow: hidden;
      border-radius: 10px;
    }
    #recentPictures img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 10px;
      transition: transform 0.25s ease;
      display: block;
      background: transparent;
    }

    #recentPictures img:hover {
      transform: scale(1.03);
    }

    #recentPicturesSection {
      width: 100%;
      padding: auto;
      padding-bottom: 30px;
      box-sizing: border-box;
      text-align: center;
    }

    @media screen and (max-width: 768px) {
      #recentPictures {
        grid-template-columns: repeat(2, 1fr) !important;
        width: calc(100% - 40px);
        margin: 0 auto;
      }

      #recentPicturesSection {
        padding-left: 20px;
        padding-right: 20px;
      }
    }

    #mainMenuBtn {
      font-size: 22px;
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: #4a6cf7;
      color: white;
      border: none;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
      position: relative;
      z-index: 2;
    }

    #menuItems {
      position: absolute;
      bottom: 65px;
      right: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
      opacity: 0;
      pointer-events: none;
      transform: translateY(10px);
      transition: opacity 0.2s ease, transform 0.3s ease;
    }

    #menuItems.show {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
    }

    #menuItems button {
      font-size: 22px;
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: #2a2a2a;
      color: white;
      border: 1px solid #444;
      cursor: pointer;
      transition: background 0.2s ease;
    }

    #menuItems button:hover {
      background: #444;
    }

    #guestbookModal {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 9999;
      background: rgba(0, 0, 0, 0.9);
      justify-content: center;
      align-items: center;
      overflow-y: auto;
    }

    .guestbook-content {
      background: #fff;
      color: #000;
      padding: 2rem;
      border-radius: 12px;
      max-width: 600px;
      width: 90%;
      position: relative;
    }

    body.dark-mode .guestbook-content {
      background: #222;
      color: #fff;
    }

    .guestbook-entry {
      margin-bottom: 1.5rem;
      padding: 1rem;
      border-bottom: 1px solid #ccc;
    }

    .status-message {
      margin-top: 10px;
      font-weight: bold;
    }

    .read-more:hover {
      text-decoration: underline;
    }
    .read-more {
      color: #4a6cf7;
      cursor: pointer;
      font-weight: 600;
      margin-left: 6px;
      user-select: none;
    }

    .read-more-link {
      color: #4a6cf7;
      cursor: pointer;
      font-weight: 600;
      margin-left: 6px;
    }

    .read-more-link:hover {
      text-decoration: underline;
    }

    .bio-text {
      text-align: center;
      line-height: 1.6;
      font-size: 1.1rem;
      position: relative;
    }

    .btn-small {
      margin-top: 12px;
      padding: 6px 14px;
      font-size: 0.85rem;
      background: #4a6cf7;
      color: white;
      border: none;
      border-radius: 20px;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .btn-small:hover {
      background: #3a57d4;
    }

    .bio-expanded {
      display: none;
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: all 0.35s ease;
      margin-top: 6px;
    }

    .bio-expanded.open {
      max-height: 500px;
      opacity: 1;
      display: inline;
    }

    .bio-readmore-wrapper {
      text-align: center;
      margin-top: 10px;
    }

    #readMoreBtn {
      display: inline-block;
      background: #4a6cf7;
      color: white;
      padding: 6px 14px;
      border-radius: 8px;
      font-size: 14px;
      border: none;
      cursor: pointer;
    }

    #readMoreBtn:hover {
      background: #3b5adc;
    }

    #bioExpanded {
      display: block;
      margin-top: 0;
      opacity: 0;
      max-height: 0;
      overflow: hidden;
      transition: all 0.25s ease;
    }

    #bioExpanded.open {
      margin-top: 16px;
      opacity: 1;
      max-height: 500px;
    }
    .map {
      background-color: #0a7c46;
      color: white;
    }

    .map:hover {
      background-color: #0f8f52;
    }

    body.dark-mode .map {
      background-color: #146b3a;
    }

    body.dark-mode .map:hover {
      background-color: #1d8c59;
    }
    .leaflet-popup-content-wrapper {
      border-radius: 12px;
      padding: 10px 14px;
    }

    .leaflet-popup-content {
      margin: 6px 0;
      font-size: 15px;
      color: #000;
    }

    .leaflet-container {
      background: #d7ebff;
    }

    body.dark-mode .leaflet-container {
      background: #0d1117;
    }

    .playlist-card {
      background: #ffffff;
      color: #111827;
      border: 1px solid rgba(15, 23, 42, 0.12);
      border-radius: 12px;
      padding: 15px;
      margin: 15px 0;
    }

    body.dark-mode .playlist-card {
      background: #1a1a1a;
      color: #f8fafc;
      border-color: rgba(255, 255, 255, 0.10);
    }

    .button.music {
      background-color: #d32f2f;
      color: white;
    }

    #publicPlaylists {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 20px;
      padding: 10px 0;
    }

    .playlist-card-wrapper a.playlist-card {
      display: block;
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.12);
      border-radius: 14px;
      padding: 16px;
      box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
      text-align: left;
      text-decoration: none;
      color: #111827;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .playlist-card-wrapper a.playlist-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
    }

    .playlist-card-wrapper a.playlist-card h3,
    .playlist-card-wrapper a.playlist-card p,
    .playlist-card-wrapper a.playlist-card .playlist-meta {
      color: inherit;
    }

    body.dark-mode .playlist-card-wrapper a.playlist-card {
      background: #1b1b1b;
      border-color: rgba(255, 255, 255, 0.10);
      color: #ffffff;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.30);
    }

    body.dark-mode .playlist-card-wrapper a.playlist-card:hover {
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    }

    .playlist-thumb {
      width: 100%;
      border-radius: 12px;
      margin-bottom: 10px;
      object-fit: cover;
    }
    .dark-mode .leaflet-control-zoom-in,
    .dark-mode .leaflet-control-zoom-out {
      color: #7a7a7a !important;
      background-color: #fff !important;
      border-color: #ccc !important;
    }

    .button,
    .button:link,
    .button:visited {
      cursor: pointer !important;
    }

    body.dark-mode .leaflet-popup-content {
      color: #222 !important;
    }

    body.dark-mode .leaflet-control-zoom,
    body.dark-mode .leaflet-control {
      background: #222 !important;
      border: 1px solid #444 !important;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    }

    body.dark-mode .leaflet-control-zoom-in,
    body.dark-mode .leaflet-control-zoom-out {
      background: #222 !important;
      color: #fff !important;
      border-bottom: 1px solid #444 !important;
    }

    body.dark-mode .leaflet-control-zoom-in:hover,
    body.dark-mode .leaflet-control-zoom-out:hover {
      background: #333 !important;
    }

    body {
      margin: 0;
      font-family: 'Roboto', sans-serif;
      background-color: rgb(255, 255, 255);
      text-align: center;
      color: #333;
      background: linear-gradient(135deg,
          #d14cff 0%,
          
          #5b6cff 18%,
          
          #3aa0ff 35%,
          
          #12bce0 55%,
          
          #00d2b5 75%,
          
          #00c896 100%
          
        );
    }
    body.dark-mode {
      background-color: #121212;
      color: #e5e7eb;
      background: linear-gradient(135deg,
          #070A12 0%,
          #081326 35%,
          #0A1B2E 65%,
          #071018 100%);
    }
    body.dark-mode a {
      color: #d4d4d4;
    }
    body.dark-mode .bio-box,
    body.dark-mode .media-section,
    body.dark-mode .blog-header-box,
    body.dark-mode .blog-area {
      background: rgba(10, 14, 24, 0.65);
      border: 1px solid rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(8px);
    }
    .media-section,
    #recentPicturesSection,
    #recentPictures,
    .insta-feed-static {
      background: transparent !important;
      box-shadow: none !important;
      border: none !important;
    }
    .media-section::before,
    .media-section::after,
    #recentPicturesSection::before,
    #recentPicturesSection::after {
      content: none !important;
      display: none !important;
    }

    .site-title-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      width: fit-content;
      max-width: calc(100% - 32px);
      margin: 0 auto;
    }

    .siteTitle {
      position: relative;
      display: inline-block;
      margin: 0;
      line-height: 1;
      font-weight: 900;
      font-size: clamp(34px, 4.5vw, 52px);
    }
    .siteTitle .titleShadow {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 0;
      pointer-events: none;
      user-select: none;

      color: #0b2c66;
      transform: translate(4px, 4px);

      text-shadow:
        0 2px 0 #061833,
        0 6px 14px rgba(5, 18, 50, 0.55);
    }
    .siteTitle .titleText {
      position: relative;
      z-index: 1;
      display: inline-block;
      color: #ffffff;

      animation: titleBounce 1.8s ease-in-out infinite;
      transform-origin: 50% 100%;
    }

    @keyframes titleBounce {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-2px);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .siteTitle .titleText {
        animation: none;
      }
    }
    .cookie-banner[hidden],
    .cookie-modal[hidden] {
      display: none !important;
    }

    .cookie-banner {
      position: fixed;
      inset: auto 0 0 0;
      z-index: 99999;
      padding: 12px;
      pointer-events: none;
    }

    .cookie-card {
      pointer-events: auto;
      max-width: 980px;
      margin: 0 auto;
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(0, 0, 0, 0.12);
      border-radius: 16px;
      box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
      padding: 14px 14px;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
    }

    .cookie-title {
      font-size: 16px;
      font-weight: 800;
      letter-spacing: 0.2px;
    }

    .cookie-desc {
      font-size: 13px;
      opacity: 0.9;
      line-height: 1.35;
      margin-top: 4px;
    }

    .cookie-link {
      display: inline-block;
      margin-top: 8px;
      font-size: 13px;
      text-decoration: underline;
      opacity: 0.9;
    }

    .cookie-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .cookie-btn {
      border: 1px solid rgba(0, 0, 0, 0.18);
      background: rgba(255, 255, 255, 0.75);
      padding: 10px 12px;
      border-radius: 12px;
      font-weight: 700;
      font-size: 13px;
      cursor: pointer;
      transition: transform 0.08s ease, opacity 0.12s ease;
      user-select: none;
    }

    .cookie-btn:hover {
      transform: translateY(-1px);
    }

    .cookie-btn:active {
      transform: translateY(0px);
      opacity: 0.95;
    }

    .cookie-btn.primary {
      border-color: rgba(0, 0, 0, 0.22);
      background: rgba(74, 108, 247, 0.95);
      color: #fff;
    }

    .cookie-btn.secondary {
      background: rgba(255, 255, 255, 0.85);
    }
    @media (max-width: 720px) {
      .cookie-card {
        grid-template-columns: 1fr;
      }

      .cookie-actions {
        justify-content: stretch;
      }

      .cookie-btn {
        width: 100%;
      }
    }
    .cookie-modal {
      position: fixed;
      inset: 0;
      z-index: 100000;
      display: grid;
      place-items: center;
      padding: 14px;
      background: rgba(0, 0, 0, 0.35);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }

    .cookie-modal-card {
      width: min(560px, 100%);
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(0, 0, 0, 0.12);
      border-radius: 18px;
      box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
      padding: 16px;
      position: relative;
    }

    .cookie-modal-close {
      position: absolute;
      top: 10px;
      right: 12px;
      width: 38px;
      height: 38px;
      border-radius: 12px;
      border: 1px solid rgba(0, 0, 0, 0.12);
      background: rgba(255, 255, 255, 0.9);
      font-size: 22px;
      cursor: pointer;
    }

    .cookie-options {
      display: grid;
      gap: 10px;
    }

    .cookie-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border: 1px solid rgba(0, 0, 0, 0.10);
      border-radius: 14px;
      padding: 12px;
      background: rgba(255, 255, 255, 0.75);
    }

    .cookie-option input[type="checkbox"] {
      width: 20px;
      height: 20px;
    }

    body.dark-mode .cookie-modal-card {
      background: rgba(15, 23, 42, 0.98);
      border-color: rgba(255, 255, 255, 0.12);
      color: #f8fafc;
    }

    body.dark-mode .cookie-modal-close {
      border-color: rgba(255, 255, 255, 0.16);
      background: #1e293b;
      color: #f8fafc;
    }

    body.dark-mode .cookie-option {
      border-color: rgba(255, 255, 255, 0.12);
      background: rgba(30, 41, 59, 0.9);
      color: #f8fafc;
    }
    #imageModal img {
      max-width: 95vw;
      max-height: 95vh;
      object-fit: contain;
      border-radius: 6px;
    }

    #imageModal .image-modal-img {
      max-width: 95vw !important;
      max-height: 95vh !important;
      object-fit: contain !important;
      border-radius: 12px !important;
      display: block !important;
    }

    #closeImageModal {
      position: fixed !important;
      top: 20px !important;
      right: 24px !important;
      font-size: 32px !important;
      color: #fff !important;
      cursor: pointer !important;
      z-index: 2147483647 !important;
    }
    body.dark-mode.has-modal .media-section,
    body.dark-mode.has-modal .blog-section,
    body.dark-mode.has-modal .content,
    body.dark-mode.has-modal .container,
    body.dark-mode.has-modal section,
    body.dark-mode.has-modal main {
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      filter: none !important;
      transform: none !important;
    }
    #imageModal {
      position: fixed !important;
      inset: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      background: rgba(0, 0, 0, 0.85) !important;
      display: none;
      justify-content: center !important;
      align-items: center !important;
      z-index: 2147483647 !important;
    }
    #dayOverviewModal .day-overview-card,
    #dayOverviewModal .day-overview-body,
    #dayOverviewModal .day-event,
    #dayOverviewModal .day-event * {
      text-align: left !important;
    }
    #dayOverviewModal .day-event,
    #dayOverviewModal .day-event-line {
      display: flex;
      flex-direction: column;
      align-items: flex-start !important;
    }
    #dayOverviewModal .day-event-top {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: flex-start !important;
      text-align: left !important;
    }
    #dayOverviewModal .day-event-top>* {
      text-align: left !important;
    }

    h2 {
      color: #ffffff;
      padding: auto;
      font-weight: 1100 !important;
    }

    .bio-box,
    .traits-box {
      margin: 20px auto;
      padding: 20px;
      max-width: 600px;
      background: rgba(255, 255, 255, 0.3);
      border-radius: 16px;
      backdrop-filter: blur(8px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
      color: #333;
      box-sizing: border-box;
    }

    body.dark-mode .bio-box,
    body.dark-mode .traits-box {
      background: rgba(10, 14, 24, 0.65);
      color: #f0f0f0;
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .traits-box {
      width: min(calc(100% - 40px), 600px);
      max-width: none;
    }

    .traits-title {
      font-weight: 900;
      font-size: 1.25rem;
      margin-bottom: 14px;
      letter-spacing: 0.04em;
      text-align: center;
    }

    .trait-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }

    .trait-row:last-child {
      border-bottom: none;
    }

    .trait-label {
      font-weight: 700;
    }

    .trait-rating {
      font-size: 1.2rem;
      letter-spacing: 2px;
    }

.today-event-banner strong,
.today-event-banner .today-event-title {
  display: block;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
}
.comments-modal.show,
.comments-admin-modal.show,
.comment-thanks-modal.show {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  z-index: 2147483000 !important;
}

.comments-panel,
.comments-admin-panel,
.comment-thanks-card {
  width: min(960px, 100%);
  height: min(88vh, 860px);
  background: rgba(255, 255, 255, 0.96);
  color: #101827;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
}

.comments-admin-panel { width: min(1100px, 100%); }
.comment-thanks-card {
  width: min(420px, calc(100% - 28px));
  height: auto;
  padding: 28px;
  align-items: center;
  text-align: center;
}

body.dark-mode .comments-panel,
body.dark-mode .comments-admin-panel,
body.dark-mode .comment-thanks-card {
  background: rgba(14, 18, 31, 0.96);
  color: #e5e7eb;
  border-color: rgba(255,255,255,.10);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: linear-gradient(135deg, rgba(74,108,247,.16), rgba(18,188,224,.10));
}

body.dark-mode .comments-header { border-bottom-color: rgba(255,255,255,.08); }
.comments-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .68; font-weight: 900; }
.comments-header h2 { margin: 2px 0 0; color: inherit; font-size: 1.4rem; }
.comments-close,
.comments-admin-gear {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.75);
  color: inherit;
  cursor: pointer;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.dark-mode .comments-close,
body.dark-mode .comments-admin-gear { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.10); }

.comments-status { padding: 12px 22px; font-weight: 700; opacity: .82; }
.comments-list,
.comments-admin-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px 90px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comments-admin-list { padding-bottom: 22px; }
body.dark-mode .comment-card,
body.dark-mode .comment-admin-card { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.10); }
.comment-topline,
.comment-admin-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.comment-topline strong,
.comment-admin-top strong { display: block; font-size: 1rem; }
.comment-topline small,
.comment-admin-top small { display: block; opacity: .62; margin-top: 3px; }
.comment-card p,
.comment-admin-card p { margin: 12px 0 0; line-height: 1.45; white-space: normal; }
.heart-btn,
.comment-admin-hearts {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(244,63,94,.10);
  color: #be123c;
  font-weight: 900;
  cursor: pointer;
}
.heart-btn.liked { background: #f43f5e; color: #fff; }
.comments-fab {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: #4a6cf7;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(74,108,247,.34);
}
.comment-form {
  position: absolute;
  right: 24px;
  bottom: 92px;
  width: min(420px, calc(100% - 48px));
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 55px rgba(0,0,0,.24);
  box-sizing: border-box;
}
body.dark-mode .comment-form { background: #111827; border-color: rgba(255,255,255,.10); }
.comment-form-title { font-weight: 900; margin-bottom: 8px; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.95);
  color: #111827;
  font: inherit;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
body.dark-mode .comment-form input,
body.dark-mode .comment-form textarea { background: rgba(255,255,255,.07); color: #fff; border-color: rgba(255,255,255,.12); }
.comment-form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.comment-primary,
.comment-secondary,
.comment-admin-actions button,
.comments-admin-tabs button {
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
}
.comment-primary { background: #4a6cf7; color: #fff; border-color: transparent; }
.comment-secondary { background: rgba(0,0,0,.06); color: inherit; }
.comments-admin-tabs { display: flex; gap: 10px; padding: 14px 22px 4px; flex-wrap: wrap; }
.comments-admin-tabs button { background: rgba(0,0,0,.06); color: inherit; }
.comments-admin-tabs button.active { background: #4a6cf7; color: white; border-color: transparent; }
.comment-admin-meta { margin-top: 12px; font-size: 13px; opacity: .75; }
.comment-admin-pill { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(74,108,247,.14); font-size: 12px; font-weight: 900; }
.comment-admin-pill.danger { background: rgba(239,68,68,.18); color: #f87171; }
.comment-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.comment-admin-actions button { background: rgba(255,255,255,.08); color: inherit; }
.comment-admin-actions button.danger { background: rgba(127, 29, 29, .92); color: #fff; border-color: rgba(248,113,113,.45); }
.comments-admin-empty { padding: 18px; opacity: .75; }
.comment-thanks-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #22c55e;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 12px;
}
.comment-thanks-card h2 { color: inherit; margin: 0 0 8px; }
.comment-thanks-card p { margin: 0 0 18px; opacity: .8; }
.bio-box,
.traits-box,
.today-event-banner {
      width: min(calc(100% - 40px), 600px) !important;
      max-width: none !important;
      box-sizing: border-box !important;
}

.today-event-banner .today-event-kicker,
.today-event-banner strong,
.today-event-banner .today-event-title {
  display: block;
  font-size: .74rem !important;
  letter-spacing: .10em !important;
  text-transform: uppercase !important;
  opacity: .72 !important;
  margin-bottom: 3px;
}

.today-event-banner .today-event-name,
.today-event-banner span:not(.today-event-kicker):not(.today-event-title) {
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 900;
}

.today-event-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(14, 56, 160, 0.28), inset 0 1px 0 rgba(255,255,255,.28) !important;
}
.comments-header-actions {
      display: flex;
      gap: 8px;
      align-items: center;
}

.comments-admin-gear {
      width: 40px;
      height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 40px;
      padding: 0;
      border-radius: 14px;
      border: 1px solid #284cea;
      background: #4a6cf7;
      color: #ffffff;
      box-shadow: 0 8px 18px rgba(74,108,247,.24);
      cursor: pointer;
      font-size: 16px;
      transition: background .15s ease, box-shadow .15s ease;
}
.comments-admin-gear:hover,
body.dark-mode .comments-admin-gear:hover {
      background: #3657db;
      box-shadow: 0 10px 22px rgba(74,108,247,.30);
}
body.dark-mode .comments-admin-gear {
      border-color: #284cea;
      background: #4a6cf7;
      color: #ffffff;
}
.comments-admin-gear i {
      margin: 0;
      pointer-events: none;
}

.comments-admin-gear[hidden] {
  display: none !important;
}

.thread-expanded .comment-thread.is-collapsed .extra-reply {
  display: grid;
}

.thread-read-more {
  margin: 10px 0 0 28px;
  border: 0;
  background: transparent;
  color: #4a6cf7;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 0;
}

.comment-admin-mini {
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 6px 9px;
  background: rgba(255,255,255,.08);
  color: inherit;
  cursor: pointer;
}

.comment-admin-mini.danger,
.comment-admin-actions .danger {
  color: #fecaca !important;
  border-color: rgba(248,113,113,.28) !important;
  background: rgba(127,29,29,.28) !important;
}

body.dark-mode .today-event-banner {
      border-color: rgba(255,255,255,.16) !important;
      background: rgba(10, 14, 24, 0.72) !important;
      color: #f4f7ff !important;
      box-shadow: none !important;
}

.reply-rail::before {
      content: "" !important;
      position: absolute !important;
      top: 0.9em !important;
      bottom: -10px;
      left: 7px !important;
      width: 11px !important;
      border-radius: 0 0 0 8px !important;
      background: rgba(74,108,247,.36);
      height: 11px !important;
      border-left: 2px solid rgba(74, 108, 247, 0.42) !important;
      border-bottom: 2px solid rgba(74, 108, 247, 0.42) !important;
}

.reply-meta strong { font-size: 0.92rem !important; }
.reply-meta small {
      opacity: .68 !important;
      font-size: .78rem !important; }

.thread-read-more,
.comment-admin-mini {
  margin-top: 10px !important;
  border: none !important;
  background: transparent !important;
  color: #4a6cf7 !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.admin-reply-form {
      margin-top: 14px;
      display: grid;
      gap: 8px;
      margin: 14px 0 !important;
      padding: 12px !important;
      border-radius: 16px !important;
      background: rgba(74, 108, 247, 0.07) !important;
      border: 1px solid rgba(74, 108, 247, 0.16) !important;
}

.admin-reply-form textarea {
      width: 100% !important;
      min-height: 86px !important;
      resize: vertical !important;
      box-sizing: border-box !important;
      border-radius: 12px !important;
      border: 1px solid rgba(0, 0, 0, 0.14) !important;
      background: rgba(255, 255, 255, 0.95) !important;
      color: #111827 !important;
      padding: 10px 12px !important;
      font: inherit !important;
}

.comment-admin-actions.compact {
  margin-top: 8px !important;
}

.comment-admin-actions button.danger,
.comment-admin-actions .danger {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #991b1b !important;
}

.comment-admin-actions button.danger:hover,
.comment-admin-actions .danger:hover {
  background: #b91c1c !important;
  color: #ffffff !important;
}

body.dark-mode .reply-body,
body.dark-mode .admin-reply-form {
  background: rgba(74, 108, 247, 0.13) !important;
  border-color: rgba(255,255,255,.10) !important;
}

body.dark-mode .admin-reply-form textarea {
  background: rgba(255,255,255,.08) !important;
  color: #f4f7ff !important;
  border-color: rgba(255,255,255,.14) !important;
}

.today-event-banner::after {
      content: none !important;
      position: absolute;
      inset: 1px;
      border-radius: 21px;
      border: 1px solid rgba(255,255,255,.18);
      pointer-events: none;
      display: none !important;
}

.comment-thread::before {
  content: "" !important;
  position: absolute !important;
  left: 8px !important;
  top: 0 !important;
  bottom: 12px !important;
  width: 2px !important;
  background: rgba(74, 108, 247, 0.42) !important;
  border-radius: 999px !important;
}

.reply-rail {
      position: relative !important;
      width: 18px !important;
      flex: 0 0 18px !important;
      display: none !important;
}
.today-event-banner {
      width: min(calc(100% - 32px), 600px) !important;
      max-width: none !important;
      margin: 18px auto 34px auto !important;
      padding: 10px 18px 10px 14px !important;
      border-radius: 18px !important;
      border: 1px solid rgba(255, 255, 255, 0.42) !important;
      background: rgba(255, 255, 255, 0.18) !important;
      color: #071225 !important;
      cursor: pointer !important;
      text-align: left !important;
      font-weight: 700;
      display: none;
      min-height: 64px !important;
      align-items: center !important;
      gap: 14px !important;
      box-shadow: none !important;
      backdrop-filter: blur(8px) !important;
      -webkit-backdrop-filter: blur(8px) !important;
      position: relative !important;
      justify-content: flex-start !important;
      overflow: hidden !important;
      box-sizing: border-box !important;
      white-space: normal !important;
}

.today-event-banner::before {
      content: "\f073" !important;
      font-family: "Font Awesome 6 Free" !important;
      font-weight: 900 !important;
      width: 44px !important;
      height: 44px !important;
      border-radius: 14px !important;
      background: #2878ff !important;
      color: #fff !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      flex: 0 0 44px !important;
      box-shadow: none !important;
      position: static !important;
      left: 18px !important;
      top: 50% !important;
      transform: none !important;
      inset: auto !important;
      margin: 0 !important;
      min-width: 44px !important;
      line-height: 1 !important;
}

.today-event-banner .today-event-copy {
      display: flex !important;
      flex-direction: column !important;
      justify-content: center !important;
      gap: 2px !important;
      min-width: 0 !important;
      flex: 1 1 auto !important;
      margin: 0 !important;
      padding: 0 !important;
      overflow: hidden !important;
      padding-left: 0 !important;
      margin-left: 0 !important;
}

.today-event-banner .today-event-label {
      display: block !important;
      font-size: 0.78rem !important;
      line-height: 1.05 !important;
      font-weight: 900 !important;
      letter-spacing: .08em !important;
      text-transform: uppercase !important;
      opacity: .72 !important;
}

.today-event-banner .today-event-name {
      display: block !important;
      font-size: 1.22rem !important;
      line-height: 1.18 !important;
      font-weight: 900 !important;
      letter-spacing: 0 !important;
      text-transform: none !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      min-width: 0 !important;
      max-width: 100% !important;
}

.comment-thread.is-collapsed .extra-reply {
      display: none !important; }
.comment-thread.thread-expanded .extra-reply {
      display: flex !important; }

.comment-admin-mini.danger,
.comment-admin-mini.danger.delete-reply-btn {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      width: auto !important;
      margin-top: 10px !important;
      padding: 8px 14px !important;
      border-radius: 10px !important;
      border: 1px solid #991b1b !important;
      background: #dc2626 !important;
      color: #ffffff !important;
      font-weight: 900 !important;
      line-height: 1.1 !important;
      cursor: pointer !important;
}

.comment-admin-mini.danger:hover,
.comment-admin-mini.danger.delete-reply-btn:hover {
      background: #b91c1c !important;
      color: #ffffff !important;
}

@media (max-width: 480px) {
  .today-event-banner {
            width: min(calc(100% - 24px), 600px) !important;
            padding: 10px 13px !important;
            gap: 11px !important;
  }
  .today-event-banner::before {
            width: 40px !important;
            height: 40px !important;
            min-width: 40px !important;
            flex-basis: 40px !important;
  }
  .today-event-banner .today-event-name {
            font-size: 1.04rem !important;
  }
}
.comment-card > p,
.comment-admin-card > p {
  margin-bottom: 0 !important;
}

.comment-card > p + .comment-thread,
.comment-admin-card > p + .comment-thread {
  margin-top: 3px !important;
}

.comment-reply.first-reply,
.comment-thread > .comment-reply:first-child {
  margin-top: 0 !important;
}

.comment-reply.first-reply::before,
.comment-thread > .comment-reply:first-child::before {
  top: -7px !important;
  height: 31px !important;
}

.comment-reply.first-reply:not(.last-reply)::after,
.comment-thread > .comment-reply:first-child:not(.last-reply)::after {
  top: 24px !important;
}

body.dark-mode .comment-main-text,
body.dark-mode .comment-card > p,
body.dark-mode .comment-admin-card > p {
  color: #f3f6ff !important;
}

.comment-thread::before,
.reply-rail {
      content: none !important;
      display: none !important;
}

.comment-thread::after {
  content: "" !important;
  position: absolute !important;
  left: -4px !important;
  top: -16px !important;
  width: 4px !important;
  height: 16px !important;
  background: rgba(74, 108, 247, 0.60) !important;
  border-radius: 999px 999px 0 0 !important;
}
.comment-card,
.comment-admin-card {
      background: rgba(255,255,255,.82);
      border: 1px solid rgba(0,0,0,.08);
      border-radius: 20px !important;
      padding: 16px 16px 14px !important;
      box-shadow: 0 8px 20px rgba(0,0,0,.06);
      position: relative !important;
      overflow: visible !important;
}

.comment-card {
      background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,248,255,.96)) !important;
      border: 1px solid rgba(54, 91, 210, 0.18) !important;
      box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10) !important;
      padding: 17px 18px 18px !important;
}

.comment-card::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 16px !important;
  bottom: 16px !important;
  width: 5px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #4a6cf7, #12bce0) !important;
}

.comment-topline,
.comment-admin-top,
.comment-admin-topline {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 0 2px !important;
}

.comment-meta-line,
.reply-meta {
      display: flex !important;
      align-items: baseline !important;
      justify-content: flex-start !important;
      gap: 6px !important;
      min-width: 0 !important;
      line-height: 1.2 !important;
      flex-wrap: wrap !important;
      text-align: left !important;
}

.comment-meta-line strong,
.reply-meta strong {
      display: inline !important;
      font-weight: 950 !important;
      color: #071225 !important;
}

.comment-meta-line small,
.reply-meta small,
.reply-meta .reply-tag,
.meta-dot {
      display: inline !important;
      opacity: .66 !important;
      font-size: .82rem !important;
      margin: 0 !important;
      white-space: nowrap !important;
      line-height: 1.2 !important;
}

.reply-meta .reply-tag {
      font-size: .78rem !important;
      opacity: .72 !important;
      font-weight: 850 !important;
      margin-left: 2px !important;
}

.meta-dot {
      font-weight: 900 !important;
      opacity: .48 !important;
}

.comment-main-text,
.comment-card > p,
.comment-admin-card > p {
      margin: 8px 0 0 0 !important;
      padding: 0 !important;
      font-size: 1.05rem !important;
      line-height: 1.48 !important;
      color: #0f172a !important;
}

.comment-card > .comment-main-text,
.comment-card > p:not(.reply-body p) {
      position: relative !important;
      z-index: 2 !important;
      padding: 2px 2px 0 0 !important;
      font-weight: 500 !important;
}

.comment-thread {
      margin-top: 2px !important;
      padding-left: 22px !important;
      border-left: 4px solid rgba(74, 108, 247, 0.60) !important;
      position: relative !important;
      margin-left: 10px !important;
      --reply-line: rgba(74, 108, 247, .62);
      --reply-line-w: 3px;
      margin: 18px 0 0 12px !important;
      padding: 0 0 0 34px !important;
      border: 0 !important;
      overflow: visible !important;
}

.comment-thread::before,
.comment-thread::after,
.reply-rail,
.reply-rail::before,
.reply-rail::after {
  content: none !important;
  display: none !important;
}

.comment-reply {
      display: flex !important;
      grid-template-columns: 18px 1fr;
      gap: 0 !important;
      margin-top: 10px;
      margin: 12px 0 0 !important;
      text-align: left !important;
      position: relative !important;
      --reply-line: rgba(74, 108, 247, 0.62);
      --reply-line-w: 4px;
      padding: 0 !important;
}

.comment-thread > .comment-reply:first-child,
.comment-reply.first-reply {
      margin-top: 0 !important;
}

.comment-reply::before {
      content: "" !important;
      position: absolute !important;
      left: -25px !important;
      top: 18px !important;
      width: 25px !important;
      height: 13px !important;
      border-left: var(--reply-line-w) solid var(--reply-line) !important;
      border-bottom: var(--reply-line-w) solid var(--reply-line) !important;
      border-radius: 0 0 0 10px !important;
      box-sizing: border-box !important;
}

.comment-reply:not(.last-reply)::after {
      content: "" !important;
      position: absolute !important;
      left: -25px !important;
      top: 31px !important;
      bottom: -15px !important;
      width: var(--reply-line-w) !important;
      background: var(--reply-line) !important;
      border-radius: 999px !important;
}

.comment-reply.only-reply::after,
.comment-reply.last-reply::after {
      content: none !important;
      display: none !important;
}

.reply-body {
      text-align: left;
      padding: 11px 13px !important;
      border-radius: 15px !important;
      background: rgba(74, 108, 247, 0.075) !important;
      border: 1px solid rgba(74, 108, 247, 0.16) !important;
      flex: 1 1 auto !important;
      min-width: 0 !important;
      margin-top: 0 !important;
      margin: 0 !important;
      box-shadow: none !important;
}

.reply-body p {
      margin: 6px 0 0 !important;
      line-height: 1.42 !important;
      white-space: pre-wrap !important;
      color: #111827 !important;
      font-size: .98rem !important;
}

.reply-meta {
      display: flex !important;
      align-items: baseline !important;
      justify-content: space-between;
      gap: 8px !important;
      margin-bottom: 0 !important;
      margin: 0 !important;
}

body.dark-mode .comment-card {
      background: linear-gradient(135deg, rgba(20, 28, 50, .98), rgba(12, 18, 33, .96)) !important;
      border-color: rgba(142, 164, 255, .22) !important;
      box-shadow: 0 16px 34px rgba(0, 0, 0, .36) !important;
}

body.dark-mode .comment-meta-line strong,
body.dark-mode .reply-meta strong,
body.dark-mode .comment-main-text,
body.dark-mode .comment-card > p,
body.dark-mode .comment-admin-card > p {
  color: #f4f7ff !important;
}

body.dark-mode .reply-body {
      background: rgba(74, 108, 247, .14) !important;
      border-color: rgba(142, 164, 255, .20) !important;
}

body.dark-mode .reply-body p {
  color: #f4f7ff !important;
}
.comment-card > .comment-main-text + .comment-thread,
.comment-card > p.comment-main-text + .comment-thread,
.comment-card > p + .comment-thread,
.comment-admin-card > .comment-main-text + .comment-thread,
.comment-admin-card > p.comment-main-text + .comment-thread,
.comment-admin-card > p + .comment-thread {
  margin-top: 10px !important;
}

.comment-card .comment-thread,
.comment-admin-card .comment-thread {
  margin-top: 32px !important;
  margin-left: 12px !important;
  padding-left: 34px !important;
}

.comment-card .comment-thread > .comment-reply:first-child,
.comment-admin-card .comment-thread > .comment-reply:first-child,
.comment-card .comment-reply.first-reply,
.comment-admin-card .comment-reply.first-reply {
  margin-top: 0 !important;
}

.comment-card .comment-reply::before,
.comment-admin-card .comment-reply::before {
  top: 18px !important;
}

.comment-card .comment-reply:not(.last-reply)::after,
.comment-admin-card .comment-reply:not(.last-reply)::after {
  top: 31px !important;
}@media(max-width:650px){}
.comment-main-text,.comment-card>p.comment-main-text{margin:5px 0 0!important;line-height:1.45!important}.comment-card .comment-thread{margin-top:20px!important}.comment-topline{
      align-items: center !important;
      margin-bottom: 0 !important}
.center-button {
      text-align: center;
      display: flex !important;
      justify-content: center;
      margin-bottom: 20px;
      position: relative !important;
      align-items: center !important;
}
@keyframes profileAccordionIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
#commentsAdminGear[hidden] { display: none !important; }
#commentsAdminGear i { margin: 0 !important; }
.fc .fc-button-group {
  gap: 10px !important;
}
.fc .fc-button-group > .fc-button {
  margin: 0 !important;
}
#calendar { flex: 1 1 auto !important; min-height: 0 !important; overflow: auto !important; padding: 14px !important; box-sizing: border-box !important; }
@media (max-width: 650px) {
  .comment-card > .comment-main-text + .comment-thread,
  .comment-card > p.comment-main-text + .comment-thread,
  .comment-card > p + .comment-thread,
  .comment-admin-card > .comment-main-text + .comment-thread,
  .comment-admin-card > p.comment-main-text + .comment-thread,
  .comment-admin-card > p + .comment-thread,
  .comment-card .comment-thread,
  .comment-admin-card .comment-thread {
    margin-top: 28px !important;
  }
  .comment-card {
    padding: 15px 14px 16px !important;
  }
  .comment-reply:not(.last-reply)::after {
            left: -22px !important;
  }
  .comment-reply::before {
            left: -22px !important;
            width: 22px !important;
  }
  .comment-thread {
            margin-top: 16px !important;
            margin-left: 6px !important;
            padding-left: 18px !important;
  }
  .comment-form { left: 14px; right: 14px; bottom: 86px; width: auto; }
  .comments-panel,
  .comments-admin-panel { height: 100vh; border-radius: 0; }
  .comments-modal.show,
  .comments-admin-modal.show { padding: 0 !important; }
}
@media(max-width:700px){}
.blog-header-box .center-button{
      align-items: center !important;
      gap: 10px !important;
      flex-wrap: wrap !important;}
/* Core modal system */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  box-sizing: border-box;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(4px);
}
.modal.show {
  display: flex;
}
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(900px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 22px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.35);
}
body.dark-mode .modal-content {
  border-color: rgba(255, 255, 255, 0.12);
  background: #111827;
  color: #f8fafc;
}
.modal-topbar,
.profile-admin-head {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
  padding: 16px 20px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  color: #0f172a;
  text-align: left;
}
body.dark-mode .modal-topbar,
body.dark-mode .profile-admin-head {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #f8fafc;
}
.modal-heading,
.profile-admin-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}
.modal-heading h2,
.profile-admin-head h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  overflow-wrap: anywhere;
}
.modal-kicker,
.profile-admin-kicker {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}
body.dark-mode .modal-kicker,
body.dark-mode .profile-admin-kicker {
  color: #cbd5e1;
}
.modal-actions,
.admin-action-row,
.profile-admin-actions,
.profile-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.modal-icon-button,
.icon-button,
.admin-card-icon,
.profile-square-action {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 13px;
  background: #4a6cf7;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  box-shadow: 0 7px 18px rgba(74, 108, 247, 0.22);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  overflow: hidden;
  transform: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.modal-icon-button:hover,
.icon-button:hover,
.admin-card-icon:hover,
.profile-square-action:hover {
  background: #3658dc;
  box-shadow: 0 9px 22px rgba(74, 108, 247, 0.28);
  transform: none;
}
.modal-icon-button:focus-visible,
.icon-button:focus-visible,
.admin-card-icon:focus-visible,
.profile-square-action:focus-visible {
  outline: 3px solid rgba(74, 108, 247, 0.3);
  outline-offset: 2px;
}
.modal-icon-button i,
.icon-button i,
.admin-card-icon i,
.profile-square-action i {
  margin: 0;
  pointer-events: none;
}
.modal-close-button,
.profile-admin-close {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.1);
}
.modal-close-button:hover,
.profile-admin-close:hover {
  background: #ffffff;
  color: #111827;
}
body.dark-mode .modal-close-button,
body.dark-mode .profile-admin-close {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(30, 41, 59, 0.95);
  color: #f8fafc;
}
body.dark-mode .modal-close-button:hover,
body.dark-mode .profile-admin-close:hover {
  background: #334155;
  color: #ffffff;
}
.modal-scroll-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  box-sizing: border-box;
  background: #ffffff;
  color: #111827;
}
.modal-fill-body {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  background: #ffffff;
  color: #111827;
}
body.dark-mode .modal-scroll-body,
body.dark-mode .modal-fill-body {
  background: #111827;
  color: #f8fafc;
}
.calendar-modal-content {
  width: min(900px, calc(100vw - 44px));
  height: min(88vh, 850px);
}
.calendar-modal-content #calendar {
  width: 100%;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
  background: #ffffff;
  color: #111827;
}
/* Keep the FullCalendar month/year visible in light mode.
   The global h2 rule uses white text, while FullCalendar renders its title as an h2. */
.calendar-modal-content #calendar .fc-toolbar-title {
  color: #111827 !important;
}

body.dark-mode .calendar-modal-content #calendar .fc-toolbar-title {
  color: #f8fafc !important;
}

body.dark-mode .calendar-modal-content #calendar,
body.dark-mode .calendar-modal-content .fc {
  background: #111827;
  color: #f8fafc;
}
body.dark-mode .calendar-modal-content .fc-theme-standard td,
body.dark-mode .calendar-modal-content .fc-theme-standard th,
body.dark-mode .calendar-modal-content .fc-theme-standard .fc-scrollgrid {
  border-color: #334155;
}
body.dark-mode .calendar-modal-content .fc .fc-daygrid-day-number,
body.dark-mode .calendar-modal-content .fc .fc-col-header-cell-cushion,
body.dark-mode .calendar-modal-content .fc .fc-toolbar-title {
  color: #f8fafc;
}
body.dark-mode .calendar-modal-content .fc .fc-button-primary {
  border-color: #3153df;
  background: #4a6cf7;
  color: #ffffff;
}
body.dark-mode .calendar-modal-content .fc .fc-day-today {
  background: rgba(74, 108, 247, 0.18);
}
.map-modal-content {
  width: min(1100px, calc(100vw - 44px));
  height: min(88vh, 900px);
}
#leafletMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #dbeafe;
}
#leafletMap .leaflet-tile {
  filter: none;
  mix-blend-mode: normal;
  opacity: 1;
}
.playlists-modal-content {
  width: min(820px, calc(100vw - 44px));
  max-height: min(88vh, 850px);
}
#publicPlaylistsWrapper {
  padding: 18px;
  background: #ffffff;
  color: #111827;
}
body.dark-mode #publicPlaylistsWrapper {
  background: #111827;
  color: #f8fafc;
}
.discord-modal-content {
  width: min(460px, calc(100vw - 44px));
  height: min(82vh, 680px);
}
.discord-modal-content iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.blog-modal-content {
  width: min(820px, calc(100vw - 44px));
  max-height: min(90vh, 900px);
}
.blog-modal-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.blog-modal-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}
.blog-modal-author:empty {
  display: none;
}
.blog-modal-author .blog-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  object-fit: cover;
}
.blog-modal-author .author-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  line-height: 1.2;
  text-align: left;
}
.blog-modal-author .author-text strong {
  color: inherit;
  font-size: 0.92rem;
}
.blog-modal-author .post-date {
  color: #64748b;
  font-size: 0.76rem;
}
body.dark-mode .blog-modal-author .post-date {
  color: #cbd5e1;
}
#blogModalBody {
  padding: 0;
  background: #ffffff;
  color: #111827;
}
body.dark-mode #blogModalBody {
  background: #111827;
  color: #f1f5f9;
}
.blog-inner {
  padding: 22px;
  box-sizing: border-box;
}
#blogModalBody .blog-post {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
}
#blogModalBody .blog-post p {
  margin: 0;
  color: inherit;
  line-height: 1.65;
  text-align: left;
}
#blogModalBody .blog-preview-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  margin: 18px 0 0;
  border-radius: 12px;
  object-fit: contain;
}
.modal-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px 20px 20px;
  box-sizing: border-box;
}
.modal-nav button {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #3153df;
  border-radius: 14px;
  background: #4a6cf7;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.modal-nav button:hover:not(:disabled) {
  background: #3658dc;
}
.modal-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.image-modal .close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 2;
  color: #ffffff;
  cursor: pointer;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}
/* Static page admin controls */
.admin-only[hidden] {
  display: none !important;
}
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 16px;
}
.section-title-row h2 {
  margin: 0;
}
.blog-control-row {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.blog-control-row .blog-toggle-button,
.blog-control-row .icon-button {
  transform: none;
}
.site-edit-button {
  flex: 0 0 auto;
  margin: 2px 0 0;
  transform: translateX(2px);
}
.site-edit-button:hover,
.site-edit-button:focus-visible {
  transform: translateX(2px);
}
@media (max-width: 520px) {
  .site-title-row {
    gap: 12px;
  }
  .site-edit-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}
/* Admin modals and generated management content */
.profile-admin-modal {
  z-index: 12000;
}
.profile-admin-panel {
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 22px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.35);
}
.profile-admin-panel.small {
  width: min(620px, calc(100vw - 44px));
}
body.dark-mode .profile-admin-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: #111827;
  color: #f8fafc;
}
.profile-admin-head > .profile-admin-close {
  flex: 0 0 42px;
}
.profile-admin-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}
.profile-admin-head-actions[hidden] {
  display: none;
}
.profile-admin-head-add {
  box-shadow: 0 7px 18px rgba(74, 108, 247, 0.24);
}
.profile-admin-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 20px;
  box-sizing: border-box;
  background: #ffffff;
  color: #111827;
}
body.dark-mode .profile-admin-body {
  background: #111827;
  color: #f8fafc;
}
.profile-admin-form {
  display: grid;
  gap: 14px;
  padding: 20px;
  overflow: auto;
  box-sizing: border-box;
  background: #ffffff;
  color: #111827;
}
body.dark-mode .profile-admin-form {
  background: #111827;
  color: #f8fafc;
}
.profile-admin-form.compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 0 0 18px;
}
.profile-admin-form label,
.profile-field-label {
  display: grid;
  gap: 7px;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: left;
}
.profile-admin-form input,
.profile-admin-form textarea,
.profile-admin-form select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #ffffff;
  color: #111827;
  box-sizing: border-box;
  font: inherit;
}
.profile-admin-form textarea {
  min-height: 110px;
  resize: vertical;
}
body.dark-mode .profile-admin-form input,
body.dark-mode .profile-admin-form textarea,
body.dark-mode .profile-admin-form select {
  border-color: #475569;
  background: #1e293b;
  color: #f8fafc;
}
.profile-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px;
}
.profile-check input {
  width: auto;
}
.profile-hidden-check {
  font-weight: 600;
}
.profile-admin-form > .profile-primary,
.profile-primary,
.profile-secondary,
.profile-danger {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #4a6cf7;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.profile-secondary {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}
body.dark-mode .profile-secondary {
  border-color: #475569;
  background: #1e293b;
  color: #f8fafc;
}
.profile-danger,
.admin-card-icon.danger {
  border-color: #b91c1c;
  background: #dc2626;
  color: #ffffff;
}
.profile-danger:hover,
.admin-card-icon.danger:hover {
  background: #b91c1c;
}
.profile-admin-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
}
.profile-admin-form > .profile-admin-actions {
  justify-content: flex-end;
  padding-top: 4px;
}
.profile-admin-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #f8fafc;
  color: #111827;
  text-align: left;
}
body.dark-mode .profile-admin-card {
  border-color: #334155;
  background: #1e293b;
  color: #f8fafc;
}
.profile-admin-card.media > img {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border-radius: 12px;
  object-fit: cover;
}
.profile-admin-card-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.profile-admin-card-copy h3,
.profile-admin-card-copy p {
  margin: 0 0 6px;
}
.profile-admin-card-copy small {
  display: block;
  color: #64748b;
}
body.dark-mode .profile-admin-card-copy small {
  color: #cbd5e1;
}
.profile-admin-list,
.profile-grid {
  display: grid;
  gap: 12px;
}
.profile-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.profile-gallery-sort-item {
  transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.profile-gallery-sort-item.is-dragging {
  opacity: 0.42;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
  transform: scale(0.98);
}
.profile-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
}
.profile-tabs button {
  padding: 9px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.profile-tabs button.active {
  border-color: #3153df;
  background: #4a6cf7;
  color: #ffffff;
}
body.dark-mode .profile-tabs button {
  border-color: #475569;
  background: #1e293b;
  color: #e2e8f0;
}
body.dark-mode .profile-tabs button.active {
  border-color: #6f86ff;
  background: #4a6cf7;
  color: #ffffff;
}
.admin-card-icon {
  position: relative;
  box-shadow: none;
}
.admin-card-icon input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.profile-upload-tile {
  position: relative;
  min-height: 88px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px;
  border: 2px dashed #94a3b8;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.08);
  color: #475569;
  cursor: pointer;
  text-align: center !important;
}
.profile-upload-tile input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.profile-current-image img {
  display: block;
  width: min(220px, 100%);
  max-height: 180px;
  border-radius: 12px;
  object-fit: cover;
}
.profile-site-image-field {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
body.dark-mode .profile-site-image-field {
  border-color: #334155;
  background: #1e293b;
}
.profile-site-preview {
  margin-top: 4px;
}
.site-image-preview-card {
  position: relative;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
}
body.dark-mode .site-image-preview-card {
  border-color: #475569;
  background: #1e293b;
}
.site-image-preview-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.site-image-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #dc2626;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.site-image-empty,
.empty-state {
  padding: 12px;
  border-radius: 11px;
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
  text-align: left;
}
body.dark-mode .site-image-empty,
body.dark-mode .empty-state {
  color: #cbd5e1;
}
@media (max-width: 700px) {
  .center-button { gap: 8px; }
  .modal {
    padding: 10px;
  }

  .modal-content,
  .calendar-modal-content,
  .map-modal-content,
  .playlists-modal-content,
  .discord-modal-content,
  .blog-modal-content,
  .profile-admin-panel,
  .profile-admin-panel.small {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 17px;
  }

  .modal-topbar,
  .profile-admin-head {
    min-height: 66px;
    padding: 12px 14px;
  }

  .profile-admin-head {
    gap: 10px;
  }

  .profile-admin-head-actions {
    gap: 8px;
  }

  .modal-icon-button,
  .icon-button,
  .admin-card-icon,
  .profile-square-action,
  .profile-admin-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
  }

  .profile-admin-form.compact {
    grid-template-columns: 1fr;
  }

  .profile-admin-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-admin-card .profile-admin-actions {
    width: 100%;
  }
}
/* Management grids and item editors */
.profile-sortable-card[draggable="true"] {
  cursor: grab;
  user-select: none;
  transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.profile-sortable-card[draggable="true"]:active {
  cursor: grabbing;
}
.profile-sortable-card.is-dragging {
  opacity: 0.42;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
  transform: scale(0.98);
}
.profile-item-settings {
  flex: 0 0 42px;
  margin-left: auto;
}
.profile-archive-blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}
.profile-archive-post-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 0 14px;
  overflow: hidden;
}
.profile-archive-post-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px 14px 0 0;
  object-fit: cover;
  background: #e2e8f0;
}
.profile-archive-post-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 2rem;
}
body.dark-mode .profile-archive-post-placeholder {
  background: #0f172a;
  color: #94a3b8;
}
.profile-archive-post-card .profile-admin-card-copy {
  padding: 14px 14px 6px;
}
.profile-archive-post-card .profile-admin-actions {
  justify-content: flex-end;
  padding: 6px 14px 0;
}

.profile-playlist-add-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}
body.dark-mode .profile-playlist-add-form {
  border-color: #334155;
  background: #1e293b;
}
.profile-playlist-add-form textarea {
  min-height: 86px;
}
.profile-playlist-add-form > .profile-primary {
  width: 100%;
}
.profile-playlist-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}
.admin-playlist-card {
  position: relative;
  min-width: 0;
}
.admin-playlist-card .playlist-card {
  position: relative;
  height: 100%;
  margin: 0;
  padding: 16px 16px 68px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  color: #111827;
  text-align: left;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
body.dark-mode .admin-playlist-card .playlist-card {
  border-color: rgba(255, 255, 255, 0.10);
  background: #1b1b1b;
  color: #ffffff;
}
.admin-playlist-card .playlist-settings-button {
  position: absolute;
  right: 16px;
  bottom: 14px;
}
.playlist-provider {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 2px 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(74, 108, 247, 0.12);
  color: #3153df;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
body.dark-mode .playlist-provider {
  background: rgba(111, 134, 255, 0.18);
  color: #b9c5ff;
}
.playlist-thumb-placeholder {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 2.2rem;
}
body.dark-mode .playlist-thumb-placeholder {
  background: #0f172a;
  color: #94a3b8;
}
.playlist-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.playlist-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.playlist-meta-separator {
  opacity: 0.5;
}
.profile-item-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  text-align: left;
}
body.dark-mode .profile-item-preview {
  border-color: #334155;
  background: #1e293b;
}
.profile-item-preview img {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  border-radius: 12px;
  object-fit: cover;
}
.profile-item-preview > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.profile-current-image-card {
  position: relative;
  display: grid;
  width: min(260px, 100%);
  gap: 7px;
}
.profile-current-image-card img {
  width: 100%;
  max-height: 200px;
  border-radius: 12px;
  object-fit: cover;
}
.profile-current-image-card .admin-card-icon {
  position: absolute;
  top: 8px;
  right: 8px;
}
.map-place-popup p {
  margin: 5px 0 0;
}
.map-popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.map-popup-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3153df;
  border-radius: 11px;
  background: #4a6cf7;
  color: #ffffff;
  cursor: pointer;
}
.map-popup-button.danger {
  border-color: #b91c1c;
  background: #dc2626;
}

@media (max-width: 700px) {
  .profile-playlist-admin-grid,
  .profile-archive-blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-item-preview {
    align-items: flex-start;
  }
}

/* Hidden footer-login modal */
.admin-login-panel {
  width: min(460px, calc(100vw - 44px));
}
.admin-login-form {
  overflow: visible;
}
.admin-login-status {
  min-height: 1.25rem;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}
.admin-login-status[data-state="error"] {
  color: #dc2626;
}
.admin-login-status[data-state="success"] {
  color: #15803d;
}
body.dark-mode .admin-login-status {
  color: #cbd5e1;
}
body.dark-mode .admin-login-status[data-state="error"] {
  color: #fca5a5;
}
body.dark-mode .admin-login-status[data-state="success"] {
  color: #86efac;
}
.admin-login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
}
.admin-login-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

/* Hidden footer logout confirmation */
.admin-logout-panel {
  width: min(460px, calc(100vw - 44px));
}
.admin-logout-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  text-align: left;
}
.admin-logout-content p {
  margin: 0;
  color: #334155;
  font-size: 1rem;
  line-height: 1.55;
}
body.dark-mode .admin-logout-content p {
  color: #cbd5e1;
}
.admin-logout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.admin-logout-actions button {
  min-width: 112px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.admin-logout-actions .profile-secondary {
  background: #e2e8f0;
  color: #0f172a;
}
.admin-logout-actions .profile-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #dc2626;
  color: #ffffff;
}
body.dark-mode .admin-logout-actions .profile-secondary {
  background: #334155;
  color: #f8fafc;
}
.admin-logout-actions button:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 700px) {
  .admin-login-panel,
  .admin-logout-panel {
    width: calc(100vw - 20px);
  }
  .admin-logout-actions {
    flex-direction: column-reverse;
  }
  .admin-logout-actions button {
    width: 100%;
  }
}


/* Collapsed characteristics sections */
.traits-disclosure {
  overflow: hidden;
  padding: 0 !important;
}
.traits-disclosure > .traits-title {
  list-style: none;
  min-height: 58px;
  margin: 0 !important;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}
.traits-disclosure > .traits-title::-webkit-details-marker { display: none; }
.traits-disclosure > .traits-title::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(74, 108, 247, 0.12);
  color: #3153df;
  transition: transform 0.2s ease, background 0.2s ease;
}
.traits-disclosure[open] > .traits-title::after { transform: rotate(180deg); }
.traits-disclosure > .traits-content {
  padding: 0 20px 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
body.dark-mode .traits-disclosure > .traits-content { border-top-color: rgba(255, 255, 255, 0.09); }
body.dark-mode .traits-disclosure > .traits-title::after {
  background: rgba(111, 134, 255, 0.18);
  color: #aab8ff;
}

/* Selected gallery uploads */
.profile-gallery-upload-form {
  grid-template-columns: minmax(0, 1fr) auto;
}
.profile-gallery-upload-form .profile-upload-preview-grid {
  grid-column: 1 / -1;
}
.profile-upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  width: 100%;
}
.profile-upload-preview-grid[hidden] { display: none !important; }
.profile-selected-upload {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  box-shadow: 0 5px 15px rgba(15, 23, 42, 0.08);
}
.profile-selected-upload > img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e2e8f0;
}
.profile-selected-upload-info {
  min-width: 0;
  padding: 9px 10px 10px;
  display: grid;
  gap: 3px;
  text-align: left;
}
.profile-selected-upload-info strong,
.profile-selected-upload-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-selected-upload-info strong { font-size: 0.82rem; }
.profile-selected-upload-info small { color: #64748b; font-size: 0.72rem; }
.profile-selected-upload-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.94);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}
body.dark-mode .profile-selected-upload {
  border-color: #334155;
  background: #1e293b;
  color: #f8fafc;
}
body.dark-mode .profile-selected-upload-info small { color: #cbd5e1; }
#profileGalleryUploadSubmit:disabled { opacity: 0.55; cursor: not-allowed; }

#pics,
#blog { scroll-margin-top: 16px; }

@media (max-width: 700px) {
  .profile-gallery-upload-form { grid-template-columns: 1fr; }
  .profile-gallery-upload-form .profile-upload-preview-grid { grid-column: 1; }
  .profile-upload-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Site settings: editable bio translations */
.profile-site-settings-panel {
  width: min(780px, calc(100vw - 44px));
}

.profile-bio-settings {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fafc;
  color: #111827;
  text-align: left;
}

.profile-bio-settings-header h3 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  font-weight: 900;
}

.profile-bio-settings-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}

.profile-bio-settings-header code {
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.16);
  color: #334155;
  font-size: 0.76rem;
}

.profile-bio-language {
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  background: #ffffff;
}

.profile-bio-language summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  box-sizing: border-box;
  color: #1e293b;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  list-style: none;
  user-select: none;
}

.profile-bio-language summary::-webkit-details-marker {
  display: none;
}

.profile-bio-language summary i {
  margin-left: auto;
  color: #64748b;
  font-size: 0.78rem;
  transition: transform 0.18s ease;
}

.profile-bio-language[open] summary i {
  transform: rotate(180deg);
}

.profile-bio-language-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: rgba(74, 108, 247, 0.12);
  color: #3153df;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.profile-bio-language-fields {
  display: grid;
  gap: 12px;
  padding: 13px;
  border-top: 1px solid #e2e8f0;
  animation: profileAccordionIn 0.18s ease;
}

.profile-bio-language-fields label {
  font-size: 0.82rem;
}

.profile-bio-language-fields textarea {
  min-height: 118px;
  line-height: 1.5;
  white-space: pre-wrap;
}

body.dark-mode .profile-bio-settings {
  border-color: #334155;
  background: #1e293b;
  color: #f8fafc;
}

body.dark-mode .profile-bio-settings-header p {
  color: #cbd5e1;
}

body.dark-mode .profile-bio-settings-header code {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

body.dark-mode .profile-bio-language {
  border-color: #475569;
  background: #0f172a;
}

body.dark-mode .profile-bio-language summary {
  color: #f8fafc;
}

body.dark-mode .profile-bio-language summary i {
  color: #cbd5e1;
}

body.dark-mode .profile-bio-language-code {
  background: rgba(111, 134, 255, 0.18);
  color: #c7d2fe;
}

body.dark-mode .profile-bio-language-fields {
  border-top-color: #334155;
}

@media (max-width: 700px) {
  .profile-site-settings-panel {
    width: calc(100vw - 20px);
  }

  .profile-bio-settings {
    padding: 11px;
  }

  .profile-bio-language-fields {
    padding: 11px;
  }
}



/* Public-language update: translated blog editor fields */
.profile-post-translations {
  margin-top: 2px;
}

.profile-post-translations .profile-bio-language-fields input,
.profile-post-translations .profile-bio-language-fields textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.profile-post-translations .profile-bio-language-fields textarea {
  min-height: 132px;
}

#profilePostEditModal .profile-admin-panel.small {
  width: min(720px, calc(100vw - 44px));
}

@media (max-width: 700px) {
  #profilePostEditModal .profile-admin-panel.small {
    width: calc(100vw - 20px);
  }
}


/* Configurable My Socials / More About (Pup) Djay buttons */
.configurable-buttons-title-row {
  margin-bottom: 10px;
  gap: 10px;
}
.configurable-buttons-title-row h2 { margin: 0; }
.public-buttons-list { width: 100%; }
.profile-configurable-button {
  background: var(--profile-button-bg, #4a6cf7) !important;
  color: var(--profile-button-text, #ffffff) !important;
  border: 2px solid var(--profile-button-border, transparent) !important;
  box-sizing: border-box;
}
.profile-configurable-button:hover {
  background: var(--profile-button-hover, #3658dc) !important;
  color: var(--profile-button-text, #ffffff) !important;
}
.profile-configurable-button i { color: inherit; }
.profile-button-shape-pill { border-radius: 30px !important; }
.profile-button-shape-rounded { border-radius: 12px !important; }
.profile-button-shape-square { border-radius: 2px !important; }

.profile-button-manager-card { cursor: grab; }
.profile-button-manager-card:active { cursor: grabbing; }
.profile-button-manager-card .profile-admin-actions { flex-wrap: nowrap; }
.profile-button-manager-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--button-preview-color, #4a6cf7);
  color: var(--button-preview-text, #fff);
  font-size: 1.25rem;
}
.profile-manager-help {
  margin: 0 0 16px;
  color: #64748b;
  text-align: left;
  line-height: 1.5;
}
body.dark-mode .profile-manager-help { color: #cbd5e1; }

.profile-button-link-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
}
.profile-button-link-options[hidden] { display: none !important; }
.profile-icon-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}
.profile-icon-field > button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.profile-icon-browser {
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
}
.profile-icon-browser[hidden] { display: none !important; }
body.dark-mode .profile-icon-browser { border-color: #334155; background: #1e293b; }
.profile-icon-browser > input {
  margin-bottom: 12px;
}
.profile-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}
.profile-icon-choice {
  min-height: 76px;
  padding: 10px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font: inherit;
}
.profile-icon-choice i { font-size: 1.3rem; }
.profile-icon-choice span { font-size: .72rem; font-weight: 800; text-align: center; }
.profile-icon-choice:hover { border-color: #4a6cf7; color: #3153df; }
body.dark-mode .profile-icon-choice { border-color: #475569; background: #0f172a; color: #e2e8f0; }

.profile-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-color-control {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
}
.profile-color-control input[type="color"] {
  width: 52px;
  min-height: 43px;
  padding: 3px;
  cursor: pointer;
}
.profile-button-live-preview {
  padding: 15px;
  border: 1px dashed #94a3b8;
  border-radius: 14px;
  background: rgba(148, 163, 184, .08);
}
.profile-button-live-preview .button {
  width: 100%;
  margin: 0;
  pointer-events: none;
}
.profile-button-translations { margin: 0; }

@media (max-width: 700px) {
  .configurable-buttons-title-row { max-width: calc(100% - 24px); }
  .profile-button-link-options,
  .profile-icon-field,
  .profile-color-grid { grid-template-columns: 1fr; }
  .profile-button-manager-card .profile-admin-actions { width: 100%; justify-content: flex-end; }
}

/* Fix: fully reveal the button-text translation accordion in the button editor. */
#profileButtonItemModal .profile-button-translations {
  width: 100%;
  min-width: 0;
  overflow: visible;
  box-sizing: border-box;
}

#profileButtonItemModal .profile-button-translations:not([open]) > .profile-bio-language-fields {
  display: none !important;
}

#profileButtonItemModal .profile-button-translations[open] > .profile-bio-language-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 13px;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box;
}

#profileButtonItemModal .profile-button-translations[open] > .profile-bio-language-fields > label {
  display: grid !important;
  gap: 7px;
  min-width: 0;
  visibility: visible !important;
  opacity: 1 !important;
}

#profileButtonItemModal .profile-button-translations[open] > .profile-bio-language-fields input {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box !important;
}

@media (max-width: 700px) {
  #profileButtonItemModal .profile-button-translations[open] > .profile-bio-language-fields {
    grid-template-columns: minmax(0, 1fr);
    padding: 11px;
  }
}

/* Configurable characteristics menus */
.characteristics-section {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.characteristics-section[hidden] { display: none !important; }
.characteristics-title-row {
  margin-top: 6px;
  margin-bottom: 16px;
}
.characteristics-title-row.is-edit-only {
  width: max-content;
  margin: 8px auto 14px;
}
.characteristics-title-row.is-edit-only h2 { display: none !important; }
.characteristics-menus:empty { display: none; }
.characteristics-menus .traits-box:first-child { margin-top: 0; }
.characteristics-menus .traits-box:last-child { margin-bottom: 20px; }
.trait-rating:empty::after {
  content: "";
  display: inline-block;
  min-width: 1px;
}

.profile-trait-menu-manager-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 108, 247, 0.12);
  color: #3153df;
  font-size: 1.2rem;
}
body.dark-mode .profile-trait-menu-manager-icon {
  background: rgba(111, 134, 255, 0.18);
  color: #b9c5ff;
}

.profile-trait-menu-editor-panel {
  width: min(900px, calc(100vw - 44px));
}
.profile-trait-items-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fafc;
}
body.dark-mode .profile-trait-items-editor {
  border-color: #334155;
  background: #1e293b;
}
.profile-trait-items-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.profile-trait-items-header h3 {
  margin: 0 0 4px;
  color: inherit;
  text-align: left;
}
.profile-trait-items-header p {
  margin: 0;
  color: #64748b;
  font-size: .86rem;
  line-height: 1.45;
  text-align: left;
}
body.dark-mode .profile-trait-items-header p { color: #cbd5e1; }
.profile-trait-items-list {
  display: grid;
  gap: 10px;
}
.profile-trait-item-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #ffffff;
}
body.dark-mode .profile-trait-item-editor {
  border-color: #475569;
  background: #0f172a;
}
.profile-trait-item-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(130px, .55fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
}
.profile-trait-item-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: inherit;
  font-size: .82rem;
  font-weight: 800;
  text-align: left;
}
.profile-trait-item-fields input,
.profile-trait-item-fields select {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  box-sizing: border-box;
  font: inherit;
}
body.dark-mode .profile-trait-item-fields input,
body.dark-mode .profile-trait-item-fields select {
  border-color: #475569;
  background: #1e293b;
  color: #f8fafc;
}
.profile-trait-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Fully reveal menu-title translation fields. */
#profileTraitMenuModal .profile-trait-title-translations {
  width: 100%;
  min-width: 0;
  overflow: visible;
  box-sizing: border-box;
}
#profileTraitMenuModal .profile-trait-title-translations:not([open]) > .profile-bio-language-fields {
  display: none !important;
}
#profileTraitMenuModal .profile-trait-title-translations[open] > .profile-bio-language-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 13px;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box;
}
#profileTraitMenuModal .profile-trait-title-translations[open] > .profile-bio-language-fields > label {
  display: grid !important;
  gap: 7px;
  min-width: 0;
}
#profileTraitMenuModal .profile-trait-title-translations[open] > .profile-bio-language-fields input {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 800px) {
  .profile-trait-item-editor { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .profile-trait-item-fields { grid-template-columns: minmax(0, 1fr) minmax(120px, .5fr); }
  .profile-trait-rating-text { grid-column: 1 / -1; }
  .profile-trait-item-actions { justify-content: flex-end; }
}
@media (max-width: 600px) {
  .profile-trait-items-header { align-items: center; }
  .profile-trait-item-fields { grid-template-columns: minmax(0, 1fr); }
  .profile-trait-rating-text { grid-column: auto; }
  #profileTraitMenuModal .profile-trait-title-translations[open] > .profile-bio-language-fields {
    grid-template-columns: minmax(0, 1fr);
    padding: 11px;
  }
}


/* =========================================================
   PROFILE BUILDER: appearance, account, visibility and rain
   ========================================================= */

/* Database-controlled title styling and animations. */
body.profile-appearance-ready .siteTitle {
  font-size: clamp(24px, 7vw, var(--profile-title-size, 52px));
}
body.profile-appearance-ready .siteTitle .titleShadow,
.profile-title-preview .titleShadow {
  color: var(--profile-title-shadow, #0b2c66);
  transform: translate(var(--profile-title-shadow-x, 4px), var(--profile-title-shadow-y, 4px));
  text-shadow: 0 2px 0 var(--profile-title-shadow, #0b2c66),
               0 6px 14px var(--profile-title-shadow, #0b2c66);
}
body.profile-appearance-ready .siteTitle .titleText,
.profile-title-preview .titleText {
  color: var(--profile-title-text, #ffffff);
  background: none;
  animation: none;
  transform-origin: 50% 100%;
}
body.profile-appearance-ready .siteTitle.title-use-gradient .titleText,
.profile-title-preview.title-use-gradient .titleText {
  background: linear-gradient(90deg, var(--profile-title-text, #ffffff), var(--profile-title-accent, #7dd3fc));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Include the appearance-ready body selector on the live title rules.
   This gives the selected animation enough specificity to override the
   base appearance rule that deliberately clears the legacy animation. */
body.profile-appearance-ready .siteTitle.title-animation-bounce .titleText,
.profile-title-preview.title-animation-bounce .titleText { animation: profileTitleBounce var(--profile-title-speed, 1.8s) ease-in-out infinite; }
body.profile-appearance-ready .siteTitle.title-animation-float .titleText,
.profile-title-preview.title-animation-float .titleText { animation: profileTitleFloat var(--profile-title-speed, 2.4s) ease-in-out infinite; }
body.profile-appearance-ready .siteTitle.title-animation-pulse .titleText,
.profile-title-preview.title-animation-pulse .titleText { animation: profileTitlePulse var(--profile-title-speed, 1.8s) ease-in-out infinite; }
body.profile-appearance-ready .siteTitle.title-animation-glow .titleText,
.profile-title-preview.title-animation-glow .titleText { animation: profileTitleGlow var(--profile-title-speed, 1.8s) ease-in-out infinite alternate; }
body.profile-appearance-ready .siteTitle.title-animation-sway .titleText,
.profile-title-preview.title-animation-sway .titleText { animation: profileTitleSway var(--profile-title-speed, 2.2s) ease-in-out infinite; }
body.profile-appearance-ready .siteTitle.title-animation-shake .titleText,
.profile-title-preview.title-animation-shake .titleText { animation: profileTitleShake var(--profile-title-speed, .8s) ease-in-out infinite; }
body.profile-appearance-ready .siteTitle.title-animation-none .titleText,
.profile-title-preview.title-animation-none .titleText { animation: none !important; }

@keyframes profileTitleBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(calc(0px - var(--profile-title-move, 8px))) scale(var(--profile-title-bounce-scale, 1.015)); }
  65% { transform: translateY(var(--profile-title-return, 1px)) scale(var(--profile-title-bounce-return-scale, .995)); }
}
@keyframes profileTitleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(calc(0px - var(--profile-title-float, 10px))); }
}
@keyframes profileTitlePulse {
  0%, 100% { transform: scale(1); filter: saturate(1); }
  50% { transform: scale(var(--profile-title-pulse-scale, 1.055)); filter: saturate(1.35); }
}
@keyframes profileTitleGlow {
  from { text-shadow: 0 0 2px transparent; filter: brightness(1); }
  to { text-shadow: 0 0 8px var(--profile-title-accent, #7dd3fc), 0 0 22px var(--profile-title-accent, #7dd3fc); filter: brightness(1.16); }
}
@keyframes profileTitleSway {
  0%, 100% { transform: rotate(calc(0deg - var(--profile-title-sway-angle, 1.5deg))) translateY(0); }
  50% { transform: rotate(var(--profile-title-sway-angle, 1.5deg)) translateY(calc(0px - var(--profile-title-sway-lift, 3px))); }
}
@keyframes profileTitleShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(calc(0px - var(--profile-title-shake-wide, 3px))) rotate(calc(0deg - var(--profile-title-shake-angle-wide, .6deg))); }
  40% { transform: translateX(var(--profile-title-shake-wide, 3px)) rotate(var(--profile-title-shake-angle-wide, .6deg)); }
  60% { transform: translateX(calc(0px - var(--profile-title-shake-narrow, 2px))) rotate(calc(0deg - var(--profile-title-shake-angle-narrow, .4deg))); }
  80% { transform: translateX(var(--profile-title-shake-narrow, 2px)) rotate(var(--profile-title-shake-angle-narrow, .4deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .siteTitle .titleText,
  .profile-title-preview .titleText { animation: none !important; }
}

/* Hidden page sections stay available to an authenticated admin. */
body:not(.is-admin) [data-site-section].profile-section-hidden {
  display: none !important;
}
body.is-admin [data-site-section].profile-section-hidden {
  position: relative;
  opacity: .48;
  outline: 2px dashed rgba(248, 113, 113, .8);
  outline-offset: 5px;
  filter: grayscale(.25);
}
body.is-admin [data-site-section].profile-section-hidden::after {
  content: "Hidden from visitors";
  position: absolute;
  z-index: 50;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 999px;
  background: #991b1b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 5px 16px rgba(0,0,0,.22);
}
.configurable-public-section {
  width: 100%;
  box-sizing: border-box;
}

/* Fixed appearance editor launcher shown only to admins. */
.profile-appearance-launcher {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9997;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #4a6cf7;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15,23,42,.3);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.profile-appearance-launcher:hover {
  transform: translateY(-2px);
  background: #3658dc;
  box-shadow: 0 16px 34px rgba(15,23,42,.36);
}
.profile-appearance-launcher[hidden] { display: none !important; }

/* Emoji rain. */
.profile-emoji-rain-drop {
  position: fixed;
  z-index: 2147482500;
  top: -90px;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  animation-name: profileEmojiFall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
@keyframes profileEmojiFall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate3d(var(--profile-rain-drift, 0px), 115vh, 0) rotate(540deg); opacity: .9; }
}

/* Admin account/profile panel. */
.admin-profile-panel {
  width: min(720px, calc(100vw - 44px));
}
.admin-profile-form {
  gap: 16px;
}
.admin-profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fafc;
  text-align: left;
}
body.dark-mode .admin-profile-summary {
  border-color: #334155;
  background: #1e293b;
}
.admin-profile-summary > div:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.admin-profile-summary strong { font-size: 1.08rem; }
.admin-profile-summary small { color: #64748b; }
body.dark-mode .admin-profile-summary small { color: #cbd5e1; }
.admin-profile-picture-preview {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 28px;
}
.admin-profile-picture-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.admin-profile-file-name {
  margin-top: 7px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
body.dark-mode .admin-profile-file-name { color: #cbd5e1; }
.admin-profile-password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 4px;
}
.admin-profile-password-grid label:first-child { grid-column: 1 / -1; }
.admin-profile-password-grid small {
  color: #64748b;
  font-size: .75rem;
  font-weight: 600;
}
body.dark-mode .admin-profile-password-grid small { color: #cbd5e1; }
.admin-profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-profile-actions button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.admin-profile-actions .profile-danger {
  background: #dc2626;
  color: #fff;
  border: 1px solid #b91c1c;
}

/* Appearance/page builder modal. */
.profile-appearance-panel {
  width: min(1050px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
}
.profile-appearance-form {
  display: grid;
  gap: 18px;
  padding: 20px;
}
.profile-builder-card {
  display: grid;
  gap: 15px;
  padding: 17px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #f8fafc;
  color: #111827;
}
body.dark-mode .profile-builder-card {
  border-color: #334155;
  background: #1e293b;
  color: #f8fafc;
}
.profile-builder-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}
.profile-builder-card-head h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}
.profile-builder-card-head p {
  margin: 0;
  color: #64748b;
  font-size: .84rem;
  line-height: 1.45;
}
body.dark-mode .profile-builder-card-head p { color: #cbd5e1; }
.profile-builder-grid {
  display: grid;
  gap: 12px;
  align-items: end;
}
.profile-builder-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-builder-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-builder-check {
  min-height: 44px;
  align-self: end;
  padding: 10px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
}
body.dark-mode .profile-builder-check {
  border-color: #475569;
  background: #0f172a;
}
.profile-builder-subsection {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: rgba(255,255,255,.68);
}
body.dark-mode .profile-builder-subsection {
  border-color: #475569;
  background: rgba(15,23,42,.78);
}
.profile-gradient-color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 9px;
}
.profile-gradient-color-grid label {
  display: grid;
  gap: 6px;
  font-size: .75rem;
  text-align: center;
}
.profile-gradient-color-grid input[type="color"] {
  width: 100%;
  height: 48px;
  padding: 3px;
  border-radius: 10px;
  cursor: pointer;
}
.profile-background-preview {
  min-height: 190px;
  border: 1px solid rgba(15,23,42,.18);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
  background-size: cover;
  background-position: center;
}
body.dark-mode .profile-background-preview { border-color: rgba(255,255,255,.18); }
.profile-preset-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.profile-preset-add-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.profile-preset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-preset-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #ffffff;
}
body.dark-mode .profile-preset-card {
  border-color: #475569;
  background: #0f172a;
}
.profile-preset-swatch {
  width: 78px;
  height: 58px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.16);
  background-size: cover !important;
  background-position: center !important;
}
.profile-preset-card > input {
  min-width: 0;
}
.profile-preset-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.profile-title-preview {
  position: relative;
  width: max-content;
  max-width: 100%;
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 6vw, var(--profile-title-size, 52px));
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.profile-title-preview .titleShadow {
  position: absolute;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.profile-title-preview .titleText {
  position: relative;
  z-index: 1;
  display: inline-block;
}
.profile-section-visibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-section-visibility-grid .profile-check {
  padding: 11px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
}
body.dark-mode .profile-section-visibility-grid .profile-check {
  border-color: #475569;
  background: #0f172a;
}
.profile-appearance-save-row {
  position: sticky;
  bottom: -20px;
  z-index: 4;
  padding: 12px;
  border-radius: 14px;
  background: rgba(248,250,252,.94);
  box-shadow: 0 -8px 24px rgba(15,23,42,.08);
  backdrop-filter: blur(12px);
}
body.dark-mode .profile-appearance-save-row {
  background: rgba(15,23,42,.94);
  box-shadow: 0 -8px 24px rgba(0,0,0,.28);
}
.profile-appearance-save-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 800px) {
  .profile-builder-grid.three-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-gradient-color-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-preset-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .profile-appearance-launcher { top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 14px; }
  .admin-profile-password-grid,
  .profile-builder-grid.two-columns,
  .profile-builder-grid.three-columns,
  .profile-section-visibility-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-profile-password-grid label:first-child { grid-column: auto; }
  .admin-profile-actions { flex-direction: column; }
  .admin-profile-actions button { width: 100%; }
  .profile-gradient-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-preset-add-row { grid-template-columns: minmax(0, 1fr); }
  .profile-preset-card { grid-template-columns: 64px minmax(0, 1fr); }
  .profile-preset-swatch { width: 64px; }
  .profile-preset-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .profile-title-preview { white-space: normal; text-align: center; }
}

body:not(.is-admin) .social-btn.profile-all-social-sections-hidden {
  display: none !important;
}
body:not(.is-admin) #socialsSection.profile-section-hidden + br {
  display: none !important;
}
.profile-title-preview .titleShadow {
  left: 0;
  top: 50%;
  transform: translate(var(--profile-title-shadow-x, 4px), calc(-50% + var(--profile-title-shadow-y, 4px)));
}
/* calendar.css */

/* Base container */
.built-calendar {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px;
}

/* FullCalendar base */
#calendarModal .fc {
  background: transparent;
}

#calendarModal .fc .fc-toolbar-title {
  font-size: 1.2rem;
  font-weight: 700;
}

/* =========================================================
   CALENDAR MODAL — DEFAULT LIGHT
   ========================================================= */

body:not(.dark-mode) #calendarModal {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

/* Modal sizing (prevents huge empty bottom area) */
body:not(.dark-mode) #calendarModal .modal-content {
  background: #f9fafb;
  color: #111827;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);

  height: auto !important;
  min-height: 0 !important;
  max-height: 85vh !important;
  overflow: auto !important;
  display: block !important;
}

/* Toolbar buttons */
body:not(.dark-mode) #calendarModal .fc-button {
  background: #e5e7eb;
  color: #111827;
  border: none;
  border-radius: 10px;
}

body:not(.dark-mode) #calendarModal .fc-button:hover {
  background: #d1d5db;
}

body:not(.dark-mode) #calendarModal .fc-button:disabled {
  opacity: 0.5;
}

/* Weekday header bar */
body:not(.dark-mode) #calendarModal .fc-col-header-cell {
  background: #111827;
  border-color: rgba(0, 0, 0, 0.15);
}

body:not(.dark-mode) #calendarModal .fc-col-header-cell-cushion {
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700;
}

/* Day tiles */
body:not(.dark-mode) #calendarModal .fc-daygrid-day-frame {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

body:not(.dark-mode) #calendarModal .fc-daygrid-day-number {
  color: #111827;
}

body:not(.dark-mode) #calendarModal .fc-day-other .fc-daygrid-day-number {
  color: #9ca3af;
}

/* Today highlight */
body:not(.dark-mode) #calendarModal .fc-day-today {
  background: #e0f2fe !important;
}

/* =========================================================
   CALENDAR MODAL — DARK MODE (dark grey palette)
   ========================================================= */

body.dark-mode #calendarModal {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
}

/* Modal sizing (same rules as light, different colors) */
body.dark-mode #calendarModal .modal-content {
  background: #121212;
  /* dark grey modal */
  color: #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);

  height: auto !important;
  min-height: 0 !important;
  max-height: 85vh !important;
  overflow: auto !important;
  display: block !important;
}

/* Toolbar title */
body.dark-mode #calendarModal .fc-toolbar-title {
  color: #e5e7eb !important;
}

/* Toolbar buttons */
body.dark-mode #calendarModal .fc-button {
  background: #2a2a2a !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 10px;
}

body.dark-mode #calendarModal .fc-button:hover {
  background: #3a3a3a !important;
}

/* Weekday header bar (dark strip) */
body.dark-mode #calendarModal .fc-col-header-cell {
  background: #1c1c1c !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

body.dark-mode #calendarModal .fc-col-header-cell-cushion {
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700;
}

/* Day tiles (darker) */
body.dark-mode #calendarModal .fc-daygrid-day-frame {
  background: #1a1a1a !important;
  /* dark grey tile */
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

body.dark-mode #calendarModal .fc-daygrid-day-number {
  color: #e5e7eb !important;
}

body.dark-mode #calendarModal .fc-day-other .fc-daygrid-day-number {
  color: #8b93a3 !important;
}

/* Today highlight (subtle, still grey-themed) */
body.dark-mode #calendarModal .fc-day-today {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Ensure FC internals don’t force light backgrounds */
body.dark-mode #calendarModal .fc,
body.dark-mode #calendarModal .fc-scrollgrid,
body.dark-mode #calendarModal .fc-scrollgrid-section,
body.dark-mode #calendarModal table {
  background: transparent !important;
}

/* Keep day-of-week links from turning blue anywhere */
#calendarModal .fc-col-header-cell-cushion {
  text-decoration: none !important;
}

/* ===============================
   DAY OVERVIEW MODAL — LIGHT MODE
   =============================== */

#dayOverviewModal {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

#dayOverviewModal>div {
  background: #f9fafb;
  color: #111827;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* Header */
#dayOverviewModal #domTitle {
  color: #111827;
}

/* Event cards */
#dayOverviewModal .day-event {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

/* Event title */
#dayOverviewModal .day-event-title {
  color: #111827;
}

/* Event meta (time, labels) */
#dayOverviewModal .day-event-meta {
  color: #374151;
}

/* Notes box */
#dayOverviewModal .day-event-notes {
  background: #f3f4f6;
  color: #111827;
}

/* ===============================
   DAY OVERVIEW MODAL — DARK MODE
   =============================== */

body.dark-mode #dayOverviewModal {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
}

body.dark-mode #dayOverviewModal>div {
  background: #121212;
  /* dark grey modal */
  color: #e5e7eb;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

/* Header */
body.dark-mode #dayOverviewModal #domTitle {
  color: #e5e7eb;
}

/* Event cards */
body.dark-mode #dayOverviewModal .day-event {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Event title */
body.dark-mode #dayOverviewModal .day-event-title {
  color: #e5e7eb;
}

/* Event meta */
body.dark-mode #dayOverviewModal .day-event-meta {
  color: #9ca3af;
}

/* Notes box */
body.dark-mode #dayOverviewModal .day-event-notes {
  background: #0f0f0f;
  color: #e5e7eb;
}

/* ===============================
   DAY OVERVIEW MODAL THEME
   default = light, dark-mode = dark grey
   =============================== */

/* Backdrop */
#dayOverviewModal {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

/* Card */
#dayOverviewModal .day-overview-card {
  width: min(760px, 100%);
  max-height: min(78vh, 760px);
  overflow: auto;
  background: #f9fafb;
  color: #111827;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* Header */
#dayOverviewModal .day-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  background: #f9fafb;
}

#dayOverviewModal .day-overview-subtitle {
  font-size: 12px;
  opacity: 0.7;
}

#dayOverviewModal .day-overview-title {
  font-size: 16px;
  font-weight: 800;
}

#dayOverviewModal .day-overview-close {
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: inherit;
}

#dayOverviewModal .day-overview-body {
  padding: 14px 16px;
}

/* Empty day */
#dayOverviewModal .day-empty {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
}

/* Event cards */
#dayOverviewModal .day-event {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.02);
}

#dayOverviewModal .day-event-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

#dayOverviewModal .day-event-title {
  font-weight: 800;
  font-size: 15px;
}

#dayOverviewModal .day-event-meta {
  font-size: 12px;
  opacity: 0.8;
  white-space: nowrap;
}

#dayOverviewModal .day-event-line {
  margin-top: 8px;
  font-size: 13px;
}

#dayOverviewModal .day-event-notes {
  margin-top: 6px;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 10px 12px;
}

/* ---------- DARK MODE ---------- */
body.dark-mode #dayOverviewModal {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
}

body.dark-mode #dayOverviewModal .day-overview-card {
  background: #121212;
  color: #e5e7eb;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

body.dark-mode #dayOverviewModal .day-overview-header {
  background: #121212;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

body.dark-mode #dayOverviewModal .day-overview-close {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode #dayOverviewModal .day-empty {
  background: rgba(255, 255, 255, 0.06);
}

body.dark-mode #dayOverviewModal .day-event {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

body.dark-mode #dayOverviewModal .day-event-notes {
  background: #0f0f0f;
}

/* ===============================
   CURRENT DAY HIGHLIGHT
   =============================== */

/* Light mode: subtle blue */
body:not(.dark-mode) #calendarModal .fc-day-today {
  background: rgba(59, 130, 246, 0.15) !important;
  /* blue-500 */
}

/* Dark mode: softer blue, lower opacity */
body.dark-mode #calendarModal .fc-day-today {
  background: rgba(59, 130, 246, 0.20) !important;
}

/* ===============================
   CURRENT DAY (TODAY) HIGHLIGHT
   Month view: target the day cell + its frame
   =============================== */

/* LIGHT MODE */
body:not(.dark-mode) #calendarModal .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
  background: rgba(59, 130, 246, 0.16) !important;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35) !important;
}

/* DARK MODE */
body.dark-mode #calendarModal .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
  background: rgba(59, 130, 246, 0.18) !important;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.30) !important;
}

/* Ensure the highlight isn't hidden by inner layers */
#calendarModal .fc-daygrid-day.fc-day-today {
  background: transparent !important;
}
/* =====================================================================
   Consolidated runtime, builder, sorting, and accessibility improvements
   ===================================================================== */
#loader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--loader-bg, #7fc8dc);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.spinner { font-size: 58px; color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#siteAvatarImg { opacity: 0; transition: opacity .25s ease; }
#siteAvatarImg.loaded { opacity: 1; }
:root { --loader-bg: #7fc8dc; }
body.dark-mode { --loader-bg: #0d0d0d; }

.cookie-title-spaced { margin-bottom: .25rem; }
.cookie-desc-spaced { margin-bottom: 1rem; }
.cookie-actions-spaced { margin-top: 1rem; }
.blog-control-row-spaced { margin-top: 30px; }
[hidden] { display: none !important; }

/* Appearance builder accordions: closed initially and only one is opened by JS. */
.profile-builder-accordion {
  display: block;
  padding: 0;
  overflow: hidden;
}
.profile-builder-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 17px;
  align-items: center;
  user-select: none;
}
.profile-builder-accordion > summary::-webkit-details-marker { display: none; }
.profile-builder-accordion > summary > i {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(74,108,247,.12);
  color: #3153df;
  transition: transform .18s ease;
}
.profile-builder-accordion[open] > summary > i { transform: rotate(180deg); }
body.dark-mode .profile-builder-accordion > summary > i {
  background: rgba(111,134,255,.18);
  color: #b9c5ff;
}
.profile-builder-card-body {
  display: grid;
  gap: 15px;
  padding: 0 17px 17px;
  border-top: 1px solid #dbe3ef;
  padding-top: 15px;
}
body.dark-mode .profile-builder-card-body { border-top-color: #334155; }

.profile-appearance-head-actions { align-items: center; }
.profile-appearance-mode-label {
  margin-top: 4px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
body.dark-mode .profile-appearance-mode-label { color: #cbd5e1; }
#profileAppearanceThemeToggle[data-editor-theme="dark"] {
  background: #f8fafc;
  color: #0f172a;
}

/* Full-height color controls. This prevents native color inputs becoming a thin line. */
.profile-large-color-control {
  display: grid;
  grid-template-columns: minmax(84px, 130px) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-top: 7px;
}
.profile-large-color-control.compact { grid-template-columns: 84px minmax(0, 1fr); }
.profile-large-color-control input[type="color"],
.profile-gradient-color-grid input[type="color"],
.profile-color-control input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 52px;
  height: 48px;
  min-height: 48px;
  padding: 3px;
  border: 1px solid #94a3b8;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.profile-large-color-control input[type="color"]::-webkit-color-swatch-wrapper,
.profile-gradient-color-grid input[type="color"]::-webkit-color-swatch-wrapper,
.profile-color-control input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.profile-large-color-control input[type="color"]::-webkit-color-swatch,
.profile-gradient-color-grid input[type="color"]::-webkit-color-swatch,
.profile-color-control input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}
.profile-large-color-control input[type="color"]::-moz-color-swatch,
.profile-gradient-color-grid input[type="color"]::-moz-color-swatch,
.profile-color-control input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}
body.dark-mode .profile-large-color-control input[type="color"],
body.dark-mode .profile-gradient-color-grid input[type="color"],
body.dark-mode .profile-color-control input[type="color"] {
  border-color: #64748b;
  background: #0f172a;
}

.profile-builder-subsection[hidden] { display: none !important; }
.profile-background-preview {
  min-height: 190px;
  background-color: #e2e8f0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.profile-overlay-controls { margin-top: 2px; }

/* Switching the appearance editor between light and dark settings changes only the edited data.
   The modal itself continues to follow the active public-site theme. */

/* Drag handles for characteristics menus and their entries. */
.profile-trait-menu-manager-card,
.profile-trait-item-editor { position: relative; }
.profile-drag-handle {
  width: 38px;
  min-width: 38px;
  height: 44px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.profile-drag-handle:active { cursor: grabbing; }
body.dark-mode .profile-drag-handle {
  border-color: #475569;
  background: #0f172a;
  color: #cbd5e1;
}
.profile-sortable-card.is-dragging {
  opacity: .55;
  outline: 2px dashed #4a6cf7;
  outline-offset: 2px;
}
.profile-trait-item-editor {
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
}

/* Clearer comment boundaries in the light admin interface. */
body:not(.dark-mode) .comments-admin-list {
  gap: 18px;
  padding-top: 8px;
}
body:not(.dark-mode) .comment-admin-card {
  background: #ffffff !important;
  border: 2px solid #cbd5e1 !important;
  border-left: 6px solid #4a6cf7 !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.10) !important;
  padding: 17px 18px !important;
}
body:not(.dark-mode) .comment-admin-card + .comment-admin-card {
  margin-top: 2px;
}
body:not(.dark-mode) .comment-admin-card:nth-child(even) {
  background: #f8fafc !important;
}

@media (max-width: 700px) {
  .profile-large-color-control,
  .profile-large-color-control.compact { grid-template-columns: 76px minmax(0, 1fr); }
  .profile-trait-item-editor { grid-template-columns: auto minmax(0,1fr); }
  .profile-trait-item-actions { grid-column: 1 / -1; }
}

/* Privacy page */
.privacy-page {
  margin: 0;
  min-height: 100vh;
  background: #0d0d0d;
  color: #eaeaea;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  text-align: left;
}
.privacy-container { max-width: 900px; margin: 0 auto; padding: 3rem 1.5rem; }
.privacy-container h1,
.privacy-container h2,
.privacy-container h3 { color: #fff; line-height: 1.3; }
.privacy-container h1 { margin-top: 0; font-size: 2.4rem; }
.privacy-container h2 { margin-top: 2.5rem; padding-bottom: .4rem; border-bottom: 1px solid #2a2a2a; font-size: 1.6rem; }
.privacy-container h3 { margin-top: 1.8rem; }
.privacy-container p,
.privacy-container li { color: #eaeaea; }
.privacy-container ul { padding-left: 1.25rem; }
.privacy-container li { margin-bottom: .4rem; }
.privacy-meta { color: #b5b5b5 !important; margin-bottom: 2rem; }
.privacy-box { margin: 1.5rem 0; padding: 1.25rem; border: 1px solid #2a2a2a; border-radius: 10px; background: #161616; }
.privacy-footer { margin-top: 4rem; color: #b5b5b5; font-size: .9rem; text-align: center; }

.profile-section-title-editor {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 15px;
  text-align: left;
}
.profile-section-title-editor .profile-bio-settings-header { padding: 0; }
.profile-section-title-editor .profile-bio-settings-header h3 { margin: 0 0 4px; }
.profile-section-title-language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-section-title-language {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: .88rem;
  font-weight: 800;
}
.profile-section-title-language-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-section-title-language input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.profile-section-title-actions {
  justify-content: flex-end;
  padding-top: 2px;
}
@media (max-width: 650px) {
  .profile-section-title-language-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-section-title-actions .profile-primary { width: 100%; justify-content: center; }
}

/* 2026-07 floating action stack and appearance-editor sizing fixes. */
#floatingMenu {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#menuItems {
  align-items: center;
}

/* The rain button belongs to the menu stack. The old standalone fixed
   positioning caused it to overlap the theme button. */
#menuItems #emojiRainBtn,
#menuItems #darkModeBtn,
#menuItems #commentsMenuBtn,
#menuItems #questionsMenuBtn {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  flex: 0 0 54px;
}

/* Use all available modal height and make the form itself the scroll area.
   Without min-height:0 the flex child could keep its intrinsic height while
   the panel clipped the open accordion body. */
.profile-appearance-panel {
  height: min(900px, calc(100vh - 44px));
}

.profile-appearance-form {
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  align-content: start;
  grid-auto-rows: max-content;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.profile-builder-accordion {
  min-width: 0;
  min-height: max-content;
}

.profile-builder-accordion[open] {
  overflow: visible;
}

.profile-builder-accordion[open] > .profile-builder-card-body {
  display: grid;
  min-width: 0;
  overflow: visible;
}

@media (max-width: 700px) {
  .profile-appearance-panel {
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
  }

  .profile-appearance-form {
    padding: 14px;
    gap: 14px;
  }
}

/* Social and More About translation fields: match all other admin inputs. */
.profile-section-title-editor {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fafc;
}

.profile-section-title-language input,
#profileButtonItemModal .profile-button-translations input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  outline: none;
  background: #ffffff;
  color: #111827;
  box-sizing: border-box;
  font: inherit;
  font-weight: 500;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.profile-section-title-language input:hover,
#profileButtonItemModal .profile-button-translations input[type="text"]:hover {
  border-color: #94a3b8;
}

.profile-section-title-language input:focus,
#profileButtonItemModal .profile-button-translations input[type="text"]:focus {
  border-color: #4a6cf7;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, .16);
}

body.dark-mode .profile-section-title-editor {
  border-color: #334155;
  background: #1e293b;
}

body.dark-mode .profile-section-title-language input,
body.dark-mode #profileButtonItemModal .profile-button-translations input[type="text"] {
  border-color: #475569;
  background: #1e293b;
  color: #f8fafc;
}

body.dark-mode .profile-section-title-language input:hover,
body.dark-mode #profileButtonItemModal .profile-button-translations input[type="text"]:hover {
  border-color: #64748b;
}

body.dark-mode .profile-section-title-language input:focus,
body.dark-mode #profileButtonItemModal .profile-button-translations input[type="text"]:focus {
  border-color: #6f86ff;
  box-shadow: 0 0 0 3px rgba(111, 134, 255, .2);
}

/* Standalone 403/404 pages. */
body.error-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(74, 108, 247, .22), transparent 34rem),
    radial-gradient(circle at 82% 86%, rgba(139, 92, 246, .18), transparent 32rem),
    #080b12;
  color: #f8fafc;
  font-family: Roboto, Arial, sans-serif;
  text-align: center;
}

.error-shell {
  width: min(520px, 100%);
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 26px;
  background: rgba(17, 24, 39, .88);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42);
  box-sizing: border-box;
  backdrop-filter: blur(14px);
}

.error-symbol {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: linear-gradient(145deg, #4a6cf7, #7c3aed);
  box-shadow: 0 14px 34px rgba(74, 108, 247, .3);
  font-size: 1.85rem;
}

.error-code {
  margin: 0 0 5px;
  color: #91a3ff;
  font-size: clamp(3.7rem, 14vw, 6.5rem);
  font-weight: 950;
  line-height: .95;
  letter-spacing: -.06em;
}

.error-shell h1 {
  margin: 16px 0 10px;
  color: #ffffff;
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  line-height: 1.15;
}

.error-message {
  max-width: 420px;
  margin: 0 auto 26px;
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.65;
}

.error-home-button {
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #4a6cf7;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(74, 108, 247, .25);
  font-size: .95rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.error-home-button:hover,
.error-home-button:focus-visible {
  transform: translateY(-2px);
  background: #3658dc;
  box-shadow: 0 16px 34px rgba(74, 108, 247, .33);
}

.error-home-button:focus-visible {
  outline: 3px solid rgba(145, 163, 255, .52);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  body.error-page { padding: 14px; }
  .error-shell { border-radius: 20px; }
}



/* Private anonymous question inbox and square-story export UI. */
.questions-modal.show,
.questions-admin-modal.show {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  z-index: 2147483000 !important;
}

.questions-panel,
.questions-admin-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 0%, rgba(74, 108, 247, 0.18), transparent 35%),
    linear-gradient(145deg, #111722, #080b11 70%);
  color: #f7f8fb;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
  text-align: left;
}

.questions-admin-panel {
  width: min(1050px, 100%);
  height: min(88vh, 880px);
}

.questions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.025);
}

.questions-header h2 {
  margin: 3px 0 0;
  color: #ffffff;
  font-size: 1.48rem;
  line-height: 1.2;
}

.questions-eyebrow {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.questions-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.questions-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-size: 23px;
  cursor: pointer;
}

.questions-icon-button:hover {
  background: rgba(255, 255, 255, 0.13);
}

.questions-admin-gear {
  border-color: rgba(103, 132, 255, 0.65);
  background: #4a6cf7;
  font-size: 16px;
}

.questions-admin-gear[hidden] {
  display: none !important;
}

.questions-body {
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}

.questions-intro {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.questions-intro-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #4a6cf7, #3652ca);
  color: #ffffff;
  font-size: 25px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(74, 108, 247, 0.28);
}

.questions-intro strong {
  display: block;
  margin: 1px 0 5px;
  color: #ffffff;
  font-size: 1.08rem;
}

.questions-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.5;
}

.question-form {
  display: grid;
  gap: 12px;
}

.question-form[hidden],
.question-success[hidden] {
  display: none !important;
}

.question-form > label:first-child {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  font-weight: 850;
}

.question-form textarea {
  display: block;
  width: 100%;
  min-height: 190px;
  max-height: 430px;
  padding: 16px 17px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 17px;
  outline: none;
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
  font: 650 1.02rem/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  caret-color: #8ea3ff;
}

.question-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.question-form textarea:focus {
  border-color: rgba(115, 143, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.16);
}

.question-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.question-form-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
  font-weight: 750;
}

#questionCharacterCount.near-limit {
  color: #fbbf24;
}

.question-status {
  min-height: 1.3em;
  color: #cdd5ff;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.4;
}

.question-submit-button,
.question-instagram-button,
.question-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 49px;
  padding: 12px 16px;
  box-sizing: border-box;
  border: 0;
  border-radius: 14px;
  font: 850 0.98rem/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.question-submit-button {
  background: linear-gradient(135deg, #5a78ff, #405fdc);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(74, 108, 247, 0.25);
}

.question-submit-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.question-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px 4px;
  text-align: center;
}

.question-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
  border-radius: 20px;
  background: #22c55e;
  color: #ffffff;
  font-size: 34px;
  font-weight: 950;
  box-shadow: 0 14px 35px rgba(34, 197, 94, 0.22);
}

.question-success h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.45rem;
}

.question-success p {
  max-width: 410px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.55;
}

.question-instagram-button {
  max-width: 360px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d 58%, #fcb045);
  color: #ffffff;
}

.question-secondary-button {
  max-width: 360px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.questions-admin-tabs {
  display: flex;
  gap: 10px;
  padding: 15px 22px 6px;
}

.questions-admin-tabs button {
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 850;
  cursor: pointer;
}

.questions-admin-tabs button.active {
  border-color: transparent;
  background: #4a6cf7;
  color: #ffffff;
}

.questions-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 22px 12px;
}

.questions-admin-status {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
  font-weight: 750;
}

.questions-reset-cooldowns {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 11px;
  background: rgba(146, 64, 14, 0.34);
  color: #fde68a;
  font-weight: 850;
  cursor: pointer;
}

.questions-reset-cooldowns:hover:not(:disabled) {
  background: rgba(146, 64, 14, 0.52);
}

.questions-reset-cooldowns:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.questions-admin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  min-height: 0;
  overflow-y: auto;
  padding: 0 22px 22px;
}

.question-admin-card {
  position: relative;
  align-self: start;
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.question-admin-card.is-new {
  border-color: rgba(112, 140, 255, 0.52);
  background: rgba(74, 108, 247, 0.10);
}

.question-admin-card.is-archived {
  border-color: rgba(74, 222, 128, 0.20);
  background: rgba(22, 101, 52, 0.08);
}

.question-admin-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.question-admin-label {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 900;
}

.question-admin-card-top small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.46);
}

.question-admin-badges {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.question-admin-badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.question-admin-badge.new {
  background: #4a6cf7;
  color: #ffffff;
}

.question-admin-badge.blocked {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.question-admin-badge.answered {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.question-admin-badge.expired {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.question-admin-text {
  display: block;
  width: 100%;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f7f8fb;
  font: 800 1.08rem/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.question-admin-text:hover:not(:disabled) {
  color: #cdd6ff;
}

.question-admin-text:disabled {
  color: rgba(247, 248, 251, 0.78);
  cursor: default;
}

.question-admin-meta {
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.question-image-window {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.50);
  line-height: 1.4;
}

.question-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.question-admin-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.question-admin-actions button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.13);
}

.question-admin-actions button.question-share-button {
  border-color: transparent;
  background: #4a6cf7;
}

.question-admin-actions button.question-answered-button {
  border-color: transparent;
  background: #15803d;
  color: #ffffff;
}

.question-admin-actions button.question-answered-button:hover:not(:disabled) {
  background: #16a34a;
}

.question-admin-actions button.question-restore-button {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(22, 101, 52, 0.44);
  color: #bbf7d0;
}

.question-admin-actions button.danger {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(127, 29, 29, 0.7);
}

.question-admin-actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.question-ban-ip {
  margin-top: 15px;
  color: #ffffff;
  font: 850 1rem/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}

.questions-admin-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.56);
  text-align: center;
}

@media (max-width: 760px) {
  /* Public question form: always remain a floating, inset card on phones. */
  .questions-modal.show {
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding:
      max(16px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left)) !important;
    box-sizing: border-box !important;
  }

  .questions-modal.show > .questions-panel {
    flex: 0 1 auto !important;
    width: calc(100vw - 32px) !important;
    max-width: 560px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
    margin: auto !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    border-radius: 22px !important;
    box-sizing: border-box !important;
  }

  .questions-modal.show > .questions-panel > .questions-body {
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* The private admin inbox still uses the available mobile workspace. */
  .questions-admin-modal.show {
    padding: 0 !important;
  }

  .questions-admin-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .questions-body {
    padding: 20px;
  }

  .questions-admin-list {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 16px;
  }

  .questions-header {
    padding-inline: 18px;
  }

  .questions-admin-tabs,
  .questions-admin-toolbar {
    padding-inline: 16px;
  }
}

@media (max-width: 430px) {
  .questions-intro-icon {
    flex-basis: 43px;
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }

  .question-form textarea {
    min-height: 175px;
  }

  .question-form-meta {
    font-size: 0.72rem;
  }

  .questions-admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .questions-reset-cooldowns {
    width: 100%;
  }

  .question-admin-actions button {
    flex: 1 1 calc(50% - 8px);
  }
}

/* =========================================================
   MOBILE SITE TITLE SIZE
   Keep the profile title prominent on phones while preserving
   the administrator-configured title-size control.
   ========================================================= */
@media (max-width: 600px) {
  /* Larger fallback before the saved appearance settings finish loading. */
  .siteTitle {
    font-size: clamp(30px, 10vw, 42px);
  }

  /*
    The configured desktop size remains the source of truth.
    Mobile renders it at 78%, capped by the viewport so longer titles
    cannot be enlarged beyond the available phone width.
  */
  body.profile-appearance-ready .siteTitle {
    font-size: clamp(24px, calc(var(--profile-title-size, 52px) * 0.78), 12vw);
  }
}

/* =========================================================
   GLOBAL FLOATING ACTION NOTIFICATIONS
   One shared corner toast for saves, sends, uploads, deletes,
   archive changes and errors across the public and admin UI.
   ========================================================= */
.site-toast-region {
  position: fixed;
  z-index: 2147483000;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(390px, calc(100vw - 36px));
  pointer-events: none;
}

.site-toast {
  --site-toast-accent: #2ac76f;
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-width: min(290px, 100%);
  max-width: 100%;
  min-height: 58px;
  padding: 10px 10px 10px 12px;
  overflow: hidden;
  color: #f7f8fb;
  background: rgba(20, 22, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32), 0 4px 14px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  pointer-events: auto;
  isolation: isolate;
  animation: site-toast-enter 260ms cubic-bezier(.2, .8, .2, 1) both;
}

.site-toast::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--site-toast-accent);
}

.site-toast-error {
  --site-toast-accent: #ff5d68;
}

.site-toast-info {
  --site-toast-accent: #66a9ff;
}

.site-toast-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #0d1711;
  background: var(--site-toast-accent);
  border-radius: 50%;
  font-size: 14px;
  box-shadow: 0 5px 16px color-mix(in srgb, var(--site-toast-accent) 30%, transparent);
}

.site-toast-message {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.005em;
  overflow-wrap: anywhere;
}

.site-toast-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.site-toast-close:hover,
.site-toast-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.site-toast-close:active {
  transform: scale(0.92);
}

.site-toast.is-repeated {
  animation: site-toast-repeat 220ms ease;
}

.site-toast.is-leaving {
  pointer-events: none;
  animation: site-toast-leave 250ms ease both;
}

@keyframes site-toast-enter {
  from { opacity: 0; transform: translate3d(20px, -8px, 0) scale(0.96); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes site-toast-repeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@keyframes site-toast-leave {
  from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: 0; transform: translate3d(18px, -5px, 0) scale(0.96); }
}

@media (max-width: 600px) {
  .site-toast-region {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: auto;
    align-items: flex-start;
    width: min(300px, calc(100vw - max(20px, env(safe-area-inset-left) + env(safe-area-inset-right))));
    gap: 7px;
  }

  .site-toast {
    grid-template-columns: 26px minmax(0, 1fr) 24px;
    gap: 7px;
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    padding: 7px 7px 7px 9px;
    border-radius: 12px;
    font-size: 0.84rem;
  }

  .site-toast-icon {
    width: 25px;
    height: 25px;
    font-size: 0.78rem;
  }

  .site-toast-close {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-toast,
  .site-toast.is-repeated,
  .site-toast.is-leaving {
    animation-duration: 1ms !important;
  }
}

/* =========================================================
   MOBILE MODAL CHROME + SAFE-AREA FIX
   Keeps the same smooth, darkened backdrop and solid/blurred
   modal header treatment at the top and bottom of mobile screens.
   ========================================================= */
@media (max-width: 700px) {
  .modal.show {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left)) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    background: rgba(2, 6, 23, 0.82) !important;
    backdrop-filter: blur(14px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
    overscroll-behavior: contain;
  }

  /* Preserve the intentionally floating public question card and the
     full-workspace admin inboxes established by their dedicated layouts. */
  .questions-modal.show {
    padding:
      max(16px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left)) !important;
  }

  .comments-admin-modal.show,
  .questions-admin-modal.show {
    padding: 0 !important;
  }

  .modal.show > .modal-content {
    max-width: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box !important;
    border-color: rgba(15, 23, 42, 0.16);
    background: #ffffff;
  }

  body.dark-mode .modal.show > .modal-content {
    border-color: rgba(255, 255, 255, 0.12);
    background: #111827;
  }

  .modal.show > .modal-content > .modal-topbar {
    background: rgba(248, 250, 252, 0.94) !important;
    backdrop-filter: blur(16px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(135%) !important;
  }

  body.dark-mode .modal.show > .modal-content > .modal-topbar {
    background: rgba(15, 23, 42, 0.94) !important;
  }

  .modal.show > .modal-content > .modal-scroll-body,
  .modal.show > .modal-content > .modal-fill-body {
    background-clip: padding-box;
  }
}

/* =========================================================
   ANONYMOUS QUESTIONS — LIGHT / DARK THEME SUPPORT
   The existing design remains the dark-mode appearance.
   These overrides give both the public question card and the
   private question inbox a complete light-mode presentation.
   ========================================================= */
.questions-panel,
.questions-admin-panel {
  color-scheme: dark;
}

body:not(.dark-mode) .questions-panel,
body:not(.dark-mode) .questions-admin-panel {
  color-scheme: light;
  border-color: rgba(15, 23, 42, 0.14);
  background:
    radial-gradient(circle at 10% 0%, rgba(74, 108, 247, 0.13), transparent 38%),
    linear-gradient(145deg, #ffffff, #f3f6fb 76%);
  color: #172033;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

body:not(.dark-mode) .questions-header {
  border-bottom-color: rgba(15, 23, 42, 0.10);
  background: rgba(248, 250, 252, 0.82);
}

body:not(.dark-mode) .questions-header h2,
body:not(.dark-mode) .questions-intro strong,
body:not(.dark-mode) .question-form > label:first-child,
body:not(.dark-mode) .question-success h3,
body:not(.dark-mode) .question-admin-label {
  color: #0f172a;
}

body:not(.dark-mode) .questions-eyebrow {
  color: #64748b;
}

body:not(.dark-mode) .questions-icon-button {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: #172033;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
}

body:not(.dark-mode) .questions-icon-button:hover,
body:not(.dark-mode) .questions-icon-button:focus-visible {
  background: #e8edf5;
}

body:not(.dark-mode) .questions-admin-gear {
  border-color: #4a6cf7;
  background: #4a6cf7;
  color: #ffffff;
}

body:not(.dark-mode) .questions-admin-gear:hover,
body:not(.dark-mode) .questions-admin-gear:focus-visible {
  background: #3658dc;
}

body:not(.dark-mode) .questions-intro p,
body:not(.dark-mode) .question-success p {
  color: #5d6b7d;
}

body:not(.dark-mode) .question-form textarea {
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  caret-color: #4a6cf7;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

body:not(.dark-mode) .question-form textarea::placeholder {
  color: #94a3b8;
}

body:not(.dark-mode) .question-form textarea:focus {
  border-color: #6f89f7;
  box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.14);
}

body:not(.dark-mode) .question-form-meta,
body:not(.dark-mode) .questions-admin-status,
body:not(.dark-mode) .question-admin-card-top small,
body:not(.dark-mode) .question-admin-meta,
body:not(.dark-mode) .question-image-window {
  color: #64748b;
}

body:not(.dark-mode) .question-status {
  color: #4056b5;
}

body:not(.dark-mode) .question-secondary-button {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.07);
}

body:not(.dark-mode) .question-secondary-button:hover,
body:not(.dark-mode) .question-secondary-button:focus-visible {
  background: #eef2f7;
}

body:not(.dark-mode) .questions-admin-tabs button {
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.82);
  color: #475569;
}

body:not(.dark-mode) .questions-admin-tabs button:hover,
body:not(.dark-mode) .questions-admin-tabs button:focus-visible {
  background: #e8edf5;
}

body:not(.dark-mode) .questions-admin-tabs button.active {
  border-color: #4a6cf7;
  background: #4a6cf7;
  color: #ffffff;
}

body:not(.dark-mode) .questions-reset-cooldowns {
  border-color: #f0c65c;
  background: #fff7dc;
  color: #8a4b08;
}

body:not(.dark-mode) .questions-reset-cooldowns:hover:not(:disabled),
body:not(.dark-mode) .questions-reset-cooldowns:focus-visible:not(:disabled) {
  background: #ffefb8;
}

body:not(.dark-mode) .question-admin-card {
  border-color: #d8e0ea;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

body:not(.dark-mode) .question-admin-card.is-new {
  border-color: rgba(74, 108, 247, 0.42);
  background: rgba(235, 240, 255, 0.95);
}

body:not(.dark-mode) .question-admin-card.is-archived {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(240, 253, 244, 0.95);
}

body:not(.dark-mode) .question-admin-badge.blocked {
  background: #fee2e2;
  color: #b91c1c;
}

body:not(.dark-mode) .question-admin-badge.answered {
  background: #dcfce7;
  color: #166534;
}

body:not(.dark-mode) .question-admin-badge.expired {
  background: #fef3c7;
  color: #92400e;
}

body:not(.dark-mode) .question-admin-text {
  color: #172033;
}

body:not(.dark-mode) .question-admin-text:hover:not(:disabled) {
  color: #3452cf;
}

body:not(.dark-mode) .question-admin-text:disabled {
  color: #475569;
}

body:not(.dark-mode) .question-admin-actions button {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
}

body:not(.dark-mode) .question-admin-actions button:hover:not(:disabled),
body:not(.dark-mode) .question-admin-actions button:focus-visible:not(:disabled) {
  background: #e8edf5;
}

body:not(.dark-mode) .question-admin-actions button.question-share-button {
  border-color: #4a6cf7;
  background: #4a6cf7;
  color: #ffffff;
}

body:not(.dark-mode) .question-admin-actions button.question-share-button:hover:not(:disabled),
body:not(.dark-mode) .question-admin-actions button.question-share-button:focus-visible:not(:disabled) {
  background: #3658dc;
}

body:not(.dark-mode) .question-admin-actions button.question-answered-button {
  border-color: #15803d;
  background: #15803d;
  color: #ffffff;
}

body:not(.dark-mode) .question-admin-actions button.question-answered-button:hover:not(:disabled),
body:not(.dark-mode) .question-admin-actions button.question-answered-button:focus-visible:not(:disabled) {
  background: #16a34a;
}

body:not(.dark-mode) .question-admin-actions button.question-restore-button {
  border-color: #86d6a3;
  background: #dcfce7;
  color: #166534;
}

body:not(.dark-mode) .question-admin-actions button.question-restore-button:hover:not(:disabled),
body:not(.dark-mode) .question-admin-actions button.question-restore-button:focus-visible:not(:disabled) {
  background: #bbf7d0;
}

body:not(.dark-mode) .question-admin-actions button.danger {
  border-color: #f3a6a6;
  background: #fee2e2;
  color: #b91c1c;
}

body:not(.dark-mode) .question-admin-actions button.danger:hover:not(:disabled),
body:not(.dark-mode) .question-admin-actions button.danger:focus-visible:not(:disabled) {
  background: #fecaca;
}

body:not(.dark-mode) .question-ban-ip {
  color: #172033;
}

body:not(.dark-mode) .questions-admin-empty {
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.58);
  color: #64748b;
}

body:not(.dark-mode) .questions-body,
body:not(.dark-mode) .questions-admin-list {
  scrollbar-color: #b8c3d1 transparent;
}

/* ========================================================================== */
/* Account recovery, email preferences, and clearer light-mode admin surfaces */
/* ========================================================================== */
.admin-forgot-password {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 2px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #9fb3ff;
  font: inherit;
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
}
.admin-forgot-password:hover,
.admin-forgot-password:focus-visible { text-decoration: underline; }

.admin-account-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 15px;
  background: rgba(255,255,255,.045);
}
.admin-account-tabs button {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted, #aeb7c8);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.admin-account-tabs button.active {
  border-color: rgba(118,147,255,.45);
  background: rgba(78,107,235,.20);
  color: #fff;
}
.admin-account-panel[hidden] { display: none !important; }

.admin-password-reset-card,
.admin-notification-intro,
.admin-notification-option {
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}
.admin-password-reset-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
}
.admin-password-reset-icon,
.admin-notification-intro > i,
.admin-notification-option-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(78,107,235,.18);
  color: #9fb3ff;
  font-size: 1.05rem;
}
.admin-password-reset-card strong,
.admin-notification-intro strong,
.admin-notification-option strong { display: block; }
.admin-password-reset-card p,
.admin-notification-intro p,
.admin-notification-option small,
.admin-reset-help {
  margin: 4px 0 0;
  color: var(--muted, #aeb7c8);
  line-height: 1.45;
}
.admin-password-reset-card .profile-secondary { white-space: nowrap; }

.admin-notification-form { gap: 12px; }
.admin-notification-intro {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
}
.admin-notification-option {
  display: grid !important;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  cursor: pointer;
}
.admin-notification-option.locked { cursor: default; opacity: .76; }
.admin-notification-option-icon.comments { background: rgba(50,147,255,.17); color: #82bdff; }
.admin-notification-option-icon.questions { background: rgba(146,91,255,.17); color: #bea0ff; }
.admin-notification-option-icon.security { background: rgba(41,190,116,.17); color: #76dfa8; }
.admin-notification-option input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #4f6de8;
}
.admin-password-reset-flow { padding-top: 4px; }
.admin-password-reset-flow [data-reset-step] { animation: profileAdminFade .18s ease; }
.admin-reset-help { margin: 0 0 4px; }
#adminResetCode {
  letter-spacing: .34em;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 850;
}

@media (max-width: 640px) {
  .admin-password-reset-card { grid-template-columns: auto minmax(0,1fr); }
  .admin-password-reset-card .profile-secondary { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .admin-account-tabs button span { font-size: .82rem; }
}

/* Light mode: subtle but clearly defined cards and editor groupings in every admin modal. */
body:not(.dark-mode) .profile-admin-modal .profile-admin-panel {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 24px 70px rgba(15,23,42,.18);
}
body:not(.dark-mode) .profile-admin-modal .profile-admin-head {
  border-bottom-color: #d7dee8;
  background: rgba(248,250,252,.94);
}
body:not(.dark-mode) .profile-admin-modal .profile-admin-body,
body:not(.dark-mode) .profile-admin-modal .profile-admin-form { color: #162033; }

body:not(.dark-mode) .profile-admin-modal :is(
  .profile-admin-card,
  .profile-gallery-sort-item,
  .profile-archive-post-card,
  .profile-button-manager-card,
  .profile-trait-menu-manager-card,
  .profile-trait-items-editor,
  .profile-trait-item-editor,
  .profile-bio-settings,
  .profile-bio-language,
  .profile-bio-language-fields,
  .profile-post-translations,
  .profile-builder-card,
  .profile-builder-subsection,
  .profile-builder-check,
  .profile-section-title-editor,
  .profile-current-image-card,
  .profile-upload-tile,
  .profile-preset-card,
  .profile-playlist-add-form,
  .playlist-card,
  .admin-profile-summary,
  .admin-password-reset-card,
  .admin-notification-intro,
  .admin-notification-option
) {
  border-color: #cbd5e1 !important;
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(15,23,42,.055);
}

body:not(.dark-mode) .profile-admin-modal :is(
  .profile-gallery-sort-item,
  .profile-archive-post-card,
  .profile-button-manager-card,
  .profile-trait-menu-manager-card,
  .profile-trait-item-editor,
  .playlist-card
):hover {
  border-color: #aeb9c9 !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.085);
}

body:not(.dark-mode) .profile-admin-modal :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  textarea,
  select
) {
  border-color: #c4cedb;
  background: #ffffff;
  color: #111827;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.035);
}
body:not(.dark-mode) .profile-admin-modal :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  textarea,
  select
):focus {
  border-color: #6f89ef;
  box-shadow: 0 0 0 3px rgba(79,109,232,.13), inset 0 1px 2px rgba(15,23,42,.025);
}
body:not(.dark-mode) .profile-admin-modal :is(input, textarea)::placeholder { color: #8a98aa; }

body:not(.dark-mode) .profile-admin-modal :is(
  .profile-bio-language-fields,
  .profile-trait-items-editor,
  .profile-builder-subsection,
  .profile-post-translations
) {
  background-color: #f6f8fb;
}
body:not(.dark-mode) .profile-admin-modal .profile-trait-item-editor,
body:not(.dark-mode) .profile-admin-modal .profile-gallery-sort-item,
body:not(.dark-mode) .profile-admin-modal .profile-button-manager-card,
body:not(.dark-mode) .profile-admin-modal .profile-trait-menu-manager-card {
  outline: 1px solid rgba(148,163,184,.18);
  outline-offset: -2px;
}
body:not(.dark-mode) .profile-admin-modal .profile-upload-tile {
  border-style: dashed !important;
  background: #f9fbfd;
}
body:not(.dark-mode) .profile-admin-modal .admin-account-tabs {
  border-color: #cbd5e1;
  background: #edf1f6;
}
body:not(.dark-mode) .profile-admin-modal .admin-account-tabs button { color: #536176; }
body:not(.dark-mode) .profile-admin-modal .admin-account-tabs button.active {
  border-color: #8ca0ee;
  background: #ffffff;
  color: #3049b8;
  box-shadow: 0 3px 9px rgba(15,23,42,.07);
}
body:not(.dark-mode) .admin-forgot-password { color: #3655ca; }
body:not(.dark-mode) .admin-password-reset-icon,
body:not(.dark-mode) .admin-notification-intro > i { background: #e8edff; color: #3e58c8; }
body:not(.dark-mode) .admin-notification-option-icon.comments { background: #e5f2ff; color: #1769b0; }
body:not(.dark-mode) .admin-notification-option-icon.questions { background: #f0eaff; color: #6841b5; }
body:not(.dark-mode) .admin-notification-option-icon.security { background: #e4f8ed; color: #177640; }
body:not(.dark-mode) :is(.admin-password-reset-card p, .admin-notification-intro p, .admin-notification-option small, .admin-reset-help) { color: #64748b; }
@keyframes profileAdminFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

body:not(.dark-mode) .profile-admin-modal :is(
  .profile-gallery-upload-form,
  .profile-selected-upload,
  .profile-icon-choice,
  .profile-item-settings,
  .profile-section-title-language,
  .profile-trait-title-translations
) {
  border-color: #cbd5e1 !important;
}
body:not(.dark-mode) .profile-admin-modal .profile-gallery-upload-form {
  padding: 14px;
  border: 1px solid #d3dbe6;
  border-radius: 16px;
  background: #f7f9fc;
}
body:not(.dark-mode) .profile-admin-modal .profile-selected-upload {
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15,23,42,.055);
}
body:not(.dark-mode) .profile-admin-modal :is(.profile-admin-card-copy small, .profile-manager-help, .profile-gallery-limit-help) {
  color: #66758a;
}

/* Light-mode finishing pass: make nested admin sections easy to scan without
   changing the existing dark-mode appearance. */
body:not(.dark-mode) .profile-admin-modal .profile-gallery-sort-item > img,
body:not(.dark-mode) .profile-admin-modal .profile-current-image-card img,
body:not(.dark-mode) .profile-admin-modal .profile-gallery-item-preview img {
  border: 1px solid #c8d2df;
  background: #eef2f6;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

body:not(.dark-mode) .profile-trait-menu-editor-panel .profile-admin-form > label:not(.profile-check),
body:not(.dark-mode) .profile-admin-modal .profile-admin-form > .profile-form-group,
body:not(.dark-mode) .profile-admin-modal .profile-admin-form > fieldset {
  padding: 12px;
  border: 1px solid #d2dae5;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .04);
}

body:not(.dark-mode) .profile-trait-menu-editor-panel :is(
  .profile-trait-title-translations,
  .profile-trait-items-editor
) {
  border: 1px solid #c7d1de !important;
  background: #f8fafc;
  box-shadow: 0 4px 13px rgba(15, 23, 42, .045);
}

body:not(.dark-mode) .profile-trait-menu-editor-panel .profile-trait-title-translations > summary,
body:not(.dark-mode) .profile-trait-menu-editor-panel .profile-trait-items-header {
  border-bottom-color: #d9e0e9;
}

body:not(.dark-mode) .profile-trait-menu-editor-panel .profile-bio-language-fields,
body:not(.dark-mode) .profile-trait-menu-editor-panel .profile-trait-items-list {
  background: #f4f7fa;
}

body:not(.dark-mode) .profile-trait-menu-editor-panel .profile-trait-item-editor {
  border-color: #c7d1de !important;
  background: #ffffff;
}

body:not(.dark-mode) .profile-admin-modal .profile-archive-post-card,
body:not(.dark-mode) .profile-admin-modal .profile-gallery-sort-item {
  border-width: 1px;
  border-style: solid;
}

/* Password recovery spacing: keep labels, status text, icons and actions visually separated. */
.admin-forgot-password,
.admin-password-reset-panel :is(.profile-primary, .profile-secondary),
.admin-password-reset-card .profile-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.admin-forgot-password {
  width: max-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 8px 4px;
}
.admin-password-reset-panel .admin-password-reset-flow {
  padding-top: 8px;
}
.admin-password-reset-panel .profile-admin-form {
  gap: 18px;
}
.admin-password-reset-panel .profile-admin-form label {
  gap: 9px;
}
.admin-password-reset-panel .admin-reset-help {
  margin: 0 0 2px;
  line-height: 1.6;
}
.admin-password-reset-panel .admin-login-status:not(:empty) {
  margin-top: 1px;
}
.admin-password-reset-panel :is(.profile-primary, .profile-secondary) i,
.admin-password-reset-card .profile-secondary i,
.admin-forgot-password i {
  flex: 0 0 auto;
}

/* Gallery manager: separate the upload area from active and archived image entries. */
.profile-gallery-upload-form {
  margin-bottom: 28px;
}
@media (max-width: 700px) {
  .profile-gallery-upload-form {
    margin-bottom: 24px;
  }
}

/* ========================================================================== */
/* Profile/account modal layout refinement                                     */
/* ========================================================================== */
#adminLogoutModal .admin-profile-panel {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
}

#adminLogoutModal .admin-account-tabs {
  flex: 0 0 auto;
  align-self: flex-start;
  width: auto;
  max-width: calc(100% - 40px);
  margin: 18px 20px 14px;
  padding: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  border-radius: 13px;
}
#adminLogoutModal .admin-account-tabs::-webkit-scrollbar { display: none; }
#adminLogoutModal .admin-account-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 9px;
  white-space: nowrap;
}

#adminLogoutModal .admin-account-panel {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}
#adminLogoutModal .admin-account-panel > .profile-admin-form {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: 8px;
  padding-bottom: 26px;
}

#adminLogoutModal .admin-notification-intro {
  align-items: flex-start;
}
#adminLogoutModal .admin-notification-intro > div {
  min-width: 0;
  padding-top: 1px;
  text-align: left;
}
#adminLogoutModal .admin-notification-intro strong,
#adminLogoutModal .admin-notification-intro p {
  width: 100%;
  margin-left: 0;
  padding-left: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

#adminNotificationSave,
#adminProfileSave,
#adminLogoutConfirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
#adminNotificationSave i,
#adminProfileSave i,
#adminLogoutConfirm i {
  flex: 0 0 auto;
  margin: 0;
}
#adminNotificationSave {
  justify-self: start;
}
#adminLogoutModal .admin-profile-actions {
  padding-bottom: 2px;
}

@media (max-width: 600px) {
  #adminLogoutModal .admin-profile-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  #adminLogoutModal .admin-account-tabs {
    max-width: calc(100% - 32px);
    margin: 14px 16px 12px;
  }
  #adminLogoutModal .admin-account-tabs button {
    min-height: 35px;
    padding: 7px 10px;
  }
  #adminLogoutModal .admin-account-panel > .profile-admin-form {
    padding: 8px 16px 24px;
  }
  #adminNotificationSave {
    width: 100%;
  }
}

/* Public Favorite Music: mirror the effective light-mode card treatment from Manage Playlists.
   The global admin light-mode rule changes the final admin border to #cbd5e1, so the public
   cards intentionally use those computed values rather than the older base-card values. */
body:not(.dark-mode) #playlistsModal #publicPlaylists .playlist-card-wrapper > a.playlist-card {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 5px 15px rgba(15, 23, 42, 0.055) !important;
}

body:not(.dark-mode) #playlistsModal #publicPlaylists .playlist-card-wrapper > a.playlist-card:hover,
body:not(.dark-mode) #playlistsModal #publicPlaylists .playlist-card-wrapper > a.playlist-card:focus-visible {
  border-color: #aeb9c9 !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.085) !important;
}

/* Profile & Account modal scrolling: resolve the flex height so every tab can
   scroll inside the floating modal on desktop and mobile. */
#adminLogoutModal .admin-profile-panel {
  height: min(820px, calc(100vh - 32px));
  height: min(820px, calc(100dvh - 32px));
  min-height: 0;
  overflow: hidden;
}
#adminLogoutModal .admin-account-panel:not([hidden]) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#adminLogoutModal .admin-account-panel > .profile-admin-form {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
#adminLogoutModal .admin-profile-actions {
  position: sticky;
  z-index: 3;
  bottom: -26px;
  margin: 4px -20px -26px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.dark-mode #adminLogoutModal .admin-profile-actions {
  border-top-color: rgba(255, 255, 255, 0.10);
  background: rgba(17, 24, 39, 0.96);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.20);
}

/* Hidden username field for password managers and Chrome's password-form audit. */
.password-manager-username-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.password-manager-username-field input {
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

@media (max-width: 600px) {
  #adminLogoutModal .admin-profile-panel {
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  #adminLogoutModal .admin-profile-actions {
    bottom: -24px;
    margin: 4px -16px -24px;
    padding-right: 16px;
    padding-left: 16px;
  }
  #adminLogoutModal .admin-profile-actions > button {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }
}

/* Cookie consent: explicit theme colors so global/custom text colors cannot
   produce white text on the light cookie surfaces. */
body:not(.dark-mode) .cookie-card,
body:not(.dark-mode) .cookie-modal-card {
  color: #1f2937 !important;
}

body:not(.dark-mode) .cookie-card .cookie-title,
body:not(.dark-mode) .cookie-modal-card .cookie-title {
  color: #111827 !important;
}

body:not(.dark-mode) .cookie-card .cookie-desc,
body:not(.dark-mode) .cookie-modal-card .cookie-desc,
body:not(.dark-mode) .cookie-option,
body:not(.dark-mode) .cookie-option span,
body:not(.dark-mode) .cookie-option strong {
  color: #374151 !important;
  opacity: 1;
}

body:not(.dark-mode) .cookie-link {
  color: #1d4ed8 !important;
  opacity: 1;
}

body:not(.dark-mode) .cookie-btn.secondary,
body:not(.dark-mode) .cookie-modal-close {
  color: #1f2937 !important;
  background: rgba(255, 255, 255, 0.94);
}

body:not(.dark-mode) .cookie-btn.primary {
  color: #ffffff !important;
}

/* Match the cookie banner to the existing dark-mode cookie settings modal. */
body.dark-mode .cookie-card {
  color: #f8fafc !important;
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
}

body.dark-mode .cookie-card .cookie-title,
body.dark-mode .cookie-modal-card .cookie-title {
  color: #f8fafc !important;
}

body.dark-mode .cookie-card .cookie-desc,
body.dark-mode .cookie-modal-card .cookie-desc,
body.dark-mode .cookie-option span,
body.dark-mode .cookie-option strong {
  color: #cbd5e1 !important;
  opacity: 1;
}

body.dark-mode .cookie-link {
  color: #93c5fd !important;
  opacity: 1;
}

body.dark-mode .cookie-btn.secondary {
  color: #f8fafc !important;
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(255, 255, 255, 0.16);
}

body.dark-mode .cookie-btn.primary {
  color: #ffffff !important;
}

/* Mobile stability fixes: keep archived blog cards contained and prevent
   WebKit/iOS from zooming the page when a small form control receives focus. */
@media (max-width: 700px) {
  .profile-archive-blog-grid,
  .profile-archive-post-card,
  .profile-archive-post-card .profile-admin-card-copy,
  .profile-archive-post-card .profile-admin-actions {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .profile-archive-post-card .profile-admin-card-copy,
  .profile-archive-post-card .profile-admin-card-copy * {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .profile-archive-post-card .profile-admin-actions {
    flex-wrap: wrap;
  }

  .profile-archive-post-card .profile-admin-actions > * {
    min-width: 0;
    max-width: 100%;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 700px) {
    input,
    textarea,
    select {
      font-size: max(16px, 1em);
    }
  }
}

