/* Öffentliche Seite */
#maincontainer {
  min-width: 0 !important;
}

#contentdiv_public {
  float: left;
  width: 100%;
}

#contentcolumn_public {
  margin-right: 300px;
  min-width: 0;
}

#rightcolumn_public {
  float: left;
  width: 280px;
  margin-left: -280px;
}

#headerpublic {
  width: 100%;
  height: auto;
  min-width: 0 !important;
  margin-bottom: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 55%, transparent), transparent 64%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#headerpublic_left,
#headerpublic_right {
  display: none;
}

#headerpublic_center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  height: auto;
  margin: 0;
  padding: 6px 14px;
  background: none;
}

div.logo,
div.slogan,
div.advertise,
div.header_menu,
div.header_tools,
div.header_aside {
  position: static;
  z-index: 1;
  margin: 0;
  padding: 0;
  height: auto;
  width: auto;
}

div.logo {
  flex: 0 0 auto;
  max-width: 300px;
  line-height: 0;
}

div.logo a,
.logo_intern a {
  display: block;
  line-height: 0;
}

div.logo img {
  display: block;
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  aspect-ratio: auto;
}

div.slogan {
  display: none !important;
}

div.header_menu {
  flex: 0 0 auto;
  max-width: 100%;
  margin-left: auto;
}

div.header_aside {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

div.header_tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

div.advertise {
  flex: 0 0 auto;
  max-width: 100%;
  line-height: 0;
}

div.advertise:empty {
  display: none;
}

#Navigation {
  overflow: visible;
}

#Navigation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  height: auto;
  width: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  float: none;
  background: none;
}

#Navigation li {
  height: auto;
  width: auto;
  display: block;
  float: none;
  list-style: none;
  background: none;
}

#Navigation li.separator {
  display: none;
}

#Navigation li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 64px;
  height: auto;
  width: auto;
  float: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  transition: border-color var(--ease), background-color var(--ease), color var(--ease);
}

#Navigation li a:hover,
#Navigation li:hover a {
  padding-top: 4px;
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
}

#Navigation li.current,
#Navigation li.current:hover {
  background: none;
}

#Navigation a.current,
#Navigation li.current a {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: var(--accent);
  color: var(--accent);
}

.login_box,
.statistic,
.miscellaneous {
  width: 100%;
}

.login_box ul,
.statistic ul,
.miscellaneous ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.login_box li,
.statistic li {
  display: block;
  padding: 6px 2px;
  border-bottom: 1px solid var(--border);
}

.login_boxdiv {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: auto;
}

.login_boxdiv_left,
.login_textdiv_left {
  flex: 1 1 auto;
  width: auto;
  float: none;
  text-align: left;
  min-width: 0;
}

.login_boxdiv_right,
.login_textdiv_right {
  flex: 0 0 auto;
  width: auto;
  float: none;
  text-align: right;
  margin-top: 0;
}

.login_box .text,
.login_box .password {
  width: 100% !important;
}

.login_box .standardButton {
  width: auto !important;
  min-width: 72px;
}

.login_textdiv_right {
  width: 40px;
}

form[name="selclanlogin"] > div {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin: 4px 0 !important;
  float: none;
}

form[name="selclanlogin"] > div > div {
  float: none !important;
  width: auto !important;
  position: static !important;
}

form[name="selclanlogin"] > div > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

form[name="selclanlogin"] > div > div:nth-child(2) {
  flex: 0 0 40px;
  width: 40px !important;
}

form[name="selclanlogin"] .ui-widget,
form[name="selclanlogin"] .text {
  width: 100% !important;
  max-width: 100%;
}

form[name="selclanlogin"] .goButton {
  width: 40px !important;
  height: 40px !important;
}

.statisticdiv,
.statisticdiv_left,
.statisticdiv_right {
  width: auto;
  height: auto;
}

.statisticdiv,
.statistic li > div {
  display: flex !important;
  align-items: baseline;
  gap: 10px;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
}

.statisticdiv_left,
.statisticdiv_right {
  float: none !important;
  display: block;
}

.statisticdiv_left {
  flex: 1 1 auto;
  text-align: left;
  min-width: 0;
}

