:root {
  color-scheme: light;
  --ink: #151923;
  --muted: #687284;
  --line: #dce2ea;
  --paper: #e9edf3;
  --panel: #f6f8fb;
  --red: #d84848;
  --green: #27866d;
  --yellow: #dda235;
  --blue: #3d67b1;
  --accent: #4f7cc3;
  --accent-dark: #254d91;
  --control: #eef2f7;
  --control-hover: #e5ebf3;
  --shadow: 0 18px 44px rgba(43, 52, 69, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(246, 248, 251, 0.76), rgba(233, 237, 243, 0.2) 44%, rgba(233, 237, 243, 0)),
    radial-gradient(circle at 18% 0%, rgba(79, 124, 195, 0.09), transparent 31rem),
    radial-gradient(circle at 82% 12%, rgba(39, 134, 109, 0.075), transparent 28rem),
    var(--paper);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(12px);
}

.brand-lockup,
.workspace-header,
.title-row,
.matchup {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background:
    radial-gradient(circle at 7px 9px, #fffdf8 0 3px, transparent 3.5px),
    radial-gradient(circle at 7px 19px, #fffdf8 0 3px, transparent 3.5px),
    radial-gradient(circle at 7px 29px, #fffdf8 0 3px, transparent 3.5px),
    radial-gradient(circle at 45px 9px, #fffdf8 0 3px, transparent 3.5px),
    radial-gradient(circle at 45px 19px, #fffdf8 0 3px, transparent 3.5px),
    radial-gradient(circle at 45px 29px, #fffdf8 0 3px, transparent 3.5px),
    linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 5px 5px 0 var(--ink);
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fffdf8;
  filter: drop-shadow(1px 1px 0 rgba(23, 26, 31, 0.32));
  transform: translate(-38%, -50%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px 12px;
  border-right: 1px solid rgba(255, 253, 248, 0.56);
  border-left: 1px solid rgba(255, 253, 248, 0.56);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  line-height: 1.1;
}

.entry-form {
  display: grid;
  gap: 14px;
}

.browse-layout {
  display: grid;
  gap: 16px;
}

.browse-search-bar,
.browse-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 35, 42, 0.06);
}

.browse-search-bar {
  background: #fbfcfd;
}

.browse-search-bar .entry-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.browse-search-bar .search-panel {
  grid-column: 1 / -1;
  width: 100%;
}

.browse-search-bar .title-row {
  min-width: 0;
}

.browse-search-bar .entry-actions {
  min-width: 190px;
}

.browse-search-bar h3,
.browse-panel h3 {
  margin: 0;
  font-size: 1.05rem;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.section-head > div {
  min-width: 0;
}

.browse-controls {
  display: grid;
  min-width: 190px;
}

.browse-controls select {
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.browse-controls select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 93, 156, 0.14);
}

.browse-status {
  min-height: 1rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.browse-status:empty::before {
  content: "Choose a genre to see popular movies.";
  color: var(--muted);
}

.browse-results {
  display: grid;
  gap: 10px;
  min-height: 86px;
  max-height: none;
  overflow: auto;
}

.account-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-panel button,
.auth-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.account-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.app-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav-button {
  position: relative;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: #2d333d;
  font-weight: 900;
}

.nav-button:has(.nav-notification-count) {
  padding-right: 22px;
}

.nav-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.auth-dialog {
  width: min(420px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-dialog::backdrop {
  background: rgba(23, 26, 31, 0.62);
  backdrop-filter: blur(5px);
}

.auth-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.auth-card .brand-lockup {
  margin-bottom: 4px;
}

.auth-card label {
  display: block;
  margin-bottom: 6px;
  color: #3c414b;
  font-size: 0.86rem;
  font-weight: 800;
}

.auth-card input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  outline: none;
}

.auth-card input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 93, 156, 0.14);
}

.auth-card p {
  min-height: 1rem;
  margin-bottom: 0;
  color: #7a3030;
  font-size: 0.84rem;
  font-weight: 800;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-actions button:last-child {
  border: 1px solid #bfc5d0;
  background: #fff;
  color: #2d333d;
}

.entry-form label {
  color: #3c414b;
  font-size: 0.86rem;
  font-weight: 800;
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.info-tooltip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid #69707d;
  border-radius: 50%;
  color: #4a505b;
  cursor: help;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.info-tooltip:focus-visible {
  outline: 3px solid rgba(49, 93, 156, 0.18);
  outline-offset: 2px;
}

.info-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 250px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 2px);
  transition:
    opacity 60ms linear,
    transform 60ms linear;
  white-space: normal;
}

.info-tooltip::before {
  content: "";
  position: absolute;
  z-index: 31;
  left: 50%;
  bottom: calc(100% + 3px);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 60ms linear;
}

.info-tooltip:hover::after,
.info-tooltip:focus-visible::after,
.info-tooltip:hover::before,
.info-tooltip:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.info-tooltip:hover::before,
.info-tooltip:focus-visible::before {
  transform: translateX(-50%);
}

.title-row {
  gap: 8px;
}

input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input[type="text"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 93, 156, 0.14);
}

textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  line-height: 1.4;
  outline: none;
  resize: vertical;
}

textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 93, 156, 0.14);
}

.icon-button {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.entry-actions {
  display: grid;
}

.entry-actions button,
.result-card button {
  min-height: 38px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: #2d333d;
  font-weight: 850;
}

.search-panel {
  display: grid;
  gap: 8px;
  max-height: min(460px, calc(100vh - 330px));
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.search-panel[hidden] {
  display: none;
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-panel-head button {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.search-status {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.search-results {
  display: grid;
  gap: 10px;
}

.result-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  background: #fff;
}

.result-poster {
  display: grid;
  place-items: center;
  width: 46px;
  height: 68px;
  overflow: hidden;
  border-radius: 5px;
  background: linear-gradient(145deg, var(--blue), var(--yellow));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 950;
}

.result-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-copy {
  min-width: 0;
}

.result-copy h3 {
  margin-bottom: 2px;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  line-height: 1.15;
}

.result-year {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.result-overview {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 0;
  color: #555d69;
  font-size: 0.78rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-card button {
  min-height: 34px;
  padding: 0 9px;
  background: var(--ink);
  color: #fff;
}

.workspace {
  min-width: 0;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.page[hidden] {
  display: none;
}

.workspace-header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.workspace-controls {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.view-button,
.edit-order-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.view-button,
.edit-order-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: #2d333d;
  font-weight: 800;
}

.view-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.edit-order-button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.view-button:disabled,
.edit-order-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.social-top-actions,
.social-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-top-actions {
  justify-content: flex-end;
}

.social-tab,
.bell-button,
.back-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: #2d333d;
  font-weight: 900;
}

.social-tab.active,
.bell-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.bell-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
}

.bell-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  line-height: 18px;
}

.nav-notification-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
}

.social-tab-panel[hidden],
.profile-view[hidden],
.friends-home[hidden] {
  display: none;
}

.friends-home {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.friends-home .social-panel:last-child {
  grid-column: 1 / -1;
}

.social-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 8px 24px rgba(31, 35, 42, 0.06);
}

.social-panel h3,
.profile-head h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.social-panel-head,
.friend-search-row,
.friend-row,
.activity-item,
.notification-item,
.profile-head,
.profile-movie {
  display: flex;
  align-items: center;
}

.social-panel-head,
.friend-row,
.notification-item,
.profile-head,
.profile-movie {
  justify-content: space-between;
  gap: 12px;
}

.friend-search-row {
  gap: 8px;
}

.recommendation-block {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.recommendation-block h4 {
  margin: 0;
  color: #3c414b;
  font-size: 0.9rem;
  line-height: 1.2;
}

.friend-search-row input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  outline: none;
}

.friend-search-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 93, 156, 0.14);
}

.friend-search-row button,
.social-panel-head button,
.friend-row button:not(.friend-name),
.notification-item button,
.refresh-button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.social-status {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.social-results,
.friend-list,
.activity-feed,
.profile-movies,
.notification-list,
.recommendations-list {
  display: grid;
  gap: 8px;
}

.recommendations-page {
  width: min(980px, 100%);
}

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

.recommendations-status {
  min-height: 1rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.recommendations-status:empty::before {
  content: "Your picks will appear here after you rank a few movies.";
  color: var(--muted);
}

.recommendation-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 10px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 35, 42, 0.06);
}

.recommendation-poster {
  display: grid;
  place-items: center;
  width: 72px;
  height: 104px;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--green), var(--blue));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 950;
}

