/* ============================================================
   PROFILE PAGE
   ============================================================ */

body {
  counter-reset: sec;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  margin: 20px 0 12px;
  font-size: 13px;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* ---------- Profile header ---------- */
.profile-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.45s var(--ease) both;
  transition: border-color var(--t-fast), box-shadow var(--t-med);
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet), transparent 70%);
  opacity: 0.8;
}

.profile-header:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline));
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.7);
}

.profile-header > div:first-child {
  flex: 1;
  min-width: 0;
}

.profile-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-game {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin: 14px 0 10px;
}

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

.profile-meta {
  color: var(--text-dim);
  font-size: 12.5px;
  margin: 4px 0 0;
}

.profile-meta .meta-link {
  color: var(--accent);
  text-decoration: none;
}

.profile-meta .meta-link:hover {
  text-decoration: underline;
}

.profile-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 14px 0 0;
  max-width: 72ch;
  white-space: pre-wrap;
  word-break: break-word;
}

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

/* ---------- Profile actions / votes ---------- */
.profile-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex: none;
}

.profile-actions .vote-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.profile-actions .btn {
  white-space: nowrap;
}

/* ---------- Warnings ---------- */
.macro-warning,
.loop-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border-soft);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
  animation: fadeUp 0.4s var(--ease) both;
}

.macro-warning strong,
.loop-warning strong {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex: none;
  padding-top: 2px;
}

.macro-warning {
  border-left-color: var(--amber);
  background: var(--amber-dim);
}

.macro-warning strong {
  color: var(--amber);
}

.loop-warning {
  border-left-color: var(--danger);
  background: var(--danger-dim);
}

.loop-warning strong {
  color: var(--danger);
}

.macro-warning[hidden],
.loop-warning[hidden] {
  display: none;
}

/* ---------- Group tabs ---------- */
#group-tabs.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#group-tabs .chip {
  font-size: 12.5px;
  padding: 7px 16px;
}

/* ---------- Sub-profile navigation ---------- */
.sub-nav-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.sub-nav-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.sub-nav-desc {
  color: var(--text-faint);
  font-size: 12px;
}

#sub-group-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

#sub-group-tabs .chip.base {
  background: var(--accent-dim);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent-bright);
}

#sub-group-tabs .chip.base.active {
  background: var(--accent);
  color: #070d16;
  border-color: var(--accent);
}

#sub-group-tabs .chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.chip-crumb {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.chip-app {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  margin-left: 4px;
}

.indent {
  color: var(--text-faint);
}

/* ---------- On-load panel ---------- */
.onload-panel {
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--hairline));
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  animation: fadeUp 0.45s var(--ease) both;
}

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

.onload-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.onload-icon {
  font-size: 22px;
  flex: none;
}

.onload-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--amber);
  margin: 0;
}

.onload-desc {
  color: var(--text-faint);
  font-size: 12.5px;
  margin: 2px 0 0;
}

.onload-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.onload-keys .key-badge {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--hairline-strong));
  background: var(--bg-elevated);
  color: var(--text);
}

/* ---------- Section titles / hints ---------- */
.section-title {
  counter-increment: sec;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-title::before {
  content: counter(sec, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 3px 9px;
  flex: none;
}

.section-hint {
  color: var(--text-faint);
  font-size: 13px;
  margin: -6px 0 16px;
  max-width: 68ch;
  line-height: 1.55;
}

.section-hint[hidden] {
  display: none;
}

/* ---------- Device settings (spec grid) ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.spec-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: cardIn 0.4s var(--ease) both;
}

.spec-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan-glow);
  box-shadow: 0 12px 30px -14px var(--cyan-glow);
}

.spec-card .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.spec-card .value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.spec-card.full {
  grid-column: 1 / -1;
}

.spec-card.double {
  grid-column: span 2;
}

/* ---------- Mapping list ---------- */
.mapping-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mapping-list[hidden] {
  display: none;
}

.mapping-row {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 16px;
  align-items: center;
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-med), box-shadow var(--t-med);
  animation: cardIn 0.4s var(--ease) both;
}

.mapping-row:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline));
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.7);
}

