:root {
  color-scheme: light;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #232833;
  background: #f6f8fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: #2e6f85;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
}

.save-state {
  min-width: 110px;
  padding: 8px 12px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #ffffff;
  color: #667085;
  text-align: center;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #ffffff;
}

.tab {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: #4b5565;
  background: transparent;
  cursor: pointer;
}

.tab.is-active {
  color: #ffffff;
  background: #2e6f85;
}

.view {
  display: none;
}

.view.is-active {
  display: grid;
  gap: 20px;
}

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

.section-heading h2 {
  margin-bottom: 6px;
  font-size: 1.5rem;
}

.section-heading p {
  color: #667085;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #ffffff;
}

.schedule-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  min-width: 170px;
  padding: 12px;
  border-bottom: 1px solid #e4e9f1;
  border-left: 1px solid #e4e9f1;
  vertical-align: top;
}

.schedule-table th:first-child,
.schedule-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 210px;
  border-left: 0;
  background: #f8fafc;
}

.schedule-table th {
  color: #344054;
  background: #f8fafc;
  text-align: center;
}

.schedule-table th:first-child {
  text-align: left;
}

.schedule-table tr.row-ok > td,
.schedule-table tr.row-ok > td:first-child {
  background: #f1f8df;
}

.schedule-table tr.row-partial > td,
.schedule-table tr.row-partial > td:first-child {
  background: #fff8d9;
}

.schedule-table tr.row-ng > td,
.schedule-table tr.row-ng > td:first-child {
  background: #fff0ef;
}

.schedule-table tr.is-today > td:first-child {
  box-shadow: inset 5px 0 0 #2e6f85;
}

.date-cell {
  display: grid;
  gap: 12px;
  font-weight: 800;
}

.date-idea {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.date-idea span {
  color: #667085;
}

.availability-control {
  display: grid;
  grid-template-columns: 56px 74px 56px;
  grid-template-rows: 44px 44px;
  width: 186px;
  overflow: hidden;
  border: 1px solid #d4c8b8;
  border-radius: 8px;
  background: #ffffff;
}

.availability-button {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  border-left: 1px solid #d4c8b8;
  border-top: 1px solid #d4c8b8;
  color: #6f6a60;
  background: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
}

.availability-button:first-child {
  border-left: 0;
}

.availability-button.ok,
.availability-button.ng {
  grid-row: 1 / span 2;
  border-top: 0;
}

.availability-button.ok {
  grid-column: 1;
  font-size: 1.65rem;
}

.availability-button.day {
  grid-column: 2;
  grid-row: 1;
  border-top: 0;
}

.availability-button.night {
  grid-column: 2;
  grid-row: 2;
}

.availability-button.ng {
  grid-column: 3;
}

.availability-button.is-selected {
  color: #ffffff;
  background: #2e6f85;
}

.availability-button.ng.is-selected {
  background: #a53f3f;
}

.empty-cell {
  color: #98a2b3;
}

.form-grid,
.inline-form,
.idea-form {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #ffffff;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  align-items: end;
}

.inline-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.idea-form {
  grid-template-columns: minmax(220px, 0.7fr) 1fr;
}

.idea-form fieldset,
.idea-form button {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #232833;
}

input {
  height: 42px;
  padding: 0 12px;
}

select {
  height: 40px;
  padding: 0 10px;
}

textarea {
  min-height: 112px;
  padding: 10px 12px;
  resize: vertical;
}

fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
}

legend {
  padding: 0 6px;
  color: #344054;
  font-weight: 800;
}

.date-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.date-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 600;
}

.date-check input {
  width: 16px;
  height: 16px;
}

.button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #344054;
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  border-color: #2e6f85;
  color: #ffffff;
  background: #2e6f85;
}

.button.danger {
  border-color: #f0c5c5;
  color: #a53f3f;
  background: #fff5f5;
}

.list,
.idea-list {
  display: grid;
  gap: 10px;
}

.list-item,
.idea-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #ffffff;
}

.idea-card {
  align-items: flex-start;
}

.list-item.is-editing {
  align-items: flex-start;
}

.item-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.idea-card .edit-area {
  display: grid;
  flex: 1 1 520px;
  min-width: 0;
  gap: 8px;
}

.list-item .actions,
.idea-card .actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-end;
}

.idea-card h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.idea-card p {
  color: #667085;
  line-height: 1.7;
}

.idea-card h3 input,
.idea-card p textarea {
  width: 100%;
}

.idea-card h3 input {
  margin-right: 0;
}

.idea-card p textarea {
  min-height: 156px;
}

.idea-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.date-pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: #315b9d;
  font-size: 0.82rem;
  font-weight: 800;
}

.empty-state {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #667085;
}

.list-item input {
  flex: 1 1 280px;
  min-width: 0;
  width: 100%;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .idea-form {
    grid-template-columns: 1fr;
  }

  .idea-card {
    flex-direction: column;
    gap: 12px;
  }

  .list-item.is-editing {
    flex-direction: column;
    gap: 12px;
  }

  .idea-card h3,
  .idea-card p {
    width: 100%;
  }

  .idea-card h3 input {
    margin-right: 0;
  }

  .list-item .actions,
  .idea-card .actions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .list-item .actions button,
  .idea-card .actions button {
    width: 100%;
  }
}
