/*
 * みんなの見えない苦労
 * 既存 style.css の後に読み込み、.mk-page 内だけへ適用する。
 */

:root {
  --mk-beige: #f4ead7;
  --mk-beige-light: #fffaf0;
  --mk-paper: #fffdf7;
  --mk-brown: #5b342d;
  --mk-purple: #713a58;
  --mk-purple-dark: #52253d;
  --mk-yellow: #e6b84a;
  --mk-yellow-light: #fff1a8;
  --mk-green: #5f7e59;
  --mk-text: #342822;
  --mk-muted: #6d5f56;
  --mk-border: rgba(91, 52, 45, 0.2);
  --mk-shadow: 0 13px 30px rgba(67, 45, 34, 0.14);
  --mk-focus: #166b70;
}

html,
body {
  overflow-x: clip;
}

body#omoi_haikei main.mk-page {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 0 calc(80px + env(safe-area-inset-bottom));
  color: var(--mk-text);
}

body#omoi_haikei main.mk-page *,
body#omoi_haikei main.mk-page *::before,
body#omoi_haikei main.mk-page *::after {
  box-sizing: border-box;
}

body#omoi_haikei main.mk-page section,
body#omoi_haikei main.mk-page article,
body#omoi_haikei main.mk-page aside,
body#omoi_haikei main.mk-page nav,
body#omoi_haikei main.mk-page form,
body#omoi_haikei main.mk-page details {
  min-width: 0;
}

body#omoi_haikei main.mk-page h1,
body#omoi_haikei main.mk-page h2,
body#omoi_haikei main.mk-page h3,
body#omoi_haikei main.mk-page p,
body#omoi_haikei main.mk-page li,
body#omoi_haikei main.mk-page dt,
body#omoi_haikei main.mk-page dd,
body#omoi_haikei main.mk-page label,
body#omoi_haikei main.mk-page summary,
body#omoi_haikei main.mk-page button,
body#omoi_haikei main.mk-page a {
  overflow-wrap: anywhere;
  word-break: normal;
}

body#omoi_haikei main.mk-page h1,
body#omoi_haikei main.mk-page h2,
body#omoi_haikei main.mk-page h3 {
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--mk-purple-dark);
  line-height: 1.45;
  text-align: left;
}

body#omoi_haikei main.mk-page p {
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--mk-text) !important;
  font-size: 1rem !important;
  line-height: 1.9;
  text-align: left;
}

body#omoi_haikei main.mk-page a {
  color: var(--mk-purple) !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

body#omoi_haikei main.mk-page button,
body#omoi_haikei main.mk-page input,
body#omoi_haikei main.mk-page select,
body#omoi_haikei main.mk-page textarea {
  font: inherit;
}

body#omoi_haikei main.mk-page button {
  border: 0;
}

body#omoi_haikei main.mk-page :focus-visible {
  outline: 3px solid var(--mk-focus);
  outline-offset: 4px;
}

.mk-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.mk-section-label,
body#omoi_haikei main.mk-page .mk-section-label,
body#omoi_haikei main.mk-page .mk-eyebrow {
  margin-bottom: 9px;
  color: var(--mk-purple) !important;
  font-size: 0.86rem !important;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Hero */
.mk-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--mk-border);
  background:
    radial-gradient(circle at 10% 20%, rgba(230, 184, 74, 0.3), transparent 31%),
    radial-gradient(circle at 92% 7%, rgba(95, 126, 89, 0.17), transparent 27%),
    linear-gradient(155deg, #fffaf0 0%, #f4ead7 68%, #eadbc2 100%);
}

.mk-hero::before,
.mk-hero::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(113, 58, 88, 0.1);
  border-radius: 45% 55% 58% 42%;
  pointer-events: none;
}

.mk-hero::before {
  top: 22px;
  right: -70px;
  width: 240px;
  height: 190px;
  transform: rotate(12deg);
}

.mk-hero::after {
  bottom: -80px;
  left: -50px;
  width: 190px;
  height: 160px;
  transform: rotate(-16deg);
}

.mk-hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(52px, 9vw, 104px) 0 clamp(44px, 7vw, 82px);
}

body#omoi_haikei main.mk-page .mk-hero h1 {
  max-width: 950px;
  color: var(--mk-purple-dark);
  font-size: clamp(2rem, 5.5vw, 4.25rem);
  font-weight: 850;
  line-height: 1.35;
}

