:root{
	--bg1: #ffffff;
	--bg2: #ffffff;
	--card: #ffffff;
	--accent: #ff6b9f;
	--accent-dark: #e34f7a;
	--tile-border: #dcdcdc;
}
#mobile-block {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(255, 255, 255);
  display: none; /* hidden by default */
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 9999;
}

.mobile-message {
  max-width: 400px;
  padding: 20px;
  color: #000000;
}

/* Show the block on screens smaller than 768px */
/*
@media (max-width: 768px) {
  #mobile-block {
    display: flex;
  }

  body > *:not(#mobile-block) {
    display: none;
  }
}
  */
*{box-sizing:border-box}
body{
	margin:0;
	font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
	background: linear-gradient(135deg,var(--bg1),var(--bg2));
	color:#222;
	min-height:100vh;
	display:flex;
	align-items:center;
	text-align: center;
	justify-content:center;
}
.container{
	width:100%;
	max-width:900px;
	padding:28px;
}
header{ text-align:center; margin-bottom:18px }
header h1{ font-size:40px; margin:0 }
header h2{ font-size:36px; margin-bottom: 35px; margin-top: -5px;}
.title { font-size:82px; margin:0 }
.subtitle{ color:#6b6b6b }
.pages{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin:20px 0 }
.card{ display:block; padding:18px; background:var(--card); border-radius:12px; text-decoration:none; color:inherit; box-shadow:0 6px 18px rgba(0,0,0,0.06); border:1px solid rgba(0,0,0,0.04); font-weight:600 }
.pink-card{ background-color: #ffe0f7; }
.card:hover{ transform:translateY(-4px) }

.btn {
  padding: 10px 16px;
  border-radius: 6px;
  background: #ffffff;
  color: #000000;
  border: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
  font-weight: 700;

  flex: 1 1 auto;           /* allows shrinking */
  max-width: 150px;             /* prevents flex overflow bug */
}

/* Remove iOS default tint and appearance for buttons */
.btn, .key {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  color: inherit;
}

/* Minute Cryptic styles */
.clue-box{
	font-size:32px;
	line-height:1.2;
	padding:22px;
	border-radius:12px;
	background: linear-gradient(180deg, #fff, #fffaf8);
	border: 2px solid rgba(0,0,0,0.06);
	box-shadow: 0 6px 18px rgba(0,0,0,0.04);
	margin-bottom:14px;
	min-height:72px;
	display:flex;
	align-items:center;
	justify-content:center;
	font-weight:800;
}

.hint-area{ color:#6b6b6b; min-height:28px; margin-bottom:8px; font-weight:700 }

.letters {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  margin-left: 5px;
  margin-right: 5px;
  margin-bottom: 50px;
  padding: 0 12px;
  flex-wrap: nowrap;      /* force single row */
}

.letter-box {
  width: min(12vw, 64px);   /* scales with screen */
  aspect-ratio: 1 / 1;    /* keeps your tall shape */

  border-radius: 8px;
  border: 2px solid var(--tile-border);

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  font-weight: 900;
  font-size: min(7vw, 36px);  /* responsive text */
  text-transform: uppercase;

  background: #fff;
  flex-shrink: 1;            /* allow shrinking */
}

/* Input-specific tweaks so single-character inputs render correctly on iOS */
input.letter-box {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  text-align: center;
  line-height: 1;
  background: transparent; /* keep container background */
  font-family: inherit;
  color: inherit;
  caret-color: var(--accent-dark);
}

/* Hide iOS/Chrome clear/search decorations */
input.letter-box::-webkit-search-decoration,
input.letter-box::-webkit-search-cancel-button,
input.letter-box::-webkit-clear-button {
  display: none;
}


.letter-box.space{ width:24px; height:24px; border:none; background:transparent }
.letter-box.revealed{ background:linear-gradient(180deg,#ffefef,#fff); border-color:var(--accent); color:var(--accent-dark) }

.letter-box{ cursor:text }
.letter-box:focus, .letter-box.active{ outline:3px solid rgba(255,107,159,0.18); transform:translateY(-2px) }

@media (max-width:520px){
	.clue-box{ font-size:20px; padding:14px; min-height:52px }
	.letter-box{ width:41px; height:41px; font-size:26px; text-align: center; }
}

/* Wordle styles */
.game-wrap{ max-width:520px; margin:0 auto }
.grid{ justify-content: center; display:grid; gap:8px; margin:20px 0 }
.row{ display:grid; grid-template-columns:repeat(5,0fr); gap:8px }
.tile{ width:72px; height:72px; background:#fff; border-radius:8px; border:2px solid var(--tile-border); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:28px; text-transform:uppercase }
.tile.correct{ background:#6aaa64; color:#fff; border-color:#6aaa64 }
.tile.present{ background:#c9b458; color:#fff; border-color:#c9b458 }
.tile.absent{ background:#787c7e; color:#fff; border-color:#787c7e }
.keyboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
  width: 100%;
}

.keyrow {
  display: flex;
  gap: 6px;
  justify-content: center;
  width: 100%;
}

.key {
  flex: 1;                /* makes keys share available space */
         /* prevents giant keys on desktop */
  padding: 10px 0;        /* remove horizontal padding */
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  text-align: center;
}

.key.small{ padding:8px 10px }
.key.correct{ background:#6aaa64; color:#fff; border-color:#6aaa64 }
.key.present{ background:#c9b458; color:#fff; border-color:#c9b458 }
.key.absent{ background:#787c7e; color:#fff; border-color:#787c7e }
.controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;          /* allow wrapping */
  padding: 0 12px;          /* prevent edge overflow */
}
.msg{ text-align:center; color:#6b6b6b; min-height:0px }

footer{ text-align:center; margin-top:22px; color:#6b6b6b }

@media (max-width:520px){
	.tile{ width:52px; height:52px; font-size:20px }
}

/* Connections (4x4) styles */
.conn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px auto;
  max-width: 760px; /* prevents cells from growing too large on very wide screens */
}

.conn-cell {
  aspect-ratio: 1 / 1;     /* makes squares */
  display: flex;           /* center content */
  align-items: center;
  justify-content: center;

  padding: 8px;
  background: var(--card);
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,0.06);
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
font-size: clamp(12px, 3vw, 18px);


  min-width: 0;
}

/* Limit individual cell size so desktop layouts remain reasonable */
.conn-cell {
  max-width: 140px;
  max-height: 140px;
}


.conn-cell.selected{ outline:3px solid rgba(255,107,159,0.25); transform:translateY(-4px) }
.conn-cell.wrong{ animation:shake 320ms ease; background:#ffa7b1 }

@keyframes shake{ 0%{transform:translateX(0)}25%{transform:translateX(-6px)}50%{transform:translateX(6px)}75%{transform:translateX(-4px)}100%{transform:translateX(0)} }

.conn-cell.solved{ color:#000000; border-color:transparent }
.conn-cell.cat-0.solved{ background:#a0c35a; font-weight:700 }
.conn-cell.cat-1.solved{ background:#f9df6d; font-weight:700 }
.conn-cell.cat-2.solved{ background:#b0c4ef; font-weight:700 }
.conn-cell.cat-3.solved{ background:#bb80c5; font-weight:700; }

.conn-legend{ display:flex; flex-direction: column; gap:8px; justify-content:center; margin-top:8px }
.conn-legend .dot{
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: inline-block;
  align-self: flex-start;
}
.dot.cat-0{ background:#a0c35a; font-weight:700 }
.dot.cat-1{ background:#f9df6d; font-weight:700 }
.dot.cat-2{ background:#b0c4ef; font-weight:700 }
.dot.cat-3{ background:#bb80c5; font-weight:700 }

a {
	color: black;
	text-decoration: none;
	font-weight: 600;
}

.legend-item {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
}