.statisticdiv_right {
  flex: 0 0 auto;
  min-width: 3.25ch;
  margin-left: 0;
  text-align: right;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.statistic li:hover,
.miscellaneous li.first:hover,
.miscellaneous li.firstlevel:hover,
.miscellaneous li.secondlevel:hover {
  background: rgba(var(--accent-rgb), 0.08);
  border-left: 0;
}

.miscellaneous li.first,
.miscellaneous li.firstlevel,
.miscellaneous li.secondlevel {
  height: auto;
  min-height: 28px;
  line-height: 1.4;
  padding: 4px 4px 4px 14px;
  background: none;
  border-top: 1px solid var(--border);
  border-left: 2px solid transparent;
}

.miscellaneous li:first-child {
  border-top: 0;
}

.miscellaneous li.secondlevel {
  padding-left: 22px;
}

.miscellaneous_last {
  background-color: var(--border);
  height: 1px;
  width: 100%;
  margin: 0;
}

/* Ladeanzeige, solange der Seiteninhalt noch verborgen ist */
.cc-loadscreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 16px 28px;
}

.cc-spinner {
  width: 42px;
  height: 42px;
}

.cc-spinner-ring {
  display: block;
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cc-spin 0.7s linear infinite;
}

.cc-loadscreen-text {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

@keyframes cc-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cc-spinner-ring {
    animation: none;
    border-color: var(--accent);
  }
}

/* Interner Kopf */
#headerintern {
  width: 100%;
  height: auto;
  min-width: 0 !important;
  margin-bottom: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 55%, transparent), transparent 64%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#headerintern_left,
#headerintern_right {
  display: none;
}

#headerintern_center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  height: auto;
  margin: 0 !important;
  padding: 4px 14px;
  background: none;
  text-align: left;
}

.logo_intern {
  order: 1;
  width: auto;
  max-width: 260px;
  height: auto;
  margin: 0;
  float: none;
  line-height: 0;
}

.header_aside--intern {
  order: 4;
  margin-left: auto;
}

.logo_intern img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 110px;
  aspect-ratio: auto;
}

#advertise_intern_small,
#advertise_intern_big {
  order: 3;
  display: none;
  float: none;
  height: auto;
  margin: 0;
  max-width: 100%;
}

#advertise_intern_small { width: 234px; }
#advertise_intern_big { width: min(468px, 100%); }

#status_div_container,
.header_intern_title {
  order: 2;
  display: flex;
  flex: 1 1 220px;
  justify-content: center;
  align-items: center;
  height: auto;
  margin: 0 !important;
  padding: 0;
  min-width: 0 !important;
  font-family: var(--font);
  text-align: center;
}

.header_intern_title {
  font-size: 1.35rem;
  font-weight: 650;
}

#status_div_container > .cc-center {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 460px;
}

#status_div,
#status_change_div {
  width: 100%;
  max-width: 460px;
  height: auto;
  min-height: 62px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--field);
  cursor: pointer;
  text-align: left;
  position: relative;
  box-sizing: border-box;
  padding: 6px 10px 6px 64px;
  transition: border-color var(--ease), box-shadow var(--ease);
}

#status_div:hover,
#status_change_div:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#status_change_div {
  display: none;
  cursor: default;
}

.status_pic {
  position: absolute;
  top: 6px;
  left: 6px;
  margin: 0;
  width: 50px;
  height: 50px;
  max-width: 50px;
  overflow: hidden;
  border-radius: 4px;
}

.status_pic img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.mood_text_container,
.mood_name_container {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  height: auto;
  margin: 0;
  min-width: 0;
  text-align: left;
}

.mood_text_container {
  margin-bottom: 4px;
}

.mood_text_label,
.mood_name_label {
  position: static;
  float: none;
  flex: 0 0 4.8rem;
  width: 4.8rem;
  margin: 0;
  font-weight: 650;
  line-height: 1.2;
  font-size: 13px;
  color: var(--muted);
}

#mood_text_final,
#mood_text_change,
#mood_name_final,
#mood_name_change {
  position: static;
  float: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
}

#mood_text_final {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mood_name,
.mood_pic {
  position: static;
  margin: 0 !important;
}

.mood_name {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mood_pic {
  flex: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.mood_pic img {
  max-width: 22px;
  max-height: 22px;
  width: auto;
  height: auto;
}

#status_change_div #mood_text,
#status_change_div #mood_id {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: 28px;
  padding: 2px 8px;
  font-size: 13px;
  line-height: 1.2;
}

#status_change_div #mood_name_change > div:last-child {
  float: none !important;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin: 0 !important;
}

#status_change_div button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  line-height: 0;
}

