/* nako3storage - basic.css */

#n3s_header {
  margin: 0;
  padding: 4px;
  background-color: white;
  font-size: 0.8em;
  border-bottom: 1px dotted gray;
}

#n3s_header h1.title {
  margin: 0;
  font-size: 1.2em;
  padding: 1em;
  background-color: #fff0f0;
}

#n3s_header h1.title a {
  text-decoration: none;
  color: black;
}

#n3s_header .search_box {
  padding-left: 1em;
}

#n3s_footer {
  border-top: 1px dotted gray;
  padding: 4px;
  font-size: 0.8em;
}

#n3s_footer .applink {
  padding: 12px;
  text-align: center;
  font-size: 0.8em;
}
.header-right {
  text-align: right;
  padding: 0.5em;
  line-height: 3;
}

h1 {
  padding: 0.3em;
  font-size: 1em;
  border-left: 1em solid #ffc0c0;
}
h2 {
  padding: 0.3em;
  font-size: 1em;
}

.list {
  padding: 1em;
}
.list table {
  border-top: 1px solid silver;
  border-left: 1px solid silver;
}
.list table td {
  border-right: 1px solid silver;
  border-bottom: 1px solid silver;
  padding: 0.5em;
}
.list table th {
  border-right: 1px solid silver;
  border-bottom: 1px solid silver;
  background-color: #f0f0f0;
  padding: 0.5em;
}
.list .date {
  font-size: 0.7em;
  color: silver;
}
.list .dev {
  font-size: 0.7em;
  color: gray;
}
.list .dev a {
  font-size: 0.9em;
  color: #444499;
  text-decoration: none;
  background-color: #ffff99;
}
.list .postmemo {
  font-size: 0.9em;
  color: #555555;
}

.saveform {
  padding: 1em;
}

.saveform label {
  color: black;
  font-size: 1em;
}

.saveform input {
  width: 20em;
  margin: 8px;
}
.saveform input[type="checkbox"] {
  width: 2em;
}
.saveform select {
  width: 20em;
  margin-left: 8px;
  margin-top: 4px;
  padding: 6px;
}

.saveform textarea {
  width: 95%;
  height: 150px;
  margin: 8px;
  padding: 8px;
  background-color: #f9f0f0;
}

.showblock {
  padding: 1em;
}
.showblock .memo {
  color: gray;
  font-size: 0.8em;
}
.showblock label {
  color: gray;
  font-size: 0.8em;
}
.showblock textarea {
  width: 300px;
  height: 150px;
  background-color: #f0f0f0;
}

.showblock ul li {
  line-height: 1.8;
}
.showblock table td {
  line-height: 1.5;
  font-size: 1em;
  padding: 4px;
  border-bottom: 1px solid silver;
}
.showblock tr:nth-child(2n+1) {
  background-color: #f0f0ff;
}

.linkblock {
  border-bottom: 1px dotted silver;
  padding: 1em;
  margin: 0;
  font-size: 0.8em;
  background-color: #fff0ff;
}

.favblock {
  background-color: #fff0f0;
  font-size: 0.8em;
  padding: 1em;
  line-height: 1.4;
}

.ctrl_block {
  border-top: 1px dotted gray;
  padding: 1em;
}

.showinfo {
  font-size: 0.8em;
  color: gray;
}

.error {
  color: red;
}

.info {
  color: gray;
  font-size: 0.8em;
}

#runbox {
  padding: 1em;
}

#nako3_output {
  border: 1px solid silver;
  height: 3em;
  max-height: 10em;
  resize: vertical;
  box-sizing: content-box;
  background-color: #f0f0f04b;
  margin: 4px;
  padding: 4px 4px 16px 16px;
  overflow-y: auto;
}

.nako3info {
  border: 1px solid silver;
  background-color: #f9f5f0;
  margin: 4px;
  padding: 8px;
}

#nako3_info {
  max-height: 10em;
  overflow-y: auto;
  resize: vertical;
  box-sizing: content-box;
}

#nako3_canvas {
  margin: 4px;
  border: 1px dotted silver;
}

.next_button_div {
  padding: 1em;
}

.nako3_div {
  font-size: 1em;
  line-height: 1.1;
}
.nako3_div > button {
  margin: 4px;
  padding: 4px;
  font-size: 0.9em;
}
.nako3_div input[type="checkbox"] {
  padding: 4px;
  margin: 4px;
}

:where(#nako3_div table) {
  border-left: 1px solid silver;
  border-top: 1px solid silver;
  border-collapse: collapse;
  padding: 0px;
  margin: 0px;
}

:where(#nako3_div th,#nako3_div td) {
  margin: 0px;
  padding: 0.4em;
  border-right: 1px solid silver;
  border-bottom: 1px solid silver;
  border-collapse: collapse;
  border-spacing: 0;
  background-color: initial;
}

.fav_block {
  padding: 1em;
}

/* Ace breakpoint marker (theme-independent fallback) */
.ace_gutter-cell.ace_breakpoint {
  position: relative;
}

.ace_gutter-cell.ace_breakpoint::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #d93025;
}

.fav_block #fav {
  font-size: 1em;
  color: #ffb0b0;
}

.memo {
  color: gray;
  font-size: 0.8em;
}

.addon_block {
  padding: 1em;
  font-size: 0.8em;
  line-height: 1.8;
}

.devblock {
  color: gray;
  padding: 2em;
  margin: 1em;
  font-size: 0.8em;
}

.devblock a {
  text-decoration: none;
}

/* ace editor の場合 */
div#nako3code {
  width: 99%;
  height: 450px;
}

/* 古いバージョンのなでしこを使う場合 */
textarea#nako3code {
  margin: 0;
  padding: 0.5em;
  font-size: 1.2em;
  line-height: 1.4;
  width: 99%;
  height: 150px;
  background-color: #f0f0f0;
  border: 1px solid silver;
}

#nako3_error {
  color: red;
  padding: 0.5em;
  margin: 0.5em;
  border: 1px solid silver;
  background-color: #fff0f0;
}

.info_box {
  padding: 1em;
  font-size: 0.8em;
  color: black;
  background-color: #ffe0e0;
  line-height: 1.7;
}

.crown {
  color: #ffb0b0;
}

.blogparts {
  line-height: 1.5;
  margin: 1em;
  border: 1px dotted #e0e0e0;
  padding: 1em;
  background-color: #f0f0f0;
}

.blogparts input {
  background-color: #e0e0e0;
  padding: 8px;
  margin: 4px;
  margin-left: 1em;
  width: 95%;
}

.info_link {
  background-color: white;
  color: gray;
  font-size: 0.8em;
  width: 100%;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid #e0e0e0;
}

.setumei {
  padding: 4px;
}

.setumei a {
  background-color: #ffffaa;
  color: black;
  text-decoration: none;
}

.list_user_profile a {
  background-color: #ffffaa;
  color: black;
  text-decoration: none;
  border-bottom: 1px dotted silver;
}