body#omoi_haikei main.mk-page .mk-hero-lead {
  max-width: 790px;
  margin-top: 24px;
  font-size: clamp(1rem, 2vw, 1.2rem) !important;
}

.mk-hero-points {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.mk-hero-points li {
  position: relative;
  padding-left: 29px;
  color: var(--mk-brown);
  font-size: 0.98rem;
  line-height: 1.7;
}

.mk-hero-points li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 2px;
  width: 13px;
  height: 9px;
  border-radius: 58% 42% 54% 46%;
  background: var(--mk-purple);
  box-shadow:
    inset 2px 1px 0 rgba(255, 255, 255, 0.2),
    0 1px 0 rgba(91, 52, 45, 0.12);
  transform: translateY(-50%) rotate(-16deg);
}

.mk-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

body#omoi_haikei main.mk-page .mk-primary-link,
body#omoi_haikei main.mk-page .mk-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--mk-purple);
  border-radius: 999px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

body#omoi_haikei main.mk-page .mk-primary-link {
  color: #fff !important;
  background: var(--mk-purple) !important;
}

body#omoi_haikei main.mk-page .mk-secondary-link {
  color: var(--mk-purple) !important;
  background: rgba(255, 255, 255, 0.86) !important;
}

/* Board */
.mk-board-section {
  scroll-margin-top: 120px;
  padding: clamp(48px, 8vw, 88px) 0;
  background:
    linear-gradient(rgba(91, 52, 45, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 52, 45, 0.035) 1px, transparent 1px),
    var(--mk-beige);
  background-size: 25px 25px;
}

.mk-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
}

.mk-section-heading > div:first-child {
  max-width: 760px;
}

body#omoi_haikei main.mk-page .mk-section-heading h2,
body#omoi_haikei main.mk-page .mk-about-section h2 {
  color: var(--mk-purple-dark);
  font-size: clamp(1.65rem, 3.8vw, 2.55rem);
  font-weight: 850;
}

body#omoi_haikei main.mk-page .mk-section-heading h2 + p {
  margin-top: 14px;
}

.mk-sort-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--mk-border);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.86);
}

body#omoi_haikei main.mk-page .mk-sort-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: var(--mk-purple) !important;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

body#omoi_haikei main.mk-page .mk-sort-tabs a.is-current {
  color: #fff !important;
  background: var(--mk-purple) !important;
}

.mk-filter-panel {
  margin-top: 24px;
  border: 1px solid var(--mk-border);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.93);
}

.mk-filter-panel > summary {
  position: relative;
  padding: 17px 52px 17px 20px;
  color: var(--mk-purple-dark);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  list-style: none;
}

.mk-filter-panel > summary::-webkit-details-marker {
  display: none;
}

.mk-filter-panel > summary::after {
  content: "＋";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--mk-purple);
  font-size: 1.35rem;
}

.mk-filter-panel[open] > summary::after {
  content: "−";
}

.mk-filter-active {
  display: inline-flex;
  margin-left: 8px;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  background: var(--mk-green);
  font-size: 0.74rem;
  vertical-align: middle;
}

.mk-filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0 20px 20px;
}

.mk-filter-form label,
.mk-post-form label {
  display: grid;
  gap: 7px;
}

.mk-filter-form label > span,
.mk-post-form label > span {
  color: var(--mk-brown);
  font-size: 0.9rem;
  font-weight: 800;
}

.mk-filter-form select,
.mk-post-form select,
.mk-post-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(91, 52, 45, 0.35);
  border-radius: 11px;
  color: var(--mk-text);
  background: #fff;
}

.mk-filter-form select,
.mk-post-form select {
  min-height: 46px;
  padding: 0.65rem 0.75rem;
}

.mk-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

body#omoi_haikei main.mk-page .mk-filter-actions button {
  min-height: 46px;
  padding: 0.65rem 1.05rem;
  border-radius: 10px;
  color: #fff;
  background: var(--mk-purple);
  cursor: pointer;
  font-weight: 800;
}

body#omoi_haikei main.mk-page .mk-filter-actions a {
  font-weight: 700;
}