#status_change_div button:hover {
  border-color: var(--accent);
}

/* Intern-Zeile als Flex, damit die Menüspalte ihre Breite animieren kann */
#headerintern + table,
#headerintern + table > tbody,
#headerintern + table > tbody > tr {
  display: block;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

#headerintern + table > tbody > tr {
  display: flex;
  align-items: flex-start;
}

/* Menü-Spalte schmiegt sich an den Clip. Der clippt von rechts, das Menü läuft nach links zu. */
#showmenuTD {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding-right: 0;
  overflow: hidden;
  vertical-align: top;
}

#showmenuClip {
  width: 164px;
  min-width: 0;
  margin-right: 12px;
  overflow: hidden;
  transition: width 0.35s ease, margin-right 0.35s ease;
}

/* Content-Spalte darf schrumpfen, sonst Horizontal-Overflow */
#showmenuTD + td {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  max-width: 100%;
  vertical-align: top;
}

#showmenuTD.is-collapsed {
  margin-bottom: 0 !important;
}

#showmenuTD.is-collapsed #showmenuClip {
  width: 0;
  margin-right: 0;
}

#showmenu {
  width: 164px;
  min-width: 164px;
  max-width: none;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

#showmenuTD.is-collapsed #showmenu {
  visibility: hidden;
  transition: visibility 0s linear 0.35s;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  #showmenuClip,
  #showmenuTD.is-collapsed #showmenu {
    transition: none;
  }
}

#showmenu > br {
  display: none;
}

#showmenu .headed_top {
  min-height: 34px;
}

#showmenu .headed_mc {
  padding: 4px 8px 2px;
}

#showmenu .headed_bottom {
  min-height: 6px;
  margin-bottom: 18px;
}

/* Menü */
.menu_intern {
  width: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu_intern ul {
  padding-left: 0;
}

.menu_intern li {
  display: block;
  white-space: normal;
}

.menu_intern li.mainpoint {
  height: auto;
  min-height: 0;
  line-height: 1.25;
  padding: 4px 8px 4px 10px;
  margin: 1px 0;
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--text);
  background: none;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}

.menu_intern li.mainpoint:hover {
  background: rgba(var(--section-rgb), 0.12);
  color: var(--text);
}

/* Unterpunkte: eingerückte Rail-Hierarchie */
.menu_intern li.subpoint {
  position: relative;
  height: auto;
  min-height: 0;
  line-height: 1.25;
  margin: 0 0 0 10px;
  padding: 2px 6px 2px 16px;
  font-size: 0.75rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: 1px solid rgba(var(--section-rgb), 0.35);
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}

.menu_intern li.subpoint a {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.menu_intern li.subpoint::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 1px;
  background: rgba(var(--section-rgb), 0.45);
  transform: translateY(-50%);
}

.menu_intern li.subpoint:hover {
  background: rgba(var(--section-rgb), 0.1);
  border-left-color: rgba(var(--section-rgb), 0.7);
  color: var(--text);
}

.menu_intern li.subpoint:hover::before {
  background: rgb(var(--section-rgb));
}

.menu_intern li.active,
.menu_intern li.new_active {
  font-weight: 650;
  color: var(--section);
  background: rgba(var(--section-rgb), 0.14);
  border-left-color: var(--section);
}

.menu_intern li.subpoint_active {
  font-weight: 600;
  color: var(--section);
  background: rgba(var(--section-rgb), 0.12);
  border-left-color: var(--section);
}

.menu_intern li.subpoint_active::before {
  background: var(--section);
}

.menu_intern li.subpoint_active a {
  text-decoration: none;
  color: inherit;
}

#showmenu .menu_intern li.mainpoint a,
#showmenu .menu_intern li.subpoint a {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
}

#showmenu .menu_intern li.mainpoint:hover a,
#showmenu .menu_intern li.subpoint:hover a,
#showmenu .menu_intern li.active a,
#showmenu .menu_intern li.new_active a,
#showmenu .menu_intern li.subpoint_active a {
  color: inherit;
}

.menu_intern li.page,
.menu_intern li.clan,
.menu_intern li.user,
.menu_intern li.new,
.menu_intern li.normal {
  background-image: none;
}

