@charset "UTF-8";

/*!
 * PukiWiki - Yet another WikiWikiWeb clone.
 * Copyright
 *   2002-2021 PukiWiki Development Team
 *   2001-2002 Originally written by yu-ji
 * License: GPL v2 or (at your option) any later version
 *
 * Modern UI Design System
 */

/* ===================================
   CSS Variables (Design Tokens)
   =================================== */
:root {
  /* Colors - Orange Accent (atWiki-inspired) */
  --primary-color: hsl(28, 100%, 55%);
  --primary-hover: hsl(28, 100%, 48%);
  --primary-light: hsl(28, 100%, 95%);

  --secondary-color: hsl(210, 80%, 50%);
  --secondary-hover: hsl(210, 80%, 42%);
  --secondary-light: hsl(210, 80%, 95%);

  --text-primary: hsl(0, 0%, 13%);
  --text-secondary: hsl(0, 0%, 40%);
  --text-muted: hsl(0, 0%, 60%);

  --bg-primary: hsl(0, 0%, 100%);
  --bg-secondary: hsl(0, 0%, 98%);
  --bg-tertiary: hsl(0, 0%, 95%);
  --bg-accent: hsl(28, 100%, 98%);

  --border-color: hsl(0, 0%, 85%);
  --border-light: hsl(0, 0%, 92%);

  --success-color: hsl(142, 71%, 45%);
  --warning-color: hsl(38, 92%, 50%);
  --danger-color: hsl(0, 84%, 60%);
  --info-color: hsl(188, 78%, 41%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Typography */
  --font-sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

/* ===================================
   Base Styles
   =================================== */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

pre,
dl,
ol,
p,
blockquote {
  line-height: 1.6;
}

blockquote {
  margin-left: var(--spacing-xl);
  padding-left: var(--spacing-lg);
  border-left: 4px solid var(--primary-color);
  color: var(--text-secondary);
  font-style: italic;
}

body,
td {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  margin: 0;
  padding: 0;
  font-size: var(--font-size-base);
  font-family: var(--font-sans);
  line-height: 1.6;
}

textarea {
  box-sizing: border-box;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  padding: var(--spacing-sm);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ===================================
   Links
   =================================== */
a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

a:hover {
  color: var(--secondary-hover);
  text-decoration: underline;
}

a:visited {
  color: hsl(280, 50%, 45%);
}

a:active {
  color: var(--primary-color);
}

a.external-link:not(.external-link-silent)::after {
  content: url(../image/external-link.png);
  margin: 3px;
}

/* ===================================
   Headings
   =================================== */

h1,
h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-accent) 100%);
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-left: 4px solid var(--primary-color);
  margin: var(--spacing-lg) 0 var(--spacing-md) 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 3px solid var(--primary-color);
  border-top: 1px solid var(--border-light);
  border-left: 10px solid var(--primary-color);
  border-right: 5px solid var(--primary-light);
  background-color: var(--bg-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
  border-radius: var(--radius-sm);
}

h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-primary);
  border-left: 18px solid var(--primary-light);
  background-color: var(--bg-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
}

h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  margin: var(--spacing-sm) 0;
  border-radius: var(--radius-sm);
}

h1.title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color) 0%, hsl(28, 100%, 65%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: var(--spacing-md) 0 0 0;
  border: none;
  margin: var(--spacing-md) 0 0 0;
}

dt {
  font-weight: bold;
  margin-top: 1em;
  margin-left: 1em;
}

pre {
  border-top: #DDDDEE 1px solid;
  border-bottom: #888899 1px solid;
  border-left: #DDDDEE 1px solid;
  border-right: #888899 1px solid;
  padding: .5em;
  margin-left: 1em;
  margin-right: 2em;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: black;
  background-color: #F0F8FF;
}

img {
  border: none;
  vertical-align: middle;
}

ul {
  margin-top: .5em;
  margin-bottom: .5em;
  line-height: 130%;
}

em {
  font-style: italic;
}

strong {
  font-weight: bold;
}

thead td.style_td,
tfoot td.style_td {
  color: inherit;
  background-color: #D0D8E0;
}

thead th.style_th,
tfoot th.style_th {
  color: inherit;
  background-color: #E0E8F0;
}

.style_table {
  padding: 0;
  border: 0;
  margin: auto;
  text-align: left;
  color: inherit;
  background-color: #ccd5dd;
}

.style_th {
  padding: 5px;
  margin: 1px;
  text-align: center;
  color: inherit;
  background-color: #EEEEEE;
}

.style_td {
  padding: 5px;
  margin: 1px;
  color: inherit;
  background-color: #EEF5FF;
}

ul.list1 {
  list-style-type: disc;
}

ul.list2 {
  list-style-type: circle;
}

ul.list3 {
  list-style-type: square;
}