.mk-message {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 13px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.mk-message-success {
  border: 1px solid rgba(95, 126, 89, 0.45);
  color: #31522e;
  background: #eef7e9;
}

.mk-message-notice {
  border: 1px solid rgba(230, 184, 74, 0.65);
  color: #674e12;
  background: #fff8d8;
}

.mk-message-error {
  border: 1px solid rgba(153, 49, 66, 0.4);
  color: #772234;
  background: #fff0f2;
}

.mk-message ul {
  margin: 9px 0 0;
  padding-left: 1.3rem;
}

body#omoi_haikei main.mk-page .mk-message p {
  margin-top: 9px;
  font-size: 0.9rem !important;
}

body#omoi_haikei main.mk-page .mk-result-count {
  margin-top: 22px;
  color: var(--mk-muted) !important;
  font-size: 0.9rem !important;
}

.mk-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 25px;
  margin-top: 26px;
}

.mk-note {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 30px 23px 20px;
  border: 1px solid rgba(91, 52, 45, 0.17);
  border-radius: 5px 9px 6px 10px;
  box-shadow: var(--mk-shadow);
  transform: rotate(var(--mk-note-rotation));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mk-note::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, transparent 50%, rgba(91, 52, 45, 0.12) 51%);
}

.mk-note:hover {
  z-index: 1;
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 16px 35px rgba(67, 45, 34, 0.18);
}

.mk-note-color-1 { background: #fff3a9; }
.mk-note-color-2 { background: #f2dfbd; }
.mk-note-color-3 { background: #ead7e2; }
.mk-note-color-4 { background: #dce7cd; }
.mk-note-color-5 { background: #f4d4c5; }

.mk-note-pin {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(91, 52, 45, 0.38);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.64);
  transform: translateX(-50%);
}

body#omoi_haikei main.mk-page .mk-note-body {
  flex: 1;
  color: #2f261f !important;
  font-size: clamp(1.08rem, 2vw, 1.3rem) !important;
  font-weight: 650;
  line-height: 1.85;
}

.mk-note-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 0;
}

.mk-note-attributes div {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(91, 52, 45, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.mk-note-attributes dt,
.mk-note-attributes dd {
  margin: 0;
  color: var(--mk-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.mk-note-attributes dt::after {
  content: ":";
}

.mk-note-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px dashed rgba(91, 52, 45, 0.24);
  color: var(--mk-muted);
  font-size: 0.72rem;
}

.mk-note-reach {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}

.mk-reaction-form {
  margin: 0;
}

body#omoi_haikei main.mk-page .mk-empathy-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(113, 58, 88, 0.35);
  border-radius: 999px;
  color: var(--mk-purple);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font-weight: 800;
}

body#omoi_haikei main.mk-page .mk-empathy-button.is-done {
  color: #355b31;
  border-color: rgba(95, 126, 89, 0.5);
  background: rgba(238, 247, 233, 0.85);
}

body#omoi_haikei main.mk-page .mk-empathy-status {
  color: var(--mk-muted) !important;
  font-size: 0.75rem !important;
  line-height: 1.4;
  text-align: right;
}

.mk-note-tools {
  margin-top: 10px;
}

.mk-note-tools > summary,
.mk-report-box > summary {
  color: var(--mk-muted);
  cursor: pointer;
  font-size: 0.76rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mk-share-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

body#omoi_haikei main.mk-page .mk-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(91, 52, 45, 0.24);
  border-radius: 8px;
  color: var(--mk-brown) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.mk-report-box {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid rgba(91, 52, 45, 0.16);
}

.mk-report-form {
  margin-top: 10px;
  padding: 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
}

.mk-report-form fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mk-report-form legend {
  margin-bottom: 7px;
  color: var(--mk-brown);
  font-size: 0.82rem;
  font-weight: 800;
}

.mk-report-form label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--mk-text);
  font-size: 0.78rem;
  line-height: 1.45;
}

.mk-report-form input {
  flex: 0 0 auto;
  margin-top: 2px;
}

body#omoi_haikei main.mk-page .mk-report-submit {
  min-height: 40px;
  margin-top: 12px;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: #fff;
  background: var(--mk-brown);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

body#omoi_haikei main.mk-page .mk-report-result {
  margin-top: 8px;
  color: var(--mk-muted) !important;
  font-size: 0.76rem !important;
}