.icondiv {
  width: 26px;
  height: 26px;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background-image: none;
  background-repeat: no-repeat;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.icondiv::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: var(--section, var(--muted));
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.private_normal,
.private_highlight {
  --section: var(--area-private);
  --section-rgb: var(--area-private-rgb);
  --icon: url("../../images/general/menu/icon-private.svg");
}

.clan_intern_normal,
.clan_intern_highlight {
  --section: var(--area-clan-intern);
  --section-rgb: var(--area-clan-intern-rgb);
  --icon: url("../../images/general/menu/icon-clan-intern.svg");
}

.clan_extern_normal,
.clan_extern_highlight {
  --section: var(--area-clan-extern);
  --section-rgb: var(--area-clan-extern-rgb);
  --icon: url("../../images/general/menu/icon-clan-extern.svg");
}

.clan_admin_normal,
.clan_admin_highlight {
  --section: var(--area-clan-admin);
  --section-rgb: var(--area-clan-admin-rgb);
  --icon: url("../../images/general/menu/icon-admin.svg");
}

.public_normal,
.public_highlight {
  --section: var(--area-public);
  --section-rgb: var(--area-public-rgb);
  --icon: url("../../images/general/menu/icon-public.svg");
}

.community_normal,
.community_highlight {
  --section: var(--area-community);
  --section-rgb: var(--area-community-rgb);
  --icon: url("../../images/general/menu/icon-community.svg");
}

.options_normal,
.options_highlight {
  --section: var(--area-options);
  --section-rgb: var(--area-options-rgb);
  --icon: url("../../images/general/menu/icon-options.svg");
}

.statistic_normal {
  --section: var(--area-statistic);
  --section-rgb: var(--area-statistic-rgb);
  --icon: url("../../images/general/menu/icon-statistic.svg");
}

.miscellaneous_normal {
  --section: var(--area-misc);
  --section-rgb: var(--area-misc-rgb);
  --icon: url("../../images/general/menu/icon-misc.svg");
}

.pub_promotion {
  --section: var(--area-promotion);
  --section-rgb: var(--area-promotion-rgb);
  --icon: url("../../images/general/menu/icon-promotion.svg");
}

.private_normal,
.private_highlight,
.clan_intern_normal,
.clan_intern_highlight,
.clan_extern_normal,
.clan_extern_highlight,
.clan_admin_normal,
.clan_admin_highlight,
.public_normal,
.public_highlight,
.community_normal,
.community_highlight,
.options_normal,
.options_highlight,
.statistic_normal,
.miscellaneous_normal,
.pub_promotion {
  background-color: rgba(var(--section-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--section-rgb), 0.38);
}

.credits_logo,
.upload,
.diskspace {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background-image: none;
  background-color: rgba(var(--section-rgb, 158, 176, 198), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--section-rgb, 158, 176, 198), 0.38);
}

.credits_logo::before,
.upload::before,
.diskspace::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: var(--section, var(--muted));
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.credits_logo {
  --section: var(--area-promotion);
  --section-rgb: var(--area-promotion-rgb);
  --icon: url("../../images/general/credits/credits_logo.png");
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
  background-image: url(../../images/general/credits/credits_logo.png);
  background-position: 0 0;
}

.credits_logo::before {
  content: none;
}

.upload {
  --section: var(--accent);
  --section-rgb: var(--accent-rgb);
  --icon: url("../../images/general/filebase/icons/icon-upload.svg");
}

.diskspace {
  --section: var(--area-public);
  --section-rgb: var(--area-public-rgb);
  --icon: url("../../images/general/filebase/icons/icon-diskspace.svg");
}

/* Balloon-Karten */
.balloons_x,
.balloons_y {
  background-image: none;
}

.headed_top,
.popup_top {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: auto;
  min-height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  box-sizing: border-box;
}

.headed_top:has(.headed_tl_highlight) {
  box-shadow: inset 3px 0 0 var(--section, var(--accent));
  background: linear-gradient(90deg, rgba(var(--section-rgb, var(--accent-rgb)), 0.2), var(--surface-2) 58%);
}

/* Bereichsfarben an die ganze Menükarte weitergeben */
.menu_group:has(.private_normal),
.menu_group:has(.private_highlight),
.headed_top:has(.private_normal),
.headed_top:has(.private_highlight),
.headed_top:has(.private_normal) + table,
.headed_top:has(.private_highlight) + table,
.headed_top:has(.private_normal) + table + .headed_bottom,
.headed_top:has(.private_highlight) + table + .headed_bottom {
  --section: var(--area-private);
  --section-rgb: var(--area-private-rgb);
}