ol.list1 {
  list-style-type: decimal;
}

ol.list2 {
  list-style-type: lower-roman;
}

ol.list3 {
  list-style-type: lower-alpha;
}

.list-indent1 {
  padding-left: 16px;
  margin-left: 16px;
}

/* list-indent2,3,4 are used for leaping list level indentation */
.list-indent2 {
  padding-left: 32px;
  margin-left: 32px;
}

.list-indent3 {
  padding-left: 48px;
  margin-left: 48px;
}

.list-indent4 {
  padding-left: 64px;
  margin-left: 64px;
}

div.ie5 {
  text-align: center;
}

span.noexists {
  color: inherit;
  background-color: #FFFACC;
}

.small {
  font-size: 80%;
}

.super_index {
  color: #DD3333;
  background-color: inherit;
  font-weight: bold;
  font-size: 60%;
  vertical-align: super;
}

a.note_super {
  color: #DD3333;
  background-color: inherit;
  font-weight: bold;
  font-size: 60%;
  vertical-align: super;
}

div.jumpmenu {
  font-size: 60%;
  text-align: right;
  user-select: none;
}

hr.full_hr {
  border-style: ridge;
  border-color: #333333;
  border-width: 1px 0;
}

hr.note_hr {
  width: 90%;
  border-style: ridge;
  border-color: #333333;
  border-width: 1px 0;
  text-align: center;
  margin: 1em auto 0em auto;
}

span.size1 {
  font-size: xx-small;
  line-height: 130%;
  text-indent: 0;
  display: inline;
}

span.size2 {
  font-size: x-small;
  line-height: 130%;
  text-indent: 0;
  display: inline;
}

span.size3 {
  font-size: small;
  line-height: 130%;
  text-indent: 0;
  display: inline;
}

span.size4 {
  font-size: medium;
  line-height: 130%;
  text-indent: 0;
  display: inline;
}

span.size5 {
  font-size: large;
  line-height: 130%;
  text-indent: 0;
  display: inline;
}

span.size6 {
  font-size: x-large;
  line-height: 130%;
  text-indent: 0;
  display: inline;
}

span.size7 {
  font-size: xx-large;
  line-height: 130%;
  text-indent: 0;
  display: inline;
}

/* html.php/catbody() */
strong.word0 {
  background-color: #FFFF66;
  color: black;
}

strong.word1 {
  background-color: #A0FFFF;
  color: black;
}

strong.word2 {
  background-color: #99FF99;
  color: black;
}

strong.word3 {
  background-color: #FF9999;
  color: black;
}

strong.word4 {
  background-color: #FF66FF;
  color: black;
}

strong.word5 {
  background-color: #880000;
  color: white;
}

strong.word6 {
  background-color: #00AA00;
  color: white;
}

strong.word7 {
  background-color: #886800;
  color: white;
}

strong.word8 {
  background-color: #004699;
  color: white;
}

strong.word9 {
  background-color: #990099;
  color: white;
}

/* html.php/edit_form() */
.edit_form {
  clear: both;
}

.edit_form textarea,
.edit_form select {
  width: 95%;
}

/* pukiwiki.skin.php */
div#header {
  padding: 0;
  margin: 0;
  word-break: break-all;
}

div#navigator {
  clear: both;
  padding: 4px 0 0 0;
  margin: 0;
}

div#contents {
  display: flex;
  flex-flow: row nowrap;
  word-break: break-all;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

div#menubar {
  min-width: 12em;
  max-width: 12em;
  padding: 0;
  margin: 4px;
  font-size: 90%;
  overflow: hidden;
  order: 1;
  flex-grow: 0;
}

div#menubar ul {
  margin: 0 0 0 1em;
  padding: 0 0 0 .5em;
}

div#menubar ul li {
  line-height: 110%;
}

div#menubar h4 {
  font-size: 110%;
}

#rightbar {
  min-width: 14em;
  max-width: 14em;
  padding: 0;
  margin: 4px;
  font-size: 90%;
  overflow: hidden;
  order: 3;
  flex-grow: 0;
}

#rightbar ul {
  margin: 0 0 0 1em;
  padding: 0 0 0 .5em;
}

#rightbar ul li {
  line-height: 110%;
}

#rightbar h4 {
  font-size: 110%;
}

div#body {
  padding: 0;
  margin: 0 0 0 .5em;
  max-width: 98%;
  order: 2;
  flex-grow: 1;
}

div#note {
  clear: both;
  padding: 0;
  margin: 0;
  word-break: break-all;
}

div#attach {
  clear: both;
  padding: 0;
  margin: 0;
}

div#toolbar {
  clear: both;
  padding: 0;
  margin: 0;
  text-align: right;
}

div#lastmodified {
  font-size: 80%;
  padding: 0;
  margin: 0;
}