.mapping-row .button-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
}

.mapping-row .mapping-main {
  min-width: 0;
}

.mapping-row .action-label {
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

.mapping-row .output-list {
  justify-content: flex-end;
}

/* ---- Force-region gauge (deep-click press depth) ---- */
.region-gauge {
  position: relative;
  height: 8px;
  max-width: 260px;
  background: var(--hairline);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.region-gauge .fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--amber-dim);
  border-left: 2px solid var(--amber);
  border-right: 2px solid var(--amber);
}

.key-badge.loop {
  color: var(--violet);
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.35);
}

.card-grid {
  display: grid;
  gap: 14px;
}

.binding-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-med), box-shadow var(--t-med);
  animation: cardIn 0.45s var(--ease) both;
}

.binding-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--zone-accent, var(--accent)), transparent 70%);
  opacity: 0.6;
}

.binding-card:hover {
  border-color: color-mix(in srgb, var(--zone-accent, var(--accent)) 45%, var(--hairline));
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -16px rgba(0, 0, 0, 0.7);
}

.binding-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.binding-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  word-break: break-word;
}

.binding-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  flex: none;
}

.type-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c4);
  border: 1px solid color-mix(in srgb, var(--c4) 50%, transparent);
  background: color-mix(in srgb, var(--c4) 10%, transparent);
  border-radius: 5px;
  padding: 2px 7px;
  flex: none;
}

.sequence-card .type-badge {
  color: var(--c5);
  border-color: color-mix(in srgb, var(--c5) 50%, transparent);
  background: color-mix(in srgb, var(--c5) 10%, transparent);
}

.tilt-card .type-badge {
  color: var(--c4);
  border-color: color-mix(in srgb, var(--c4) 50%, transparent);
  background: color-mix(in srgb, var(--c4) 10%, transparent);
}

/* ---------- Action rows ---------- */
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--zone, var(--accent));
  border-radius: 8px;
  padding: 8px 12px;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.action-row:hover,
.action-row.active {
  background: var(--panel-raised);
  border-color: color-mix(in srgb, var(--zone, var(--accent)) 45%, var(--hairline));
}

.action-row.single {
  border-left-color: var(--zone, var(--accent));
}

.action-row.void {
  border-left-color: var(--text-faint);
  opacity: 0.65;
}

.action-label {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  min-width: 0;
  word-break: break-word;
  flex: 0 1 auto;
}

.output-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  justify-content: flex-end;
}

.key-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  background: rgba(126, 217, 154, 0.08);
  border: 1px solid rgba(126, 217, 154, 0.3);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ---------- Sequence steps ---------- */
.seq-step {
  margin: 8px 0;
}

.seq-step:first-child {
  margin-top: 0;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--zone, var(--accent)) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--zone, var(--accent)) 40%, transparent);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--zone, var(--accent));
}

.seq-then {
  width: 1px;
  height: 12px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--hairline-strong), transparent);
}

/* ---------- Raw JSON ---------- */
.raw-toggle {
  display: block;
  margin: 28px auto 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.raw-toggle:hover {
  color: var(--text);
  border-color: var(--hairline-strong);
  background: var(--bg-elevated);
}

.raw-json {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 14px 0 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
  max-height: 480px;
  overflow-y: auto;
}

/* ---------- Comments ---------- */
.comments-section {
  margin-top: 36px;
}

.comments-section[hidden] {
  display: none;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.comment-empty {
  color: var(--text-faint);
  font-size: 13.5px;
  padding: 8px 0;
  margin: 0;
}

.comment-item {
  display: flex;
  gap: 12px;
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  animation: fadeUp 0.4s var(--ease) both;
  transition: border-color var(--t-fast);
}

.comment-item:hover {
  border-color: var(--hairline-strong);
}

.comment-item.patch {
  border-color: color-mix(in srgb, var(--c3) 40%, var(--hairline));
  background: color-mix(in srgb, var(--c3) 5%, var(--panel));
}

.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--hairline-strong);
}

