:root {
  --bg: #f4f0e8;
  --surface: #ffffff;
  --surface-soft: #f7f6f4;
  --surface-tint: #f5efe4;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d9d9de;
  --line-strong: #c7c7cc;
  --teal: #0b6f68;
  --teal-dark: #07544f;
  --gold: #f5b64f;
  --sauce: #8b321a;
  --amber: #d97706;
  --brick: #b45309;
  --blue: #405a8d;
  --green: #3f6f5a;
  --shadow: 0 8px 24px -20px rgba(0, 0, 0, 0.32);
  --shadow-strong: 0 18px 56px -42px rgba(0, 0, 0, 0.42);
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  --font-display: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 182, 79, 0.2), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(11, 111, 104, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 34%),
    var(--bg);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.58;
}

input {
  width: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.app-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  width: min(1680px, calc(100vw - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(22px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
  background: rgba(250, 249, 247, 0.82);
  border-right: 1px solid var(--line);
}

.brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 44px;
}

.brand-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px -18px rgba(139, 50, 26, 0.66);
  object-fit: cover;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.brand-account,
.header-subtitle,
.sync-status,
.result-summary,
#feed-note,
.sidebar-foot span {
  color: var(--muted);
}

.brand-account {
  margin-top: 4px;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  gap: 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font-weight: 800;
}

.nav-item.active {
  color: var(--ink);
  background: var(--surface-tint);
}

.nav-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #b9b0a5;
}

.nav-item.active .nav-dot {
  background: var(--sauce);
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sidebar-foot span,
.sidebar-foot strong {
  display: block;
}

.sidebar-foot span {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-foot strong {
  font-size: 12px;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  padding: 38px 46px 56px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

.header-subtitle {
  max-width: 560px;
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.sync-status {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.primary-button,
.secondary-button,
.text-button {
  height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  min-width: 132px;
  padding: 0 22px;
  color: #fff;
  background: #11100f;
  border: 1px solid #11100f;
  box-shadow: 0 10px 20px -16px rgba(0, 0, 0, 0.46);
}

.primary-button:hover {
  background: #2a211d;
  border-color: #2a211d;
}

.secondary-button {
  min-width: 124px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.text-button {
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
}

.hidden {
  display: none !important;
}

.controls {
  display: grid;
  grid-template-columns: minmax(276px, 0.9fr) minmax(168px, 0.62fr) minmax(222px, 0.72fr) 112px minmax(246px, 0.8fr);
  align-items: end;
  gap: 8px 10px;
  padding: 8px 10px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(217, 217, 222, 0.86);
  border-radius: 8px;
  box-shadow: 0 10px 34px -30px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.control-group {
  min-width: 0;
}

.control-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  min-width: 46px;
  height: 28px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.chip.active {
  color: #fff;
  background: #11100f;
  border-color: #11100f;
}

.keyword-input {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
}

.date-range input {
  height: 30px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
}

.date-range span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stepper {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  width: 112px;
  height: 30px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stepper button {
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 18px;
  font-weight: 800;
}

.stepper output {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.result-summary {
  grid-column: 1 / -1;
  margin-top: 0;
  font-size: 12px;
  font-weight: 800;
}

.feed-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

#feed-note {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
}

.session-record {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 24px;
  background:
    linear-gradient(135deg, rgba(245, 182, 79, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(11, 111, 104, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 38px -34px rgba(11, 111, 104, 0.56);
  backdrop-filter: blur(18px);
}

.record-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.record-fields {
  display: grid;
  grid-template-columns: 96px 86px minmax(220px, 1fr) 132px;
  gap: 12px;
  align-items: end;
}

.record-field {
  display: grid;
  gap: 8px;
}

.record-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.record-field input,
.record-field output {
  height: 42px;
  padding: 0 12px;
  font-weight: 800;
}

.record-field output {
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.memo-field input {
  font-weight: 600;
}

.participant-panel {
  display: grid;
  gap: 12px;
}

.participant-panel #save-session {
  justify-self: end;
  min-width: 160px;
}

.participant-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.participant-rows {
  display: grid;
  gap: 8px;
}

.participant-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) 96px 82px minmax(180px, 1.2fr) 32px;
  gap: 8px;
  align-items: end;
}

.participant-row label {
  display: grid;
  gap: 6px;
}

.participant-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.participant-row input,
.participant-row output {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.participant-row output {
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.remove-participant {
  display: grid;
  place-items: center;
  width: 32px;
  height: 34px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
}

.session-record.is-entry .completed-field,
.session-record.is-entry .rate-field,
.session-record.is-entry .memo-field {
  display: none;
}

.session-record.is-entry .participant-row {
  grid-template-columns: minmax(180px, 420px) 32px;
  justify-content: start;
}

.battle-result {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(245, 239, 228, 0.92);
  border: 1px solid rgba(139, 50, 26, 0.18);
  border-radius: 8px;
}

.battle-result span,
.battle-result em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.battle-result strong {
  font-size: 16px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.post-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px -30px rgba(0, 0, 0, 0.44);
}

.order-badge {
  position: absolute;
  z-index: 2;
  top: -1px;
  left: -1px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: #11100f;
  border-bottom-right-radius: 8px;
  font-size: 16px;
  font-weight: 800;
}

.post-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
}

.profile-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff url("/img/tako-icon.svg") center / cover no-repeat;
  border: 1px solid var(--line);
}

.post-author {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.post-place {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.post-menu {
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
  text-align: right;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  background: #f5f5f7;
}

.mock-frame {
  height: 292px;
}

.real-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.post-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-failed .post-image {
  display: none;
}

.real-frame.image-failed {
  min-height: 260px;
}

.image-failed::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  background: var(--surface-soft);
  content: "画像を表示できません。Instagramで開いて確認してください。";
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.mock-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.mock-photo.green {
  background: #bed5bf;
}

.mock-photo.blue {
  background: #c6d0e8;
}

.mock-photo.sand {
  background: #d8c9a8;
}

.mock-photo.slate {
  background: #c9d6d0;
}

.mock-photo.amber,
.mock-photo.real {
  background: #dac7b7;
}

.wall {
  position: absolute;
  inset: 38px 8% 48px;
  border-radius: 14px;
  background: #73543c;
}

.green .wall {
  background: var(--green);
}

.blue .wall {
  background: var(--blue);
}

.sand .wall {
  background: #7b6439;
}

.slate .wall {
  background: #5e6a65;
}

.hold,
.climber,
.head {
  position: absolute;
  display: block;
}

.hold {
  width: 30px;
  height: 18px;
  border-radius: 50%;
  background: #f97316;
}

.hold.yellow {
  background: #f6e05e;
}

.hold.one {
  left: 27%;
  top: 30%;
}

.hold.two {
  left: 56%;
  top: 24%;
  width: 22px;
  height: 16px;
}

.hold.three {
  left: 69%;
  top: 45%;
  width: 36px;
  height: 20px;
}

.hold.four {
  left: 36%;
  top: 60%;
  width: 28px;
}

.hold.five {
  left: 59%;
  top: 73%;
}

.hold.six {
  left: 25%;
  top: 84%;
  width: 26px;
  height: 16px;
}

.climber {
  left: 47%;
  top: 50%;
  width: 18px;
  height: 62px;
  border-radius: 999px;
  background: #1f2937;
}

.head {
  left: calc(47% - 2px);
  top: 41%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f4c7a1;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 4px;
}

.action-icons {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 22px;
}

.save-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.caption {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  min-height: 74px;
  padding: 14px 16px 6px;
}

.grade-pill {
  display: grid;
  place-items: center;
  width: 52px;
  height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.grade-1 {
  color: #991b1b;
  background: #fee2e2;
}

.grade-2 {
  color: #166534;
  background: #dcfce7;
}

.grade-3 {
  color: #3730a3;
  background: #e0e7ff;
}

.grade-4,
.grade-5 {
  color: #92400e;
  background: #fef3c7;
}

.grade-unknown {
  color: #374151;
  background: #e5e7eb;
}

.caption-body {
  min-width: 0;
}

.caption-text {
  font-size: 12px;
  line-height: 1.42;
}

.caption-text.collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.caption-author {
  font-weight: 800;
}

.caption-toggle {
  padding: 6px 0 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
}

.post-date {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 18px;
  color: var(--muted);
  font-size: 11px;
}

.post-date a {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.history-list {
  max-width: 1120px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.history-list-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.history-list-header p {
  max-width: 460px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.history-row {
  display: grid;
  grid-template-columns: 126px minmax(140px, 1fr) 88px 96px 84px minmax(220px, 1.3fr) 72px;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.delete-history-button {
  height: 34px;
  color: #991b1b;
  background: #fff7f7;
  border: 1px solid #f0c9c9;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.delete-history-button:hover {
  color: #fff;
  background: #991b1b;
  border-color: #991b1b;
}

.history-row:first-child {
  border-top: 0;
}

.history-cell {
  display: grid;
  gap: 4px;
}

.history-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.history-value {
  font-size: 13px;
  font-weight: 800;
}

.history-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.participant-summary {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.participant-summary strong {
  color: var(--ink);
  font-weight: 800;
}

.growth-board {
  max-width: 1160px;
}

.growth-list {
  display: grid;
  gap: 16px;
}

.growth-card {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.growth-meta {
  display: grid;
  gap: 10px;
  align-content: start;
}

.growth-name {
  font-size: 18px;
  font-weight: 900;
}

.growth-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.growth-stat {
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.growth-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.growth-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.growth-change.positive {
  color: #047857;
}

.growth-change.negative {
  color: #b91c1c;
}

.growth-chart {
  min-height: 164px;
}

.growth-chart svg {
  display: block;
  width: 100%;
  height: 150px;
}

.growth-axis {
  stroke: #d6d3d1;
  stroke-width: 1;
}

.growth-line {
  fill: none;
  stroke: var(--sauce);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.growth-dot {
  fill: #ffffff;
  stroke: var(--sauce);
  stroke-width: 3;
}

.growth-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  min-width: 240px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 18px;
  color: #fff;
  background: #1d1d1f;
  border-radius: 8px;
  box-shadow: 0 18px 38px -26px rgba(0, 0, 0, 0.58);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.shuffle-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(245, 182, 79, 0.2), transparent 34%),
    rgba(244, 240, 232, 0.76);
  backdrop-filter: blur(20px);
}

.shuffle-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(440px, 92vw);
  min-height: 260px;
  padding: 42px 30px;
  overflow: hidden;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow: 0 28px 80px -48px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.shuffle-orbit {
  position: absolute;
  inset: 32px;
  border: 1px solid rgba(11, 111, 104, 0.16);
  border-radius: 999px;
  animation: orbitPulse 1200ms ease-in-out infinite;
}

.shuffle-orbit span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 9px rgba(11, 111, 104, 0.1);
}

.shuffle-orbit span:nth-child(1) {
  top: 12%;
  left: 18%;
}

.shuffle-orbit span:nth-child(2) {
  right: 16%;
  top: 42%;
  background: var(--gold);
  box-shadow: 0 0 0 9px rgba(245, 182, 79, 0.16);
}

.shuffle-orbit span:nth-child(3) {
  bottom: 13%;
  left: 46%;
  background: var(--sauce);
  box-shadow: 0 0 0 9px rgba(139, 50, 26, 0.12);
}

.shuffle-kicker {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.shuffle-message {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  animation: riseIn 560ms ease both;
}

.shuffle-message.is-final {
  max-width: 12em;
  font-size: clamp(30px, 5.2vw, 46px);
  line-height: 1.22;
  animation: finalMenuReveal 920ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes orbitPulse {
  0%,
  100% {
    transform: rotate(0deg) scale(0.96);
    opacity: 0.72;
  }

  50% {
    transform: rotate(14deg) scale(1);
    opacity: 1;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes finalMenuReveal {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.72);
    filter: blur(8px);
  }

  58% {
    opacity: 1;
    transform: translateY(0) scale(1.12);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 1500px) {
  .controls {
    grid-template-columns: minmax(276px, 1fr) minmax(168px, 0.72fr) minmax(222px, 0.86fr) 112px minmax(246px, 0.86fr);
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    margin: 0;
  }

  .nav-list {
    display: flex;
    gap: 6px;
  }

  .nav-item {
    width: auto;
    min-width: 88px;
  }

  .sidebar-foot {
    display: none;
  }

  .workspace {
    padding: 30px 24px 44px;
  }

  .page-header,
  .header-actions,
  .feed-toolbar,
  .history-list-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    gap: 10px;
  }

  .sync-status {
    white-space: normal;
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    margin: 0;
  }

  .session-record {
    grid-template-columns: 1fr;
  }

  .record-fields {
    grid-template-columns: 96px 86px minmax(180px, 1fr);
  }

  .participant-row {
    grid-template-columns: minmax(120px, 1fr) 96px 82px;
  }

  .participant-row .memo-field {
    grid-column: 1 / -2;
  }

  .record-fields .primary-button {
    grid-column: 1 / -1;
  }

  .history-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .growth-card {
    grid-template-columns: 1fr;
  }

  .delete-history-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 680px) {
  body {
    background: var(--bg);
  }

  .sidebar {
    display: block;
    padding: 12px;
  }

  .brand {
    margin-bottom: 12px;
  }

  .brand-name {
    font-size: 14px;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-item {
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
  }

  .nav-dot {
    display: none;
  }

  .workspace {
    padding: 20px 12px 34px;
  }

  h1 {
    font-size: 22px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .controls {
    padding: 10px;
    gap: 10px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .real-frame {
    aspect-ratio: 1 / 1;
  }

  .record-fields,
  .history-row,
  .participant-row {
    grid-template-columns: 1fr;
  }

  .session-record.is-entry .participant-row {
    grid-template-columns: 1fr;
  }

  .participant-row .memo-field {
    grid-column: auto;
  }

  .remove-participant {
    width: 100%;
  }

  .participant-panel #save-session {
    width: 100%;
  }

  .mock-frame {
    height: 260px;
  }
}
