:root {
  --ui-scale: 1;
  --cursor-xp: url("cursors/xpcur.png") 0 0, auto;
  --cursor-w7: url("cursors/w7cur.png") 0 0, auto;
  --cursor-hover: url("cursors/curhover.png") 0 0, pointer;
}
* {
  box-sizing: border-box;
}
html {
  height: 100%;
  overflow: auto;
}
body {
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  background: #000;
  font-family: Tahoma, Verdana, Arial, sans-serif !important;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 40px;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  cursor: var(--cursor-xp);
  overflow-x: auto;
}
body.win7 {
  cursor: var(--cursor-w7);
}
.app-scale {
  zoom: var(--ui-scale);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  min-height: 100%;
  margin: 0 auto;
}
@supports not (zoom: 1) {
  .app-scale {
    transform: scale(var(--ui-scale));
    transform-origin: center center;
  }
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("bliss.webp") no-repeat center center fixed;
  background-size: cover;
  opacity: 1;
  z-index: -1;
}
@media (prefers-reduced-motion: reduce) {
  .profile-text ul li,
  .social-link a {
    transition: none;
  }
}
.window {
  width: 340px;
  max-width: 420px;
  box-sizing: border-box;
  opacity: 1;
  margin-left: auto;
  margin-right: auto;
}
.window:nth-child(1) { }
.window:nth-child(2) { }
.side-windows > .window:nth-of-type(2) { }
.side-windows > .window:nth-of-type(3) { }
.side-windows > .window:nth-of-type(4) { }
.maxokie-side-button {
  display: block;
  opacity: 1;
  margin-top: 0;
  margin-bottom: 6px;
  align-self: center;
}
.window-body { padding: 12px; }
.profile-container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.profile-container img {
  width: 95px;
  height: 95px;
  object-fit: cover;
  border-radius: 4px;
}
.profile-text h1 {
  font-size: 2.5em;
  margin: 0 0 6px 0;
}
.profile-text ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 1.25em;
}
.profile-text ul li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 30px;
  line-height: 1.45em;
  cursor: default;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  border: 1px solid transparent;
  border-radius: 2px;
}
.profile-text ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1a4cff;
  box-shadow: inset -1px -1px 0 #002080, inset 1px 1px 0 #5c8dff;
}
.profile-text ul li:hover {
  background: #1e4aa1;
  color: #ffffff;
  border-color: #0a246a;
}
.socials-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 1.3em;
}
.social-link a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.social-link img {
  width: 32px;
  height: 32px;
  margin-right: 12px;
}
.social-link a:hover {
  background: #316ac5;
  color: #ffffff;
  border-color: #0a246a;
}
.center-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 200px;
  width: 100%;
}
.windows-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
}
#about-me-stack .window {
  width: 380px;
  max-width: 480px;
}
.side-windows {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.side-top-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.side-buttons-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.side-buttons-row .nav-buttons.nav-primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
}
.side-buttons-row .nav-buttons.nav-secondary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
#france-time {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-size: 1.5em;
}
.visits-list {
  font-size: 1.5em;
}
.teto-gif {
  width: 40%;
  max-width: 420px;
  height: auto;
  opacity: 1;
  margin-top: 10px;
}

.teto-right {
  display: block;
  margin-left: 20px;
  width: 230px;
  max-width: 230px;
  height: auto;
  opacity: 1;
}

.nav-area {
  position: relative;
  top: 0;
  left: auto;
  transform: none;
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  justify-content: center;
  z-index: 5;
  margin-bottom: 8px;
}

.nav-area .nav-buttons {
  width: auto;
}

.nav-area .nav-buttons.nav-primary {
  width: auto;
  align-items: center;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
  opacity: 1;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.nav-theme { }
.nav-primary { }
.nav-secondary { }

.nav-buttons button {
  padding: 10px 22px;
  font-size: 17px;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  cursor: pointer;
  font-weight: normal;
  border-radius: 6px;
  border: 1px solid #0a246a;
  background: #e4e4e4;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #b5b5b5;
}

.nav-buttons.nav-secondary {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}
.nav-buttons.nav-secondary button {
  width: auto;
  min-width: 160px;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-buttons .primary {
  background: linear-gradient(180deg, #4b6cda 0%, #2348a6 100%);
  color: #fff;
  font-weight: bold;
  border-color: #0a246a;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.45),
    inset -1px -1px 0 rgba(0, 0, 0, 0.15),
    0 2px 0 rgba(0, 0, 0, 0.15);
  min-width: 140px;
}
.nav-buttons.nav-primary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-items: center;
}
.nav-buttons.nav-primary a.vocatap-btn {
  grid-column: 1 / span 2;
  justify-self: center;
}
.nav-buttons.nav-primary a {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
  width: auto;
}
.nav-buttons.nav-primary img,
.maxokie-side-button img {
  height: auto;
  width: auto;
  display: block;
  height: 40px;
  cursor: pointer;
}
.nav-buttons.nav-primary a:hover img,
.maxokie-side-button:hover img {
  filter: brightness(1.1);
}
.nav-buttons.nav-primary a.vocatap-btn:hover img {
  filter: brightness(1.25);
}
.nav-buttons.nav-primary a:active img,
.maxokie-side-button:active img {
  transform: translateY(1px);
  filter: brightness(0.95);
}

#theme-toggle {
  background: linear-gradient(180deg, #ff6b35 0%, #d63031 100%);
  color: #fff;
  font-weight: bold;
  border-color: #a02020;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.5),
    inset -1px -1px 0 rgba(0, 0, 0, 0.2),
    0 3px 0 rgba(0, 0, 0, 0.2),
    0 0 10px rgba(255, 107, 53, 0.3);
  min-width: 180px;
  font-size: 17px;
  padding: 10px 18px;
  white-space: nowrap;
  flex-shrink: 0;
}

#theme-toggle:hover {
  filter: brightness(1.15);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.5),
    inset -1px -1px 0 rgba(0, 0, 0, 0.2),
    0 3px 0 rgba(0, 0, 0, 0.2),
    0 0 15px rgba(255, 107, 53, 0.5);
}