.menu_group:has(.clan_intern_normal),
.menu_group:has(.clan_intern_highlight),
.headed_top:has(.clan_intern_normal),
.headed_top:has(.clan_intern_highlight),
.headed_top:has(.clan_intern_normal) + table,
.headed_top:has(.clan_intern_highlight) + table,
.headed_top:has(.clan_intern_normal) + table + .headed_bottom,
.headed_top:has(.clan_intern_highlight) + table + .headed_bottom {
  --section: var(--area-clan-intern);
  --section-rgb: var(--area-clan-intern-rgb);
}

.menu_group:has(.clan_extern_normal),
.menu_group:has(.clan_extern_highlight),
.headed_top:has(.clan_extern_normal),
.headed_top:has(.clan_extern_highlight),
.headed_top:has(.clan_extern_normal) + table,
.headed_top:has(.clan_extern_highlight) + table,
.headed_top:has(.clan_extern_normal) + table + .headed_bottom,
.headed_top:has(.clan_extern_highlight) + table + .headed_bottom {
  --section: var(--area-clan-extern);
  --section-rgb: var(--area-clan-extern-rgb);
}

.menu_group:has(.clan_admin_normal),
.menu_group:has(.clan_admin_highlight),
.headed_top:has(.clan_admin_normal),
.headed_top:has(.clan_admin_highlight),
.headed_top:has(.clan_admin_normal) + table,
.headed_top:has(.clan_admin_highlight) + table,
.headed_top:has(.clan_admin_normal) + table + .headed_bottom,
.headed_top:has(.clan_admin_highlight) + table + .headed_bottom {
  --section: var(--area-clan-admin);
  --section-rgb: var(--area-clan-admin-rgb);
}

.menu_group:has(.public_normal),
.menu_group:has(.public_highlight),
.headed_top:has(.public_normal),
.headed_top:has(.public_highlight),
.headed_top:has(.public_normal) + table,
.headed_top:has(.public_highlight) + table,
.headed_top:has(.public_normal) + table + .headed_bottom,
.headed_top:has(.public_highlight) + table + .headed_bottom {
  --section: var(--area-public);
  --section-rgb: var(--area-public-rgb);
}

.menu_group:has(.community_normal),
.menu_group:has(.community_highlight),
.headed_top:has(.community_normal),
.headed_top:has(.community_highlight),
.headed_top:has(.community_normal) + table,
.headed_top:has(.community_highlight) + table,
.headed_top:has(.community_normal) + table + .headed_bottom,
.headed_top:has(.community_highlight) + table + .headed_bottom {
  --section: var(--area-community);
  --section-rgb: var(--area-community-rgb);
}

.menu_group:has(.options_normal),
.menu_group:has(.options_highlight),
.headed_top:has(.options_normal),
.headed_top:has(.options_highlight),
.headed_top:has(.options_normal) + table,
.headed_top:has(.options_highlight) + table,
.headed_top:has(.options_normal) + table + .headed_bottom,
.headed_top:has(.options_highlight) + table + .headed_bottom {
  --section: var(--area-options);
  --section-rgb: var(--area-options-rgb);
}

.menu_group:has(.statistic_normal),
.headed_top:has(.statistic_normal),
.headed_top:has(.statistic_normal) + table,
.headed_top:has(.statistic_normal) + table + .headed_bottom {
  --section: var(--area-statistic);
  --section-rgb: var(--area-statistic-rgb);
}

.menu_group:has(.miscellaneous_normal),
.headed_top:has(.miscellaneous_normal),
.headed_top:has(.miscellaneous_normal) + table,
.headed_top:has(.miscellaneous_normal) + table + .headed_bottom {
  --section: var(--area-misc);
  --section-rgb: var(--area-misc-rgb);
}

.menu_group:has(.pub_promotion),
.headed_top:has(.pub_promotion),
.headed_top:has(.pub_promotion) + table,
.headed_top:has(.pub_promotion) + table + .headed_bottom {
  --section: var(--area-promotion);
  --section-rgb: var(--area-promotion-rgb);
}

#showmenu .menu_group {
  border: 1px solid rgba(var(--section-rgb, var(--accent-rgb)), 0.32);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 18px;
}

#showmenu .headed_top {
  background: linear-gradient(90deg, rgba(var(--section-rgb, var(--accent-rgb)), 0.14), var(--surface-2) 72%);
  box-shadow: inset 3px 0 0 var(--section, var(--accent));
  border: 0;
  border-radius: 0;
}

