@media screen {
  #pn-studio {
    --pn-ink: #263b39;
    --pn-muted: #5b6c66;
    --pn-petrol: #245956;
    --pn-petrol-deep: #193e3d;
    --pn-sage: #526b57;
    --pn-sage-soft: #edf2e9;
    --pn-cream: #fbf8ef;
    --pn-paper: #fffefa;
    --pn-line: #d8e0d4;
    --pn-plum: #76566f;
    --pn-focus: #ad5f85;
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2.4rem) clamp(0.8rem, 2vw, 1.4rem) 4rem;
    color: var(--pn-ink);
  }
  #pn-studio [hidden] { display: none !important; }
  #pn-studio .pn-hero {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 260px;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 2.5rem);
    text-align: left;
    overflow: hidden;
    padding: clamp(1.35rem, 4vw, 3.2rem);
    margin: 0 0 1.3rem;
    border: 1px solid #d9dfd0;
    border-radius: 26px;
    background: linear-gradient(118deg, #f7f3e7, #eef2e8 63%, #f2e9ee);
    box-shadow: 0 12px 34px rgb(35 67 61 / 8%);
  }
  #pn-studio .pn-hero-copy { position: relative; z-index: 1; min-width: 0; max-width: 810px; }
  #pn-studio .pn-eyebrow {
    margin: 0 0 0.55rem;
    color: var(--pn-sage);
    font-size: 0.73rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
  }
  #pn-studio .pn-hero h1 {
    max-width: 780px;
    margin: 0 0 0.8rem;
    color: var(--pn-petrol-deep);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.15rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.04;
  }
  #pn-studio .pn-hero-copy > p:not(.pn-eyebrow, .pn-privacy, .pn-family-reference) {
    max-width: 720px;
    margin: 0;
    color: #435c56;
    font-size: clamp(0.98rem, 1.35vw, 1.1rem);
    line-height: 1.65;
  }
  #pn-studio .pn-hero-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
  #pn-studio .pn-hero-meta > span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0.35rem 0.72rem;
    border: 1px solid #d5ded1;
    border-radius: 999px;
    background: rgb(255 255 255 / 82%);
    color: var(--pn-petrol-deep);
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.25;
  }
  #pn-studio .pn-privacy,
  #pn-studio .pn-family-reference { margin: 0.7rem 0 0; color: var(--pn-muted); font-size: 0.82rem; line-height: 1.5; }
  #pn-studio .pn-family-reference a { color: var(--pn-plum); font-weight: 750; text-underline-offset: 3px; }
  #pn-studio .pn-hero-art { position: relative; z-index: 0; display: block; width: clamp(105px, 16vw, 190px); height: auto; flex: 0 0 auto; }
  #pn-studio .pn-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0 0 1.25rem;
  }
  #pn-studio .pn-tab {
    display: flex;
    min-width: 0;
    min-height: 76px;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--pn-line);
    border-radius: 15px;
    background: #fffefa;
    color: var(--pn-ink);
    cursor: pointer;
    text-align: left;
    transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
  }
  #pn-studio .pn-tab:hover { border-color: #9db2a0; transform: translateY(-1px); }
  #pn-studio .pn-tab.active { border-color: var(--pn-petrol); background: var(--pn-sage-soft); box-shadow: inset 0 0 0 1px var(--pn-petrol); }
  #pn-studio .pn-tab-no { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #e8eee3; color: var(--pn-petrol-deep); font-size: 0.76rem; font-weight: 850; }
  #pn-studio .pn-tab-copy { display: grid; min-width: 0; gap: 0.17rem; }
  #pn-studio .pn-tab-copy strong { color: var(--pn-petrol-deep); font-size: 0.95rem; line-height: 1.3; }
  #pn-studio .pn-tab-copy small { color: var(--pn-muted); font-size: 0.76rem; line-height: 1.35; }
  #pn-studio .pn-panel { display: none; min-width: 0; }
  #pn-studio .pn-panel:not(.pn-tbi) { margin: 0; padding: 0; }
  #pn-studio .pn-panel.pn-tbi { background: #0f172a !important; }
  #pn-studio .pn-panel.active:not(.pn-tbi) { display: grid; }
  #pn-studio #pn-panel-charte.active,
  #pn-studio #pn-panel-passeport.active {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(0.85rem, 2vw, 1.35rem);
  }
  #pn-studio #pn-panel-quiz.active:not(.pn-tbi) {
    grid-template-columns: minmax(0, 1000px);
    justify-content: center;
    gap: 0.25rem;
  }
  #pn-studio .pn-block {
    min-width: 0;
    padding: clamp(1rem, 2vw, 1.35rem);
    margin: 0 0 1rem;
    border: 1px solid var(--pn-line);
    border-radius: 18px;
    background: var(--pn-paper);
    box-shadow: 0 8px 24px rgb(35 67 61 / 5%);
  }
  #pn-studio .pn-section-intro h2,
  #pn-studio .pn-quiz-intro h2,
  #pn-studio #pn-quiz-result > h2 {
    margin: 0 0 0.7rem;
    color: var(--pn-petrol-deep);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.2;
  }
  #pn-studio .pn-section-intro > p,
  #pn-studio .pn-quiz-intro > p { color: var(--pn-muted); line-height: 1.6; }
  #pn-studio .pn-session-guide { padding: 0.85rem; margin-top: 1rem; border: 1px solid #d5dfd1; border-radius: 13px; background: #f3f5ed; }
  #pn-studio .pn-session-guide h3 { margin: 0 0 0.55rem; color: var(--pn-petrol-deep); font-size: 0.95rem; line-height: 1.4; }
  #pn-studio .pn-session-guide .pn-eyebrow { margin-bottom: 0.3rem; }
  #pn-studio .pn-session-guide p { margin: 0 0 0.5rem; color: var(--pn-muted); font-size: 0.84rem; line-height: 1.5; }
  #pn-studio .pn-session-guide ol { margin: 0; padding-left: 1.2rem; color: var(--pn-ink); font-size: 0.83rem; line-height: 1.55; }
  #pn-studio .pn-paper-surface { min-width: 0; border: 1px solid #d8e0d4; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgb(35 67 61 / 8%); }
  #pn-studio .pn-cards.pn-paper-surface { overflow-x: auto; }
  #pn-studio .pn-config label { color: var(--pn-ink); line-height: 1.5; }
  #pn-studio .pn-config :is(input, textarea) { box-sizing: border-box; min-width: 0; max-width: 100%; width: 100%; border: 1px solid #bfcfc6; border-radius: 10px; background: #fffefa; color: #263b39; }
  #pn-studio .pn-config textarea { resize: vertical; }
  #pn-studio .pn-hint { color: var(--pn-muted); font-size: 0.85rem; line-height: 1.6; }
  #pn-studio .pn-btn {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0.62rem 0.9rem;
    border: 1px solid var(--pn-petrol-deep);
    border-radius: 10px;
    background: var(--pn-petrol-deep);
    color: #fff;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    transition: background-color 150ms ease, transform 150ms ease;
  }
  #pn-studio .pn-btn:hover:not(:disabled) { background: #2d6c66; transform: translateY(-1px); }
  #pn-studio .pn-btn.secondary { border-color: #ac91a5; background: #fffdfa; color: #65485f; }
  #pn-studio .pn-btn.secondary:hover:not(:disabled) { background: #f4edf2; }
  #pn-studio .pn-btn:disabled { cursor: not-allowed; opacity: 0.56; }
  #pn-studio .pn-mode { display: flex; flex-wrap: wrap; gap: 0.55rem; }
  #pn-studio #pn-mode-hint { padding: 0.75rem 0.85rem; border-left: 3px solid var(--pn-sage); border-radius: 0 10px 10px 0; background: var(--pn-sage-soft); color: var(--pn-muted); font-size: 0.86rem; line-height: 1.55; }
  #pn-studio #pn-quiz-area > h3 { margin: 0 0 0.75rem; color: var(--pn-petrol-deep); font-size: 1rem; }
  #pn-studio .pn-situation { color: var(--pn-ink); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.5; }
  #pn-studio .pn-progress { color: var(--pn-muted); font-size: 0.86rem; font-weight: 750; }
  #pn-studio .pn-options { display: grid; gap: 0.6rem; }
  #pn-studio .pn-opt {
    min-width: 0;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border: 1px solid #cfd9d2;
    border-radius: 12px;
    background: #fffefa;
    color: var(--pn-ink);
    cursor: pointer;
    font-size: 0.98rem;
    line-height: 1.45;
    text-align: left;
  }
  #pn-studio .pn-opt:hover:not(:disabled) { border-color: #8aa998; background: #f5f7f0; }
  #pn-studio .pn-opt.good { border-color: #4c896b; background: #e6f2e9; color: #24543a; }
  #pn-studio .pn-opt.bad { border-color: #b66767; background: #faeaea; color: #783e42; }
  #pn-studio .pn-opt:disabled { cursor: default; }
  #pn-studio .pn-explain { border-left-color: #63866c; background: var(--pn-sage-soft); color: var(--pn-ink); line-height: 1.6; }
  #pn-studio .pn-result .score { color: var(--pn-petrol-deep); }
  #pn-studio #pn-result-title, #pn-studio #pn-result-msg { color: var(--pn-ink); }
  #pn-studio .pn-nav { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.85rem; }
  #pn-studio .pn-tbi .pn-situation { font-size: clamp(1.4rem, 3vw, 2rem); }
  #pn-studio .pn-tbi .pn-opt { padding: 1rem; font-size: clamp(1.05rem, 2vw, 1.25rem); }
  #pn-studio .pn-tbi .pn-progress { font-size: 1rem; }
  #pn-studio .pn-tab:focus-visible,
  #pn-studio .pn-btn:focus-visible,
  #pn-studio .pn-opt:focus-visible,
  #pn-studio a:focus-visible,
  #pn-studio select:focus-visible,
  #pn-studio input:focus-visible,
  #pn-studio textarea:focus-visible,
  #pn-studio :is(#pn-situation, #pn-explain, #pn-result-title):focus-visible { outline: 3px solid var(--pn-focus); outline-offset: 3px; }

  html[data-theme='dark'] #pn-studio {
    --pn-ink: #e7eeea;
    --pn-muted: #c3cfca;
    --pn-petrol: #a8d1c8;
    --pn-petrol-deep: #d0e5dd;
    --pn-sage: #bbd4b9;
    --pn-sage-soft: #263a34;
    --pn-line: #465550;
    --pn-focus: #f0b8d1;
    color: var(--pn-ink);
  }
  html[data-theme='dark'] #pn-studio .pn-hero { border-color: #574b48; background: linear-gradient(118deg, #382f2c, #293431 65%, #352f36); }
  html[data-theme='dark'] #pn-studio .pn-hero-copy > p:not(.pn-eyebrow) { color: #d1ddd8; }
  html[data-theme='dark'] #pn-studio .pn-family-reference a { color: #edcfe3; }
  html[data-theme='dark'] #pn-studio .pn-config :is(input, textarea) { border-color: #667b72; background: #172321; color: #eef5f0; }
  html[data-theme='dark'] #pn-studio .pn-hero-meta > span { border-color: #53635d; background: #293633; color: #e2eee8; }
  html[data-theme='dark'] #pn-studio .pn-tab,
  html[data-theme='dark'] #pn-studio .pn-block { border-color: var(--pn-line); background: #202d2b; color: var(--pn-ink); }
  html[data-theme='dark'] #pn-studio .pn-tab.active { background: #293d37; box-shadow: inset 0 0 0 1px #80a99c; }
  html[data-theme='dark'] #pn-studio .pn-tab-no { background: #334940; color: #d8eadf; }
  html[data-theme='dark'] #pn-studio .pn-btn { border-color: #80a99c; background: #245b59; color: #fff; }
  html[data-theme='dark'] #pn-studio .pn-btn.secondary { border-color: #ad91a6; background: #342f35; color: #f1ddeb; }
  html[data-theme='dark'] #pn-studio .pn-session-guide,
  html[data-theme='dark'] #pn-studio #pn-mode-hint { border-color: #52645b; background: #293832; color: #d3dfd9; }
  html[data-theme='dark'] #pn-studio .pn-opt { border-color: #53645d; background: #182522; color: #e7eeea; }
  html[data-theme='dark'] #pn-studio .pn-opt.good { border-color: #609a78; background: #263e30; color: #d7f0dc; }
  html[data-theme='dark'] #pn-studio .pn-opt.bad { border-color: #b97679; background: #452d30; color: #f4d8da; }
  html[data-theme='dark'] #pn-studio .pn-paper-surface { border-color: #68776f; }

  @media (max-width: 1000px) {
    #pn-studio #pn-panel-charte.active,
    #pn-studio #pn-panel-passeport.active { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 640px) {
    #pn-studio { padding-right: 0.65rem; padding-left: 0.65rem; }
    #pn-studio .pn-hero { min-height: 0; padding: 1.25rem; border-radius: 20px; }
    #pn-studio .pn-hero-art { width: clamp(76px, 21vw, 112px); }
    #pn-studio .pn-tabs { grid-template-columns: minmax(0, 1fr); gap: 0.45rem; }
    #pn-studio .pn-tab { min-height: 60px; }
    #pn-studio .pn-tab-copy small { font-size: 0.79rem; }
    #pn-studio .pn-btn { width: 100%; }
    #pn-studio .pn-mode .pn-btn { flex: 1 1 100%; }
    #pn-studio .pn-nav .pn-btn { flex: 1 1 100%; }
  }
  @media (max-width: 420px) {
    #pn-studio .pn-hero-art { display: none; }
    #pn-studio .pn-block { padding: 0.9rem; }
  }
}