.mk-note.is-target-note {
  border: 4px solid var(--mk-purple);
  box-shadow: 0 0 0 6px rgba(230, 184, 74, 0.55), var(--mk-shadow);
  animation: mk-target-highlight 1.3s ease 2;
}

@keyframes mk-target-highlight {
  50% { transform: rotate(0deg) scale(1.015); }
}

/* Voice bridge */
.mk-voice-bridge {
  grid-column: 1 / -1;
  padding: clamp(25px, 5vw, 43px);
  border: 2px solid rgba(113, 58, 88, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.97), rgba(234, 215, 226, 0.93));
  box-shadow: var(--mk-shadow);
}

body#omoi_haikei main.mk-page .mk-voice-bridge h3 {
  color: var(--mk-purple-dark);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 850;
}

body#omoi_haikei main.mk-page .mk-voice-bridge h3 + p {
  max-width: 850px;
  margin-top: 13px;
}

.mk-bridge-links,
.mk-about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 21px;
}

body#omoi_haikei main.mk-page .mk-bridge-links a,
body#omoi_haikei main.mk-page .mk-about-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--mk-purple);
  border-radius: 999px;
  color: var(--mk-purple) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.mk-empty-state {
  margin-top: 28px;
  padding: 40px 24px;
  border: 2px dashed rgba(113, 58, 88, 0.3);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.82);
  text-align: center;
}

body#omoi_haikei main.mk-page .mk-empty-state h3,
body#omoi_haikei main.mk-page .mk-empty-state p {
  text-align: center;
}

body#omoi_haikei main.mk-page .mk-empty-state p {
  margin-top: 10px;
}

body#omoi_haikei main.mk-page .mk-empty-state a {
  display: inline-flex;
  margin-top: 18px;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  color: #fff !important;
  background: var(--mk-purple) !important;
  font-weight: 800;
  text-decoration: none;
}

/* Pagination */
.mk-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.mk-page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

body#omoi_haikei main.mk-page .mk-pagination a,
.mk-page-numbers > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--mk-purple);
  border-radius: 999px;
  color: var(--mk-purple) !important;
  background: var(--mk-paper) !important;
  font-weight: 800;
  text-decoration: none;
}

.mk-page-numbers > span.is-current {
  color: #fff !important;
  background: var(--mk-purple) !important;
}

/* About */
.mk-about-section {
  padding: clamp(55px, 8vw, 90px) 0;
  background: var(--mk-beige-light);
}

body#omoi_haikei main.mk-page .mk-about-section h2 + p {
  max-width: 860px;
  margin-top: 15px;
}

/* Posting panel: no JS = inline */
.mk-panel-shell {
  width: min(920px, calc(100% - 32px));
  margin: 55px auto 0;
}

.mk-panel-backdrop,
.mk-panel-close {
  display: none;
}

.mk-post-panel {
  scroll-margin-top: 100px;
  padding: clamp(23px, 5vw, 39px);
  border: 1px solid var(--mk-border);
  border-radius: 22px;
  background: var(--mk-paper);
  box-shadow: var(--mk-shadow);
}

.mk-post-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

body#omoi_haikei main.mk-page .mk-post-panel h2 {
  color: var(--mk-purple-dark);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 850;
}

body#omoi_haikei main.mk-page .mk-post-intro {
  margin-top: 14px;
}

.mk-post-form {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.mk-main-field > span strong {
  display: inline-flex;
  margin-left: 5px;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  color: #fff;
  background: var(--mk-purple);
  font-size: 0.7rem;
  vertical-align: middle;
}

.mk-post-form textarea {
  min-height: 155px;
  padding: 0.8rem;
  line-height: 1.75;
  resize: vertical;
}

.mk-post-form textarea:focus,
.mk-post-form select:focus,
.mk-filter-form select:focus {
  border-color: var(--mk-focus);
  outline: 3px solid rgba(22, 107, 112, 0.17);
}

.mk-post-form small {
  color: var(--mk-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.mk-character-count {
  float: right;
  font-weight: 800;
}

.mk-optional-fields {
  border: 1px solid var(--mk-border);
  border-radius: 15px;
  background: #faf5e9;
}

.mk-optional-fields > summary {
  position: relative;
  padding: 16px 50px 16px 18px;
  color: var(--mk-purple-dark);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.mk-optional-fields > summary::-webkit-details-marker {
  display: none;
}

.mk-optional-fields > summary::after {
  content: "＋";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
}

.mk-optional-fields[open] > summary::after {
  content: "−";
}

body#omoi_haikei main.mk-page .mk-optional-fields > p {
  padding: 0 18px;
  color: var(--mk-muted) !important;
  font-size: 0.88rem !important;
}

.mk-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

body#omoi_haikei main.mk-page .mk-third-party-warning {
  margin: 0 18px 18px;
  padding: 12px 13px;
  border-left: 4px solid var(--mk-yellow);
  color: var(--mk-brown) !important;
  background: #fff9df;
  font-size: 0.84rem !important;
}

.mk-submit-area {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 15px;
  background: #f2e7ec;
}

body#omoi_haikei main.mk-page .mk-submit-area p {
  color: var(--mk-brown) !important;
  font-size: 0.88rem !important;
}

body#omoi_haikei main.mk-page .mk-submit-area button {
  min-height: 52px;
  border-radius: 11px;
  color: #fff;
  background: var(--mk-purple);
  cursor: pointer;
  font-weight: 850;
}