.search_list ul {
  list-style: none;
  padding: 1em;
  margin: 0;
}
.search_list ul > li {
  line-height: 1.8;
  padding-bottom: 1em;
}
.search_title a {
  font-size: 1.1em;
  color: blue;
  text-decoration: none;
  font-weight: bolder;
}
.search_info {
  padding-left: 1em;
}
.search_info a {
  font-size: 0.9em;
  color: blue;
  text-decoration: none;
  font-weight: bolder;
}
.search_code {
  background-color: #fff0f0;
}
#controll_buttons {
  line-height: 2.0;
  border-top: 1px dotted silver;
  padding-top: 8px;
}

.public {
  color: green;
}
.private {
  color: red;
}

ul.devblock {
  background-color: #f0f0f0;
  padding: 1em;
  list-style: none;
}
ul.devblock li {
  padding-left: 1em;
  border-bottom: 1px dotted #e0e0e0;
  color: #404040;
}
ul.devblock span.lbl {
  color: #808080;
}
#tempInfoLabel {
  font-size: 0.8em;
  padding: 0.5em;
  color: gray;
}
.iframe_memo {
  padding: 8px;
  text-align: right;
  font-size: 0.9em;
}

.mypage_box {
  border: 1px solid silver;
  padding: 1em;
  margin: 1em;
}

.option_box {
  border:1px dotted silver; padding: 8px; margin: 8px;
}

.cover_image_option {
  margin: 1em 0;
}
.cover_image_preview {
  max-width: 600px;
  margin: 0.5em 0;
}
.cover_image_preview img {
  display: block;
  width: 100%;
  aspect-ratio: 600 / 240;
  object-fit: cover;
  border: 1px solid #e8d3da;
  border-radius: 8px;
}
.cover_delete_label {
  display: block;
  margin: 0.5em 0;
}
.show_cover_start {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-width: 760px;
  margin: 1em auto;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  border: 1px solid #e8d3da;
  box-shadow: 0 6px 18px rgba(59, 49, 52, 0.12);
}
.show_cover_start .pure-button {
  background: rgba(209, 71, 122, 0.92);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(59, 49, 52, 0.25);
}

.n3s-list-page,
.n3s-mypage-page {
  --n3s-sakura-bg: #fef7f9;
  --n3s-sakura-band: #fdf0f4;
  --n3s-sakura-accent: #d1477a;
  --n3s-sakura-soft: #e5a3b3;
  --n3s-sumi: #3b3134;
  --n3s-border: #e8d3da;
  --n3s-gold: #c9a86a;
  color: var(--n3s-sumi);
  background: var(--n3s-sakura-bg);
  padding: 1px 0 2em;
}
.n3s-list-page a {
  color: var(--n3s-sakura-accent);
  text-decoration: none;
}
.n3s-list-section {
  max-width: 1180px;
  margin: 18px auto;
  padding: 0 16px;
}
.n3s-list-section h1 {
  display: flex;
  align-items: center;
  gap: 0.45em;
  color: var(--n3s-sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.45em;
  letter-spacing: 0;
  border-bottom: 3px double var(--n3s-border);
  padding-bottom: 0.35em;
}
.n3s-list-section h1::before {
  content: "❀";
  color: var(--n3s-sakura-accent);
  font-size: 0.9em;
}
.n3s-list-user-profile {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 18px 0 28px;
}
.n3s-list-user-profile-image {
  display: block;
  box-sizing: border-box;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 1px solid var(--n3s-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(59, 49, 52, 0.1);
}
.n3s-list-user-profile-main {
  min-width: 0;
  padding-left: 24px;
  border-left: 3px solid var(--n3s-sakura-soft);
}
.n3s-list-user-profile-main h2 {
  margin: 0 0 14px;
  color: var(--n3s-sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.25em;
  letter-spacing: 0;
}
.n3s-list-user-description {
  margin: 0;
  color: #5f5357;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.n3s-list-user-description.is-empty {
  color: #8b7a80;
}
.n3s-section-lead {
  color: #6f6065;
  line-height: 1.7;
}
.n3s-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.n3s-app-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--n3s-border);
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(59, 49, 52, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.n3s-app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(59, 49, 52, 0.13);
}
.n3s-app-card-cover {
  display: block;
  background: var(--n3s-sakura-band);
}
.n3s-app-card-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 600 / 240;
  object-fit: cover;
}
.n3s-app-card-body {
  padding: 12px 14px 14px;
}
.n3s-app-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.n3s-app-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--n3s-sakura-band);
}

.n3s-user-image {
  width: 32px;
  height: 32px;
  object-fit: cover;
  vertical-align: middle;
}

.n3s-user-image-profile {
  margin-bottom: 0.6em;
}

.n3s-mypage-profile-image {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  margin: 0.8em auto 0;
}
.n3s-app-meta {
  min-width: 0;
  color: #76676c;
  font-size: 0.86em;
}
.n3s-app-author {
  font-weight: bold;
}
.n3s-app-date {
  display: block;
  margin-top: 2px;
  white-space: nowrap;
}
.n3s-app-title {
  margin: 0.55em 0 0.25em;
  font-size: 1.12em;
  line-height: 1.35;
  letter-spacing: 0;
}
.n3s-app-title a {
  color: var(--n3s-sumi);
}
.n3s-app-memo {
  min-height: 3.2em;
  margin: 0;
  color: #5f5357;
  font-size: 0.92em;
  line-height: 1.6;
}
.n3s-app-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  color: #76676c;
  font-size: 0.86em;
}
.n3s-app-fav,
.n3s-app-bad {
  color: var(--n3s-sakura-accent);
  font-weight: bold;
}
.n3s-app-tags a {
  display: inline-block;
  margin-right: 0.35em;
  color: #9b6675;
}
.n3s-more,
.next_button_div {
  text-align: right;
  padding: 0.8em 0;
}
.n3s-top-users {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
}
.n3s-top-user,
.n3s-user-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--n3s-border);
  border-radius: 999px;
  background: #fff;
}
.n3s-list-actions,
.n3s-admin-links {
  max-width: 1180px;
  margin: 18px auto;
  border: 1px solid var(--n3s-border);
  border-radius: 8px;
  background: #fff;
}

.n3s-mypage-page a {
  color: var(--n3s-sakura-accent);
  text-decoration: none;
}

.n3s-mypage-nav,
.n3s-mypage-profile,
.n3s-mypage-activity-grid,
.n3s-mypage-section {
  width: min(1120px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.n3s-mypage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--n3s-border);
  font-size: 0.92em;
}

.n3s-mypage-nav a {
  padding: 5px 0;
  color: #6f6065;
  font-weight: bold;
}

.n3s-mypage-nav a:hover,
.n3s-mypage-nav a.is-current {
  color: var(--n3s-sakura-accent);
  border-bottom: 2px solid var(--n3s-sakura-accent);
}

.n3s-mypage-profile {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 30px 0 34px;
}

