:root {
  --n-ot-n: #B4690E;
  --n-ot-on: #FFFFFF;
}

:root[data-theme="dark"] {
  --n-ot-n: #F2B45A;
  --n-ot-on: #16171A;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --n-ot-n: #F2B45A;
    --n-ot-on: #16171A;
  }
}

.n-ot {
  margin: 16px 0 48px;
}

.n-ot-moods {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.n-ot-moods::-webkit-scrollbar {
  display: none;
}

.n-ot-mood {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  white-space: nowrap;
  padding: 0 14px;
  border-radius: 17px;
  background: var(--n-s1);
  color: var(--n-t2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.n-ot-mood:hover {
  color: var(--n-t1);
}

.n-ot-mood[aria-current="page"] {
  background: var(--n-t1);
  color: var(--n-ot-on);
}

.n-ot-lay {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hero" "grid" "week" "done";
  gap: 32px;
}

.n-ot-hero {
  grid-area: hero;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.n-ot-ht {
  font-size: 40px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--n-t1);
  text-wrap: balance;
}

.n-ot-ht:hover,
.n-ot-t:hover,
.n-ot-wt:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.n-ot-img {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: var(--n-s1);
}

.n-ot-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .4s ease;
}

.n-ot-img:hover img {
  transform: scale(1.02);
}

.n-ot-hero .n-ot-img {
  margin-top: 4px;
  border-radius: 12px;
}

.n-ot-hero .n-ot-img img {
  aspect-ratio: 16 / 9;
}

.n-ot-img::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56px;
  background: linear-gradient(to top, rgb(0 0 0 / .45), rgb(0 0 0 / 0));
  pointer-events: none;
}

.n-ot-cr {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 8px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.n-ot-x {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--n-t2);
}

.n-ot-m {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  font-size: 13px;
  color: var(--n-t3);
}

.n-ot-k {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

.n-ot-pl {
  color: var(--n-t2);
  font-weight: 600;
}

.n-ot-sh {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--n-t3);
  font: inherit;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.n-ot-sh svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.n-ot-sh:hover {
  background: var(--n-s1);
  color: var(--n-t1);
}

.n-ot-sh.is-done {
  color: var(--n-a);
}

.n-ot-g {
  grid-area: grid;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  margin: 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--n-rule);
  list-style: none;
}

.n-ot-c {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.n-ot-b {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.n-ot-t {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--n-t1);
}

.n-ot-b .n-ot-m {
  margin-top: auto;
}

.n-ot-wk {
  grid-area: week;
  min-width: 0;
}

.n-ot-h {
  margin: 0;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--n-rule);
  font-size: 15px;
  font-weight: 600;
  color: var(--n-t1);
}

.n-ot-wl {
  margin: 0;
  padding: 0;
  list-style: none;
}

.n-ot-wl li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--n-rule);
}

.n-ot-n {
  font-weight: 700;
  font-size: 17px;
  color: var(--n-ot-n);
}

.n-ot-wb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.n-ot-wt {
  font-size: 15px;
  line-height: 1.4;
  color: var(--n-t1);
}

.n-ot-wb .n-ot-pl {
  font-size: 13px;
  font-weight: 500;
  color: var(--n-t3);
}

.n-ot-done {
  grid-area: done;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--n-t3);
  white-space: nowrap;
}

.n-ot-done::before,
.n-ot-done::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--n-rule);
}

@media (min-width: 1024px) {
  .n-ot-lay {
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas: "hero week" "grid grid" "done done";
    gap: 40px;
  }

  .n-ot-lay:not(:has(.n-ot-hero)) {
    grid-template-areas: "week week" "grid grid" "done done";
  }

  .n-ot-wk {
    padding-left: 32px;
    border-left: 1px solid var(--n-rule);
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .n-ot-g {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .n-ot-ht {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .n-ot-moods {
    gap: 6px;
    margin: 0 calc(var(--n-gut, 16px) * -1) 16px;
    padding: 4px var(--n-gut, 16px);
    scroll-padding-inline: var(--n-gut, 16px);
  }

  .n-ot-mood {
    min-height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }

  .n-ot-mood::after {
    content: "";
    position: absolute;
    inset: -4px 0;
  }

  .n-ot-lay {
    gap: 24px;
  }

  .n-ot-ht {
    font-size: 26px;
    line-height: 1.18;
  }

  .n-ot-hero .n-ot-img {
    margin-inline: calc(var(--n-gut, 16px) * -1);
    border-radius: 0;
  }

  .n-ot-g {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 0;
  }

  .n-ot-c {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 12px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--n-rule);
  }

  .n-ot-c .n-ot-img {
    grid-column: 2;
    grid-row: 1;
    border-radius: 8px;
  }

  .n-ot-c .n-ot-img img {
    aspect-ratio: 1;
  }

  .n-ot-c .n-ot-img::after,
  .n-ot-c .n-ot-cr,
  .n-ot-c .n-ot-x {
    display: none;
  }

  .n-ot-c .n-ot-b {
    grid-column: 1;
    grid-row: 1;
    gap: 6px;
  }

  .n-ot-t {
    font-size: 17px;
    line-height: 1.3;
  }

  .n-ot-c .n-ot-sh span {
    display: none;
  }

  .n-ot-c .n-ot-m {
    min-height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .n-ot-img img,
  .n-ot-mood,
  .n-ot-sh {
    transition: none;
  }

  .n-ot-img:hover img {
    transform: none;
  }
}