.mk-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* JS enhancement modal / bottom sheet */
.js .mk-panel-shell {
  position: fixed;
  z-index: 10000;
  inset: 0;
  width: auto;
  margin: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.js .mk-panel-shell.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.js .mk-panel-backdrop {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(42, 28, 25, 0.58);
  cursor: pointer;
}

.js .mk-post-panel {
  position: absolute;
  top: 4vh;
  right: max(18px, calc((100vw - 900px) / 2));
  bottom: 4vh;
  left: max(18px, calc((100vw - 900px) / 2));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.js .mk-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--mk-purple-dark);
  background: #f3e5ea;
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
}

body.mk-panel-open {
  overflow: hidden;
}

/* Fixed writing button */
body#omoi_haikei main.mk-page .mk-fixed-write {
  position: fixed;
  z-index: 9000;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0.75rem 1.1rem;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff !important;
  background: var(--mk-purple) !important;
  box-shadow: 0 9px 28px rgba(55, 31, 43, 0.34);
  font-weight: 850;
  text-decoration: none;
}

.mk-fixed-write > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--mk-purple);
  background: var(--mk-yellow-light);
  font-size: 1.15rem;
}

.mk-toast {
  position: fixed;
  z-index: 11000;
  right: 18px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  max-width: min(360px, calc(100% - 36px));
  padding: 13px 16px;
  border-radius: 11px;
  color: #fff;
  background: var(--mk-brown);
  box-shadow: var(--mk-shadow);
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 960px) {
  .mk-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mk-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body#omoi_haikei main.mk-page {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .mk-inner {
    width: min(100% - 24px, 1180px);
  }

  body#omoi_haikei main.mk-page .mk-hero h1 br {
    display: none;
  }

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

  .mk-sort-tabs {
    align-self: flex-start;
  }

  .mk-note-grid,
  .mk-filter-form,
  .mk-form-grid {
    grid-template-columns: 1fr;
  }

  .mk-note {
    min-height: 0;
    transform: none;
  }

  .mk-note:hover {
    transform: translateY(-2px);
  }

  .mk-hero-actions,
  .mk-bridge-links,
  .mk-about-links {
    flex-direction: column;
  }

  body#omoi_haikei main.mk-page .mk-primary-link,
  body#omoi_haikei main.mk-page .mk-secondary-link,
  body#omoi_haikei main.mk-page .mk-bridge-links a,
  body#omoi_haikei main.mk-page .mk-about-links a {
    width: 100%;
  }

  .mk-pagination {
    flex-direction: column;
  }

  .mk-page-numbers {
    order: -1;
    width: 100%;
  }

  .js .mk-post-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: min(92vh, 900px);
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    transform: translateY(30px);
    transition: transform 0.18s ease;
  }

  .js .mk-panel-shell.is-open .mk-post-panel {
    transform: translateY(0);
  }

  body#omoi_haikei main.mk-page .mk-fixed-write {
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    min-height: 58px;
  }

  .mk-toast {
    right: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mk-note,
  .js .mk-panel-shell,
  .js .mk-post-panel {
    transition: none !important;
  }

  .mk-note.is-target-note {
    animation: none !important;
  }
}

body#omoi_haikei main.mk-page .mk-fixed-write.is-footer-overlap {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