.n3s-mypage-profile .n3s-mypage-profile-image {
  width: 160px;
  height: 160px;
  margin: 0;
  border: 1px solid var(--n3s-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(59, 49, 52, 0.08);
}

.n3s-mypage-profile-main {
  min-width: 0;
}

.n3s-mypage-user-id {
  margin: 0 0 5px;
  color: #9b7d86;
  font-size: 0.78em;
  font-weight: bold;
}

.n3s-mypage-profile h1 {
  margin: 0;
  padding: 0;
  color: var(--n3s-sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.75em;
  line-height: 1.35;
  letter-spacing: 0;
  border: 0;
}

.n3s-mypage-description {
  max-width: 620px;
  margin: 12px 0 0;
  color: #66575c;
  line-height: 1.75;
}

.n3s-mypage-admin {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 8px;
  border: 1px solid var(--n3s-gold);
  border-radius: 4px;
  color: #856b38;
  background: #fffaf0;
  font-size: 0.78em;
}

.n3s-mypage-profile-actions {
  display: grid;
  gap: 8px;
  min-width: 160px;
}

.n3s-mypage-page .pure-button {
  border: 1px solid var(--n3s-border);
  border-radius: 6px;
  color: var(--n3s-sumi);
  background: #fff;
  box-shadow: none;
}

.n3s-mypage-page .pure-button-primary {
  border-color: var(--n3s-sakura-accent);
  color: #fff;
  background: var(--n3s-sakura-accent);
}

.n3s-mypage-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.n3s-mypage-activity-grid .n3s-mypage-section {
  width: auto;
  margin: 0;
}

.n3s-mypage-section {
  padding: 22px 0 28px;
  border-top: 3px double var(--n3s-border);
}

.n3s-mypage-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.n3s-mypage-section-head h2 {
  display: flex;
  align-items: center;
  gap: 0.45em;
  margin: 0;
  padding: 0;
  color: var(--n3s-sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.28em;
  letter-spacing: 0;
}

.n3s-mypage-section-head h2::before {
  content: "❀";
  color: var(--n3s-sakura-accent);
  font-size: 0.88em;
}

.n3s-mypage-section-head > a {
  flex: 0 0 auto;
  font-size: 0.88em;
}

.n3s-mypage-empty {
  margin: 0;
  padding: 18px 0;
  color: #817177;
}

.n3s-mypage-activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.n3s-mypage-activity-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-mypage-activity-list li:last-child {
  border-bottom: 0;
}

.n3s-mypage-activity-title {
  color: var(--n3s-sumi) !important;
  font-weight: bold;
  line-height: 1.5;
}

.n3s-mypage-activity-list p {
  margin: 5px 0 0;
  color: #66575c;
  font-size: 0.9em;
  line-height: 1.55;
}

.n3s-mypage-activity-list time {
  display: block;
  margin-top: 4px;
  color: #9b8b90;
  font-size: 0.78em;
}

.n3s-mypage-app-list {
  border-top: 1px solid var(--n3s-border);
}

.n3s-mypage-app-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-mypage-app-status span {
  display: inline-block;
  min-width: 58px;
  padding: 4px 7px;
  border-radius: 4px;
  text-align: center;
  font-size: 0.76em;
  font-weight: bold;
}

.n3s-mypage-app-status .is-public {
  color: #317250;
  background: #edf8f1;
}

.n3s-mypage-app-status .is-private {
  color: #8a5363;
  background: var(--n3s-sakura-band);
}

.n3s-mypage-app-status .is-limited {
  color: #80662f;
  background: #fff8e9;
}

.n3s-mypage-app-main {
  min-width: 0;
}

.n3s-mypage-app-main h3 {
  margin: 0;
  font-size: 1em;
  letter-spacing: 0;
}

.n3s-mypage-app-main h3 a {
  color: var(--n3s-sumi);
}

.n3s-mypage-app-main p {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 0;
  color: #8b7b80;
  font-size: 0.8em;
}

.n3s-mypage-app-actions {
  display: flex;
  gap: 6px;
}

.n3s-mypage-app-actions .pure-button {
  padding: 0.45em 0.85em;
  font-size: 0.82em;
}

.n3s-mypage-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
}

.n3s-material-list {
  border-top: 1px solid var(--n3s-border);
}

.n3s-material-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 14px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-material-preview {
  display: flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid var(--n3s-border);
  border-radius: 6px;
  color: #8a6672 !important;
  background: var(--n3s-sakura-band);
  font-size: 0.72em;
  font-weight: bold;
}

.n3s-material-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n3s-material-main {
  min-width: 0;
}

.n3s-material-main h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1em;
  letter-spacing: 0;
}

.n3s-material-main h3 a {
  color: var(--n3s-sumi);
}

.n3s-material-main p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 7px 0 0;
  color: #8b7b80;
  font-size: 0.8em;
  overflow-wrap: anywhere;
}

.n3s-material-actions .pure-button {
  padding: 0.45em 0.85em;
  font-size: 0.82em;
}

.n3s-userinfo-section {
  max-width: 860px;
}

.n3s-userinfo-form {
  display: grid;
  gap: 22px;
}

.n3s-userinfo-field label,
.n3s-userinfo-image-field legend {
  margin: 0 0 7px;
  color: var(--n3s-sumi);
  font-size: 0.9em;
  font-weight: bold;
}

.n3s-userinfo-field input[type="text"] {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #d8c4cb;
  border-radius: 6px;
  color: var(--n3s-sumi);
  background: #fff;
  box-shadow: none;
}

.n3s-userinfo-field input[type="text"]:focus,
.n3s-userinfo-image-field input[type="file"]:focus {
  border-color: var(--n3s-sakura-accent);
  outline: 2px solid rgba(209, 71, 122, 0.16);
  outline-offset: 1px;
}

.n3s-userinfo-field p,
.n3s-userinfo-image-field p {
  margin: 7px 0 0;
  color: #8b7b80;
  font-size: 0.8em;
  line-height: 1.55;
}

.n3s-userinfo-image-field {
  margin: 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--n3s-border);
}

.n3s-userinfo-image-field input[type="file"] {
  display: block;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #d8c4cb;
  border-radius: 6px;
  color: #66575c;
  background: #fff;
}

.n3s-userinfo-image-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border: 0;
  border-radius: 4px;
  color: var(--n3s-sumi);
  background: var(--n3s-sakura-band);
  cursor: pointer;
}

.n3s-userinfo-check {
  display: flex !important;
  gap: 8px;
  align-items: center;
  margin-top: 14px !important;
  color: #8a5363;
  font-size: 0.88em;
}

.n3s-userinfo-check input {
  flex: 0 0 auto;
  margin: 0;
}

.n3s-userinfo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.n3s-userinfo-message {
  margin: 0 0 20px;
  padding: 10px 12px;
  border-left: 3px solid var(--n3s-sakura-accent);
  color: #6b4c56;
  background: var(--n3s-sakura-band);
  line-height: 1.55;
}

.n3s-userinfo-details {
  margin: 0;
}

.n3s-userinfo-details > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  padding: 14px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-userinfo-details dt {
  color: #8b7b80;
  font-size: 0.86em;
  font-weight: bold;
}

.n3s-userinfo-details dd {
  margin: 0;
  color: var(--n3s-sumi);
  overflow-wrap: anywhere;
}

.n3s-upload-header,
.n3s-upload-section {
  width: min(1120px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.n3s-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px 0 28px;
}

.n3s-upload-eyebrow {
  margin: 0 0 5px;
  color: #9b7d86;
  font-size: 0.78em;
  font-weight: bold;
}

.n3s-upload-header h1 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--n3s-sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.75em;
  letter-spacing: 0;
}

