:root{
  --bg: #FFF7F3;
  --card: #ffffff;
  --text: #222222;
  --muted: #7C6A5A;
  --accent: #FB923C;
}
*{box-sizing:border-box}
body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin:0;
  padding: 0;
}
.site-container{
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
}
.site-header{
  background: var(--card);
  border-bottom: 1px solid #eee;
  padding: 1rem;
  text-align: center;
}
input[type="search"]{
  padding: .6rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  width: 100%;
}
button{
  padding: .6rem 1rem;
  border: none;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  cursor:pointer;
}
.result-item{
  background: var(--card);
  border: 1px solid #eee;
  margin-bottom: .6rem;
  padding: .6rem;
  border-radius:6px;
}
.muted{ color: var(--muted) ;}
.notes{ margin-top: .3rem; color:var(--muted); font-size: .95rem;}

 /* Ensure brand buttons are visible when project CSS would otherwise override */
 .bg-brand { background-color: var(--accent) !important; color: #fff !important; }
 a[role="button"], button { display: inline-block; text-decoration: none; }
 a[role="button"].bg-brand, button.bg-brand { color: #fff !important; background-color: var(--accent) !important; border: none; }
 .bg-brand:hover { opacity: 0.95; }

.mode-choice {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  padding: 1rem;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.mode-choice:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.mode-choice:focus-visible {
  outline: 2px solid #FB923C;
  outline-offset: 2px;
}

.mode-choice .mode-kicker {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .8;
}

.mode-choice .mode-title {
  display: block;
  margin-top: .2rem;
  font-size: 1rem;
  font-weight: 700;
}

.mode-choice .mode-copy {
  display: block;
  margin-top: .45rem;
  font-size: .8rem;
  line-height: 1.45;
  opacity: .88;
}

.mode-choice .mode-check {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  font-size: .95rem;
  font-weight: 700;
}

.mode-choice.name {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fdba74;
  color: #9a3412;
}

.mode-choice.office {
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  border-color: #a5b4fc;
  color: #3730a3;
}

.mode-choice.is-active.name {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  border-color: #ea580c;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(249, 115, 22, .28);
}

.mode-choice.is-active.office {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #4338ca;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(79, 70, 229, .24);
}

.mode-choice.is-active .mode-check {
  display: inline-flex;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #ffffff;
}

@media (max-width: 639px) {
  .mode-choice {
    padding: .56rem .58rem;
    border-radius: .75rem;
  }

  .mode-choice .mode-kicker,
  .mode-choice .mode-copy {
    display: none;
  }

  .mode-choice .mode-title {
    margin-top: 0;
    font-size: .83rem;
    line-height: 1.2;
  }

  .mode-choice .mode-check {
    display: none !important;
  }

  .mode-choice > span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .mode-choice > span > span:first-child {
    width: 100%;
    text-align: center;
  }
}

.quick-access-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.quick-access-label {
  margin: 0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: #155e75;
  white-space: nowrap;
}

.quick-access-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: .48rem;
  column-gap: .85rem;
}

.quick-access-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #93c5fd;
  background: #ffffff;
  color: #0057d9;
  border-radius: 9999px;
  padding: .26rem .68rem;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: .09em;
  text-underline-offset: .13em;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.quick-access-chip:hover {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #003ea6;
  transform: translateY(-1px);
}

.quick-access-chip:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.terms-page {
  max-width: 860px;
  margin: 0 auto;
}

.terms-page__inner {
  padding: 2rem 1.5rem 2.25rem;
}

.terms-page__header {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #f1e7df;
}

.terms-page__eyebrow {
  margin: 0 0 .5rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.terms-page__title {
  margin: 0;
  color: #111827;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.terms-page__lead {
  margin: .9rem 0 0;
  max-width: 46rem;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.8;
}

.terms-content {
  color: #374151;
  font-size: 1rem;
  line-height: 1.95;
}

.terms-content h2,
.terms-content h3 {
  color: #111827;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.terms-content h2 {
  margin: 2.25rem 0 1rem;
  font-size: 1.35rem;
  line-height: 1.4;
  padding-left: .85rem;
  border-left: 4px solid var(--accent);
}

.terms-content h3 {
  margin: 1.75rem 0 .8rem;
  font-size: 1.08rem;
  line-height: 1.5;
}

.terms-content p {
  margin: 0 0 1rem;
}

.terms-content hr {
  margin: 1.75rem 0;
  border: 0;
  border-top: 1px solid #f3e8de;
}

.terms-content ul {
  margin: .75rem 0 1rem;
  padding-left: 1.4rem;
}

.terms-content li {
  margin: .5rem 0;
  padding-left: .15rem;
}

@media (min-width: 768px) {
  .terms-page__inner {
    padding: 2.75rem 2.75rem 3rem;
  }

  .terms-content {
    font-size: 1.03rem;
  }
}

/* Truncate long role names in work detail view */
.role-name {
  display: inline-block;
  /* ensure very short role names still show: min 40ch, but normally reserve space for the right-side tag */
  max-width: clamp(40ch, calc(100% - 9rem), 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* Ensure actor meta can shrink inside flex so role-name truncates correctly */
.actor-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Left column that contains name + role; allow it to shrink so right tag stays on one line */
.cast-left {
  flex: 1 1 auto;
  min-width: 0;
}

/* Prevent the regular tag from wrapping and keep it visually fixed */
.regular-tag {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .role-name {
    /* on small screens still keep role-name at least 40 characters */
    max-width: clamp(40ch, calc(100% - 6.5rem), 100%);
  }
}