/* =========================================================
 * UX修正：固定投稿ボタンと送信ボタンの誤操作防止
 * ======================================================= */

/*
 * 投稿フォームが開いている間は、固定「付箋を書く」を完全に隠す。
 * 狭い画面で「この内容で付箋を加える」と重なるのを防ぐ。
 */
body.mk-panel-open
main.mk-page
.mk-fixed-write,
.js
.mk-panel-shell.is-open
~ .mk-fixed-write {
  display: none !important;
}

/*
 * エラー表示へフォーカスした時、現在位置が分かるようにする。
 */
body#omoi_haikei
main.mk-page
[data-form-error]:focus {
  outline: 3px solid var(--mk-focus);
  outline-offset: 4px;
}

/* =========================================================
 * UX修正：「わかる」が届いたことを明確に表示
 * ======================================================= */

body#omoi_haikei
main.mk-page
.mk-empathy-status {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

body#omoi_haikei
main.mk-page
.mk-empathy-status strong {
  color: var(--mk-purple-dark);
  font-size: 1rem;
}

body#omoi_haikei
main.mk-page
.mk-reaction-result {
  margin: 9px 0 0 !important;
  padding: 9px 11px;
  border-left: 4px solid var(--mk-green);
  border-radius: 7px;
  color: #355b31 !important;
  background: rgba(238, 247, 233, 0.88);
  font-size: 0.82rem !important;
  font-weight: 700;
  line-height: 1.55;
}

body#omoi_haikei
main.mk-page
.mk-reaction-result[hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  .mk-note-reach {
    align-items: stretch;
    flex-direction: column;
  }

  body#omoi_haikei
  main.mk-page
  .mk-empathy-button {
    justify-content: center;
    width: 100%;
  }

  body#omoi_haikei
  main.mk-page
  .mk-empathy-status {
    justify-content: flex-start;
    text-align: left;
  }

  /*
   * 送信欄の下に十分な余白を残し、
   * スマートフォンのブラウザUIにも隠れにくくする。
   */
  .mk-submit-area {
    margin-bottom: calc(18px + env(safe-area-inset-bottom));
  }
}
/* =========================================================
 * 投稿フォーム表示中の固定ボタンを確実に非表示
 * ======================================================= */

body.mk-panel-open .mk-fixed-write,
body.mk-panel-open .gotop,
html.js body:has(.mk-panel-shell.is-open) .mk-fixed-write,
html.js body:has(.mk-panel-shell.is-open) .gotop {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 620px) {
  .js .mk-post-panel {
    padding-bottom:
      calc(54px + env(safe-area-inset-bottom)) !important;
  }

  .mk-submit-area {
    position: relative;
    z-index: 2;
    margin-bottom:
      calc(34px + env(safe-area-inset-bottom)) !important;
  }
}
/* =========================================================
 * V6：投稿フォームを常時ページ内表示
 * ======================================================= */

/*
 * 旧モーダル用クラスが残っていても、
 * 投稿フォームを通常の文書フローへ固定する。
 */
html.js .mk-panel-shell,
html.mk-enhanced .mk-panel-shell,
.mk-panel-shell {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: min(920px, calc(100% - 32px)) !important;
  margin: 55px auto 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

html.js .mk-post-panel,
html.mk-enhanced .mk-post-panel,
.mk-post-panel {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
}

.mk-panel-backdrop,
.mk-panel-close {
  display: none !important;
}

body.mk-panel-open {
  overflow: auto !important;
}

/*
 * 投稿フォームが画面内にある時だけ、
 * 固定「付箋を書く」を隠す。
 */
body#omoi_haikei
main.mk-page
.mk-fixed-write.is-form-overlap,
body#omoi_haikei
main.mk-page
.mk-fixed-write.is-footer-overlap {
  visibility: hidden !important;
  opacity: 0 !important;
  transform: translateY(18px);
  pointer-events: none !important;
}

/*
 * 送信ボタンは固定せず、フォーム内の通常位置に置く。
 */
body#omoi_haikei
main.mk-page
.mk-submit-area,
body#omoi_haikei
main.mk-page
.mk-submit-area button[type="submit"] {
  position: static !important;
}

body#omoi_haikei
main.mk-page
.mk-submit-area button[type="submit"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-height: 56px;
}

/*
 * 狭い画面でもフォーム下端と送信ボタンへ余白を確保する。
 */
@media (max-width: 720px) {
  .mk-panel-shell {
    width: min(100% - 20px, 920px) !important;
    margin-top: 34px !important;
  }

  .mk-post-panel {
    padding-bottom:
      calc(34px + env(safe-area-inset-bottom)) !important;
  }

  .mk-submit-area {
    margin-bottom:
      calc(22px + env(safe-area-inset-bottom)) !important;
  }
}
/* =========================================================
 * V8：固定ボタン復旧と入力欄の上寄せ
 * ======================================================= */

/*
 * 固定「付箋を書く」は通常時に表示。
 * 隠すのはジャンプ直後・入力欄表示中・送信欄表示中・フッター重複時だけ。
 */
body#omoi_haikei
main.mk-page
.mk-fixed-write.is-jump-hidden,
body#omoi_haikei
main.mk-page
.mk-fixed-write.is-control-overlap,
body#omoi_haikei
main.mk-page
.mk-fixed-write.is-footer-overlap {
  visibility: hidden !important;
  opacity: 0 !important;
  transform: translateY(18px);
  pointer-events: none !important;
}

/*
 * 「上に戻る」は下スクロール中またはフォーム操作部と重なる時だけ隠す。
 */
body#omoi_haikei
.gotop.mk-scroll-hidden,
body#omoi_haikei
.gotop.mk-form-overlap {
  visibility: hidden !important;
  opacity: 0 !important;
  transform: translateY(12px);
  pointer-events: none !important;
}

/*
 * 入力欄は上寄せで止める。
 * scrollIntoView(center)は使わない。
 */
#mk-post-body,
#mk-post-errors {
  scroll-margin-top: 104px !important;
  scroll-margin-bottom: 35vh;
}

/*
 * 実際の送信ボタンは通常の文書フロー内。
 */
body#omoi_haikei
main.mk-page
.mk-submit-area,
body#omoi_haikei
main.mk-page
.mk-submit-area button[type="submit"] {
  position: static !important;
}

body#omoi_haikei
main.mk-page
.mk-submit-area button[type="submit"] {
  display: flex !important;
  width: 100% !important;
  min-height: 60px;
}

/*
 * モバイルブラウザの下部UIを避ける。
 */
@media (max-width: 720px) {
  body#omoi_haikei
  main.mk-page
  .mk-post-form {
    padding-bottom:
      calc(76px + env(safe-area-inset-bottom)) !important;
  }

  body#omoi_haikei
  main.mk-page
  .mk-submit-area {
    margin-bottom:
      calc(36px + env(safe-area-inset-bottom)) !important;
    padding-bottom:
      calc(28px + env(safe-area-inset-bottom)) !important;
  }
}
/* =========================================================
 * V9：「付箋を書く」クリック後の表示位置
 * ======================================================= */

:root {
  /*
   * PC：投稿カードの上端位置
   * 添付画像に合わせて、画面上から約72px。
   */
  --mk-form-jump-top-pc: 72px;

  /*
   * SP：本文入力欄の上端位置
   * 添付画像に合わせて、画面上から約56px。
   */
  --mk-form-jump-top-sp: 56px;
}

/*
 * ブラウザ標準のアンカージャンプが発生した場合も、
 * おおむね同じ位置へ収まるよう補助する。
 */
@media (min-width: 721px) {
  .mk-panel-shell {
    scroll-margin-top:
      var(--mk-form-jump-top-pc) !important;
  }
}

@media (max-width: 720px) {
  #mk-post-body,
  #mk-post-errors {
    scroll-margin-top:
      var(--mk-form-jump-top-sp) !important;
  }
}
/* =========================================================
 * V10：ページ末尾フォームの位置指定を有効にする余白
 * ======================================================= */

/*
 * JavaScriptが、指定位置へ到達するために不足する高さだけ
 * --mk-active-scroll-runwayへ設定する。
 *
 * 通常時は0pxなので、ページ下部に不要な空白は発生しない。
 */
body#omoi_haikei
main.mk-page {
  padding-bottom:
    var(--mk-active-scroll-runway, 0px) !important;
}

/*
 * V9の値はブラウザ標準アンカー用の補助として残すが、
 * 「付箋を書く」の実際の移動位置はV10のJavaScriptが決める。
 */