.n3s-upload-form {
  display: grid;
  max-width: 820px;
  gap: 22px;
}

.n3s-upload-field label,
.n3s-upload-terms legend,
.n3s-upload-license legend,
.n3s-upload-optional legend,
.n3s-upload-url-list label {
  margin: 0 0 7px;
  color: var(--n3s-sumi);
  font-size: 0.9em;
  font-weight: bold;
}

.n3s-upload-field input[type="text"],
.n3s-upload-field input[type="number"],
.n3s-upload-url-list input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #d8c4cb;
  border-radius: 6px;
  color: var(--n3s-sumi);
  background: #fff;
  box-shadow: none;
}

.n3s-upload-field input[type="file"] {
  display: block;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #d8c4cb;
  border-radius: 6px;
  color: #66575c;
  background: #fff;
}

.n3s-upload-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border: 0;
  border-radius: 4px;
  color: var(--n3s-sumi);
  background: var(--n3s-sakura-band);
  cursor: pointer;
}

.n3s-upload-field p,
.n3s-upload-optional p {
  margin: 7px 0 0;
  color: #8b7b80;
  font-size: 0.8em;
  line-height: 1.55;
}

.n3s-upload-terms,
.n3s-upload-license,
.n3s-upload-optional {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--n3s-border);
}

.n3s-upload-check,
.n3s-upload-radio-list label {
  display: flex !important;
  gap: 8px;
  align-items: flex-start;
  color: #66575c;
  font-size: 0.9em;
  line-height: 1.5;
}

.n3s-upload-check input,
.n3s-upload-radio-list input {
  flex: 0 0 auto;
  margin: 3px 0 0;
}

.n3s-upload-radio-list {
  display: grid;
  gap: 9px;
  padding-left: 2px;
}

.n3s-upload-optional {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.n3s-upload-optional legend {
  grid-column: 1 / -1;
}

.n3s-upload-actions,
.n3s-upload-delete-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.n3s-upload-detail-grid {
  display: grid;
  grid-template-columns: minmax(180px, 400px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.n3s-upload-preview {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--n3s-border);
  border-radius: 6px;
  color: #8a6672;
  background: var(--n3s-sakura-band);
  font-weight: bold;
}

.n3s-upload-preview img {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.n3s-upload-details,
.n3s-upload-url-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.n3s-upload-details > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-upload-details dt {
  color: #8b7b80;
  font-size: 0.86em;
  font-weight: bold;
}

.n3s-upload-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.n3s-upload-url-list {
  max-width: 820px;
  gap: 7px;
  margin-top: 26px;
}

.n3s-upload-url-list label:not(:first-child) {
  margin-top: 14px;
}

.n3s-upload-danger-zone {
  color: #8a5363;
}

/* Program editor */
.n3s-edit-page {
  --n3s-editor-ink: #30292c;
  --n3s-editor-muted: #76676c;
}

.n3s-edit-notice,
.n3s-edit-header,
.n3s-edit-workspace,
.n3s-edit-actions,
.n3s-edit-material {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.n3s-edit-notice {
  margin-top: 18px;
  padding: 11px 14px;
  border-left: 3px solid var(--n3s-sakura-accent);
  color: #6b4c56;
  background: var(--n3s-sakura-band);
  line-height: 1.55;
}

.n3s-edit-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 26px;
}

.n3s-edit-heading {
  min-width: 0;
}

.n3s-edit-eyebrow,
.n3s-edit-section-label {
  margin: 0 0 5px;
  color: #9b7d86;
  font-size: 0.76em;
  font-weight: bold;
}

.n3s-edit-header h1,
.n3s-edit-workspace h2,
.n3s-edit-actions h2,
.n3s-edit-material h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--n3s-editor-ink);
  letter-spacing: 0;
}

.n3s-edit-header h1 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.75em;
  line-height: 1.35;
}

.n3s-edit-private {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid var(--n3s-border);
  border-radius: 4px;
  color: #8a5363;
  font-family: sans-serif;
  font-size: 0.42em;
  vertical-align: middle;
}

.n3s-edit-description {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--n3s-editor-muted);
  line-height: 1.6;
}

.n3s-edit-doc-links,
.n3s-edit-view-controls,
.n3s-edit-save-buttons,
.n3s-edit-version-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.n3s-edit-doc-links a {
  padding: 6px 0;
  border-bottom: 1px solid var(--n3s-border);
  color: #6f6065;
  font-size: 0.88em;
  font-weight: bold;
}

.n3s-edit-workspace {
  overflow: hidden;
  border: 1px solid var(--n3s-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(59, 49, 52, 0.09);
}

.n3s-edit-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-edit-workspace h2,
.n3s-edit-actions h2,
.n3s-edit-material h2 {
  font-size: 1.08em;
}

.n3s-edit-view-controls .pure-button,
.n3s-edit-toolbar .pure-button,
.n3s-edit-actions .pure-button,
.n3s-edit-material .pure-button {
  border: 1px solid #d8c4cb;
  border-radius: 5px;
  color: #51464a;
  background: #fff;
  box-shadow: none;
}

.n3s-edit-toolbar .pure-button-primary,
.n3s-edit-actions .pure-button-primary {
  border-color: var(--n3s-sakura-accent);
  color: #fff;
  background: var(--n3s-sakura-accent);
}

.n3s-edit-toolbar {
  padding: 12px 18px;
  border-bottom: 1px solid var(--n3s-border);
  background: #fdfafb;
}

.n3s-edit-page #controll_buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  padding: 0;
  border: 0;
  line-height: normal;
}

.n3s-edit-run-controls,
.n3s-edit-canvas-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.n3s-edit-run-controls #runButton {
  min-width: 116px;
  font-weight: bold;
}

.n3s-edit-run-controls #runButton span {
  font-size: 0.76em;
  opacity: 0.85;
}

.n3s-edit-debug {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  box-sizing: border-box;
  padding: 0 9px;
  border-left: 1px solid var(--n3s-border);
  color: #66575c;
  font-size: 0.88em;
}

.n3s-edit-breakpoints {
  align-items: center;
  gap: 6px;
  color: var(--n3s-editor-muted);
  font-size: 0.82em;
}

.n3s-edit-temp-info {
  color: #8a5363;
  font-size: 0.82em;
}

.n3s-edit-canvas-controls {
  justify-content: flex-end;
  color: var(--n3s-editor-muted);
  font-size: 0.84em;
}

.n3s-edit-canvas-label {
  font-weight: bold;
}

.n3s-edit-canvas-controls label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.n3s-edit-canvas-controls input {
  width: 76px;
  min-height: 34px;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid #d8c4cb;
  border-radius: 5px;
  background: #fff;
}

.n3s-edit-code-pane {
  min-width: 0;
  box-sizing: border-box;
  background: #fbfafb;
}

.n3s-edit-page div#nako3code,
.n3s-edit-page textarea#nako3code {
  display: block;
  width: 100%;
  min-height: 240px;
  margin: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: #fbfafb;
}

.n3s-edit-page textarea#nako3code {
  padding: 16px 18px;
  color: #272124;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1em;
  line-height: 1.6;
  resize: vertical;
}

.n3s-edit-result-pane {
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
}

