html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
}
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);

  background: #0b0b0f;
}
button, select {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}



body {
  margin: 0;
  background: #0b0b0f;
  color: #e6e6eb;
  font-family: system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.card {
  width: 320px;
  padding: 24px;
  border-radius: 16px;
  background: #14141d;
  box-shadow: 0 0 40px rgba(0,0,0,.6);
}
h1 {
  margin: 0 0 16px;
  font-size: 20px;
  text-align: center;
}
label {
  font-size: 13px;
  opacity: .8;
  display: block;
  margin-top: 14px;
}
select, button {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #1f1f2e;
  color: #fff;
}
button {
  margin-top: 20px;
  background: linear-gradient(135deg, #6b6bff, #8f6bff);
  cursor: pointer;
}
.status {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  opacity: .8;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }

.modal-card {
  background: #14141d;
  padding: 20px;
  border-radius: 14px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-card h3 {
  margin: 0 0 10px;
  text-align: center;
}
.modal-card select {
  padding: 8px;
  border-radius: 8px;
  background: #1f1f2e;
  color: #fff;
  border: none;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.modal-actions button { flex: 1; }


.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* контейнер для SVG */
.logo-wrap {
  width: 100%;
  max-width: 420px;
}

/* сам SVG */
.logo-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

/* мобильная оптимизация */
@media (max-width: 480px) {
  .logo-wrap {
    max-width: 300px;
  }
}

.contact-time {
  margin-top: 6px;
  text-align: center;
  font-size: 12px;
  opacity: 0.55;
  letter-spacing: 0.3px;
}
.phrase-input {
  width: 100%;
  height: 42px;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;

  padding: 0 14px;
  box-sizing: border-box;

  color: #fff;
  font-size: 14px;
  font-family: inherit;

  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* hover */
.phrase-input:hover {
  border-color: rgba(155, 120, 255, 0.5);
}

/* focus */
.phrase-input:focus {
  border-color: rgba(155, 120, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(155, 120, 255, 0.25);
}

/* placeholder */
.phrase-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}


<!-- QR - поделится -->
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
}

.modal-box {
  position: relative;
  max-width: 720px;
  margin: 20vh auto;
  background: #111;
  padding: 20px;
  border-radius: 14px;
  text-align: center;
  z-index: 1;
}

.modal-box input {
  width: 100%;
  margin: 12px 0;
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: #222;
  color: #fff;
}
#qrBox {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0;
}

#qrBox img,
#qrBox canvas {
  display: block;
}
.qr-caption {
  opacity: 0.5;
}

<!-- add Safari for iOS -->
.install-hint {
  position: fixed;
  z-index: 999;
  width:100%;
}


.install-hint {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  opacity: 0.5;
}

.install-hint.hidden {
  display: none;
}

.hint-box {
  color: #fff;
  padding: 14px 18px;
  border-radius: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
}

.hint-icon {
  font-size: 20px;
  line-height: 1;
}

.hint-text {
  line-height: 1.3;
  white-space: nowrap;   /* ⬅️ текст в одну строку */
}


/* ===== Kill Time Button ===== */
.kill-time-btn {
  width: 100%;
  margin-top: 4px;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(30,30,40,0.95),
    rgba(18,18,26,0.98)
  );
  color: #e8e8ff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}

.kill-time-btn:hover {
  border-color: rgba(180,140,255,0.6);
  box-shadow: 0 0 14px rgba(150,110,255,0.25);
}

/* ===== Tetris Modal ===== */
.tetris-modal {
  position: fixed;
  inset: 0;
  display: none; /* управляется из JS */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
}

/* активное состояние */
.tetris-modal.active {
  display: flex;
}

/* ===== Tetris Box ===== */
.tetris-box {
  pointer-events: auto;
  background: #0f0f18;
  padding: 18px;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(150,110,255,0.35);
  text-align: center;
}

/* ===== Canvas ===== */
#tetris {
  display: block;
  width: 200px;
  height: 360px;
  background: #111;
  border-radius: 12px;
}

/* ===== Caption ===== */
.tetris-text {
  margin-top: 10px;
  font-size: 13px;
  color: #cbbcff;
  opacity: 0.75;
}

/* ===== Controls ===== */
.tetris-controls {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  pointer-events: auto;
}

.tetris-controls button {
  pointer-events: auto;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(180,140,255,0.3);
  background: #181824;
  color: #e6d8ff;
  font-size: 20px;
  cursor: pointer;
}

.tetris-controls button:active {
  background: #2a2a3a;
}





/* =========================
   CORE MODAL BASE
   ========================= */

.core-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.core-modal.hidden {
  display: none;
}

.core-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
}

