* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Yu Gothic UI",
    Meiryo,
    sans-serif;
  color: #222;
  background: #f4f6f8;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #dfe4ea;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 22px;
  font-weight: 800;
  color: #e85d04;
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: #555;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.hero {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid #f1d5b7;
  border-radius: 18px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 32px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.hero-label {
  color: #e85d04;
  font-weight: 700;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: 34px;
  line-height: 1.35;
  margin: 0 0 16px;
}

.hero p {
  line-height: 1.8;
}

.search-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.search-box label {
  font-size: 13px;
  font-weight: 700;
  color: #555;
}

.search-box input {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #cfd7df;
  border-radius: 8px;
  font-size: 15px;
  background: #f9fafb;
}

.search-box button {
  border: none;
  border-radius: 8px;
  padding: 13px;
  background: #e85d04;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.content-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.side-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  height: fit-content;
}

.side-panel h2 {
  font-size: 18px;
  margin: 0 0 18px;
}

.filter-group {
  border-top: 1px solid #edf0f3;
  padding-top: 16px;
  margin-top: 16px;
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.filter-title {
  font-weight: 700;
  margin: 0;
}

.job-list-area {
  display: grid;
  gap: 20px;
}

.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.result-head h2 {
  margin: 0;
  font-size: 22px;
}

.result-head p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.job-card {
  background: #ffffff;
  border: 1px solid #e3e7eb;
  border-radius: 16px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 24px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.job-tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1e6;
  color: #c2410c;
  font-size: 13px;
  font-weight: 700;
}

.job-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.company {
  margin: 0 0 16px;
  color: #555;
  font-weight: 700;
}

.job-summary {
  line-height: 1.8;
  color: #444;
}

.job-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 0;
}

.job-info div {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
}

.job-info dt {
  font-size: 12px;
  color: #777;
}

.job-info dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.job-card-side {
  display: none;
}

.detail-button,
.apply-button,
.submit-button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  background: #e85d04;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.detail-button:hover,
.apply-button:hover,
.submit-button:hover {
  filter: brightness(0.96);
}

.job-detail {
  display: none;
  background: #ffffff;
  border: 1px solid #e3e7eb;
  border-radius: 16px;
  padding: 28px;
}

.job-detail.is-open {
  display: block;
}