.recommendation-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommendation-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recommendation-copy h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.18;
}

.recommendation-year {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.recommendation-overview {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 0;
  color: #4d5562;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recommendation-card button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.friend-profile {
  display: grid;
  gap: 14px;
}

.friend-row,
.activity-item,
.notification-item,
.profile-movie {
  min-height: 48px;
  padding: 10px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  background: #fff;
}

.friend-name {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 950;
  text-align: left;
}

.profile-name,
.comment-user,
.notification-user {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 950;
  text-align: left;
}

.profile-name {
  font-size: inherit;
  line-height: inherit;
}

.comment-user {
  justify-self: start;
  font-size: 0.78rem;
}

.notification-item .notification-user {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: inherit;
  font-weight: 950;
  line-height: inherit;
  vertical-align: baseline;
}

.friend-row span,
.profile-head span,
.profile-movie > span,
.profile-movie p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.friend-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.friend-main p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #4d5562;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.recommendation-row {
  align-items: flex-start;
}

.friend-pill {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e8f2ed;
  color: var(--green) !important;
}

.profile-view .back-button {
  justify-self: start;
}

.profile-head {
  align-items: center;
  justify-content: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e1e5ec;
  border-radius: 8px;
  background: #f8fafc;
}

.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d8dde6;
  border-radius: 50%;
  background: #eef3f8;
  color: var(--blue);
  font-weight: 950;
}