#theme-toggle:active {
  transform: translateY(2px);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.5),
    inset -1px -1px 0 rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(0, 0, 0, 0.2),
    0 0 8px rgba(255, 107, 53, 0.3);
}

.nav-buttons button,
.title-bar-controls button,
.social-link a,
.profile-text ul li {
  cursor: inherit;
}
body.win7 .title-bar-controls button,
body.win7 .title-bar-controls button:hover,
body.win7 .title-bar-controls button:active,
body.win7 .title-bar-controls button:focus {
  cursor: inherit;
}
a:hover,
button:hover,
input:hover,
textarea:hover {
  cursor: var(--cursor-hover);
}
.title-bar-controls button,
.title-bar-controls button:hover,
.title-bar-controls button:active,
.title-bar-controls button:focus {
  cursor: inherit;
}
body:not(.win7) .nav-buttons button {
  color: #000;
  text-shadow: none;
}
body.win7 .nav-buttons button {
  padding: 8px 16px;
  font-size: 16px;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-weight: normal;
  border-radius: 6px;
}

.connection-status {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}
.presence-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.presence-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.presence-avatar {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #0a246a;
  background: #e5e5e5;
}
.presence-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.presence-name {
  font-weight: bold;
  font-size: 1.1em;
}
.presence-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95em;
}
.presence-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #0a246a;
}
.presence-activities {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.95em;
}
.chat-windows {
  display: flex;
  flex-direction: column;
  max-width: 380px;
}
.guestbook-window {
  width: 380px;
  max-width: 420px;
}
.guestbook-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px;
}
.guestbook-divider {
  border: none;
  border-top: 1px solid #d4d0c8;
  margin: 10px 0;
}
.chat-log {
  background: #fff;
  border: 1px solid #d4d0c8;
  border-radius: 3px;
  height: 430px;
  max-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}