.detail-head {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.detail-label {
  color: #e85d04;
  font-weight: 800;
  margin: 0 0 8px;
}

.detail-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.detail-head p {
  margin: 0;
  color: #555;
}

.detail-block {
  margin-top: 24px;
  line-height: 1.9;
}

.detail-block h3 {
  font-size: 18px;
  border-left: 5px solid #e85d04;
  padding-left: 10px;
}

.detail-block ul {
  padding-left: 1.4em;
}

.warning-block {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 18px;
}

.apply-area {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.apply-note {
  color: #555;
  line-height: 1.8;
}

.modal {
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 50;
}

.modal-panel {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  width: min(92vw, 440px);
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  color: #777;
}

.modal-label {
  color: #e85d04;
  font-weight: 800;
  margin: 0 0 8px;
}

.modal-panel h2 {
  margin: 0 0 12px;
}

.modal-text {
  color: #555;
  line-height: 1.8;
}

.name-label {
  display: block;
  margin-top: 18px;
  font-weight: 700;
}

.name-label input {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  border: 1px solid #cfd7df;
  border-radius: 10px;
  font-size: 16px;
}

.error-message {
  min-height: 1.4em;
  color: #c1121f;
  font-size: 14px;
  margin: 8px 0 12px;
}

@media (max-width: 760px) {
  .header-inner {
  padding: 12px 14px;
  display: block;
}

.site-logo {
  display: block;
  margin-bottom: 8px;
}

.header-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

  .page {
    padding: 20px 14px 56px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    display: none;
  }

  .result-head {
    display: block;
  }

  .result-head p {
    margin-top: 6px;
  }

  .job-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .job-info {
    grid-template-columns: 1fr;
  }

  .job-detail {
    padding: 22px;
  }

  .detail-head h2 {
    font-size: 23px;
  }
}
.message-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.message-list {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  height: fit-content;
}

.message-list h1 {
  margin: 0 0 18px;
  font-size: 24px;
}

.message-thread {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  background: #ffffff;
}

.message-thread.active {
  border-color: #e85d04;
  background: #fff7ed;
}

.message-thread.disabled {
  opacity: 0.55;
}

.thread-company {
  margin: 0 0 6px;
  font-weight: 800;
}

.thread-preview {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.message-room {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.message-room-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: #ffffff;
}

.room-label {
  margin: 0 0 4px;
  color: #777;
  font-size: 13px;
}

.message-room-header h2 {
  margin: 0;
  font-size: 20px;
}

.room-status {
  color: #16a34a;
  font-size: 13px;
  font-weight: 700;
}

.message-body {
  flex: 1;
  padding: 28px 24px;
  background: #f8fafc;
  overflow-y: auto;
}

.message-date {
  text-align: center;
  color: #777;
  font-size: 12px;
  margin: 0 0 22px;
}

.message-bubble {
  max-width: 72%;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  line-height: 1.75;
  font-size: 15px;
  white-space: pre-line;
}

.message-bubble.client {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top-left-radius: 4px;
}

.message-bubble.player {
  background: #fff1e6;
  border: 1px solid #fed7aa;
  border-top-right-radius: 4px;
  margin-left: auto;
}

.message-name {
  display: block;
  font-size: 12px;
  color: #777;
  margin-bottom: 4px;
  font-weight: 700;
}

.message-time {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #888;
  margin-top: 6px;
}

.message-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #e85d04;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.message-form {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.message-form input {
  flex: 1;
  border: 1px solid #cfd7df;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
}

.message-form button {
  border: none;
  border-radius: 10px;
  padding: 0 20px;
  background: #e85d04;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 760px) {
  .message-page {
    grid-template-columns: 1fr;
    padding: 16px 12px 40px;
  }

  .message-list {
    display: none;
  }

  .message-room {
    min-height: calc(100dvh - 96px);
  }

  .message-room-header {
    padding: 16px;
  }

  .message-body {
    padding: 20px 14px;
  }

  .message-bubble {
    max-width: 88%;
    font-size: 14px;
  }

  .message-form {
    padding: 12px;
  }

  .message-form button {
    padding: 0 14px;
  }
}
.current-task-panel {
  margin: 16px 20px 0;
  padding: 16px 18px;
  border: 1px solid #f2d18b;
  border-radius: 14px;
  background: #fff8e7;
}

.current-task-label {
  margin: 0 0 6px;
  color: #9a6700;
  font-size: 12px;
  font-weight: 800;
}

.current-task-panel h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #3f2f10;
}

.current-task-panel p {
  line-height: 1.7;
}

#currentTaskText {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.current-reply-label {
  margin: 12px 0 4px;
  color: #777;
  font-size: 12px;
  font-weight: 800;
}

.current-reply-text {
  display: inline-block;
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #f2d18b;
  color: #8a1f11;
  font-weight: 800;
  font-size: 14px;
}

@media (max-width: 760px) {
  .current-task-panel {
    margin: 12px 12px 0;
    padding: 14px;
  }

  .current-task-panel h3 {
    font-size: 16px;
  }
}
.current-day-label {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #285943;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}
.dev-check-area {
  margin: 32px auto 0;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

#resetGameButton,
#goDay2Button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

#resetGameButton {
  background: #4b5563;
}

#goDay2Button {
  background: #8a1f11;
}