div#related {
  font-size: 80%;
  padding: 0;
  margin: 16px 0 0 0;
}

div#related .page_passage {
  font-size: 60%;
}

div#footer {
  font-size: 70%;
  padding: 0;
  margin: 16px 0 0 0;
}

div#banner {
  float: right;
  margin-top: 24px;
}

div#preview {
  color: inherit;
  background-color: #F5F8FF;
}

img#logo {
  float: left;
  margin-right: 20px;
}

/* aname.inc.php */
.anchor_super {
  font-size: xx-small;
  vertical-align: super;
  margin-left: .5em;
}

/* list.inc.php */
.page_passage {
  font-size: small;
}

/* calendar*.inc.php */
.style_calendar {
  padding: 0;
  border: 0;
  margin: 3px;
  color: inherit;
  background-color: #CCD5DD;
  text-align: center;
}

.style_td_caltop {
  padding: 5px;
  margin: 1px;
  color: inherit;
  background-color: #EEF5FF;
  font-size: 80%;
  text-align: center;
}

.style_td_today {
  padding: 5px;
  margin: 1px;
  color: inherit;
  background-color: #FFFFDD;
  text-align: center;
}

.style_td_sat {
  padding: 5px;
  margin: 1px;
  color: inherit;
  background-color: #DDE5FF;
  text-align: center;
}

.style_td_sun {
  padding: 5px;
  margin: 1px;
  color: inherit;
  background-color: #FFEEEE;
  text-align: center;
}

.style_td_blank {
  padding: 5px;
  margin: 1px;
  color: inherit;
  background-color: #EEF5FF;
  text-align: center;
}

.style_td_day {
  padding: 5px;
  margin: 1px;
  color: inherit;
  background-color: #EEF5FF;
  text-align: center;
}

.style_td_week {
  padding: 5px;
  margin: 1px;
  color: inherit;
  background-color: #DDE5EE;
  font-size: 80%;
  font-weight: bold;
  text-align: center;
}

/* calendar_viewer.inc.php */
div.calendar_viewer {
  color: inherit;
  background-color: inherit;
  margin-top: 20px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

span.calendar_viewer_left {
  color: inherit;
  background-color: inherit;
  float: left;
}

span.calendar_viewer_right {
  color: inherit;
  background-color: inherit;
  float: right;
}

/* clear.inc.php */
.clear {
  margin: 0;
  clear: both;
}

/* counter.inc.php */
div.counter {
  font-size: 70%;
}

/* diff.inc.php */
span.diff_added {
  color: blue;
  background-color: inherit;
}

span.diff_removed {
  color: red;
  background-color: inherit;
}

/* hr.inc.php */
hr.short_line {
  text-align: center;
  width: 80%;
  border-style: solid;
  border-color: #333333;
  border-width: 1px 0;
}

/* include.inc.php */
h5.side_label {
  text-align: center;
}

/* navi.inc.php */
ul.navi {
  margin: 0;
  padding: 0;
  text-align: center;
}

li.navi_none {
  display: block;
  float: none;
}

li.navi_left {
  display: block;
  float: left;
  text-align: left;
}

li.navi_right {
  display: block;
  float: right;
  text-align: right;
}

/* new.inc.php */
span.comment_date {
  font-size: x-small;
}

span.new1 {
  color: red;
  background-color: transparent;
  font-size: x-small;
}

span.new5 {
  color: green;
  background-color: transparent;
  font-size: xx-small;
}

/* comment.inc.php */
._p_comment_form input[name="msg"] {
  max-width: 90%;
}

/* pcomment.inc.php */
._p_pcomment_form input[name="msg"] {
  max-width: 90%;
}

/* article.inc.php */
._p_article_form input[name="subject"] {
  max-width: 82%;
}

/* popular.inc.php */
span.counter {
  font-size: 70%;
}

/* ref.inc.php */
div.img_margin {
  margin-left: 32px;
  margin-right: 32px;
}

/* vote.inc.php */
td.vote_label {
  color: inherit;
  background-color: #FFCCCC;
}

td.vote_td1 {
  color: inherit;
  background-color: #DDE5FF;
}

td.vote_td2 {
  color: inherit;
  background-color: #EEF5FF;
}

/* topicpath.inc.php */
span.topicpath-slash {
  margin: 0 0.2em;
}

span.topicpath-top {
  user-select: none;
}

/* bugtrack.inc.php */
tr.bugtrack_list_header th {
  background-color: #ffffcc;
}

tr.bugtrack_list_header th:nth-child(1) {
  min-width: 7em;
}

tr.bugtrack_list_header th:nth-child(2) {
  min-width: 2em;
}

tr.bugtrack_list_header th:nth-child(3) {
  min-width: 4em;
}

tr.bugtrack_list_header th:nth-child(4) {
  min-width: 4em;
}

tr.bugtrack_list_header th:nth-child(5) {
  min-width: 3em;
}

tr.bugtrack_state_proposal td {
  background-color: #ccccff;
}

tr.bugtrack_state_accept td {
  background-color: #ffcc99;
}

tr.bugrack_state_resolved td {
  background-color: #ccffcc;
}

tr.bugtrack_state_pending td {
  background-color: #ffccff;
}

tr.bugtrack_state_cancel td {
  background-color: #cccccc;
}

tr.bugtrack_state_undef td {
  background-color: #ff3333;
}

._p_bugtrack_form input[name="summary"],
._p_bugtrack_form textarea {
  box-sizing: border-box;
  width: 35em;
  max-width: 99.5%;
}

/* tracker.inc.php */
._p_tracker_form th {
  min-width: 5em;
}

/* search2.inc.php  */
.search-result-page-summary {
  font-size: 70%;
  color: gray;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile-friendly Responsive layout */
@media (max-width:767px) {
  div#contents {
    flex-flow: column wrap;
  }

  div#menubar {
    width: auto;
    max-width: none;
    font-size: 100%;
    order: 2;
  }

  div#rightbar {
    width: auto;
    max-width: none;
    font-size: 100%;
    order: 3;
  }

  div#body {
    order: 1;
  }

  div#body img {
    max-width: 95%;
    height: auto;
  }

  ._p_tracker_form th,
  ._p_tracker_form td {
    display: block;
    text-align: left !important;
    width: auto !important;
    margin: 0;
  }

  ._p_tracker_form td input[type=text],
  ._p_tracker_form td textarea {
    box-sizing: border-box;
    width: 99.5%;
  }

  tr.bugtrack_list_header th:nth-child(1) {
    min-width: 4em;
  }

  tr.bugtrack_list_header th:nth-child(2) {
    min-width: 1em;
  }

  tr.bugtrack_list_header th:nth-child(3) {
    min-width: 1em;
  }

  tr.bugtrack_list_header th:nth-child(4) {
    min-width: 3em;
  }

  tr.bugtrack_list_header th:nth-child(5) {
    min-width: 3em;
  }

  ._p_bugtrack_form th,
  ._p_bugtrack_form td {
    display: block;
    text-align: left !important;
    margin: 0;
  }

  ._p_bugtrack_form input[name="summary"],
  ._p_bugtrack_form textarea {
    box-sizing: border-box;
    width: 99.5%;
  }
}