.chat-log::-webkit-scrollbar-button:vertical:start:increment,
.chat-log::-webkit-scrollbar-button:vertical:end:decrement {
  display: none;
}
.chat-message {
  border: 1px solid #d4d0c8;
  border-radius: 3px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f3f3 100%);
  box-shadow: inset 0 1px 0 #fff;
}
.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  margin-bottom: 4px;
  color: #3b3b3b;
}
.chat-name {
  font-weight: bold;
}
.chat-time {
  color: #666;
}
.chat-text {
  white-space: pre-wrap;
  word-break: break-word;
  color: #111;
  font-size: 1.02em;
}
.status {
  margin-top: 0;
  font-size: 0.95em;
  color: #444;
  min-height: 20px;
}
.status.error { color: #c00000; }
.status.success { color: #0c7a0c; }
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.field-row label {
  min-width: 70px;
}
.field-row input[type="text"] {
  flex: 1;
  min-width: 160px;
}
textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}
.helper {
  margin-top: 4px;
  font-size: 0.9em;
  color: #444;
}
.presence-activities li {
  padding: 6px 8px;
  border: 1px solid #d4d0c8;
  border-radius: 3px;
  background: #fff;
}
.presence-activities .meta {
  color: #444;
  font-size: 0.9em;
}

@media (min-width: 901px) {
  .app-scale {
    justify-content: center;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .center-group {
    display: grid;
    grid-template-columns: auto auto auto auto;
    column-gap: 60px;
    justify-content: center;
    align-items: center;
  }
  .chat-windows {
    order: 0;
    width: 380px;
    margin: 0 auto;
  }
  #about-me-stack {
    order: 1;
    width: 380px;
    margin: 0 auto;
  }
  .side-windows {
    order: 2;
    width: 340px;
    margin: 0 auto;
  }
  .teto-column {
    order: 3;
    width: 230px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .teto-gif {
    width: 200px;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
    gap: 20px;
    align-items: stretch;
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .app-scale {
    gap: 20px;
    display: flex;
    flex-direction: column;
  }
  .center-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 20px;
  }
  .chat-windows {
    order: 3;
  }
  #about-me-stack {
    order: 0;
  }
  .side-windows {
    order: 1;
  }
  .teto-column {
    order: 4;
  }
  .app-scale {
    margin-top: 0;
    justify-content: flex-start;
  }
  .chat-windows,
  #about-me-stack,
  .side-windows,
  .teto-column {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  .window {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .guestbook-window {
    width: 100%;
    max-width: 100%;
  }
  .chat-log {
    height: 260px;
    max-height: 260px;
  }
  .nav-area {
    width: 100%;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    justify-content: flex-start;
    margin-bottom: 16px;
  }
  .nav-buttons {
    width: 100%;
  }
  .nav-buttons.nav-theme button,
  .nav-buttons.nav-primary button,
  .nav-buttons.nav-secondary button {
    width: 100%;
    min-width: auto;
    padding: 12px 16px;
    font-size: 16px;
    touch-action: manipulation;
  }
  .nav-buttons.nav-secondary {
    flex-direction: column;
    align-items: stretch;
  }
  .maxokie-side-button {
    display: none;
  }
  .nav-buttons.nav-primary {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
  }
  
  .teto-right {
    position: relative;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    width: 150px;
    max-width: 150px;
    margin: 20px auto 0;
    display: block;
    order: 2;
  }
  
  .side-windows {
    width: 100%;
    gap: 20px;
  }
  
  .profile-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }
  
  .profile-text h1 {
    font-size: 2em;
  }
  
  .profile-text ul {
    font-size: 1.1em;
  }
  
  .socials-list {
    font-size: 1.1em;
  }
  
  .social-link a {
    padding: 10px 12px;
    touch-action: manipulation;
  }
  
  .social-link img {
    width: 28px;
    height: 28px;
  }
  
  .visits-list {
    font-size: 1.2em;
  }
  
  #france-time {
    font-size: 1.3em;
  }
  
  .presence-avatar {
    width: 40px;
    height: 40px;
  }
  
  .presence-name {
    font-size: 1em;
  }
  
  .presence-state {
    font-size: 0.9em;
  }
  
  .presence-activities {
    font-size: 0.9em;
  }
  
  body:not(.win7) .title-bar {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 14px;
  }
  
  body:not(.win7) .title-bar-text {
    font-size: 14px;
  }
  
  body:not(.win7) .title-bar-controls button {
    height: 20px;
    width: 20px;
  }
  
  .window-body {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 8px;
    gap: 15px;
  }
  
  .app-scale {
    gap: 15px;
  }
  
  .window {
    width: 100%;
  }
  
  .profile-text h1 {
    font-size: 1.75em;
  }
  
  .profile-text ul {
    font-size: 1em;
  }
  
  .socials-list {
    font-size: 1em;
  }
  
  .visits-list {
    font-size: 1.1em;
  }
  
  #france-time {
    font-size: 1.2em;
  }
  
  .teto-right {
    width: 120px;
    max-width: 120px;
  }
  
  .nav-buttons button {
    padding: 10px 14px;
    font-size: 15px;
  }
  
  #theme-toggle {
    font-size: 15px;
    padding: 10px 16px;
  }
}

@media screen and (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

@media (hover: none) and (pointer: coarse) {
  .social-link a,
  .nav-buttons button,
  .profile-text ul li {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .social-link a:active,
  .nav-buttons button:active,
  .profile-text ul li:active {
    opacity: 0.7;
  }
}
.win7 .title-bar-controls button {
  opacity: 1 !important;
  filter: none !important;
  background-position: center !important;
  cursor: default;
  transition: filter 80ms ease, transform 60ms ease;
  pointer-events: auto;
}
body.win7 .title-bar-controls button[aria-label="Minimize"] {
  background-position: center 70% !important;
}
.win7 .title-bar-controls button:hover {
  filter: brightness(1.1) !important;
}
.win7 .title-bar-controls button:active {
  transform: translateY(1px);
  filter: brightness(0.92) !important;
}
body.win7::before {
  background: url("w7.png") no-repeat center center fixed;
  background-size: cover;
}
body:not(.win7) .title-bar-controls {
  position: relative;
  right: -4px;
}
body:not(.win7) .title-bar {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 16px;
}
body:not(.win7) .title-bar-text {
  font-size: 16px;
  line-height: 1.2;
  margin-left: -4px;
}
body:not(.win7) .title-bar-controls button {
  height: 22px;
  width: 22px;
  padding: 0;
  pointer-events: auto;
  transition: none !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}
body:not(.win7) .title-bar-controls button:hover,
body:not(.win7) .title-bar-controls button:active,
body:not(.win7) .title-bar-controls button:focus {
  transition: none !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}