/* =========================
   CORE BOX (RESPONSIVE)
   ========================= */

.core-box {
  position: relative;

  width: calc(100% - 32px);   /* мобильная ширина */
  max-width: 360px;           /* комфортный предел */
  max-height: calc(100vh - 40px);

  margin: 20px auto;
  padding: 24px;

  background: #121212;
  color: #eaeaea;

  border-radius: 16px;
  box-shadow: 0 0 0 1px #222;

  overflow-y: auto;
  overscroll-behavior: contain;
}

/* =========================
   CLOSE BUTTON
   ========================= */

.core-close {
  position: absolute;
  top: -25px;
  right: 20px;
  width: 20px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 22px;
  cursor: pointer;
}

.core-close:hover {
  color: #fff;
}

/* =========================
   TEXT
   ========================= */

.core-box p {
  line-height: 1.6;
  color: #cfcfcf;
}

.core-box ul {
  margin: 16px 0;
  padding-left: 20px;
}

.core-box li {
  margin-bottom: 8px;
}

/* =========================
   WARNING
   ========================= */

.warning {
  margin: 20px 0;
  padding: 14px;
  background: #1a1a1a;
  border-left: 4px solid #ff5555;
  font-size: 13px;
  color: #f0bebe;
}

/* =========================
   CHECKBOX
   ========================= */

.check {
  margin: 20px 0;
  display: flex;
  gap: 10px;
  font-size: 14px;
}

/* =========================
   BUTTONS
   ========================= */

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#startCoreBtn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #ffffff;
  color: #000;
  font-size: 15px;
  cursor: pointer;
}

/* =========================
   RESULT BLOCK
   ========================= */

.result {
  margin-top: 20px;
  padding: 14px;
  background: #0f0f0f;
  border-radius: 10px;
  font-size: 13px;

  max-height: 240px;
  overflow-y: auto;
}

.result.hidden {
  display: none;
}

.label {
  color: #888;
  font-size: 12px;
  margin-top: 10px;
}

/* =========================
   COPY ROW
   ========================= */

.copy-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.copy-input {
  flex: 1;
  background: #0b0b0b;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 6px 8px;
  color: #eaeaea;
  font-size: 12px;
}

/* =========================
   COPY BUTTON (STANDARD)
   ========================= */

.copy-btn {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #cfcfcf;
  font-size: 12px;
  padding: 6px 8px;
  margin-top: 0px; 
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: #1a1a1a;
  border-color: #3a3a3a;
}

.copy-btn.success {
  color: #8fffaf;
  border-color: #2f6f44;
}

/* =========================
   EXIT BUTTON
   ========================= */

.close-panel-btn {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #333;
  color: #aaa;
  cursor: pointer;
}

.close-panel-btn:hover {
  color: #fff;
  border-color: #555;
}

/* =========================
   SCROLLBAR (OPTIONAL)
   ========================= */

.core-box::-webkit-scrollbar,
.result::-webkit-scrollbar {
  width: 6px;
}

.core-box::-webkit-scrollbar-thumb,
.result::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
/* CORE LINK — нейтральная системная ссылка */
.core-link,
.core-link:visited,
.core-link:active,
.core-link:focus {
  color: #b8b8c7;              /* мягкий нейтральный */
  text-decoration: none;
  border-bottom: 1px solid rgba(184,184,199,0.35);
  cursor: pointer;

  font-size: 14px;
  letter-spacing: 0.2px;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

/* hover — аккуратное усиление */
.core-link:hover {
  color: #eaeaff;
  border-bottom-color: rgba(234,234,255,0.8);
}

/* active — лёгкое нажатие */
.core-link:active {
  opacity: 0.7;
}

/* УБИРАЕМ СИНИЙ ЦВЕТ НАВСЕГДА */
a.core-link {
  -webkit-tap-highlight-color: transparent;
}