#showmenu .headed_top:has(.headed_tl_highlight) {
  background: linear-gradient(90deg, rgba(var(--section-rgb, var(--accent-rgb)), 0.26), var(--surface-2) 62%);
}

#showmenu .headed_top .thtext,
#showmenu .headed_top .thtext_active {
  color: var(--section, var(--accent));
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#showmenu .headed_top + table {
  border: 0;
  box-shadow: inset 3px 0 0 var(--section, var(--accent));
}

#showmenu .headed_top + table + .headed_bottom {
  border: 0;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: inset 3px 0 0 var(--section, var(--accent));
}

.headed_tl_normal,
.headed_tl_highlight,
.popup_tl {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  width: auto;
  height: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 0 0 10px;
  background: none;
  flex: 0 0 auto;
}

.headed_tr_normal,
.headed_tr_highlight {
  display: none;
}

.popup_tr {
  order: 3;
  float: none;
  width: auto;
  height: auto;
  margin-left: auto;
  padding-right: 8px;
  background: none;
}

.headed_tc_normal,
.headed_tc_highlight,
.popup_tc {
  order: 2;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  height: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 12px 0 0;
  background: none;
  white-space: normal;
  min-width: 0;
}

.popup_top--noicon .popup_tc {
  padding-left: 14px;
}

.headed_tc_normal p,
.headed_tc_highlight p,
.popup_tc p {
  margin: 0;
  padding: 0;
  line-height: 1.25;
  text-align: left;
}

.headed_top + table,
.popup_top + table,
.headline_top + table,
.body_top + table {
  width: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.headed_ml,
.headed_mr,
.popup_ml,
.popup_mr,
.body_ml,
.body_mr,
.headline_ml,
.headline_mr {
  width: 0;
  padding: 0;
  background: none;
  font-size: 0;
}

.headed_mc,
.popup_mc {
  background: transparent;
  padding: 8px 12px 4px;
}

.headed_bottom,
.body_bottom,
.headline_bottom,
.popup_bottom {
  width: 100%;
  height: auto;
  min-height: 10px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.body_top + table {
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0;
}

/* Öffentliche Content-Spalte: Top + Table + Footer als eine durchgehende Karte */
#contentcolumn_public > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-sizing: border-box;
}

#contentcolumn_public > div > .body_top {
  border: 0;
  background: transparent;
  border-radius: 0;
}

#contentcolumn_public > div > table {
  border: 0 !important;
  background: transparent;
}

#contentcolumn_public > div > .body_bottom {
  border: 0;
  background: transparent;
  border-radius: 0;
  margin: 0;
}

/* footer_public.html: <br><br> + leerer Ad-Slot vor FAQ entfernen */
#contentcolumn_public .body_mc {
  padding-bottom: 28px;
}

#contentcolumn_public .body_mc > br {
  display: none;
}

#contentcolumn_public .body_mc > center:last-of-type:not(:has(img)):not(:has(iframe)):not(:has(ins)):not(:has(object)) {
  display: none;
}

.headed_bl,
.headed_br,
.headed_bc,
.body_bl,
.body_br,
.popup_bl,
.popup_br,
.popup_bc,
.headline_bl,
.headline_br,
.headline_bc {
  display: none;
}

.body_bc {
  display: block;
  background: none;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border);
}