.comment-avatar.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.comment-main {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.comment-user {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.comment-user a {
  text-decoration: none;
  color: inherit;
}

.comment-user a:hover {
  color: var(--accent-bright);
}

.comment-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c3);
  border: 1px solid color-mix(in srgb, var(--c3) 45%, transparent);
  background: color-mix(in srgb, var(--c3) 10%, transparent);
  border-radius: 5px;
  padding: 2px 7px;
}

.comment-date {
  color: var(--text-faint);
  font-size: 11.5px;
  margin-left: auto;
  white-space: nowrap;
}

.comment-rep,
.comment-del {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.comment-rep:hover {
  color: var(--c2);
  border-color: color-mix(in srgb, var(--c2) 50%, transparent);
  background: color-mix(in srgb, var(--c2) 10%, transparent);
}

.comment-del:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 50%, transparent);
  background: var(--danger-dim);
}

.comment-body {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-body p {
  margin: 0 0 8px;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comment-body a {
  color: var(--accent-bright);
}

.comment-body blockquote {
  border-left: 2px solid var(--hairline-strong);
  margin: 6px 0;
  padding-left: 12px;
  color: var(--text-faint);
}

.comment-body pre {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 12.5px;
  margin: 8px 0;
}

.comment-body code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
}

.comment-body pre code {
  background: none;
  border: none;
  padding: 0;
}

.comment-body ul,
.comment-body ol {
  margin: 6px 0;
  padding-left: 22px;
}

.comment-body li.task {
  list-style: none;
}

.comment-body hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 12px 0;
}

/* ---------- Comment form ---------- */
.comment-form {
  background: linear-gradient(160deg, var(--panel), var(--panel-raised));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
}

.comment-form[hidden] {
  display: none;
}

.comment-form .field {
  margin-bottom: 0;
}

.comment-form textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 76px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.comment-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-tool {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.comment-tool:hover {
  color: var(--text);
  border-color: var(--hairline-strong);
}

.comment-tool.active {
  color: var(--accent-bright);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.kind-select {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.kind-select[hidden] {
  display: none;
}

.kind-opt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}

.kind-opt:hover {
  color: var(--text);
}

.kind-opt.active {
  color: var(--c3);
  background: color-mix(in srgb, var(--c3) 14%, transparent);
}

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.emoji-popover {
  position: absolute;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(8, 34px);
  gap: 2px;
  background: var(--panel-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: var(--glow-lg);
  animation: modalIn 0.2s var(--ease) both;
}

.emoji-popover[hidden] {
  display: none;
}

.emoji-btn {
  width: 32px;
  height: 32px;
  font-size: 17px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--t-fast);
}

.emoji-btn:hover {
  background: var(--accent-dim);
}

/* ---------- Comment login prompt ---------- */
.comment-login {
  color: var(--text-faint);
  font-size: 13.5px;
  padding: 12px 0;
  margin: 0;
}

.comment-login a {
  color: var(--accent-bright);
}

.comment-login[hidden] {
  display: none;
}

/* ---------- Markdown help modal ---------- */
.md-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.md-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.md-card h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 8px;
}

.md-src {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c2);
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.md-preview {
  border-left: 2px solid var(--hairline-strong);
  padding-left: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .profile-header {
    flex-direction: column;
  }

  .profile-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
  }

  .profile-header h1 {
    font-size: 24px;
  }

  .mapping-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .spec-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .action-row {
    flex-wrap: wrap;
  }

  .output-list {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .comment-date {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .emoji-popover {
    grid-template-columns: repeat(6, 34px);
  }
}