.n3s-edit-page #runbox {
  min-height: 150px;
  padding: 0 18px 18px;
  box-sizing: border-box;
  overflow: auto;
  border-top: 1px solid var(--n3s-border);
}

.n3s-edit-result-head {
  margin: 0 -18px 14px;
  padding: 10px 18px;
  color: var(--n3s-editor-muted);
  background: #fdfafb;
  font-size: 0.8em;
  font-weight: bold;
}

.n3s-edit-page #nako3_output,
.n3s-edit-page #nako3_info,
.n3s-edit-page #nako3_error {
  box-sizing: border-box;
  margin: 8px 0;
  border-color: var(--n3s-border);
  border-radius: 4px;
}

.n3s-edit-page #nako3_canvas {
  display: block;
  max-width: 100%;
  margin: 8px 0;
  box-sizing: border-box;
}

.n3s-edit-page #edit-layout-lr:empty,
.n3s-edit-page #edit-layout-l:empty,
.n3s-edit-page #edit-layout-r:empty {
  display: none;
}

.n3s-edit-page #edit-layout-lr {
  width: 100%;
}

.n3s-edit-page #edit-layout-lr #nako3code {
  border-right: 1px solid var(--n3s-border);
}

.n3s-edit-page #edit-layout-lr #runbox {
  border-top: 0;
}

.n3s-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 36px;
  padding: 30px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-edit-save-buttons,
.n3s-edit-version-controls {
  margin-top: 14px;
}

.n3s-edit-recover {
  display: inline-block;
  margin-top: 16px;
  color: #795d66 !important;
  font-size: 0.84em;
}

.n3s-edit-version-area {
  align-self: start;
}

.n3s-edit-version-area summary {
  color: var(--n3s-editor-ink);
  cursor: pointer;
  font-size: 1.08em;
  font-weight: bold;
}

.n3s-edit-version-area summary::marker {
  color: var(--n3s-sakura-accent);
}

.n3s-edit-version-body {
  padding-top: 14px;
}

.n3s-edit-version-controls input {
  width: 112px;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid #d8c4cb;
  border-radius: 5px;
  color: var(--n3s-editor-ink);
  background: #fff;
}

.n3s-edit-material {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 8px;
}

.n3s-edit-material p {
  margin: 0;
  color: var(--n3s-editor-muted);
}

@media (max-width: 760px) {
  .n3s-edit-header,
  .n3s-edit-workspace-head,
  .n3s-edit-material {
    align-items: flex-start;
    flex-direction: column;
  }

  .n3s-edit-header {
    padding-top: 24px;
  }

  .n3s-edit-doc-links,
  .n3s-edit-view-controls {
    width: 100%;
  }

  .n3s-edit-view-controls .pure-button {
    flex: 1 1 auto;
  }

  .n3s-edit-page #controll_buttons {
    align-items: flex-start;
    flex-direction: column;
  }

  .n3s-edit-canvas-controls {
    justify-content: flex-start;
  }

  .n3s-edit-actions {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .n3s-edit-page #edit-layout-l,
  .n3s-edit-page #edit-layout-r {
    width: 100%;
  }

  .n3s-edit-page #edit-layout-lr #nako3code {
    border-right: 0;
  }

  .n3s-edit-page #edit-layout-lr #runbox {
    border-top: 1px solid var(--n3s-border);
  }
}

@media (max-width: 460px) {
  .n3s-edit-run-controls,
  .n3s-edit-canvas-controls {
    width: 100%;
  }

  .n3s-edit-run-controls .pure-button,
  .n3s-edit-save-buttons .pure-button {
    flex: 1 1 calc(50% - 8px);
  }

  .n3s-edit-debug {
    border-left: 0;
    padding-left: 0;
  }

  .n3s-edit-canvas-label {
    flex: 0 0 100%;
  }
}

/* Save form */
.n3s-save-page {
  --n3s-save-ink: #30292c;
  --n3s-save-muted: #76676c;
}

.n3s-save-header,
.n3s-save-notice,
.n3s-save-restore-note,
.n3s-save-form,
.n3s-save-delete-zone,
.n3s-save-danger {
  width: min(980px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.n3s-save-header {
  padding: 30px 0 28px;
}

.n3s-save-eyebrow,
.n3s-save-section-label {
  margin: 0 0 5px;
  color: #9b7d86;
  font-size: 0.76em;
  font-weight: bold;
}

.n3s-save-header h1,
.n3s-save-section h2,
.n3s-save-section h3,
.n3s-save-danger h2,
.n3s-save-notice h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--n3s-save-ink);
  letter-spacing: 0;
}

.n3s-save-header h1 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.75em;
  line-height: 1.35;
}

.n3s-save-subtitle {
  margin: 8px 0 0;
  color: var(--n3s-save-muted);
  font-size: 0.86em;
}

.n3s-save-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 16px 18px;
  border-left: 3px solid var(--n3s-sakura-accent);
  color: #6b4c56;
  background: var(--n3s-sakura-band);
}

.n3s-save-notice h2 {
  font-size: 1em;
}

.n3s-save-notice p,
.n3s-save-restore-note,
.n3s-save-muted {
  margin: 6px 0 0;
  color: var(--n3s-save-muted);
  font-size: 0.88em;
  line-height: 1.6;
}

.n3s-save-login-actions,
.n3s-save-actions,
.n3s-save-program-settings,
.n3s-save-inline-field,
.n3s-save-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.n3s-save-login-actions {
  flex: 0 0 auto;
}

.n3s-save-restore-note {
  margin-bottom: 20px;
  padding: 10px 14px;
  border-left: 3px solid var(--n3s-gold);
  background: #fffaf0;
}

.n3s-save-form {
  display: grid;
  gap: 0;
}

.n3s-save-section,
.n3s-save-terms,
.n3s-save-danger {
  padding: 26px 0;
  border-top: 1px solid var(--n3s-border);
}

.n3s-save-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.n3s-save-section-head,
.n3s-save-cover-head,
.n3s-save-advanced-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.n3s-save-section h2,
.n3s-save-danger h2 {
  font-size: 1.18em;
}

.n3s-save-section h3 {
  font-size: 1em;
}

.n3s-save-cover-head > p {
  max-width: 360px;
  margin: 0;
  color: var(--n3s-save-muted);
  font-size: 0.82em;
  line-height: 1.5;
  text-align: right;
}

.n3s-save-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.n3s-save-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--n3s-save-ink);
  font-size: 0.9em;
  font-weight: bold;
}

.n3s-save-field-wide,
.n3s-save-code-field {
  grid-column: 1 / -1;
}

.n3s-save-field small,
.n3s-save-check small {
  color: var(--n3s-save-muted);
  font-size: 0.84em;
  font-weight: normal;
  line-height: 1.5;
}

.n3s-save-page input[type="text"],
.n3s-save-page input[type="password"],
.n3s-save-page input:not([type]),
.n3s-save-page select,
.n3s-save-page textarea {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #d8c4cb;
  border-radius: 6px;
  color: var(--n3s-save-ink);
  background: #fff;
  box-shadow: none;
}

.n3s-save-page textarea#body {
  min-height: 260px;
  padding: 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.96em;
  line-height: 1.6;
  resize: vertical;
}