.profile-head > div {
  min-width: 0;
}

.profile-head h4 {
  margin: 0;
  font-size: 1.08rem;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-left: auto;
}

.profile-head .profile-count,
.profile-stat-button {
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.profile-stat-button {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  border: 1px solid #d9dde5;
  color: #3f4652;
}

.profile-stat-button strong {
  color: var(--ink);
  font-weight: 950;
}

.profile-stat-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.profile-stat-button.active strong {
  color: #fff;
}

.profile-connections {
  display: block;
}

.profile-connections:empty {
  display: none;
}

.profile-connection-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e1e5ec;
  border-radius: 8px;
  background: #fff;
}

.profile-connection-panel[hidden] {
  display: none;
}

.profile-connection-head,
.profile-connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-connection-head h5 {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
}

.profile-connection-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-connection-list {
  display: grid;
  gap: 7px;
}

.profile-connection-row {
  min-height: 42px;
  padding: 8px;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  background: #f8fafc;
}

.profile-movies {
  gap: 10px;
}

.profile-movie {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  border-color: #e1e5ec;
  background: #fff;
}

.profile-movie > .profile-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f0f3f7;
  color: #4d5562;
  font-size: 0.82rem;
  font-weight: 950;
}

.profile-movie-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-movie-main h5 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.2;
}

.profile-movie-main h5 span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.profile-sentiment {
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f4f6f8;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.profile-movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.profile-movie-tags > span:not(.profile-sentiment) {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.profile-score {
  padding: 5px 8px;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 950;
}

.activity-item {
  display: grid;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border-color: #e0e4eb;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 35, 42, 0.07);
}

.activity-head,
.activity-main,
.rating-actions,
.comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-head {
  gap: 10px;
}

.activity-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d8dde6;
  border-radius: 50%;
  background: #eef3f8;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 950;
}

.activity-head > div,
.activity-movie {
  min-width: 0;
}

.activity-head p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.activity-movie {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e3e7ee;
  border-radius: 8px;
  background: #f8fafc;
}

.activity-main {
  justify-content: space-between;
  min-width: 0;
}

.activity-main h4 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.activity-main h4 span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.activity-item p,
.profile-movie p,
.notification-item p {
  margin: 2px 0 0;
  color: #3f4652;
  font-size: 0.84rem;
  font-weight: 800;
}

.review-text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.review-text {
  padding: 9px 10px;
  border-left: 3px solid #d9dde5;
  border-radius: 6px;
  background: #f7f8fa;
  line-height: 1.4;
}

.review-readonly {
  display: grid;
  gap: 8px;
}

.review-readonly h3 {
  margin: 0;
  font-size: 0.96rem;
}

.rating-actions {
  justify-content: space-between;
  padding-top: 1px;
}

.heart-button,
.comment-form button {
  min-height: 34px;
  border: 1px solid #d7dce4;
  border-radius: 6px;
  background: #fff;
  color: #2d333d;
  font-weight: 900;
}

.heart-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #4d5562;
}