.body_bc > div {
  width: 100% !important;
  height: auto !important;
  min-height: 18px;
  margin: 0 !important;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.body_bc > div > div {
  float: none !important;
  width: auto !important;
  height: auto !important;
  max-width: none;
  flex: 0 0 auto;
  white-space: nowrap;
}

.body_bc a,
.body_bc p,
.body_bc .sitegeneradedinsecondstext {
  float: none !important;
  display: inline;
  white-space: nowrap;
}

.body_top,
.headline_top {
  width: 100%;
  height: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.body_tl,
.body_tr,
.body_tc,
.headline_tl,
.headline_tr,
.headline_tc {
  display: none;
}

.body_mc,
.headline_mc {
  background: transparent;
  padding: 8px 14px;
}

.body_mc {
  padding-bottom: 28px;
}

/* Intern: #body darf nicht inline bleiben, sonst schrumpft der Inhalt auf die Inhaltsbreite und klebt links. */
.body_mc > #body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.body_mc > #body[style*="inline"] {
  display: block !important;
}

.headline_menuarrow {
  width: 28px;
  background: transparent;
  vertical-align: middle;
  padding-left: 6px;
}

/* Menü ein-/ausklappen – CSS-Chevron, layoutneutral */
.showmenu-arrow {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.showmenu-arrow::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 6px 5px 0;
  border-color: transparent currentColor transparent transparent;
}

.showmenu-arrow.is-collapsed::before {
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent currentColor;
}

.showmenu-arrow:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.showmenu-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.popup_icondiv {
  width: 29px;
  height: 26px;
  margin: 8px 4px 8px 12px;
  background-image: url(../../images/general/shared/transparent.gif);
  background-position: 0 0;
}

.infobox {
  background-image: url(../../images/general/includes/infobox/popup_infobox.png);
}

.popup_clans { background-position: 0 0; }

/* Gruppenfilter-Popup: modernes Icon statt Sprite */
.popup_icondiv.popup_groups {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 7px;
  background-image: none;
  background-color: rgba(var(--accent-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.38);
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.popup_icondiv.popup_groups::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: var(--accent);
  -webkit-mask: url("../../images/general/shared/icon-groups.svg") center / contain no-repeat;
  mask: url("../../images/general/shared/icon-groups.svg") center / contain no-repeat;
}

.popup_top:has(.popup_groups) .popup_tc {
  justify-content: flex-start;
}

/* Clanauswahl: Schild links, Titel direkt daneben */
.popup_icondiv.popup_clans {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 7px;
  background-image: none;
  background-color: rgba(var(--clan-intern-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--clan-intern-rgb), 0.38);
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.popup_icondiv.popup_clans::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: var(--clan-intern);
  -webkit-mask: url("../../images/general/menu/icon-clan-intern.svg") center / contain no-repeat;
  mask: url("../../images/general/menu/icon-clan-intern.svg") center / contain no-repeat;
}

.popup_top:has(.popup_clans) .popup_tc {
  justify-content: flex-start;
}

.popup_top:has(.popup_clans) .thtext {
  text-align: left;
  color: var(--clan-intern);
}
.popup_appointment { background-position: -145px 0; }
.popup_hasbirthday { background-position: -29px 0; }
.popup_birthdate { background-position: -58px 0; }
.popup_nopicture { background-position: -87px 0; }
.popup_zipcode { background-position: -116px 0; }
.popup_premium_account { background-position: -174px 0; }

/* Popup-Close: reines SVG-Mask-Icon, ohne Sprite/PNG-Bleed */
.popup_close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.popup_close::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: url("../../images/general/forum/bbcode/icon-close.svg") center / 14px 14px no-repeat;
  mask: url("../../images/general/forum/bbcode/icon-close.svg") center / 14px 14px no-repeat;
}

.popup_close img {
  display: none !important;
}

.popup_close:hover {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.12);
  color: var(--red);
}

/* Clanauswahl-Popup: Listenpunkte statt alter count.png */
.popup_clan_list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0;
}

.popup_clan_option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.popup_clan_option img[src*="count.png"] {
  display: none;
}

.popup_clan_option::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clan-intern);
  box-shadow: 0 0 0 3px rgba(var(--clan-intern-rgb), 0.18);
}

.popup_clan_option--community::before {
  background: var(--area-community);
  box-shadow: 0 0 0 3px rgba(var(--area-community-rgb), 0.18);
}

.popup_clan_option:hover {
  color: var(--clan-intern);
  border-color: rgba(var(--clan-intern-rgb), 0.55);
  background: rgba(var(--clan-intern-rgb), 0.1);
}

.popup_clan_option--community:hover {
  color: var(--area-community);
  border-color: rgba(var(--area-community-rgb), 0.55);
  background: rgba(var(--area-community-rgb), 0.1);
}

/* Header-Infolines: einheitliche Leisten (Status, Online, News, PSMS, …) */
.infoline {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 32px;
  margin-bottom: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-sizing: border-box;
}

.infoline_start,
.infoline_end,
.infoline_lr_normal,
.infoline_lr_highlight,
.infoline_ml,
.infoline_mr,
.infoline_rl_normal,
.infoline_rl_highlight,
.infoline_rc_normal,
.infoline_rc_highlight {
  display: none;
}

.infoline_lc_normal,
.infoline_lc_highlight,
.infoline_mc {
  float: none;
  width: auto !important;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  line-height: 1.3;
  font-size: 13px;
  box-sizing: border-box;
}

