:root {
  --background: #f6f2ea;
  --panel: #fffdf8;
  --stone: #cdb084;
  --stone-dark: #aa8f68;
  --current: #e6cd99;
  --future: #e7e0d4;
  --text: #372f28;
  --soft-text: #6d6254;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--background);
  color: var(--text);
}

.app {
  min-height: 100vh;
  padding: 48px;
}

.header {
  text-align: center;
  margin-bottom: 36px;
}

.header h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 500;
}

.header p {
  margin-top: 12px;
  font-size: 20px;
  color: var(--soft-text);
}

.wall {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 14px;
  background: var(--panel);
  border: 1px solid #d8cbb8;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(70, 55, 35, 0.08);
}

.brick {
  min-height: 76px;
  border: 1px solid var(--stone-dark);
  border-radius: 12px;
  background: var(--stone);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  padding: 12px;
  transition: transform 400ms ease, box-shadow 400ms ease;
}

.brick:hover,
.brick:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(70, 55, 35, 0.16);
  outline: none;
}

.brick .year {
  display: block;
  font-size: 18px;
}

.brick .age {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(55, 47, 40, 0.75);
}

.brick.current {
  background: var(--current);
  border-color: #8b6d37;
}

.brick.future {
  background: var(--future);
  border-color: #c3b9aa;
  color: #817667;
}

.brick.has-memories {
  background: #d8b978;
  border-color: #92713e;
}

.brick.future.has-memories {
  background: #d8c7a6;
}

.brick.has-memories::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin-top: 10px;
  border-radius: 50%;
  background: rgba(55, 47, 40, 0.45);
}

.year-view {
  max-width: 900px;
  margin: 60px auto 0;
  padding: 48px;
  background: var(--panel);
  border: 1px solid #d8cbb8;
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(70, 55, 35, 0.08);
}

.back-button {
  border: none;
  background: transparent;
  color: var(--soft-text);
  font-size: 18px;
  cursor: pointer;
}

.year-heading {
  text-align: center;
  margin: 24px 0 34px;
}

.year-heading h2 {
  font-size: 60px;
  margin: 0;
  font-weight: 500;
}

.year-heading p {
  margin-top: 8px;
  font-size: 24px;
  color: var(--soft-text);
}

.year-invitation {
  text-align: center;
  margin-bottom: 44px;
  font-size: 24px;
  color: var(--soft-text);
  line-height: 1.35;
}

.memories-section h3 {
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--text);
}

.empty-year {
  text-align: center;
  margin: 30px auto;
  padding: 36px;
  max-width: 560px;
  border: 1px solid #e3d7c6;
  border-radius: 22px;
  background: #fffaf0;
  color: var(--soft-text);
  font-size: 22px;
  line-height: 1.45;
}

.memory-list {
  margin-top: 20px;
}

.memory-card {
  margin-top: 20px;
  padding: 28px;
  border-radius: 22px;
  background: #fffaf0;
  border: 1px solid #d8cbb8;
}

.memory-card p {
  margin: 0;
  font-size: 22px;
  line-height: 1.55;
  color: var(--text);
}

.memory-card small {
  display: block;
  margin-top: 18px;
  color: var(--soft-text);
  font-size: 15px;
}

.keep-button {
  display: block;
  margin: 34px auto 0;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  background: var(--stone);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.cancel-button {
  margin-top: 16px;
  border: none;
  background: transparent;
  color: var(--soft-text);
  font-size: 18px;
  cursor: pointer;
}

.memory-box {
  margin-top: 34px;
  text-align: left;
}

.memory-box label {
  display: block;
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--text);
}

.memory-box textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #d8cbb8;
  border-radius: 18px;
  padding: 18px;
  font-size: 20px;
  font-family: Georgia, "Times New Roman", serif;
  background: #fffaf0;
  color: var(--text);
  line-height: 1.5;
}

.memory-box textarea:focus {
  outline: 2px solid #cdb084;
}

.editor-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hidden {
  display: none;
}

.setup-view {
  max-width: 620px;
  margin: 80px auto 0;
  padding: 48px;
  background: var(--panel);
  border: 1px solid #d8cbb8;
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(70, 55, 35, 0.08);
  text-align: center;
}

.setup-view h2 {
  font-size: 42px;
  margin: 0 0 16px;
  font-weight: 500;
}

.setup-view p {
  font-size: 22px;
  color: var(--soft-text);
}

.setup-view input {
  width: 180px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #d8cbb8;
  border-radius: 14px;
  font-size: 24px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  background: #fffaf0;
  color: var(--text);
}

.life-tools {
  max-width: 900px;
  margin: 34px auto 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.life-tools button,
.import-label {
  border: 1px solid #d8cbb8;
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: var(--soft-text);
  font-size: 15px;
  cursor: pointer;
}