#resetGameButton:hover,
#goDay2Button:hover {
  filter: brightness(0.95);
}
.site-logo {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.site-logo:hover {
  opacity: 0.8;
}

.job-action-area {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 220px;
}

.detail-button,
.withdraw-button {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
}

.detail-button {
  border: none;
  background: #ea580c;
  color: #ffffff;
}

.withdraw-button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

.detail-button:hover,
.withdraw-button:hover {
  filter: brightness(0.96);
}
@media (max-width: 760px) {
  .job-action-area {
    width: 100%;
  }

  .detail-button,
  .withdraw-button {
    width: 100%;
  }
}
.job-card {
  display: block;
  padding: 24px;
  border: 1px solid #d9dee8;
  border-radius: 18px;
  background: #ffffff;
}

.job-card-main,
.job-card-side {
  display: contents;
}

.job-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.job-info div {
  padding: 14px;
  border-radius: 10px;
  background: #f8fafc;
}

.job-action-area {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 220px;
}

.detail-button,
.withdraw-button {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
}

.detail-button {
  border: none;
  background: #ea580c;
  color: #ffffff;
}

.withdraw-button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

@media (max-width: 760px) {
  .job-info {
    grid-template-columns: 1fr;
  }

  .job-action-area {
    width: 100%;
  }
}
.message-record-notice {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.6;
}
.crt-noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  background: #000;
  overflow: hidden;
}

.crt-noise-overlay.is-active {
  opacity: 1;
}

.crt-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  animation: crtFlash 0.18s ease-out forwards;
}

.crt-static {
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.16) 0px,
      rgba(255, 255, 255, 0.16) 1px,
      rgba(0, 0, 0, 0.2) 2px,
      rgba(0, 0, 0, 0.2) 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.08) 0px,
      rgba(255, 255, 255, 0.08) 2px,
      rgba(0, 0, 0, 0.12) 3px,
      rgba(0, 0, 0, 0.12) 5px
    );
  mix-blend-mode: screen;
  opacity: 0.75;
  animation: crtStaticMove 0.1s steps(6) infinite;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.32) 3px,
      rgba(0, 0, 0, 0.32) 4px
    );
  opacity: 0.9;
  animation: crtScanlines 0.12s linear infinite;
}

@keyframes crtFlash {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0.08;
  }
}

@keyframes crtStaticMove {
  0% {
    transform: translate(0, 0) scale(1);
    filter: contrast(120%) brightness(110%);
  }
  25% {
    transform: translate(-8px, 6px) scale(1.02);
    filter: contrast(150%) brightness(120%);
  }
  50% {
    transform: translate(10px, -7px) scale(1.01);
    filter: contrast(130%) brightness(90%);
  }
  75% {
    transform: translate(-6px, 10px) scale(1.03);
    filter: contrast(160%) brightness(105%);
  }
  100% {
    transform: translate(8px, -5px) scale(1);
    filter: contrast(120%) brightness(100%);
  }
}

@keyframes crtScanlines {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(4px);
  }
}
.site-footer {
  margin-top: 48px;
  padding: 24px 16px;
  text-align: center;
  color: #8b8175;
  font-size: 0.82rem;
  line-height: 1.7;
}

.site-footer p {
  margin: 0 0 6px;
}

.site-footer p:last-child {
  margin-bottom: 0;
}
/* 翌日遷移演出 */
.day-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(circle at center, rgba(45, 0, 0, 0.45), rgba(0, 0, 0, 0.96)),
    rgba(0, 0, 0, 0.92);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.day-transition-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.day-transition-box {
  width: min(86vw, 520px);
  padding: 32px 24px;
  border: 1px solid rgba(160, 30, 30, 0.45);
  background: rgba(10, 8, 8, 0.88);
  box-shadow: 0 0 36px rgba(90, 0, 0, 0.55);
  text-align: center;
  color: #f4eeee;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.day-transition-small {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: #b9a8a8;
}

.day-transition-date {
  margin: 0 0 18px;
  font-size: 32px;
  letter-spacing: 0.08em;
  color: #fff4f4;
}

.day-transition-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: #d8caca;
}

@media (max-width: 760px) {
  .day-transition-box {
    width: min(88vw, 420px);
    padding: 28px 18px;
  }

  .day-transition-date {
    font-size: 26px;
  }

  .day-transition-text {
    font-size: 14px;
  }
}
@media (max-width: 760px) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
}