.n3s-save-page input[type="text"],
.n3s-save-page input[type="password"],
.n3s-save-page input:not([type]),
.n3s-save-page select {
  padding: 8px 10px;
}

.n3s-save-program-settings {
  display: grid;
  justify-content: normal;
  gap: 16px;
  margin-top: 12px;
  padding: 12px 0 0;
  border-top: 1px solid var(--n3s-border);
}

.n3s-save-inline-field {
  color: var(--n3s-save-muted);
  font-size: 0.86em;
}

.n3s-save-setting-row {
  max-width: 560px;
}

.n3s-save-inline-field > span:first-child {
  color: var(--n3s-save-ink);
  font-weight: bold;
}

.n3s-save-inline-field label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.n3s-save-inline-field input,
.n3s-save-inline-field select {
  width: auto !important;
  min-height: 36px !important;
}

.n3s-save-inline-field input {
  width: 74px !important;
}

.n3s-save-cover {
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--n3s-border);
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-save-page .cover_image_preview {
  max-width: 600px;
  margin: 0 0 12px;
}

.n3s-save-page .cover_image_preview img {
  border-color: var(--n3s-border);
  border-radius: 6px;
}

.n3s-save-page .cover_delete_label {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #66575c;
  cursor: pointer;
  font-size: 0.9em;
}

.n3s-save-page input[type="file"] {
  display: block;
  width: 100%;
  max-width: 500px;
  min-height: 42px;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #d8c4cb;
  border-radius: 6px;
  color: #66575c;
  background: #fff;
}

.n3s-save-page input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border: 0;
  border-radius: 4px;
  color: var(--n3s-save-ink);
  background: var(--n3s-sakura-band);
  cursor: pointer;
}

.n3s-save-fields-publication {
  align-items: start;
}

.n3s-save-check {
  min-height: 32px;
  align-items: flex-start;
  margin-top: 20px;
  color: #51464a;
  cursor: pointer;
  font-size: 0.9em;
  line-height: 1.5;
}

.n3s-save-page input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--n3s-sakura-accent);
  cursor: pointer;
}

.n3s-save-key-field {
  max-width: 460px;
  margin-top: 20px;
}

.n3s-save-advanced-section {
  padding-bottom: 0;
}

.n3s-save-advanced {
  padding: 22px 24px;
}

.n3s-save-advanced-trigger {
  color: #6c5059 !important;
  border-color: #d8c4cb !important;
  font-weight: bold;
}

.n3s-save-advanced-trigger:hover,
.n3s-save-advanced-trigger:focus {
  color: #653e4b !important;
  border-color: #ba8798 !important;
  background: #fdf7f9 !important;
}

.n3s-save-advanced-panel {
  max-width: 760px;
  box-sizing: border-box;
  border: 1px solid #dccbd1;
  border-left: 4px solid var(--n3s-sakura-accent);
  border-radius: 6px;
  background: #fdfafb;
}

.n3s-save-advanced-panel[hidden] {
  display: none;
}

.n3s-save-advanced-head {
  align-items: center;
}

.n3s-save-page .pure-button {
  border: 1px solid #d8c4cb;
  border-radius: 5px;
  color: #51464a;
  background: #fff;
  box-shadow: none;
}

.n3s-save-page .pure-button-primary {
  border-color: var(--n3s-sakura-accent);
  color: #fff;
  background: var(--n3s-sakura-accent);
}

.n3s-save-terms {
  margin-top: 26px;
}

.n3s-save-submit-note {
  flex-basis: 100%;
  margin: 0 0 2px;
  color: var(--n3s-save-muted);
  font-size: 0.82em;
  line-height: 1.6;
}

.n3s-save-terms-link {
  display: inline-block;
  margin: 4px 0 0 28px;
  color: var(--n3s-sakura-accent);
  font-size: 0.84em;
}

.n3s-save-actions {
  margin: 0 0 28px;
  padding: 20px 0 0;
}

.n3s-save-actions .pure-button-primary {
  min-width: 132px;
  font-weight: bold;
}

.n3s-save-delete-zone {
  margin-top: 34px;
  padding: 26px 0;
  border-top: 1px solid var(--n3s-border);
}

.n3s-save-delete-trigger {
  color: #8a5363 !important;
  border-color: #d9b8c1 !important;
  font-weight: bold;
}

.n3s-save-delete-trigger:hover,
.n3s-save-delete-trigger:focus {
  color: #743447 !important;
  border-color: #bd7890 !important;
  background: #fff7f9 !important;
}

.n3s-save-delete-panel {
  max-width: 680px;
  box-sizing: border-box;
  padding: 22px 24px;
  border: 1px solid #dfb6c2;
  border-left: 4px solid #a94460;
  border-radius: 6px;
  color: #5f2738;
  background: #fff8fa;
}

.n3s-save-delete-panel[hidden] {
  display: none;
}

.n3s-save-delete-panel h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: #762f45;
  font-size: 1.18em;
  letter-spacing: 0;
}

.n3s-save-delete-warning {
  margin: 8px 0 0;
  color: #743447;
  font-size: 0.9em;
  line-height: 1.6;
}

.n3s-save-delete-panel form {
  margin-top: 16px;
}

.n3s-save-delete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.n3s-save-page .n3s-save-delete-submit {
  color: #fff;
  border-color: #8f304c;
  background: #8f304c;
  font-weight: bold;
}

.n3s-save-page .n3s-save-delete-submit:hover,
.n3s-save-page .n3s-save-delete-submit:focus {
  color: #fff;
  border-color: #74233b;
  background: #74233b;
}

.n3s-save-danger {
  margin-top: 34px;
  color: #8a5363;
}

.n3s-save-danger form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.n3s-save-danger .n3s-save-field {
  width: min(320px, 100%);
}

@media (max-width: 700px) {
  .n3s-save-notice,
  .n3s-save-section-head,
  .n3s-save-cover-head,
  .n3s-save-advanced-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .n3s-save-login-actions {
    width: 100%;
  }

  .n3s-save-cover-head > p {
    max-width: none;
    text-align: left;
  }

  .n3s-save-fields {
    grid-template-columns: 1fr;
  }

  .n3s-save-field-wide,
  .n3s-save-code-field {
    grid-column: auto;
  }

  .n3s-save-program-settings {
    align-items: flex-start;
    flex-direction: column;
  }

  .n3s-save-advanced-panel {
    max-width: none;
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .n3s-save-header,
  .n3s-save-notice,
  .n3s-save-restore-note,
  .n3s-save-form,
  .n3s-save-danger {
    width: min(100% - 24px, 980px);
  }

  .n3s-save-login-actions .pure-button,
  .n3s-save-actions .pure-button {
    flex: 1 1 calc(50% - 8px);
  }
}

.n3s-upload-list {
  border-top: 1px solid var(--n3s-border);
}

.n3s-upload-list-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-upload-list-preview {
  display: flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--n3s-border);
  border-radius: 6px;
  color: #8a6672 !important;
  background: var(--n3s-sakura-band);
  font-size: 0.72em;
  font-weight: bold;
}

.n3s-upload-list-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n3s-upload-list-main {
  min-width: 0;
}