.infoline_lc_normal,
.infoline_lc_highlight {
  display: flex;
  align-items: center;
}

.infoline_lc_normal,
.infoline_lc_highlight {
  flex: 0 0 108px;
  justify-content: flex-start;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.infoline_lc_highlight {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.infoline_mc {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  line-height: 30px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

/* Termin-Zeile bleibt Flex, damit der Countdown rechts sitzt.
   Deren Text steht in einem Link, die Leerzeichen gehen dort nicht verloren. */
.infoline_mc:has(#timebox),
.infoline_mc:has([id^="timebox"]) {
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.infoline_mc a {
  color: inherit;
}

.infoline_mc a:hover {
  color: var(--accent);
}

/* Statuszeile: Clan-/Bereichsauswahl als kompakter Chip (ohne Leistenhöhe zu erhöhen) */
.infoline_clan_select {
  position: relative;
  display: inline-block;
  max-width: min(280px, 42vw);
  height: 22px;
  margin: 0 1px;
  padding: 0 16px 0 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 5px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.infoline_clan_select::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -1px;
  border-style: solid;
  border-width: 4px 3.5px 0 3.5px;
  border-color: currentColor transparent transparent transparent;
  opacity: 0.9;
  transform: translateY(-50%);
}

.infoline_clan_select:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.18);
}

/* Dekorative Bullet-/Arrow-Grafiken ausblenden */
.infoline_mc > img[src*="headline_bullet.png"],
.infoline_mc > img[src*="headline_arrow"] {
  display: none;
}

/* News/Termine: Expand-Toggle als CSS-Chevron (JS tauscht weiterhin img-src) */
.infoline_mc > a:has(> img[id^="more_"]) {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  margin: 0 6px 0 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--inset);
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}

.infoline_mc > a:has(> img[id^="more_"]):hover {
  color: var(--accent);
  border-color: var(--border-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.infoline_mc > a:has(> img[id^="more_"]) > img {
  display: none;
}

.infoline_mc > a:has(> img[id^="more_"])::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 4px 0 4px;
  border-color: currentColor transparent transparent transparent;
}

.infoline_mc > a:has(> img[src*="headline_arrow_up"])::before {
  border-width: 0 4px 5px 4px;
  border-color: transparent transparent currentColor transparent;
}

/* Kategorie-Icons in PSMS-Zeile kompakt halten */
.infoline_mc a img[src*="psms/categorys/"] {
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  max-width: 14px;
  margin: 0;
  object-fit: contain;
  image-rendering: pixelated;
}

#newpsms .infoline_mc a {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Countdown in Termin-Zeile */
.infoline_mc #timebox,
.infoline_mc [id^="timebox"] {
  float: none;
  margin-left: auto;
  padding-right: 0;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .infoline {
    flex-wrap: wrap;
    height: auto;
    min-height: 32px;
  }

  .infoline_lc_normal,
  .infoline_lc_highlight {
    width: 100% !important;
    height: 32px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .infoline_mc {
    width: 100% !important;
    height: auto;
    min-height: 32px;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

tr:has(> .deepend_ul),
tr:has(> .deepend_dl),
tr:has(> .tabs_ul),
tr:has(> .tabs_dl),
tr:has(> .title_dl) {
  display: none;
}

.deepend_ml,
.deepend_mr,
.tabs_ml,
.tabs_mr,
.title_ml,
.title_mr,
.title_ul,
.title_ur {
  display: none;
}

.deepend_mc {
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.title_uc {
  height: auto;
  padding: 10px 14px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.title_mc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px;
  vertical-align: top;
}

.tabs_uc,
.tabs_mc {
  background: var(--inset);
}

.tabs_mc {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
}

/* Day/Night Theme-Toggle */
.cc-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--inset) 80%, var(--surface));
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.cc-theme-toggle:hover,
.cc-theme-toggle:focus-visible {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
  outline: none;
}

.cc-theme-toggle__track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: 32px;
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--field));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
}

.cc-theme-toggle__thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform var(--ease);
}

.cc-theme-toggle--day .cc-theme-toggle__thumb {
  transform: translateX(24px);
  color: #e08900;
}

.cc-theme-toggle--night .cc-theme-toggle__thumb {
  transform: translateX(0);
  color: #6aa8e0;
}

.cc-theme-toggle__icon {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.cc-theme-toggle__label {
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1;
  min-width: 2.8em;
}
