:root {
  --ink: #32231d;
  --muted: #7b665b;
  --paper: #f4e7dc;
  --panel: #fffaf6;
  --line: #e3d0c2;
  --brand: #7b3d34;
  --brand-soft: #c49379;
  --accent: #f0d9c7;
  --dark: #1d1512;
  --shadow: 0 24px 70px rgba(65, 39, 31, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 93% 7%, rgba(231, 204, 181, 0.28), transparent 22%),
    radial-gradient(circle at 8% 88%, rgba(186, 139, 112, 0.3), transparent 27%),
    linear-gradient(135deg, #4a3329 0%, #755443 55%, #9b735d 100%);
  font-family: "Inter", Arial, sans-serif;
  overflow: hidden;
}

button {
  font: inherit;
}

.orientation-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
}

.brand-mark {
  display: grid;
  flex: none;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fffaf6;
  background: var(--brand);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  font-weight: 800;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

.experience-panel {
  display: grid;
  place-items: center;
  height: 100vh;
  min-width: 0;
  padding: 24px;
}

.tablet {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, 100%);
  height: min(760px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: #08172a;
  border: 8px solid #05080d;
  border-radius: 28px;
  box-shadow:
    0 35px 80px rgba(29, 20, 17, 0.34),
    0 0 0 2px rgba(255, 255, 255, 0.16);
}

.tablet::before {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  width: 12px;
  height: 12px;
  content: "";
  background: #010307;
  border-radius: 999px;
  box-shadow:
    0 0 0 3px #20344d,
    0 0 18px rgba(194, 218, 232, 0.14);
  transform: translateX(-50%);
}

.tablet-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px 16px;
  color: #fffaf6;
  background: rgba(7, 20, 38, 0.98);
  border-bottom: 1px solid rgba(182, 203, 225, 0.18);
}

.tablet-brand,
.guide-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tablet-brand small,
.guide-identity small {
  display: block;
  color: #d3b7a6;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-identity {
  margin-left: auto;
}

.guide-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #4a2e25;
  background: #e6c4a7;
  border-radius: 10px;
  font-weight: 800;
}

.restart-button {
  min-height: 38px;
  padding: 0 12px;
  color: #f8e8db;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-weight: 800;
}

.tablet-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.content-area {
  min-height: 0;
  padding: 26px;
  overflow: auto;
  background:
    radial-gradient(circle at 82% 5%, rgba(70, 104, 143, 0.2), transparent 27%),
    linear-gradient(#102d50 0%, #081c35 100%);
  scrollbar-color: #536b86 transparent;
}

.day-label {
  width: fit-content;
  margin: 0 auto 16px;
  padding: 6px 10px;
  color: #c5d3e1;
  background: rgba(214, 232, 239, 0.12);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.message {
  max-width: 780px;
  margin: 0 0 12px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(123, 61, 52, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(65, 39, 31, 0.08);
}

.message.accent {
  border-left: 4px solid var(--brand-soft);
}

.detail-stack {
  display: grid;
  gap: 14px;
  max-width: 780px;
  margin-top: 18px;
}

.detail-panel {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(123, 61, 52, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(65, 39, 31, 0.08);
}

.detail-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.detail-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.profile-card {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  color: #fffaf6;
  background: linear-gradient(135deg, #7b3d34, #b68068);
  border-radius: 10px;
}

.face {
  flex: none;
  width: 76px;
  height: 88px;
  background-image: url("../assets/orientation-faces.png");
  background-size: 500% 500%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(45, 25, 19, 0.2);
}

.face-1 { background-position: 0% 0%; }
.face-2 { background-position: 25% 0%; }
.face-3 { background-position: 50% 0%; }
.face-4 { background-position: 75% 0%; }
.face-5 { background-position: 100% 0%; }
.face-6 { background-position: 0% 25%; }
.face-7 { background-position: 25% 25%; }
.face-8 { background-position: 50% 25%; }
.face-9 { background-position: 75% 25%; }
.face-10 { background-position: 100% 25%; }
.face-11 { background-position: 0% 50%; }
.face-12 { background-position: 25% 50%; }
.face-13 { background-position: 50% 50%; }
.face-14 { background-position: 75% 50%; }
.face-15 { background-position: 100% 50%; }
.face-16 { background-position: 0% 75%; }
.face-17 { background-position: 25% 75%; }
.face-18 { background-position: 50% 75%; }
.face-19 { background-position: 75% 75%; }
.face-20 { background-position: 100% 75%; }
.face-21 { background-position: 0% 100%; }

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card strong {
  font-size: 1rem;
  line-height: 1.2;
}

.profile-card small {
  display: block;
  margin: 3px 0 7px;
  opacity: 0.86;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-card span {
  opacity: 0.82;
  font-size: 0.74rem;
  font-weight: 700;
}

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.info-card {
  padding: 14px;
  background: rgba(255, 250, 246, 0.78);
  border: 1px solid rgba(123, 61, 52, 0.14);
  border-radius: 10px;
}

.info-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.action-area {
  min-height: 0;
  padding: 16px;
  overflow: hidden;
  color: #fffaf6;
  background:
    radial-gradient(circle at 100% 0, rgba(74, 105, 140, 0.18), transparent 38%),
    #091e38;
}

.action-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(194, 218, 232, 0.18);
}

.action-heading small {
  color: #e6c4a7;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.action-heading strong {
  font-size: 1.08rem;
  line-height: 1.15;
}

.menu-group {
  display: grid;
  gap: 6px;
}

.menu-group button {
  min-height: 36px;
  padding: 7px 10px;
  color: #39231c;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, #fff6ef, #e4c5af);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  font-weight: 800;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.menu-group button:hover,
.menu-group button.active {
  background: #fffaf6;
  box-shadow: 0 10px 24px rgba(3, 10, 19, 0.18);
  transform: translateX(2px);
}

@media (max-width: 980px) {
  .tablet-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .tablet {
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
  }

  .action-area {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .experience-panel {
    padding: 0;
  }

  .tablet {
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .tablet-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-identity {
    margin-left: 0;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }
}