.heart-button span:first-child {
  color: #9aa2af;
  font-size: 1rem;
  line-height: 1;
}

.heart-button.liked {
  border-color: rgba(207, 70, 57, 0.35);
  background: #fff4f2;
  color: var(--red);
}

.heart-button.liked span:first-child {
  color: var(--red);
}

.comment-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.comment-list {
  display: grid;
  gap: 6px;
}

.comment {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f4f6f8;
  color: #3f4652;
  font-size: 0.82rem;
  line-height: 1.32;
}

.comment span {
  overflow-wrap: anywhere;
}

.comment-form input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d7dce4;
  border-radius: 6px;
  outline: none;
}

.comment-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 93, 156, 0.12);
}

.comment-form button {
  padding: 0 12px;
  background: var(--ink);
  color: #fff;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 12px;
  border-color: #e1e5ec;
  background: #fff;
}

.notification-item.unread {
  border-color: rgba(49, 93, 156, 0.35);
  background: #f6f9fd;
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: #c5ccd8;
}

.notification-item.unread .notification-dot {
  background: var(--blue);
}

.notification-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notification-meta span,
.notification-meta time {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-meta time {
  text-transform: none;
}

.notification-item p {
  margin: 0;
  color: #2d333d;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.35;
}

.notification-item blockquote {
  margin: 0;
  padding: 7px 9px;
  border-left: 3px solid #d9dde5;
  border-radius: 6px;
  background: #f4f6f8;
  color: #4d5562;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
}

.notification-item .follow-back-button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 160px);
  padding: 36px 18px;
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state h3 {
  margin: 18px 0 6px;
  color: var(--ink);
  font-size: 1.3rem;
}

.empty-state p {
  max-width: 28rem;
  margin-bottom: 0;
}

.poster-stack {
  position: relative;
  width: 150px;
  height: 180px;
}

.poster-stack span {
  position: absolute;
  width: 92px;
  height: 132px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(23, 26, 31, 0.22);
}

.poster-stack span:nth-child(1) {
  left: 4px;
  top: 26px;
  rotate: -10deg;
  background: var(--blue);
}

.poster-stack span:nth-child(2) {
  left: 32px;
  top: 8px;
  background: var(--yellow);
}

.poster-stack span:nth-child(3) {
  right: 4px;
  top: 34px;
  rotate: 11deg;
  background: var(--red);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  overflow: visible;
}

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

.edit-list {
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #d2d7e0;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 6px 18px rgba(31, 35, 42, 0.06);
  overflow: visible;
}

.rank-row.editing {
  grid-template-columns: 48px 42px minmax(0, 1fr) auto;
  cursor: grab;
  user-select: none;
}

.rank-row.editing:active {
  cursor: grabbing;
}

.rank-row.dragging {
  opacity: 0.55;
}

.rank-row.drag-over {
  border-color: var(--blue);
  background: #f2f6fd;
  box-shadow: 0 0 0 3px rgba(49, 93, 156, 0.12);
}

.drag-handle {
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  background: #f4f6f8;
  color: #4d5562;
  font-size: 0.72rem;
  font-weight: 950;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
}

.rank-main {
  min-width: 0;
}

.rank-main h3 {
  margin: 0 0 3px;
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  line-height: 1.15;
}

.rank-main p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-score {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 950;
}

.locked-rating {
  position: relative;
  background: #6b7280;
  cursor: help;
}

.locked-rating::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 190px;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition:
    opacity 60ms linear,
    transform 60ms linear;
  white-space: normal;
}

.locked-rating::before {
  content: "";
  position: absolute;
  z-index: 21;
  right: 12px;
  bottom: calc(100% + 3px);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 60ms linear;
}

.locked-rating:hover::after,
.locked-rating:focus-visible::after,
.locked-rating:hover::before,
.locked-rating:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.movie-card {
  display: grid;
  grid-template-rows: 230px auto;
  min-width: 0;
  overflow: visible;
  border: 1px solid #c9ced8;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(31, 35, 42, 0.08);
}

.movie-card[data-review-id],
.rank-row[data-review-id] {
  cursor: pointer;
}

.movie-card[data-review-id]:focus-visible,
.rank-row[data-review-id]:focus-visible {
  outline: 3px solid rgba(49, 93, 156, 0.22);
  outline-offset: 3px;
}