.n3s-upload-list-main h2 {
  margin: 0;
  padding: 0;
  font-size: 1em;
  letter-spacing: 0;
}

.n3s-upload-list-main h2 a {
  color: var(--n3s-sumi);
}

.n3s-upload-list-main p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  color: #8b7b80;
  font-size: 0.8em;
}

.n3s-mypage-management-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--n3s-border);
  border-left: 1px solid var(--n3s-border);
}

.n3s-mypage-management-links a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 58px;
  padding: 14px;
  border-right: 1px solid var(--n3s-border);
  border-bottom: 1px solid var(--n3s-border);
  color: var(--n3s-sumi);
  background: #fff;
}

.n3s-mypage-management-links a:hover {
  background: var(--n3s-sakura-band);
}

.n3s-mypage-management-links span {
  color: #817177;
  font-size: 0.78em;
}

.n3s-mypage-management-links a.is-danger strong {
  color: #a43f5d;
}

@media (max-width: 767px) {
  .n3s-list-page,
  .n3s-mypage-page {
    background: #fff;
  }
  .n3s-list-section {
    margin: 0;
    padding: 0 12px;
  }
  .n3s-list-section h1 {
    font-size: 1.18em;
    margin: 16px 0 8px;
  }
  .n3s-list-user-profile {
    display: block;
    padding: 8px 0 24px;
  }
  .n3s-list-user-profile-image {
    width: min(400px, 100%);
    height: auto;
    aspect-ratio: 1;
  }
  .n3s-list-user-profile-main {
    margin-top: 20px;
    padding-left: 14px;
  }
  .n3s-list-user-profile-main h2 {
    margin-bottom: 8px;
    font-size: 1.08em;
  }
  .n3s-tiles {
    display: block;
  }
  .n3s-app-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--n3s-border);
    border-radius: 0;
    box-shadow: none;
  }
  .n3s-app-card:hover {
    transform: none;
    box-shadow: none;
  }
  .n3s-app-card-cover {
    grid-column: 2;
    grid-row: 2;
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--n3s-border);
  }
  .n3s-app-card-body {
    display: contents;
    padding: 0;
  }
  .n3s-app-card-head {
    grid-column: 1 / 3;
    grid-row: 1;
    align-items: flex-start;
  }
  .n3s-app-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .n3s-app-title,
  .n3s-app-memo,
  .n3s-app-foot {
    grid-column: 2;
  }
  .n3s-app-title {
    margin: -4px 0 0;
    font-size: 1.02em;
  }
  .n3s-app-memo {
    min-height: 0;
    margin-top: 4px;
  }
  .n3s-app-foot {
    margin-top: 8px;
  }
  .n3s-list-actions,
  .n3s-admin-links {
    margin: 12px;
  }

  .n3s-mypage-nav,
  .n3s-mypage-profile,
  .n3s-mypage-activity-grid,
  .n3s-mypage-section {
    width: calc(100% - 24px);
  }

  .n3s-mypage-nav {
    gap: 4px 14px;
    padding-top: 10px;
  }

  .n3s-mypage-profile {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 22px 0 26px;
  }

  .n3s-mypage-profile .n3s-mypage-profile-image {
    width: 96px;
    height: 96px;
  }

  .n3s-mypage-profile h1 {
    font-size: 1.25em;
  }

  .n3s-mypage-description {
    margin-top: 8px;
    font-size: 0.88em;
  }

  .n3s-mypage-profile-actions {
    grid-column: 1 / 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .n3s-mypage-profile-actions .pure-button {
    white-space: normal;
  }

  .n3s-mypage-activity-grid {
    display: block;
  }

  .n3s-mypage-activity-grid .n3s-mypage-section {
    width: 100%;
  }

  .n3s-mypage-app-row {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
  }

  .n3s-mypage-app-actions {
    grid-column: 2;
  }

  .n3s-material-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
  }

  .n3s-material-preview {
    width: 56px;
    height: 56px;
  }

  .n3s-material-actions {
    grid-column: 2;
  }

  .n3s-userinfo-section {
    max-width: none;
  }

  .n3s-userinfo-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .n3s-userinfo-actions .pure-button {
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
  }

  .n3s-userinfo-details > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .n3s-upload-header,
  .n3s-upload-section {
    width: calc(100% - 24px);
  }

  .n3s-upload-header {
    align-items: flex-start;
    padding: 22px 0 24px;
  }

  .n3s-upload-header h1 {
    font-size: 1.3em;
  }

  .n3s-upload-optional {
    grid-template-columns: 1fr;
  }

  .n3s-upload-detail-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .n3s-upload-preview {
    min-height: 160px;
  }

  .n3s-upload-details > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .n3s-upload-list-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
  }

  .n3s-upload-list-preview {
    width: 56px;
    height: 56px;
  }

  .n3s-upload-list-row > .pure-button {
    grid-column: 2;
    justify-self: start;
  }

  .n3s-mypage-management-links {
    grid-template-columns: 1fr;
  }
}

/* Program display */
.n3s-show-page {
  --n3s-show-ink: #30292c;
  --n3s-show-muted: #76676c;
}

.n3s-show-page a {
  color: var(--n3s-sakura-accent);
  text-decoration: none;
}

.n3s-show-header,
.n3s-show-section,
.n3s-show-runbox {
  width: min(980px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.n3s-show-header {
  padding: 30px 0 26px;
}

.n3s-show-eyebrow,
.n3s-show-section-label {
  margin: 0 0 5px;
  color: #9b7d86;
  font-size: 0.76em;
  font-weight: bold;
}

.n3s-show-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.n3s-show-header h1,
.n3s-show-section h2,
.n3s-show-comment-form h3 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--n3s-show-ink);
  letter-spacing: 0;
}

.n3s-show-header h1 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.75em;
  line-height: 1.35;
}

.n3s-show-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  box-sizing: border-box;
  padding: 3px 8px;
  border: 1px solid var(--n3s-border);
  border-radius: 4px;
  color: #67575c;
  background: #fff;
  font-size: 0.76em;
  font-weight: bold;
}

.n3s-show-status.is-public {
  color: #476c5a;
  border-color: #bdd5c7;
  background: #f4faf6;
}

.n3s-show-status.is-private,
.n3s-show-status.is-limited {
  color: #8a5363;
  border-color: #dfc3cc;
  background: #fff8fa;
}

.n3s-show-description {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--n3s-show-muted);
  font-size: 0.94em;
  line-height: 1.75;
  white-space: pre-wrap;
}

.n3s-show-private-run {
  margin-top: 18px;
}

.n3s-show-page .show_cover_start.n3s-show-cover {
  width: 100%;
  max-width: none;
  min-height: clamp(210px, 30vw, 300px);
  margin: 18px 0 0;
  border-color: var(--n3s-border);
  border-radius: 6px;
}

.n3s-show-page .show_cover_start .pure-button {
  min-height: 44px;
  padding: 0.75em 1.35em;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 5px;
  background: rgba(177, 50, 96, 0.94);
  font-weight: bold;
}

.n3s-show-section {
  padding: 26px 0;
  border-top: 1px solid var(--n3s-border);
}

.n3s-show-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.n3s-show-section h2 {
  font-size: 1.18em;
}