@media print {

  a:link,
  a:visited {
    text-decoration: underline;
  }

  img#logo,
  div#navigator,
  div#menubar,
  div#rightbar,
  div#related,
  div#attach,
  div#toolbar {
    display: none;
  }
}

/* ===================================
   Edit & Preview Layout
   =================================== */

/* Edit-Preview Container */
.edit-preview-container {
  display: flex;
  gap: var(--spacing-lg);
  margin: var(--spacing-md) 0;
}

.edit-area {
  flex: 1;
  min-width: 0;
}

.preview-area {
  flex: 1;
  min-width: 0;
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  max-height: 80vh;
}

.preview-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: var(--spacing-2xl);
}

.preview-placeholder p {
  margin: var(--spacing-sm) 0;
}

.preview-hint {
  font-size: var(--font-size-sm);
  font-style: italic;
}

.preview-loading,
.preview-error {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  text-align: center;
}

.preview-loading {
  background-color: var(--info-color);
  color: white;
}

.preview-error {
  background-color: var(--danger-color);
  color: white;
}

/* Mobile Buttons (hidden on desktop) */
.mobile-buttons {
  display: none;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md) 0;
  border-top: 2px solid var(--border-color);
}

.mobile-buttons button {
  flex: 1;
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--font-size-lg);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-preview {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-preview:hover {
  background-color: var(--border-light);
}

.btn-publish {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-publish:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Edit buttons styling */
.edit-buttons {
  margin: var(--spacing-md) 0;
}

.edit-buttons input[type="submit"],
.edit-buttons input[type="button"] {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  margin-right: var(--spacing-sm);
}

.edit-buttons input[type="submit"]:hover,
.edit-buttons input[type="button"]:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Mobile Layout */
@media (max-width: 768px) {
  .edit-preview-container.mobile-layout {
    flex-direction: column;
  }

  .mobile-layout .preview-area {
    display: none;
    max-height: 50vh;
  }

  .mobile-layout .preview-area.active {
    display: block;
  }

  .mobile-buttons {
    display: flex;
  }

  .mobile-layout .edit-buttons {
    display: none;
  }
}

/* Desktop Layout */
@media (min-width: 769px) {
  .edit-preview-container.desktop-layout {
    flex-direction: row;
  }

  .desktop-layout .mobile-buttons {
    display: none;
  }
}