﻿:root {
  --bg: #f4f1e9;
  --text: #111111;
  --muted: #3f3f3f;
  --link: #111111;
  --border: #2d2d2d;
}

html.dark-mode {
  --bg: #111111;
  --text: #f3efe6;
  --muted: #d6d1c7;
  --link: #f3efe6;
  --border: #cecbc3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 22px 34px;
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(520px, 640px);
  justify-content: center;
  gap: 44px;
}

.left-column {
  align-self: start;
  position: sticky;
  top: 22px;
}

.engraving-frame {
  margin: 0;
}

.engraving-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

.engraving-frame img.pixel-art {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.clock-box {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 15px;
}

.right-column h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.08;
  font-weight: 800;
}

.right-column h3 {
  margin: 34px 0 12px;
  font-size: clamp(22px, 3vw, 26px);
  line-height: 1.2;
  font-weight: 700;
}

.right-column p,
.right-column li {
  font-size: 16px;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus-visible {
  background: rgba(0, 0, 0, 0.08);
  text-decoration-thickness: 2px;
}

html.dark-mode a:hover,
html.dark-mode a:focus-visible {
  background: rgba(255, 255, 255, 0.13);
}

.tools-list,
.simple-list {
  margin: 0;
  padding-left: 20px;
}

.tools-list li,
.simple-list li {
  margin-bottom: 8px;
}

.recent-tools {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0 4px;
  margin: 16px 0 2px;
}

.section-head-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-head-inline h3 {
  margin-top: 0;
}

.small-clear {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
}

.live-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38a169;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(56, 161, 105, 0.23);
}

.chat-display {
  min-height: 90px;
  border: 1px solid var(--border);
  padding: 10px;
  margin: 10px 0 12px;
}

.chat-line {
  margin-bottom: 8px;
}

.chat-line:last-child {
  margin-bottom: 0;
}

.chat-line strong {
  font-weight: 700;
}

.chat-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: #111;
  padding: 11px 12px;
  font-size: 16px;
}

html.dark-mode .chat-form input {
  background: #1a1a1a;
  color: var(--text);
}

.chat-buttons {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.chat-buttons button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #111;
  padding: 10px 12px;
  font-size: 16px;
  cursor: pointer;
}

html.dark-mode .chat-buttons button {
  background: #1a1a1a;
  color: var(--text);
}

.contacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 280px;
  background: #1a1a1a;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }

  .left-column {
    position: static;
  }
}