.poster {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: var(--poster-bg);
}

.poster img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  z-index: 1;
}

.poster::after {
  content: "";
  position: absolute;
  inset: auto -20% 20% -20%;
  height: 52px;
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(-13deg);
  z-index: 1;
}

.poster-initials {
  position: relative;
  z-index: 1;
  color: #fffdf8;
  font-size: 3rem;
  font-weight: 950;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.28);
}

.movie-meta {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.movie-title-line {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.movie-title-line h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.2;
}

.movie-year {
  color: var(--muted);
  font-weight: 750;
}

.score {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
}

.movie-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.badge {
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf0f5;
  color: #3f4652;
}

.delete-button {
  border: 0;
  background: transparent;
  color: #7a3030;
  font-weight: 900;
}

.comparison-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 22px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: auto;
}

.comparison-dialog::backdrop,
.verdict-dialog::backdrop,
.review-dialog::backdrop {
  background: rgba(23, 26, 31, 0.58);
  backdrop-filter: blur(4px);
}

.dialog-top {
  margin-bottom: 18px;
}

.dialog-top h2 {
  font-size: 1.35rem;
}

.matchup {
  gap: 16px;
}

.choice-card {
  flex: 1;
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 24px rgba(31, 35, 42, 0.12);
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: var(--blue);
  outline: none;
}

.choice-card .comparison-movie {
  grid-template-rows: 210px auto;
  height: 100%;
  overflow: visible;
}

.choice-card .poster {
  height: 210px;
}

.choice-card .movie-meta {
  min-height: 118px;
  align-content: start;
}

.choice-card .movie-title-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.choice-card .movie-title-line h3 {
  font-size: 1.08rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
  white-space: normal;
}

.versus {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
}

.verdict-dialog {
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 22px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: auto;
}

.review-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 22px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: auto;
}

.verdict-movie {
  margin-bottom: 16px;
}

.verdict-movie .movie-card {
  grid-template-rows: 170px auto;
  box-shadow: 0 8px 24px rgba(31, 35, 42, 0.1);
}

.verdict-movie .poster {
  height: 170px;
}

.verdict-actions {
  display: grid;
  gap: 8px;
}

.review-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #3c414b;
  font-size: 0.86rem;
  font-weight: 850;
}

.review-field span {
  font-weight: 900;
}

.review-dialog-body {
  display: grid;
  gap: 14px;
}

.review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.review-summary > span:not(.badge):not(.rank-score) {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.review-comments {
  display: grid;
  gap: 8px;
}

.review-comments h3 {
  margin: 0;
  font-size: 0.96rem;
}

.review-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

.review-dialog-actions button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  background: #fff;
  color: #2d333d;
  font-weight: 900;
}

.review-dialog-actions button:first-child {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.verdict-actions button,
.cancel-verdict-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #fff;
  font-weight: 900;
}

.verdict-actions button[data-sentiment="liked"] {
  background: var(--green);
}

.verdict-actions button[data-sentiment="okay"] {
  background: var(--yellow);
  color: var(--ink);
}

.verdict-actions button[data-sentiment="disliked"] {
  background: var(--red);
}

.cancel-verdict-button {
  width: 100%;
  margin-top: 10px;
  background: #fff;
  color: #2d333d;
}

/* Visual refresh: calmer surfaces, softer controls, less heavy outline styling. */
.app-header {
  border-bottom-color: rgba(220, 226, 234, 0.84);
  background: rgba(246, 248, 251, 0.88);
  box-shadow: 0 1px 0 rgba(21, 25, 35, 0.03);
}