.n3s-show-page .pure-button {
  border: 1px solid #d8c4cb;
  border-radius: 5px;
  color: #51464a;
  background: #fff;
  box-shadow: none;
}

.n3s-show-page .pure-button-primary {
  color: #fff;
  border-color: var(--n3s-sakura-accent);
  background: var(--n3s-sakura-accent);
}

.n3s-show-program {
  padding-top: 0;
  border-top: 0;
}

.n3s-show-program #nako3code {
  display: block;
  width: 100%;
  min-height: 240px;
  box-sizing: border-box;
  margin: 0;
  padding: 15px 17px;
  overflow: auto;
  border: 1px solid var(--n3s-border);
  border-radius: 6px;
  color: #30292c;
  background: #fbfafb;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.94em;
  line-height: 1.65;
  resize: vertical;
}

.n3s-show-program div#nako3code {
  padding: 0;
}

.n3s-show-size-button {
  flex: 0 0 auto;
}

.n3s-show-runbox {
  min-height: 160px;
  margin-bottom: 26px;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--n3s-border);
  border-radius: 6px;
  background: #fff;
}

.n3s-show-runbox #iframe_contents {
  width: 100%;
  height: 400px;
  margin: 0;
  padding: 0;
  border: 0;
}

.n3s-show-author,
.n3s-show-author > a,
.n3s-show-reactions,
.n3s-show-hub-links,
.n3s-show-report {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.n3s-show-author {
  min-height: 40px;
  color: var(--n3s-show-ink);
  font-weight: bold;
}

.n3s-show-author > a {
  color: var(--n3s-show-ink);
}

.n3s-show-author .n3s-user-image {
  border: 1px solid var(--n3s-border);
}

.n3s-show-author-suffix,
.n3s-show-edited,
.n3s-show-login-note {
  color: var(--n3s-show-muted);
  font-size: 0.86em;
  font-weight: normal;
}

.n3s-show-related-link {
  margin-left: 8px;
  font-size: 0.86em;
}

.n3s-show-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 18px 0 0;
}

.n3s-show-meta > div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-show-meta dt {
  color: #8b7b80;
  font-size: 0.84em;
  font-weight: bold;
}

.n3s-show-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.n3s-show-meta dd a {
  display: inline-block;
  margin-right: 8px;
}

.n3s-show-edited {
  display: block;
  margin-top: 3px;
}

.n3s-show-reactions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--n3s-border);
}

.n3s-show-fav-count {
  min-width: 30px;
  color: #9a6f20 !important;
  text-align: center;
}

.n3s-show-page .n3s-show-x-share {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #fff;
  border-color: #1d1d1f;
  background: #1d1d1f;
  font-weight: bold;
}

.n3s-show-page .n3s-show-x-share:hover,
.n3s-show-page .n3s-show-x-share:focus {
  color: #fff;
  border-color: #000;
  background: #000;
}

.n3s-show-x-icon {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: Arial, sans-serif;
  font-size: 0.72em;
  font-weight: bold;
  line-height: 1;
}

.n3s-show-accordion-trigger {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  padding: 12px 15px;
  border: 1px solid var(--n3s-border);
  border-radius: 6px;
  color: var(--n3s-show-ink);
  background: #fff !important;
  cursor: pointer;
  font: inherit;
  font-weight: bold;
  text-align: left;
}

.n3s-show-accordion-trigger:hover,
.n3s-show-accordion-trigger:focus {
  border-color: #cf9cac;
  background: #fdf7f9 !important;
}

.n3s-show-accordion-content {
  box-sizing: border-box;
  padding: 22px 24px;
  border: 1px solid var(--n3s-border);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #fff;
}

.n3s-show-private-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--n3s-sakura-accent);
  color: #8a5363;
  background: var(--n3s-sakura-band);
}

.n3s-show-link-group {
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-show-link-group:first-child {
  padding-top: 0;
}

.n3s-show-link-group label {
  display: grid;
  gap: 6px;
  color: var(--n3s-show-ink);
  font-size: 0.88em;
  font-weight: bold;
}

.n3s-show-link-group small {
  color: var(--n3s-show-muted);
  font-weight: normal;
}

.n3s-show-page .info_link {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d8c4cb;
  border-radius: 5px;
  color: #51464a;
  background: #fbfafb;
}

.n3s-show-hub-links {
  padding: 18px 0;
  border-bottom: 1px solid var(--n3s-border);
  font-size: 0.88em;
}

.n3s-show-hub-links > span {
  flex-basis: 100%;
  color: var(--n3s-show-muted);
  font-weight: bold;
}

.n3s-show-report {
  justify-content: flex-end;
  margin-top: 18px;
  color: var(--n3s-show-muted);
  font-size: 0.84em;
}

.n3s-show-comment-content {
  padding-top: 18px;
}

.n3s-show-comment-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--n3s-sakura-accent);
  color: #6b4c56;
  background: var(--n3s-sakura-band);
  line-height: 1.6;
}

.n3s-show-comment-form {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--n3s-border);
}

.n3s-show-comment-form h3 {
  font-size: 1em;
}

.n3s-show-comment-form > p,
.n3s-show-comment-login {
  color: var(--n3s-show-muted);
  font-size: 0.84em;
  line-height: 1.6;
}

.n3s-show-comment-form textarea,
.n3s-show-comment-content .reply-form-container textarea {
  width: 100%;
  min-height: 90px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d8c4cb !important;
  border-radius: 5px !important;
  color: var(--n3s-show-ink);
  background: #fff;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.n3s-show-comment-actions {
  margin-top: 10px;
  text-align: right;
}

.n3s-show-comment-login {
  margin: 0;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--n3s-border);
  text-align: center;
}

.n3s-show-comment-list {
  padding-top: 20px;
}

.n3s-show-comment-list .comment-thread {
  border-color: var(--n3s-border) !important;
}

.n3s-show-comment-list .comment-replies,
.n3s-show-comment-list .reply-form-container {
  border-color: var(--n3s-border) !important;
  background: #fdfafb !important;
}

@media (max-width: 700px) {
  .n3s-show-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .n3s-show-meta {
    grid-template-columns: 1fr;
  }

  .n3s-show-meta > div {
    grid-template-columns: 118px minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .n3s-show-header,
  .n3s-show-section,
  .n3s-show-runbox {
    width: calc(100% - 24px);
  }

  .n3s-show-header {
    padding-top: 22px;
  }

  .n3s-show-header h1 {
    font-size: 1.35em;
  }

  .n3s-show-page .show_cover_start.n3s-show-cover {
    min-height: 190px;
  }

  .n3s-show-section-head .pure-button,
  .n3s-show-reactions .pure-button {
    box-sizing: border-box;
    white-space: normal;
  }

  .n3s-show-page .n3s-show-x-share {
    margin-left: 0;
  }

  .n3s-show-meta > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .n3s-show-accordion-content {
    padding: 18px 14px;
  }

  .n3s-show-report {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

/* Comment Section Styles */
.fav-active {
  color: #ff9800 !important;
  font-weight: bold;
}
.comment-fav-btn:hover {
  opacity: 0.8;
  background-color: #f0f0f0 !important;
}
.reply-comment:last-child {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
