/* Dada Layout Test - Beige, brown, red. Breaks when text expands (JA→EN) */
* {
  box-sizing: border-box;
}

body {
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  margin: 0;
  padding: 20px;
  background: #f5f0e6;
  color: #5c4033;
}

main {
  max-width: 70vw;
  margin: 0 auto;
  padding: 3rem 0 3rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 2px solid #8b4513;
  background: #e8e0d0;
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

header h1 a:hover {
  color: #8b2500;
}

nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  flex: 0 0 80px;
}

nav a {
  display: block;
  width: 80px;
  color: #8b2500;
  text-decoration: none;
  padding: 4px 0;
  text-align: center;
}

nav a:hover {
  color: #a52a2a;
}

/* FIXED SIZE BUTTON - will cut off when translated */
.btn-fixed {
  width: 60px;
  height: 28px;
  padding: 0;
  font-size: 14px;
  overflow: hidden;
  border: 2px solid #8b4513;
  background: #e8e0d0;
  color: #5c4033;
  cursor: pointer;
}

.btn-fixed:hover {
  background: #d4c4a8;
  border-color: #8b2500;
}

/* Key image - appears on all pages */
.key-image {
  margin-bottom: 2rem;
}

.key-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 3px solid #8b4513;
}

/* Index page: two-column, text left / image right. Text overlaps image when translated */
.index-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  overflow: visible;
}

.index-image {
  position: relative;
  z-index: 0;
}

.index-image img {
  width: 100%;
  min-width: 320px;
  height: auto;
  border: 3px solid #8b4513;
}

.index-text {
  /* No wrap; when translated, text overflows right onto image */
  max-width: 280px;
  margin-right: -80px;
  padding-right: 0;
  overflow: visible;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.index-text h2 {
  font-size: 3.5rem;
  line-height: 1.2;
  color: #5c4033;
  margin: 0 0 1rem;
}

.index-text p {
  font-size: 1.5rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero img {
  margin: 0 auto;
}

.hero h2 {
  margin-top: 1rem;
  font-size: 2rem;
  color: #5c4033;
}

.intro {
  max-width: 40rem;
  margin: 2rem auto;
  line-height: 1.6;
}

.intro p {
  margin: 0.5rem 0;
}

/* TEXT OVERLAP - fixed width container */
.text-overlap-box {
  width: 120px;
  height: 40px;
  position: relative;
  border: 1px solid #8b4513;
  padding: 4px;
  background: #e8e0d0;
}

.text-overlap-box .label {
  position: absolute;
  top: 4px;
  left: 4px;
  white-space: nowrap;
  overflow: hidden;
}

.text-overlap-box .sublabel {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 10px;
  opacity: 0.8;
}

/* IMAGE OVERLAP area */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 150px);
  gap: 10px;
  padding: 2rem;
}

.image-card {
  width: 150px;
  height: 120px;
  position: relative;
  overflow: hidden;
  border: 2px solid #8b4513;
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-card .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(92, 64, 51, 0.85);
  color: #f5f0e6;
  padding: 4px;
  font-size: 12px;
}

/* CUT-OFF text */
.cutoff-container {
  width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cutoff-badge {
  display: inline-block;
  width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* HIDDEN VALUE BUG - value in attribute, often missed by translation tools */
.hidden-value {
  font-size: 0;
  min-height: 1.5em;
}

.hidden-value::before {
  content: attr(data-value);
  font-size: 16px;
}

/* Layout that breaks with longer text */
.tight-row {
  display: flex;
  width: 200px;
}

.tight-row span {
  flex: 0 0 50px;
}