.brand-mark {
  border-color: rgba(21, 25, 35, 0.18);
  background:
    radial-gradient(circle at 7px 9px, #fff 0 3px, transparent 3.5px),
    radial-gradient(circle at 7px 19px, #fff 0 3px, transparent 3.5px),
    radial-gradient(circle at 7px 29px, #fff 0 3px, transparent 3.5px),
    radial-gradient(circle at 45px 9px, #fff 0 3px, transparent 3.5px),
    radial-gradient(circle at 45px 19px, #fff 0 3px, transparent 3.5px),
    radial-gradient(circle at 45px 29px, #fff 0 3px, transparent 3.5px),
    linear-gradient(135deg, #27866d, #4f7cc3);
  box-shadow: 0 10px 24px rgba(43, 52, 69, 0.12);
}

.app-nav {
  gap: 4px;
  justify-self: center;
  padding: 4px;
  border: 1px solid rgba(220, 226, 234, 0.88);
  border-radius: 8px;
  background: rgba(233, 237, 243, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.nav-button,
.view-button,
.edit-order-button,
.social-tab,
.bell-button,
.back-button,
.entry-actions button,
.result-card button,
.search-panel-head button,
.review-dialog-actions button,
.cancel-verdict-button,
.heart-button,
.comment-form button,
.refresh-button,
.recommendation-card button,
.friend-search-row button,
.social-panel-head button,
.friend-row button:not(.friend-name),
.notification-item button,
.account-panel button,
.auth-actions button,
.profile-stat-button {
  border-color: rgba(197, 207, 220, 0.92);
  border-radius: 8px;
  background: var(--control);
  color: #263142;
  box-shadow: 0 1px 1px rgba(43, 52, 69, 0.04);
  font-weight: 780;
}

.nav-button {
  min-height: 34px;
  min-width: 0;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-button:hover,
.view-button:hover,
.edit-order-button:hover,
.social-tab:hover,
.bell-button:hover,
.back-button:hover,
.entry-actions button:hover,
.result-card button:hover,
.search-panel-head button:hover,
.review-dialog-actions button:hover,
.cancel-verdict-button:hover,
.heart-button:hover,
.comment-form button:hover,
.refresh-button:hover,
.recommendation-card button:hover,
.friend-search-row button:hover,
.social-panel-head button:hover,
.friend-row button:not(.friend-name):hover,
.notification-item button:hover,
.account-panel button:hover,
.auth-actions button:hover,
.profile-stat-button:hover {
  background: var(--control-hover);
  border-color: rgba(168, 183, 202, 0.95);
  transform: translateY(-1px);
}

.nav-button.active,
.view-button.active,
.edit-order-button.primary,
.social-tab.active,
.bell-button.active,
.profile-stat-button.active,
.account-panel button,
.auth-actions button:first-child,
.icon-button,
.result-card button,
.recommendation-card button,
.friend-search-row button,
.social-panel-head button,
.friend-row button:not(.friend-name),
.notification-item button,
.comment-form button,
.review-dialog-actions button:first-child,
.save-review-button {
  border-color: transparent;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 124, 195, 0.24);
}

.nav-button.active:hover,
.view-button.active:hover,
.edit-order-button.primary:hover,
.social-tab.active:hover,
.bell-button.active:hover,
.profile-stat-button.active:hover,
.account-panel button:hover,
.auth-actions button:first-child:hover,
.icon-button:hover,
.result-card button:hover,
.recommendation-card button:hover,
.friend-search-row button:hover,
.social-panel-head button:hover,
.friend-row button:not(.friend-name):hover,
.notification-item button:hover,
.comment-form button:hover,
.review-dialog-actions button:first-child:hover {
  background: linear-gradient(180deg, #5c8ad0, var(--accent-dark));
  box-shadow: 0 10px 22px rgba(79, 124, 195, 0.3);
}

.auth-actions button:last-child,
.cancel-verdict-button,
.review-dialog-actions button:last-child {
  background: #f6f8fb;
  color: #263142;
  box-shadow: 0 1px 1px rgba(43, 52, 69, 0.04);
}

.browse-search-bar,
.browse-panel,
.account-panel,
.social-panel,
.recommendation-card,
.friend-row,
.activity-item,
.notification-item,
.profile-movie,
.profile-head,
.profile-connection-panel,
.movie-card,
.rank-row,
.result-card,
.activity-movie,
.search-panel,
.review-text,
.comment,
.comment-form input,
input[type="text"],
textarea,
.browse-controls select,
.auth-card input {
  border-color: rgba(220, 226, 234, 0.94);
  background-color: rgba(246, 248, 251, 0.94);
}

.account-panel,
.browse-search-bar,
.browse-panel,
.social-panel,
.recommendation-card,
.friend-row,
.activity-item,
.notification-item,
.profile-movie,
.movie-card,
.rank-row,
.result-card,
.choice-card {
  background: #f6f8fb;
}

.browse-search-bar,
.browse-panel,
.social-panel,
.recommendation-card,
.activity-item,
.movie-card,
.rank-row {
  box-shadow: 0 12px 30px rgba(43, 52, 69, 0.07);
}

.search-panel,
.activity-movie,
.profile-head,
.profile-connection-row,
.review-text,
.comment,
.profile-movie > .profile-rank {
  background: #edf2f7;
}

.search-panel,
.profile-connection-panel,
.activity-movie,
.review-readonly,
.review-comments {
  background-color: #f1f4f8;
}

input[type="text"]:focus,
textarea:focus,
.auth-card input:focus,
.browse-controls select:focus,
.friend-search-row input:focus,
.comment-form input:focus {
  border-color: rgba(79, 124, 195, 0.8);
  box-shadow: 0 0 0 4px rgba(79, 124, 195, 0.14);
}

.score,
.rank-score,
.profile-score,
.versus,
.rank-number {
  background: #263142;
  color: #fff;
}

.account-panel p,
.browse-status,
.search-status,
.social-status,
.recommendations-status,
.rank-main p,
.movie-foot,
.friend-row span,
.profile-head span,
.profile-movie > span,
.profile-movie p {
  font-weight: 720;
}

.badge,
.profile-sentiment,
.friend-pill {
  background: #eef4f1;
  color: #2f6f61;
}

.delete-button {
  color: #b54145;
}

.comparison-dialog,
.verdict-dialog,
.review-dialog,
.auth-dialog {
  border-radius: 8px;
  background: #f6f8fb;
  box-shadow: 0 28px 70px rgba(21, 25, 35, 0.2);
}

.comparison-dialog::backdrop,
.verdict-dialog::backdrop,
.review-dialog::backdrop,
.auth-dialog::backdrop {
  background: rgba(21, 25, 35, 0.42);
}

.choice-card {
  border-color: rgba(220, 226, 234, 0.94);
  box-shadow: 0 14px 34px rgba(43, 52, 69, 0.12);
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: rgba(79, 124, 195, 0.9);
  box-shadow: 0 18px 40px rgba(79, 124, 195, 0.18);
}

@media (max-width: 850px) {
  .app-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-controls {
    justify-items: start;
  }

  .app-nav,
  .account-panel,
  .view-toggle {
    justify-content: flex-start;
  }

  .account-panel {
    justify-content: space-between;
  }

  .app-nav {
    flex-wrap: wrap;
    width: 100%;
  }

  .nav-button {
    flex: 1 1 calc(50% - 4px);
    font-size: 0.82rem;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .browse-controls {
    min-width: 0;
  }

  .browse-search-bar .entry-form {
    grid-template-columns: 1fr;
  }

  .browse-search-bar .entry-actions {
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .app-header,
  .workspace {
    padding: 18px;
  }

  .brand-lockup h1 {
    font-size: 2.2rem;
  }

  .app-nav,
  .account-panel {
    width: 100%;
  }

  .nav-button {
    flex: 1 1 calc(50% - 4px);
    padding: 0 8px;
    font-size: 0.8rem;
  }

  .account-panel {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    min-height: 42px;
    padding: 6px 8px;
  }

  .account-panel p {
    min-width: 0;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-panel button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .matchup {
    flex-direction: column;
  }

  .versus {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .choice-card {
    width: 100%;
  }

  .choice-card .poster {
    height: 150px;
  }

  .choice-card .comparison-movie {
    grid-template-rows: 150px auto;
  }

  .choice-card .movie-meta {
    min-height: auto;
  }

  .rank-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .rank-row.editing {
    grid-template-columns: 44px 32px minmax(0, 1fr);
  }

  .rank-row.editing .rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .rank-row .delete-button {
    grid-column: 2 / -1;
    justify-self: start;
    padding-left: 0;
  }

  .rank-number {
    width: 28px;
    height: 28px;
  }

  .friends-home {
    grid-template-columns: 1fr;
  }

  .activity-movie {
    grid-template-columns: 1fr;
  }

  .profile-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-stats {
    margin-left: 0;
  }

  .profile-movie {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .profile-score {
    grid-column: 2;
    justify-self: start;
  }

  .recommendation-card {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
  }

  .recommendation-poster {
    width: 58px;
    height: 86px;
  }

  .recommendation-card button {
    grid-column: 2;
    justify-self: start;
  }

  .activity-main,
  .rating-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-form {
    align-items: stretch;
    flex-direction: column;
  }
}
