body {
  font-family: Arial, sans-serif; background: #f9f9f9;text-align: center;padding: 0rem;margin: 0;}
body.home {}
.landscape-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  color: #333;
  z-index: 99999;
  text-align: center;
  box-sizing: border-box;
}

.landscape-warning.show {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.main-content {
  padding: 0rem 2rem 0rem 2rem;
}
.page-content {
  padding: 2rem 2rem 2rem 2rem;
  max-width:600px;
  margin:auto;
  background: white;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #ddd;
  background: white;
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  top: 0;
  z-index: 999;
}

.bar-left {
  font-weight: bold;
}

.logo-tiles {
  display: flex;
  gap: 4px;
}

.logo-tile {width: 26px;height: 26px;border-radius: 6px;display: flex;align-items: center;justify-content: center;font-size: 0.8rem;font-weight: bold;}

.logo-tile.dark {
  background: #4caf50;
  color: #fff;
  border: 2px solid #4caf50;
}

.logo-tile.light {
  background: #fff;
  color:#666;
  border: 2px solid #ccc;
}

.logo-tile.info {
  background: #ccc;
  border: 2px solid #ccc;
  cursor: pointer;
}

.title-tiles {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 1em;
}

.title-tileXX {
  font-weight: bold;
  font-size: 1.4rem;
  padding: 7px 7px;
  border-radius: 6px;
  font-family: monospace;
}

.title-tile {width: 40px;height: 40px;border-radius: 8px;display: flex;align-items: center;justify-content: center;font-size: 1rem;font-weight: bold;}

.title-tile.green {
  background: #4caf50;
  color: #fff;
  border: 2px solid #4caf50;
}

.title-tile.amber {
  background: #ff9800;
  color: #fff;
  border: 2px solid #ff9800;
}

.title-tile.white {
  background: #fff;
  color:#666;
  border: 2px solid #ccc;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  color: #444;
}

.icon-btn:hover {
  color: #000;
}

h1 {font-size: 2rem;margin-bottom: 1rem;}
.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  width: 100%;
  margin: 0 auto; /* This centers it horizontally */
}
.mode-btn {display: flex;align-items: center;justify-content: space-between;padding: 1rem 1.5rem;background: white;border: 2px solid #ccc;border-radius: 8px;font-size: 1.2rem;text-decoration: none;color: #333;transition: all 0.2s ease;}
.mode-btn .label {display: flex;align-items: center;gap: 0.5rem;}
.mode-btn:hover {border-color: #333;}
.mode-btn.disabled {background: #eee;border-color: #ccc;color: #999;pointer-events: none;}
.label-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.subtext {
  font-weight: normal;
  color: #999;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}
h1 .dot {
  width: 16px;
  height: 16px;
  position: relative;
  top: -2px; /* adjust as needed */
}

.mode-title {
	font-size:1.2rem;
	margin-top:1.4rem;
}

.mode-title .dot {
  position: relative;
  top: -2px; /* adjust as needed */
}
.green { background: #4caf50;}
.amber { background: #ff9800;}
.red { background: #f44336;}

#tile-pool {display: grid;grid-template-columns: repeat(6, 60px);justify-content: center;gap: 0.5rem;margin: 1.5rem 0;}
.tile-frame, .drop-slot {width: 60px;height: 60px;border: 2px dashed #ccc;border-radius: 8px;display: flex;align-items: center;justify-content: center;font-size: 1.2rem;font-weight: bold;background: white;cursor: pointer;transition: background-color 0.3s, border-color 0.3s;}
.tile.selected {outline: 3px solid dodgerblue;outline-offset: -3px;}
.tile {width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;font-size: 1.2rem;font-weight: bold;user-select: none;border: none;background: transparent;}
.word-row {display: flex;justify-content: center;flex-wrap: wrap;gap: 0.5rem;margin: 1rem 0;}
#result {margin-top: 1rem;font-size: 1.2rem;font-weight: bold;}

.modal {display: none;position: fixed;top: 0; left: 0;width: 100vw; height: 100vh;background: rgba(0, 0, 0, 0.6);justify-content: center;align-items: center;z-index: 9999;}
.modal-content {background: white;padding: 20px;border-radius: 10px;max-width: 400px;width: 90%;text-align: center;}

.word-list {margin-top: 1rem;font-size: 1.4rem;font-weight: bold;}
.close-btn {margin-top: 10px;padding: 10px 20px;font-size: 1rem;cursor: pointer;}
.green-bg {background-color: #c8f7c5 !important;border-color: #5cb85c;}
.red-bg {background-color: #ffe0e0 !important;border-color: #d9534f;}
.flip-green, .flip-red {animation: stackFlip 0.6s ease forwards;}
@keyframes stackFlip {0%   { transform: rotateX(0);}
  50%  { transform: rotateX(90deg);}
  51%  { background-color: inherit;}
  100% { transform: rotateX(0);}
}

#submitBtn {font-size: 1.2rem;padding: 0.8rem 1.5rem;margin-top: 1.5rem;border: none;border-radius: 8px;cursor: pointer;font-weight: bold;transition: background-color 0.3s ease;color: #fff;background-color: #4caf50;}
#submitBtn.attempt-2 {background-color: #ff9800;}
#submitBtn.attempt-3 {background-color: #f44336;}

#submitBtn:disabled {background-color: #ccc;cursor: not-allowed;}

.new-day-box {
  display: none;
  padding: 1rem 0;
  border: 2px dashed #d9534f;
  background: #ffe0e0;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  width:100%;
  margin:2rem auto;
}

.new-day-title {font-size: 1.2rem;font-weight: bold;color: #d9534f;margin-bottom: 0.5rem;}

.new-day-box p {
  margin: 0.5rem 0;
}

.new-day-btn {
  font-size: 1.2rem;padding: 0.8rem 1.5rem;margin-top: 1.5rem;border: none;border-radius: 8px;cursor: pointer;font-weight: bold;transition: background-color 0.3s ease;color: #fff;background-color: #4caf50;
}

.new-day-btn:hover {
  background: #e8ffe8;
}

.completion-box {display: none;border: 2px dashed #4caf50;background: #f0fff0;padding: 1rem 0;border-radius: 8px;text-align: center;max-width: 400px;width:100%;margin:2rem auto;}

.completion-title {font-size: 1.2rem;font-weight: bold;color: #388e3c;margin-bottom: 0.5rem;}

#shareButton {background: #ffffff;border: 1px solid #4caf50;color: #388e3c;padding: 0.5rem 1rem;border-radius: 5px;cursor: pointer;font-size: 1rem;margin-top: 0.5rem;}

#shareButton:hover {background: #e8f5e9;}

.bookmark-tip {font-size: 0.85rem;color: #555;margin-top: 0.5rem;}

.return-link {  display: inline-block;margin-top: 2rem;font-size: 1rem;text-decoration: underline;color: #333;}
.return-link:hover {color: #000;}

details summary {list-style: none;cursor: pointer;}
details summary::-webkit-details-marker {display: none;}

#debug-bar {margin-top: 2rem;padding: 0.5rem;border: 1px dashed #888;background: #fff8e1;font-size: 0.9rem;display: block;}
footer {margin-top: 3rem;font-size: 0.9rem;color: #888;}
footer a {color: #888;text-decoration:none;}
footer a:hover {text-decoration:underline;}

.demo-section {
  margin: 1rem 0;
  text-align: center;
}

.tile-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0.5rem 0;
}

.tile-frame.demo {
  border: 2px dashed #ccc;
  padding: 0;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tile-frame.demo .tile {
  font-size: 1.2rem;
  font-weight: bold;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.arrow {
  font-size: 1.5rem;
  margin: 0.3rem 0;
}

.demo-btn {
  margin-top: 0.5rem;
  background: #f0f0f0;
  border: 1px solid #aaa;
  border-radius: 5px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}

.demo-btn:hover {
  background: #e0e0e0;
}

.tip {background: #e7f4ea;border-left: 4px solid #4caf50;padding: 10px;margin: 10px 0;}
.fun-fact {background: #fff3cd;border-left: 4px solid #ff9800;padding: 10px;margin: 10px 0;}
.divider {margin: 2rem 0rem 2rem 0rem;border-top: 1px solid #ccc;}

@media (max-width: 500px) {
.main-content {
  padding: 0rem 1rem 0rem 1rem;
}
.mode-btn {font-size: 1rem;  padding: 0.8rem 1rem;}
#tile-pool {grid-template-columns: repeat(6, 1fr);  gap: 0.4rem;}
.tile-frame, .drop-slot {width: 50px;  height: 50px;  font-size: 1rem;}
.tile {font-size: 1rem;}
}